[vlc-devel] [PATCH 1/1] Freetype: support Android's new fonts.xml

Filip Roséen filip at atch.se
Sat Mar 11 21:42:36 CET 2017


Erhm, I have no idea why my brain decided to sprinkle *"not"* in
places where it certainly does not belong.

Sorry about the confusion (if any).

Best Regards,\
Filip Roséen

On 2017-03-11 21:34, Filip Roséen wrote:

> The above check of `*psz_val` is redundant as `atoi` will return `0`
> on an empty (or ill-formed) string.
> 
> > +        else if( !strcasecmp( "style", psz_attr ) && psz_val && *psz_val )
> > +            if( !strcasecmp( "italic", psz_val ) )
> > +                b_italic = true;
> 
> Same thing about `*psz_val` in the above, `strcasecmp` will not return
> `0` for an empty string.

Should be read as *"`strcasecmp` **will** return `0` for an empty string"*.

> 
> > +    }
> > +
> > +    if( i_weight == 700 )
> > +        b_bold = true;
> 
> As a font can be either *bold* or *not-bold* through `NewFont`, it
> might make sense to check whether `i_weight` is
> *greater-than-or-equal* to 700 (as `701` would not result in a
> *non-bold* font).

Last part should be read as *"as `701` **would** result in a
*non-bold* font"*.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170311/cf58ab8d/attachment.html>


More information about the vlc-devel mailing list