After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 605655 - Pango 1.26.2 introduces kerning bug
Pango 1.26.2 introduces kerning bug
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
1.26.x
Other Linux
: Normal normal
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2009-12-29 11:00 UTC by Matt Whitlock
Modified: 2010-03-16 09:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot which demonstrates the bug using the Droid Sans font (17.61 KB, image/png)
2010-02-14 19:53 UTC, Maximilian Grothusmann
Details
Image illustrating the bug in two bisected git versions (41.68 KB, image/png)
2010-02-25 12:09 UTC, Simon Budig
Details

Description Matt Whitlock 2009-12-29 11:00:06 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".)
Comment 1 Behdad Esfahbod 2010-01-07 00:47:50 UTC
Please attach screenshots of right and wrong rendering.
Comment 2 Behdad Esfahbod 2010-01-07 00:48:51 UTC
And, what font is this?
Comment 3 Matt Whitlock 2010-01-07 00:58:13 UTC
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
Comment 4 Maximilian Grothusmann 2010-02-14 19:53:54 UTC
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.
Comment 5 Simon Budig 2010-02-25 12:09:12 UTC
Created attachment 154675 [details]
Image illustrating the bug in two bisected git versions
Comment 6 Simon Budig 2010-02-25 12:10:08 UTC
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.
Comment 7 Simon Budig 2010-02-25 13:28:10 UTC
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.
Comment 8 Behdad Esfahbod 2010-03-16 08:02:59 UTC
Ok, I believe I've tracked this bug down now.  Fixing.
Comment 9 Behdad Esfahbod 2010-03-16 08:26:20 UTC
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.
Comment 10 Simon Budig 2010-03-16 09:37:42 UTC
I can confirm that current git master renders the text correctly again.