[NTG-context] kerning info (mkiv)

Peter Rolf indiego at gmx.net
Fri Jan 7 15:44:31 CET 2011

Am 07.01.2011 15:13, schrieb Taco Hoekwater:
> On 01/07/2011 02:48 PM, Peter Rolf wrote:
>> The character stands in the first column, followed by width, height and
>> depth (in pixel). The "*kerning" line shows the kerning value (in sp) of
>> the neighbouring character pair. No problem here.
>> But "A much longer Test graphic VATo"
>> sees no kerning for "VATo" (although the text is printed with the
>> correct kerning).
>> What am I missing? Example code is attached.
> Your code only reports a kern if it happens between the first
> occurrence of a certain glyph and is predecessor. After that
> first attempt, the
>   if not char[u] then ...
> condition evaluates to false, so no further reporting is done.
> In other words, your longer example fails to report anything for
> the "VA", "AT", and "To" combinations because all the second
> glyphs in the pairs have already been seen before in a non-kerned
> combination ("A", "lo", " T").
> You have to rethink the loop logic.
Ah, I see the problem now. Many thanks Taco!!!!! :-)

Best wishes,  Peter

More information about the ntg-context mailing list