GNOME Bugzilla – Bug 605655
Pango 1.26.2 introduces kerning bug
Last modified: 2010-03-16 09:37:42 UTC
I'm using the Corbel font as my system font. Pango 1.26.2 introduces a kerning problem between the letters in "PC". The problem did not exist in Pango 1.26.1. Here is a Flash screen capture depicting the problem: http://www.mattwhitlock.com/pangobug.html (Please disregard my typo where I typed "Pango 2.26.1". It should be "Pango 1.26.1".)
Please attach screenshots of right and wrong rendering.
And, what font is this?
Font is Corbel, which comes bundled with the Microsoft PowerPoint Viewer 2007 and also comes with Windows Vista. Screencast showing both incorrect and correct rendering, caret navigation, and selection is here: http://www.mattwhitlock.com/pangobug.html
Created attachment 153793 [details] Screenshot which demonstrates the bug using the Droid Sans font The kerning of Droid Sans is affected as well. There is a huge gap in between the 'r1' and 't1' glyph pairs, as you can see from this screenshot.
Created attachment 154675 [details] Image illustrating the bug in two bisected git versions
I have encountered this bug as well, with a different Font, which unfortunately is licensed by our company, so I cannot attach it here. I have however git-bisected the bug down: the first bad commit is commit 29010456474a512c4193f2fec583c2723f3e2806, I have attached an image illustrating the problem. Interestingly the font in question is a modified version from another font, that does *not* expose this problem (at least not with the "r"). Please feel free to contact me if you need further information or test renderings.
I can further report that reverting the commit 29010456 (one small conflict with the Null-Pool - whatever that is) fixes the rendering in the current master, although that one probably would reopen bug #602660.
Ok, I believe I've tracked this bug down now. Fixing.
Ok, I believe I've fixed this bug. Please test and report ASAP since I need to make the release for GNOME 2.30 really soon! [HB] Fix the mystery bug! A couple bugs joined forces to exhibit the mystery behavior of crashes / infinite loops on OS X / wrong kerning / invalid memory access. Pooh! The bugs were involved: - Wrong pointer math with ValueRecord in PairPosFormat1 - Fallout from avoiding flex arrays, code not correctly updated to remove sizeof() usage. We strictly never use sizeof() directly now. And the PairPos code is cleaned up. Should fix them all. Bugs are: Bug 605655 - Pango 1.26.2 introduces kerning bug Bug 611229 - Pango reads from uninitialized memory Bug 593240 - (pangoosx) Crash / infinite loop with Mac OS X We were also doing wrong math converting Device adjustments to hb_position_t. Fallout from FreeType days. Should shift 16, not 6. Fixed that too. There's still another bug: we don't sanitize Device records referenced from value records. Fixing that also.
I can confirm that current git master renders the text correctly again.