[HarfBuzz] Default hb_font_t scale

Konstantin Ritt ritt.ks at gmail.com
Thu Oct 1 13:54:23 PDT 2015


Here is my +1


Regards,
Konstantin

2015-09-30 14:29 GMT+04:00 Behdad Esfahbod <behdad at behdad.org>:

> Since there's been no objections, I'll go ahead and make this change.
>
> On 15-09-02 09:12 AM, Behdad Esfahbod wrote:
> > Right now default scale is 0,0 when a new font is created.  Should I
> change
> > that to upem,upem?  That sounds like a more useful default.
> >
> > Specifically, this pattern is becoming more common:
> >
> > parent_font = hb_font_create (face);
> > hb_ot_font_set_funcs (parent_font);
> >
> > font = hb_font_create_sub_font (parent_font);
> > hb_font_set_funcs(font, custom_funcs...);
> >
> > hb_font_set_scale(font, ...);
> >
> >
> > This way custom funcs can provide only a few (say, hinted h_advance)
> function
> > and everything else comes from parent_font.  For size-related things
> (like
> > glyph_extents()) that do come from parent_font, they are scaled properly
> to
> > match the scale of the new font, but that will only work if the scale of
> > parent_font is NOT zero, otherwise the extents will be converted to a
> scale of
> > zero (ie, they all become zero), then go through a division by zero!
> >
> > Changing the default scale addresses that, and plus, make "shape at font
> > units" the default behavior.
> >
> > Objections?
> >
> > Cheers,
> >
>
> --
> behdad
> http://behdad.org/
> _______________________________________________
> HarfBuzz mailing list
> HarfBuzz at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/harfbuzz
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20151002/f84f26ed/attachment.html>


More information about the HarfBuzz mailing list