Linux For Cynics One user's experiences with Linux

27Mar/1317

Improve Font Rendering in Debian

After installing Debian Testing (Wheezy), and started using Firefox (aka Iceweazel), one of the first things I noticed is that the default font rendering in Debian is not pretty.

Luckily, fixing this is very straight foward. Create a file called .fonts.conf in your home directory, and put the following contents in it:

<?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>hintslight</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="antialias">
   <bool>true</bool>
  </edit>
 </match>
  <match target="font">
    <edit mode="assign" name="lcdfilter">
      <const>lcddefault</const>
    </edit>
  </match>
</fontconfig>

This will enable subpixel-hinting and font-smoothing. Now just restart X.org (log out, then back in again). Read more here: http://wiki.debian.org/Fonts

Here's the before and after (before is on the left):
fontrendering_beforeandafter