Bug 182828 - Font kerning issues in some cases
Summary: Font kerning issues in some cases
Status: RESOLVED WORKSFORME
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords: testcase, triaged
Depends on:
Blocks:
 
Reported: 2009-02-02 07:18 UTC by Neil Skrypuch
Modified: 2011-07-29 01:40 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Test case (964 bytes, text/html)
2009-02-02 07:19 UTC, Neil Skrypuch
Details
Screenshot of test case with Konqueror 4.2.0 and 3.5.10 (81.03 KB, image/png)
2009-02-02 07:20 UTC, Neil Skrypuch
Details
Screen shot of Skrypuch's test case with hinting disabled (25.33 KB, image/png)
2009-04-30 09:09 UTC, Matt Whitlock
Details
screenshot 4.6.5, Qt-4.7.3 (32.59 KB, image/png)
2011-07-23 12:01 UTC, Martin Koller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Neil Skrypuch 2009-02-02 07:18:19 UTC
Version:            (using KDE 4.2.0)
Compiler:          gcc version 4.1.2 (Gentoo 4.1.2 p1.1) 
OS:                Linux
Installed from:    Gentoo Packages

In some cases, letters get kerned too closely together, particularly pairs like Yo, Fi, Wo, Wa, Tw, Fr, Ve, Ty, To, Tr and WA (this is not an exhaustive list, there's probably more). In the Tr case for example, the r ends up underneath the T, which is pretty ugly looking. These font pairs looked great in KDE 3.5, and the fonts themselves haven't changed, so this is a regression.

I don't think this is Konqueror specific, but I'll attach an HTML test case, because it's the easiest way to illustrate this.
Comment 1 Neil Skrypuch 2009-02-02 07:19:10 UTC
Created attachment 30851 [details]
Test case
Comment 2 Neil Skrypuch 2009-02-02 07:20:18 UTC
Created attachment 30852 [details]
Screenshot of test case with Konqueror 4.2.0 and 3.5.10

Here's what the test case looks like for me in Konqueror 4.2.0 (on the left) and Konqueror 3.5.10 (on the right).
Comment 3 FiNeX 2009-02-03 23:01:14 UTC
moved to konqueror anyway: maybe konqueror devs could know if it is only a konqueror problem
Comment 4 Matt Whitlock 2009-04-30 07:40:03 UTC
The new Konqueror (probably by way of Qt4) is actually kerning the fonts as specified in the fonts' kerning pair tables.  The old Konqueror/Qt3/libXft was ignoring the kerning pairs specified by the fonts, so the observed difference is actually a progression, not a regression.

For reference:
http://en.wikipedia.org/wiki/File:Kerning.png

This bug should be closed as invalid, since the actual shortcoming that existed in Qt3 was fixed in Qt4.

To placate people like Neil Skrypuch who think fonts look better when their kernel pairs are ignored, maybe Qt4 should have an option to globally disable font kerning.  That enhancement request should be filed as a new Qt bug, IMO.
Comment 5 Neil Skrypuch 2009-04-30 08:24:10 UTC
Oh, interesting. However, I'm not convinced that Fi and Fr (for example) should be touching in the smaller font sizes, though I'm not sure if that's just an issue with the kerning information in the font itself.
Comment 6 Matt Whitlock 2009-04-30 09:09:03 UTC
Created attachment 33235 [details]
Screen shot of Skrypuch's test case with hinting disabled

(In reply to comment #5)
> Oh, interesting. However, I'm not convinced that Fi and Fr (for example) should
> be touching in the smaller font sizes, though I'm not sure if that's just an
> issue with the kerning information in the font itself.

That might also be an issue with your use of hinting.  Hinting distorts the intended shape of font glyphs by fudging their control points to align with the pixel grid.  See my attachment for a screen shot of your test case on my system running Konqueror 4.2.2 and Qt 4.5.1.  I have hinting disabled.
Comment 7 Martin Koller 2011-07-23 12:01:16 UTC
Testing with 4.6.5, Qt-4.7.3 this seems now ok for me.
See attached screenshot.
Comment 8 Martin Koller 2011-07-23 12:01:50 UTC
Created attachment 62112 [details]
screenshot 4.6.5, Qt-4.7.3
Comment 9 Neil Skrypuch 2011-07-29 01:40:20 UTC
For what it's worth, the kerning still looks identical for me with KDE 4.7.0 and Qt 4.7.3.