[HarfBuzz] x_offset and y_offset

Behdad Esfahbod behdad at behdad.org
Thu Oct 25 12:47:18 PDT 2012


On 12-10-22 03:40 AM, Samiullah Khawaja wrote:
> What are the semantics of the x_offset and y_offset values.
> 
> Is x_offset is like the left bearing difference of the glyph in "freetype
> glyph_bitmap->left" and the y_offset is like the top bearing of the glyph in
> "freetype glyph_bitmap->top" (upwards distance from baseline)

They have nothing to do with bearings.  Think about it this way:  normally,
with simple Latin text set, both x_offset and y_offset are zero.  When they
are nonzero, they shift that particular glyph (and just that one.  These
offsets don't accumulate.) in the x/y direction.


> Are these values 16.16 fractional values or 26.6 fractional values?

Depends on what you set in hb_font_set_scale().  Whatever value you set there
will represent on em-square.  Up to you to interpret what the number means.

behdad



> Thanks,
> Sami
> 
> 
> 
> 
> _______________________________________________
> HarfBuzz mailing list
> HarfBuzz at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/harfbuzz
> 



More information about the HarfBuzz mailing list