I seriously don’t know how I could lived this long and used my Gentoo installation without enabling anti-alias for the rendering of fonts. For a long time I have admired Konqueror (or KHTML to be precise) for its beautiful renditions of web pages compared to Firefox, text rendering so soft and clear, thinking it was a KHTML thing. Turns out that all I had to do was to edit some files and restart X.
Following is a quick summary of what I did.
To begin with, I edited my /etc/fonts/local.conf
file until it looked something like this:
- <?xml version=”1.0″?>
- <!DOCTYPE fontconfig SYSTEM “fonts.dtd”>
- <fontconfig>
- <match target=”font”>
- <edit name=”autohint” mode=”assign”>
- <bool>true</bool>
- </edit>
- <edit name=”antialias” mode=”assign”>
- <bool>true</bool>
- </edit>
- </match>
- </fontconfig>
As you can see, it’s just a simple XML file and all I did was to enable auto-hinting and anti-aliasing by default for the whole machine. Most settings in the configuration file can be overridden by the users own ~/.fonts.conf
— except anti-aliasing. So I just set some hinting options instead:
- <?xml version=”1.0″?>
- <!DOCTYPE fontconfig SYSTEM “fonts.dtd”>
- <fontconfig>
- <dir>~/.fonts</dir>
- <match target=”font” >
- <edit mode=”assign” name=”hinting” >
- <bool>true</bool>
- </edit>
- <edit mode=”assign” name=”hintstyle” >
- <const>hinthard</const>
- </edit>
- </match>
- </fontconfig>
I also defined my screens physical display size in the Monitor
section of /etc/X11/xorg.conf
:
- DisplaySize 339 271
That’s 339×271 millimeters, a number I got (I was too lazy to measure it myself with a ruler) by running :
xdpyinfo | grep dimension
And because I’m using a nVidia graphic card I also added a couple of options in the Device
section:
- Option “UseEdidDpi” “False”
- Option “DPI” “96 x 96″
To take advantage of those small tweaks, all I had to do was to logout of any sessions and restart X:
/etc/init.d/xdm restart
And admire my desktop in its full anti-aliased glory! It’s not just a browser or KHTML thing anymore. All I can say is: OMG! It’s so cute!! LOL