[HarfBuzz] What is the utility of the advances list?

Jonathan Kew jfkthame at googlemail.com
Tue Oct 29 03:58:04 PDT 2013


On 29/10/13 10:49, eduardo wrote:
> Is there any reason other than the kerning? Bacause it can be extracted
> quite easily using the FT_Get_Kerning function.

Many reasons. GPOS positioning is far more flexible than just kern 
pairs. E.g. there could be a simple kern for "To", but a different kern 
value to be used when the "o" has a combining accent following it.

FT_Get_Kerning will only report simple kern pairs from the 'kern' table 
(if present); I don't think it even looks at GPOS, and it certainly 
can't return any meaningful data about more general positioning rules.

Maybe you should read up about the OpenType layout process...

http://www.microsoft.com/typography/SpecificationsOverview.mspx

>
> On Tue, 29 Oct 2013 10:40:59 +0000, Jonathan Kew wrote:
>> On 29/10/13 10:19, eduardo wrote:
>>> Hi,
>>>
>>> Why does hb return a list of advances when, given a glyph, it can easily
>>> be extracted from the font? Are the glyph advances context dependant? If
>>> so, what is a good language/script to see the difference?
>>>
>>
>> Yes, of course they're context-dependent. The simplest example may be
>> kerning. If the GPOS table contains a kern pair for "AV", then the
>> advances you get from harfbuzz for the 'A' and 'V' glyphs will not be
>> the same as the individual glyph advances you'd find in the font.
>>
>> _______________________________________________
>> HarfBuzz mailing list
>> HarfBuzz at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/harfbuzz
>
> _______________________________________________
> HarfBuzz mailing list
> HarfBuzz at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/harfbuzz
>




More information about the HarfBuzz mailing list