You are not logged in.

#1 2008-11-27 14:42:51

valmar
Member
Registered: 2007-03-14
Posts: 55

Rendering of fonts in kde 4 and gnome 2.24 [SOLVED]

Dear all,

           I have been trying to set up fonts in my system so that gnome and kde applications look the same. I failed. I read the relevant post in these very forums, but the person that proposes the solution does not use autohinter and I do, so I cannot apply his solution. Anyway, the problem is that the spacing of letters using the same font is different in kde and gtk. For example, for the word "file" in the menubar, the F and the I and the L are closer together in GTK than in Qt. I wish I could post a screenshot.

I am using the ubuntu patches. Here is my /etc/fonts/conf.d

10-antialias.conf
10-autohint.conf
10-hinting-full.conf
10-hinting.conf
10-sub-pixel-rgb.conf
11-lcd-filter-lcddefault.conf
20-fix-globaladvance.conf
20-unhint-small-vera.conf
29-replace-bitmap-fonts.conf
30-metric-aliases.conf
30-urw-aliases.conf
40-nonlatin.conf
45-latin.conf
49-sansserif.conf
50-user.conf
51-local.conf
52-languageselector.conf
53-monospace-lcd-filter.conf
60-latin.conf
65-fonts-persian.conf
65-nonlatin.conf
69-unifont.conf
80-delicious.conf
90-synthetic.conf


My .fonts.conf is empty. I have a .Xresources file:

Xft.hintstyle: hintfull
Xft.antialias: 1
Xft.hinting: 1
Xft.autohinting: 1
Xft.dpi: 100
Xft.rgba: rgb
Xft.lcdfilter: lcddefault


that I merge with the command xrdb when X starts.

Does anyone have an idea what could be different in the Gnome and KDE setups?

Thanks for your help

         Valerio

Last edited by valmar (2009-01-09 11:04:58)

Offline

#2 2008-11-27 15:07:10

smakked
Member
From: Gold Coast , Australia
Registered: 2008-08-14
Posts: 420

Re: Rendering of fonts in kde 4 and gnome 2.24 [SOLVED]

No idea whats different but i have found KDE fonts look shocking with my GNome GTK settings, but it souldnt be like that IMOone font config for all would be ideal.


Certified Android Junkie
Arch 64

Offline

#3 2008-11-28 10:15:04

valmar
Member
Registered: 2007-03-14
Posts: 55

Re: Rendering of fonts in kde 4 and gnome 2.24 [SOLVED]

Uhm... I think I narrowed it down to being either the dpi or the lcdfilter. Does anyone know of a way to detect the "real" dpi used for the fonts, beyond the different ways to set it (xorg.conf, fonts.conf, gnome font menu, .Xresources)?

Thanks!

    Valerio

Offline

#4 2008-11-28 15:53:47

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Rendering of fonts in kde 4 and gnome 2.24 [SOLVED]

Some info here on QT4.

The most important thing to remember is that QT4 does not use Cairo, whereas Gnome does.

Offline

#5 2008-12-02 13:42:37

valmar
Member
Registered: 2007-03-14
Posts: 55

Re: Rendering of fonts in kde 4 and gnome 2.24 [SOLVED]

Thanks for the answer, I made several tests and it appears that the difference kicks in when I turn on autohinting. If I disable all hinting, specifically hinting and autohinting, the two fonts look the same.

Offline

#6 2008-12-02 14:19:54

valmar
Member
Registered: 2007-03-14
Posts: 55

Re: Rendering of fonts in kde 4 and gnome 2.24 [SOLVED]

Uhm brebs, I read the thread although it is a little too technical for me to understand. I basically replicate all my settings in .fonts.conf and .Xresources and /etc/fonts/font.conf, so everyone should read the same settings. But does the fact that one uses cairo and the other does not mean that I will never get the same fonts with hinting on the two platforms?

Thanks for your help

Offline

#7 2008-12-02 14:46:57

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Rendering of fonts in kde 4 and gnome 2.24 [SOLVED]

I'm not qualified to answer, since I don't use KDE at all. I use Gnome, which uses Cairo, which is not using ~/.fonts.conf properly anyway, as proved by the effect of cairo-respect-fontconfig.patch

So, Cairo has bugs, and QT4 has bugs sad

Offline

#8 2008-12-02 16:17:44

test1000
Member
Registered: 2005-04-03
Posts: 834

Re: Rendering of fonts in kde 4 and gnome 2.24 [SOLVED]

Maybe I shouldn't write this but an option is to just ignore it tongue Maybe the difference will be soothing to your eyes tongue


KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein

Offline

#9 2009-01-09 11:03:20

valmar
Member
Registered: 2007-03-14
Posts: 55

Re: Rendering of fonts in kde 4 and gnome 2.24 [SOLVED]

Dear All, after a long search I finally found a very accettable configuration.

First of all patched cairo using the cairo-resepect-fontconfig patch from brebs

then I applied the following patches to Qt 4.4.3:

https://bugs.launchpad.net/ubuntu/+sour … bug/217729

finally I chose the following configuration:

Autohint: yes
Hinting: yes
Hintstyle: hintmedium
Lcdfilter: lcddefault (I have the Ubuntu packages installed)
Rgba: rgb
Antialiasing: yes

Now my fonts in Qt and GTK look much more similar (not perfectly identical, but good enough!)

Thanks to anyone who helped

             Valerio

Offline

Board footer

Powered by FluxBB