[HarfBuzz] No kerning?

Jamie Dale jamiedale88+harfbuzz at gmail.com
Mon Oct 12 15:08:28 PDT 2015


Hmm, that's possible...

All the values we give to our font renderer from FreeType and HarfBuzz are
pre-converted into pixel space. For our old font rendering code, this meant
that the glyph metrics and kerning would have been converted into pixel
space separately before being summed together to get the final advance,
whereas HarfBuzz will calculate the advance in whichever space it uses
internally, before I can convert it into pixel space for the renderer (so
it's possible these would generate different results if there's fractional
pixel precision anywhere). In either case, the values are stored as
integers so any fractional precision from the conversion would be lost by
the time the renderer starts walking through the glyphs and drawing them.

I also just noticed this (slightly updated since I last saw it) comment
about FreeType flags, and I can say for certain that I'm *not* passing the
NO_HINTING flag in when getting the advances.

FreeType works in 26.6 mode.  Clients can decide to use that mode, and
everything
would work fine.  However, we also abuse this API for performing in
font-space,
but don't pass the correct flags to FreeType.  We just abuse the no-hinting
mode
for that, such that no rounding etc happens.  As such, we don't set ppem,
and
pass NO_HINTING as load_flags.  Would be much better to use NO_SCALE, and
scale
ourselves, like we do in uniscribe, etc.

That said, I'm still seeing the same thing when using the default FreeType
flags, so it may be unrelated.

-Jamie.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20151012/d0978e03/attachment.html>


More information about the HarfBuzz mailing list