[HarfBuzz] Units of members of hb_glyph_position_t
behdad at behdad.org
Tue May 28 01:21:10 UTC 2019
On Mon, May 27, 2019 at 2:21 PM Eli Zaretskii <eliz at gnu.org> wrote:
> I cannot figure out in what units are these values reported, or how to
The meaning is left to the client.
> control those units (if they are under the client program's control).
They are controlled mainly using hb_font_set_scale().
> In particular, I get a huge value of x_advance for the letter U+05EA
> HEBREW LETTER TAV when it is followed by U+05BB HEBREW POINT QUBUTS.
> The value of x_advance I get is 1229, which is too large even after
> dividing by 64 (which, btw, I still am not sure is TRT in my case,
FreeType works in 26.6 fixed-point, ie. 64 units per 1.0. That's where the
64 value comes from. And you don't see it in your code because
hb_ft_font_create* sets that on hb_font for you.
In your Windows code, you should call hb_font_set_scale(). I believe right
now you are *not* calling, and you get values in the face's UPEM. That's
the default scale for fonts. You can get the face UPEM using
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the HarfBuzz