Bug 178877 - font settings causes cropped chars
Summary: font settings causes cropped chars
Status: RESOLVED WORKSFORME
Alias: None
Product: plasma4
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Unspecified
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2008-12-27 12:23 UTC by Andreas Kuhl
Modified: 2009-04-25 19:02 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
.fonts.conf configuration causing the cropped chars (619 bytes, application/octet-stream)
2009-03-31 09:36 UTC, Andreas Kuhl
Details
Screenshot showing the cropped chars (168.02 KB, image/png)
2009-03-31 09:38 UTC, Andreas Kuhl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kuhl 2008-12-27 12:23:38 UTC
Version:            (using Devel)
Installed from:    Compiled sources

If I enable certain font settings in .fonts.conf file, plasmoids cropping of some last chars:
http://imagebin.ca/view/qZfk7xg.html

My .fonts.conf file:
http://pastebin.ca/1294469

I suspect the problem to be the "autohint" setting in the config file (lines 24-28), without autohint beeing enabled, the chars are no longer cropped (but the whole font smoothing looks not as half as good).

Additionally, I have full RGB subpixel hinting enabled in systemsettings font module.

Found in KDE 4.2 Beta 2 (4.1.85) on openSUSE 11.1.
Comment 1 Aaron J. Seigo 2008-12-27 18:30:55 UTC
Qt provides the text layout and painting; i'm not sure if this is something broken in fontconfig, Qt or elsewhere, but this is upstream of us.
Comment 2 Andreas Kuhl 2008-12-28 14:08:25 UTC
I filed the bug over at the Qt team, let's see if they can make something out of my report.
Comment 3 Andreas Kuhl 2009-03-31 09:35:46 UTC
I reported the bug upstream to Trolltech in december. Afterwards, Trolltech's Andy Nichols contacted me and we tried to pinpoint the bug.

After several tests and weeks of email communication, Andy Nichols reported that he could definetly say that the bug is NOT caused upstream by the Qt libs:

"I can make all of these things occur using plasma and KDE, but when I
load the UI file that displays the Options pages with just Qt 4.4.3,
with the fonts.conf file set, and the Oxygen Style set I can not
recreate the error.  When I load the UI file directly from my version
of Qt 4.4.3 and Qt 4.5.0Beta I get no rendering error, but I do when I
view the form through KDE4->Plasma->FolderView->Settings with 4.4.3
(Qt-Copy) I get the same error.  Unfortunatly until I reproduce the
problem without using KDE, and see a rendering error in a program that
is linked against a non-patched Qt Build, I can not report the problem
because it will be rejected."

Could you please check back and verify that the bug should be re-opened here in KDE bugzilla?

Also, that line edit in the form is a KLineEdit, not a QLineEdit.
Comment 4 Andreas Kuhl 2009-03-31 09:36:52 UTC
Created attachment 32493 [details]
.fonts.conf configuration causing the cropped chars
Comment 5 Andreas Kuhl 2009-03-31 09:38:38 UTC
Created attachment 32494 [details]
Screenshot showing the cropped chars

Have a look at the attached screenshot: I marked an upper left and a lower right spot. The upper left spot is the title setting which affects the rendered text in the lower right spot. I noticed that the text cursor in the upper left corner is optically placed before the last "r" char (i have drawn a fake red cursor in the picture), but typing additional chars append them behind the last "r", as you would expect.

I assume that the text length is calculated wrong. So not only the last char 
in the plasmoid title is cropped (because Qt "thinks" the text ends here) but 
also the cursor is placed at this position in text fields.
Comment 6 Dario Andres 2009-04-25 18:04:47 UTC
Is this still valid with an updated KDE and Qt builds ?

Here using:

Qt: 4.5.0 + qt-copy-patches-942255
KDE: 4.2.70 (KDE 4.2.70 (KDE 4.3 >= 20090415))
kdelibs svn rev. 958964 / kdebase svn rev. 958965
on ArchLinux i686 - Kernel 2.6.29.1

I can't reproduce the bug with the provided fonts.conf.
Have you tried with another font ?

Thanks
Comment 7 Andreas Kuhl 2009-04-25 18:58:37 UTC
OMG, changing the font fixed it!!! I used SegoeUI and thought that was a quality font, but using a different font (now Lucida Sans) shows no longer cropped chars.

Is it the built-in kerning of certain fonts which causes this odd behaviour?
Comment 8 Dario Andres 2009-04-25 19:02:32 UTC
I guess that the combination of some fonts and some kerning/aliasing configuration may lead to this kind of issues