PDA

View Full Version : Font issues: Qt3 Vs Qt4



kokoko3k
24th October 2007, 14:36
I all, i noticed a strange behaviour in how the fonts are rendered by Qt4 Applications compared to GTK and/or Qt3 (KDE3.5.x)

Here's a quick example:
IMAGE1: http://img520.imageshack.us/img520/9798/yaf7ge6.png

And a detailed one:
IMAGE2: http://img145.imageshack.us/img145/7676/qt3qt4kc2.png


Qt3 on the left, Qt4 on the right, as you can see, rendering done by qt3 is much more sharper, qt4 tend to smooth out the font, and i would like to have qt4 one output like qt3 one.
Also i got the same result in another gentoo system (tried both 32 and 64 bit)

Some relevant info, maybe:

> xrdb -q |grep Xft
Xft.antialias: 1
Xft.autohint: 0
Xft.dpi: 96.000000
Xft.hinting: 1
Xft.hintstyle: hintfull
Xft.rgba: rgb


cat ~/.fonts.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font" >
<edit mode="assign" name="rgba" >
<const>rgb</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hinting" >
<bool>true</bool>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hintstyle" >
<const>hintfull</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="antialias" >
<bool>true</bool>
</edit>
</match>
</fontconfig>

I'm on a gentoo system, using:
freetype 2.3.5-r2 with BC support
qt 3.3.8-r4
qt 4.3.2
Xorg version 7.2

Is this a known issue or am i missing something?

Thanks in advance.

wysota
25th October 2007, 07:24
Is it an issue? Qt4 just antialiases your fonts. In my opinion they look better than the ones in Qt3, but if you insist on disabling antialiasing, it should be possible either by changing fontconfig settings (disable antialiasing for some apps) or maybe by adjusting some settings in qtconfig (not sure about that though). For your widgets you can disable antialiasing by clearing an appropriate render hint for the painter.

kokoko3k
25th October 2007, 11:54
Is it an issue? Qt4 just antialiases your fonts. In my opinion they look better than the ones in Qt3, but if you insist on disabling antialiasing,
Even Qt3 antialiased my fonts, please, try to look better to the image i posted, so i don't insist on disabling antialiasing i'm definitely using it.


it should be possible either by changing fontconfig settings (disable antialiasing for some apps) or maybe by adjusting some settings in qtconfig (not sure about that though). For your widgets you can disable antialiasing by clearing an appropriate render hint for the painter.
I don't mind changing antialiasing config on a 'per-application' basis, i just would like Qt4 to antialias my fonts like qt3 and/or gtk do;
instead, it just seem to ignore or react strange to the hintfull parameter, and yes, it appears an issue to me, because all of my gtk and qt3 apps look (still antialiased) different.
qtconfig does not allow to change anithing about antialiasing.

Thanks anyway for answering.