Bugzilla – Bug 131128
Kerning problem with underlined characters in Gtk applications
Last modified: 2006-04-24 21:47:57 UTC
(bugreport as mentioned in e-mail communication with Mike Fabian and assigned) There's a problem with Gtk+ applications when rendering fonts black and white. The problem is shown in the attached screenshot: Each time a letter is underlined, the space to the next character is too small. It looks like wrong kerning. The problem doesn't only occure on TrueType fonts but only on bitmap fonts like "Adobe Helvetica", so it cannot be a bug in FreeType. Following test case: test@hugo:~> xdpyinfo |grep resolu resolution: 96x96 dots per inch test@hugo:~> xrdb -query|grep Xft test@hugo:~> grep DisplayS /etc/X11/xorg.conf DisplaySize 338 270 I tested with a new user and IceWM running, so there's no daemon that might change configuration. The corresponding .gtkrc (with the used font) and fonts.conf is attached. I didn't change the system-wide font configuration. Interesting: If I set Xft.dpi: 96 in my ~/.Xresources (and do xrdb -merge ~/.Xresources, of course), the problem doesn't happen in "normal" Gtk applications anymore -- with the execpetion of SWT applications: RSSowl, Eclipse and Azureus (the BitTorrent client). I tried to compile Pango without Cairo support, but there was no change. So I assume it's a Gtk bug ...
Created attachment 55777 [details] The screenshot
Created attachment 55778 [details] fonts.conf
Created attachment 55779 [details] gtkrc
Because of the SWT difference, I reported a bug at SWT. I just thought that IBM has more manpower than SuSE. https://bugs.eclipse.org/bugs/show_bug.cgi?id=116155 Quite interesting bug ...
This has turned into https://bugs.freedesktop.org/show_bug.cgi?id=5200
There is apparently an upstream solution now.
Created attachment 78654 [details] pango-131128-round-pango-units.diff This is what went into Pango CVS HEAD.
... but that patch doesn't apply to our version of Pango. It looks like pangocairo-fcfont.c got a lot of modifications since then.
Created attachment 79774 [details] pango-131128-font-extents-rounding.diff
Submitted to autobuild. This will appear in the next version of the pango package. * Mon Apr 24 2006 - federico@novell.com - Added pango-131128-font-extents-rounding.diff to fix https://bugzilla.novell.com/show_bug.cgi?id=131128. This makes PangoCairoFcFont round the font extents before exposing them to callers, which produces better results with unhinted / un-antialiased displays.