On Tue, 2009-07-21 at 10:26 +0200, Daniel Silverstone wrote:
> On Mon, 2009-07-20 at 16:41 +0100, John-Mark Bell wrote: 
> > The observant among you will have noticed that I forgot this:
> 
> I'll do this bit first so I don't forget to.
> 
> > Index: render/font.c
> > +static inline plot_font_generic_family_t plot_font_generic_family(
> > +           css_font_family css)
> > +{
> > +   plot_font_generic_family_t plot = PLOT_FONT_FAMILY_SANS_SERIF;
> 
> Personally I think it'd be neater if the default were assigned in the
> default: case of the switch() rather than here. However I don't know
> what we'd prefer in terms of style.

Done.

> > +static inline int plot_font_weight(css_font_weight css)
> > +{
> > +   int weight = 400;
> 
> Again, how about having this in the default.
> 
> switch (css) {
> case CSS_FONT_WEIGHT_100: weight = 100; break;
> ...
> case CSS_FONT_WEIGHT_NORMAL:
> default:
> case CSS_FONT_WEIGHT_400: weight = 400; break;
> ...
> 
> }
> 
> That way it's clear by fallthrough what NORMAL, BOLD and the default
> are.

Done.

> > +void font_plot_style_from_css(const struct css_style *css,
> > +           plot_font_style_t *fstyle)
> 
> Docstring for this function?

Done.

I've also dropped the use of inline, given it'll probably make GCC2
throw a fit.


J.


Reply via email to