Improve font rendering in Debian

A recent identi.ca discussion led me to notice that font rendering in Debian “squeeze” is still not on par with other distributions. It seems that there are patches to the libcairo2 library that would improve that, but they have for some reason not been applied.

Fortunately there is a really easy way to do this without any compiling: if you’re using the mozilla.debian.net version of Iceweasel 4.0 (Debian’s rebranded Firefox) you may already have a patched libcairo2. I currently have 1.10.2-1.1~bpo60+1 from their squeeze-backports/iceweasel-4.0 distribution.

After realising this I still wondered why my fonts looked bad. Turns out you still need to have a ~/.fonts.conf file with the following contents to enable it:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <match target="font">
    <edit mode="assign" name="lcdfilter">
      <const>lcddefault</const>
    </edit>
  </match>
</fontconfig>

You might need to log out and in again for the settings to take effect in Gnome. Many thanks to Eric for pointing these two things out in his blog post.

Comment on this blog post in this identi.ca conversation.

Posted by Mats Sjöberg.