[HarfBuzz] No kerning?

Nikolay Sivov bunglehead at gmail.com
Mon Oct 5 13:54:12 PDT 2015


On 05.10.2015 23:17, Jamie Dale wrote:
> I don't know what font data our "kerning only" implementation is using
> under the hood, but the kerning used when calculating the advance is
> from a call to FT_Get_Kerning with the FT_KERNING_DEFAULT flag. We only
> do this when FT_HAS_KERNING reports that the font has kerning data, and
> the remainder of the advance comes from the advance.x value on the
> FT_GlyphSlot for the glyph, such that:
>
> TotalAdvance = Kerning + GlyphSlotAdvanceX;

If that's the case it sounds like HB variant actually the one that gives 
you kerned advances, and not FT_Get_Kerning one, because freetype 
kerning is based on glyph pairs data from 'kern' table, and like I said 
this font doesn't have it.

I think you could try ftstring demo program from freetype-demos, to see 
if switching kerning on and off makes any difference. You can also 
visually compare output.

>
> -Jamie.
>
> On 5 October 2015 at 20:49, Nikolay Sivov <bunglehead at gmail.com
> <mailto:bunglehead at gmail.com>> wrote:
>
>     On 05.10.2015 22:32, Jamie Dale wrote:
>
>
>         The images below are using the Roboto font, and show the output from
>         each implementation.
>         The top image is using our "kerning only" implementation, and
>         the bottom
>         image is using HarfBuzz. Note that the "T" and "e" characters are
>         further apart in the bottom image.
>
>
>     Roboto-Regular.ttf from https://github.com/google/roboto doesn't
>     have 'kern' table, so the only way to enable kerning for it is to
>     use GPOS kern feature.
>
>     What does your "kerning only" implementation do? It only applies
>     this GPOS feature skipping the rest of shaping/positioning stuff?
>
>     _______________________________________________
>     HarfBuzz mailing list
>     HarfBuzz at lists.freedesktop.org <mailto:HarfBuzz at lists.freedesktop.org>
>     http://lists.freedesktop.org/mailman/listinfo/harfbuzz
>
>



More information about the HarfBuzz mailing list