OMG! It’s so cute!! LOL …or How I Got Anti-Aliased Fonts

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:

  1. <?xml version=”1.0″?>
  2. <!DOCTYPE fontconfig SYSTEM “fonts.dtd”>
  3. <fontconfig>
  4. <match target=”font”>
  5. <edit name=”autohint” mode=”assign”>
  6. <bool>true</bool>
  7. </edit>
  8. <edit name=”antialias” mode=”assign”>
  9. <bool>true</bool>
  10. </edit>
  11. </match>
  12. </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.confexcept anti-aliasing. So I just set some hinting options instead:

  1. <?xml version=”1.0″?>
  2. <!DOCTYPE fontconfig SYSTEM “fonts.dtd”>
  3. <fontconfig>
  4. <dir>~/.fonts</dir>
  5. <match target=”font” >
  6. <edit mode=”assign” name=”hinting” >
  7. <bool>true</bool>
  8. </edit>
  9. <edit mode=”assign” name=”hintstyle” >
  10. <const>hinthard</const>
  11. </edit>
  12. </match>
  13. </fontconfig>

I also defined my screens physical display size in the Monitor section of /etc/X11/xorg.conf:

  1. 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:

  1. Option   “UseEdidDpi”   “False”
  2. 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

This entry was posted in Besserwisser and tagged , . Bookmark the permalink. Both comments and trackbacks are currently closed.