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. Best wishes, Taco