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 <[email protected]
<mailto:[email protected]>> 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
    [email protected] <mailto:[email protected]>
    http://lists.freedesktop.org/mailman/listinfo/harfbuzz



_______________________________________________
HarfBuzz mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/harfbuzz

Reply via email to