[Qt-interest] [Linux] Ugly anti-aliasing (still) in Qt 4.5

Jens Bache-Wiig jbache at trolltech.com
Fri Mar 6 09:58:51 CET 2009


I believe I can explain the differences and I should have a solution for 
you. The blog you referred to points out that you need to enable legacy 
font rendering in GTK+. This is actually a bug in GTK+ at the moment 
because it implicitly chooses legacy rendering when you select "medium" 
or "full" hinting in the LCD font configuration dialog.

This is not a bug on the Qt side at all and fixing it would mean Qt 
would have to duplicate the bug so you see why it is difficult to "fix" 
this problem while there are still open bug reports against GTK+.

Qt uses freetype to perform LCD subpixel rendering just like GTK+ so 
there is literally no difference in font rendering. If you want the 
legacy rendering you have to explicitly enable this in your freetype 
configuration. You can do this by placing the attached fonts.conf inside 
your home directory. This will instruct Qt to use the old-style 
rendering giving you a "crisper" font appearance. Some people prefer it, 
(including me) but others dont. The drawback is that it can look very 
ugly in some fonts and give much more color fringes noticable to some 
people.

Regards,
Jens


> To be honest, I haven't found any significant differences in font 
> rendering on your screenshot.
> 
> On Thu, 05 Mar 2009 23:13:34 +0300, Sebastian Krause 
> <sebastian at realpath.org> wrote:
>> Hi,
>>
>> Even though I actually like Qt, the ugly font hinting in Qt 4.x has
>> made me mostly avoid Qt applications on Linux during the last two
>> years. It used to be a known bug and I was by far not the only one
>> suffering from it:
>>
>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=448555
>>
>> A blog post from the Trolltech Labs last September made me hope to
>> finally get a solution to this problem:
>>
>> http://labs.trolltech.com/blogs/2008/09/01/subpixel-antialiasing-on-x11/
>>
>> Now that Qt 4.5 is released I installed it (the Debian packages from
>> experimental) to see if things have improved. But to my
>> disappointment it still looks the same as before. Here is a
>> screenshot to show what I mean:
>>
>> http://realpath.org/screenshots/qt.png
>>
>> In the foreground Qt with rather blurry fonts and in the background
>> Gtk, demonstrating how it is supposed to look like. I tried severeal
>> different howtos to edit the ~/fonts.conf, e.g. these two:
>>
>> http://johan.kiviniemi.name/blag/ubuntu-fonts/
>> http://martin.ankerl.com/2009/01/22/beautiful-font-hinting-in-ubuntu-810/
>>
>> But no matter what I change, Qt4 always draws the fonts in exactly
>> the same blurry way. Is there anything that I've missed and need to
>> change to fix Qt?
>>
>> Thanks,
>> Sebastian
> 


-- 
Jens Bache-Wiig - jbache at trolltech.com
Nokia - Qt Software
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fonts.conf
Type: text/xml
Size: 660 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090306/92d23ca0/attachment.xml 


More information about the Qt-interest-old mailing list