freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] FT_HAS_KERNING


From: Werner LEMBERG
Subject: Re: [ft-devel] FT_HAS_KERNING
Date: Thu, 10 Apr 2008 23:05:09 +0200 (CEST)

> A user just sent me to a collection of fonts (ADF_Fontspack -
> Akandis Digital Foundry) that were not kerning.  I do my own kerning
> processing, but I was using FT_HAS_KERNING to determine that there
> was no need to look for kerning.

To cite the docs:

      FT_FACE_FLAG_KERNING ::
        Indicates that the face contains kerning information.  If set,
        the kerning distance can be retrieved through the function
        @FT_Get_Kerning.  Otherwise the function always return the
        vector (0,0).  Note that FreeType doesn't handle kerning data
        from the `GPOS' table (as present in some OpenType fonts).


> Well, I took that check out and indeed these fonts have a
> considerable number of GPOS kernings defined.

Today's fonts almost exclusively contain kerning via the GPOS table.

> Is there a logical reason this could happen or should I start
> digging for a possible bug/incompatibility in FreeType?

The very problem is that GPOS kerning can be context dependent.  With
other words, it's possible to construct kerning tables which need a
complete OpenType layout engine to resolve properly.  Most fonts don't
do that (this is, they just use the GPOS table to do kerning similar
to the stuff in the olf `kern' table), but even then FreeType doesn't
handle this, for good reasons.


    Werner




reply via email to

[Prev in Thread] Current Thread [Next in Thread]