Bug 290274 - khtml shows characters in a very simple text overlapped
Summary: khtml shows characters in a very simple text overlapped
Alias: None
Product: konqueror
Classification: Unclassified
Component: khtml (show other bugs)
Version: Git
Platform: openSUSE RPMs Linux
: NOR normal with 21 votes (vote)
Target Milestone: ---
Assignee: Konqueror Developers
Depends on:
Reported: 2011-12-31 18:06 UTC by Martin Koller
Modified: 2013-07-11 12:14 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:

screenshot of konqueror with overlapping chars (2.61 KB, image/png)
2011-12-31 18:06 UTC, Martin Koller
hintslight vs. hintfull when using Konqueror (with KHTML) or Akregator (241.80 KB, image/jpeg)
2012-03-28 13:54 UTC, eric

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Koller 2011-12-31 18:06:17 UTC
Version:           0.0.1 (using Devel) 
OS:                Linux

This very trivial HTML text (below) shows that the last "y" character overlaps its previous "3" character. This happens since I upgraded to 4.8-RC1/Qt4.8.0 (before I used 4.6.5)


I attach a screenshot.

In a plain Qt4.8.0 test application with a QTextEdit I do not see this bug. Also when using KWebKit-Part I don't see this problem, so it is a khtml bug only.

Reproducible: Always

Steps to Reproduce:
see details

Expected Results:  
no overlapping

OS: Linux (i686) release
Compiler: gcc
openSuse 11.3
Comment 1 Martin Koller 2011-12-31 18:06:50 UTC
Created attachment 67284 [details]
screenshot of konqueror with overlapping chars
Comment 2 Rex Dieter 2012-01-03 11:52:26 UTC
I cannot reproduce this (on fedora 16, x86_64, kde-4.7.95)
Comment 3 Martin Koller 2012-01-03 12:04:44 UTC
It probably depends on the default font, which is here "Nimbus Sans L".
Also with "Liberation Sans" and other fonts I see the bug.

Minimum Fontsize = 10

Any other settings which might influence this ?
Comment 4 Martin Koller 2012-01-03 12:09:01 UTC
Maybe this is related to bug 290485 ?
Comment 5 Rex Dieter 2012-01-03 13:15:07 UTC
still can't reproduce this with any combination of --graphicssystem (native or raster) or switching to Liberation Sans (was using DejaVu previously)
Comment 6 Martin Koller 2012-01-03 23:44:14 UTC
Ok, I found out. It has to do with the MediumFontSize configuration.
When this is 10 or 11 when I have the MinimumFontSize=10 then you'll see the problem.
When I have MediumFontSize=12 then you don't see the problem.
But all this together only when you have the following inside ~/.fonts.conf

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
 <match target="font">
  <edit mode="assign" name="hintstyle">

I don't know why I have that file at all. I sure did not create it manually, but from the timestamp I see that it was last modified in June last year, so long before my upgrade to 4.8rc1
Comment 7 Martin Koller 2012-01-03 23:53:44 UTC
I found out that this file (.fonts.conf) is created by the KDE kcm for the fonts in the Anti-Aliasing configuration and when I set hinting style to slight.
Comment 8 Martin Koller 2012-01-23 19:10:30 UTC
In the meantime I have upgraded my installation to openSuse 12.1 but I'm now back on KDE 4.7.2 but still with Qt4.8.0 - and the problem is still there.
So this seems to be a regression with Qt (or it's a bug in khtml which shows just now)
Comment 9 eric 2012-03-28 13:54:52 UTC
Created attachment 69970 [details]
hintslight vs. hintfull when using Konqueror (with KHTML) or Akregator
Comment 10 eric 2012-03-28 13:56:58 UTC
Comment on attachment 69970 [details]
hintslight vs. hintfull when using Konqueror (with KHTML) or Akregator

I can confirm this when using hintslight with Konqueror (with KHTML-engine) or Kontact (Akregator).

When I change the fontsettings (in /etc/fonts/conf.d) to hintfull the fontspacing looks correct.
Konqueror with Webkit-engine also have correct fontspacing (no matter which hintstyle is used).
Graphicssystem (native or raster) have no influence.
Comment 11 eric 2012-04-07 15:05:36 UTC
The bug is still there after upgrading to KDE-4.8.2 and Qt-4.8.1.
The first time I've seen this bug is with KDE-4.8.1 or maybe KDE-4.8.0.

More information about the attachment in comment #9:
Bug is visible on the startup screen of Akregator when:
- Setting in /etc/fonts/conf.d the hintstyle to hintslight;
- Setting in Akregator the Standard font to Arial, Candara or Verdana;
- Setting in Akregator the Medium font size to 11
Using hintfull will make the bug disappear, using an other font or fontsize will make the bug less visible.

More information that may be important:
- Output of 'xdpyinfo | grep dots' is '96x96 dots per inch'
- Graphicssystem set to native or raster makes no difference;
- Different versions of freetype2 makes no difference