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

Comments (17) Trackbacks (1)
  1. Very helpful, thank you!

  2. Thank you, sir ! U just made my day :)

  3. Thanks! A big improvement to the standard font :-)

  4. Hello from Brazil, thanks a lot for this information, quite helpful.

  5. Many thanks for the tip (from a pair of presbyopic eyes)! I just applied it and everything is noticeably sharper.

  6. It works fine, thanks a lot!

  7. Hi,

    Thanks for this great tutorial, I am new to linux. One thing that is not pretty is the fonts of this distribution. I am gonna give your tutorial a try and will see how things will turn out.

  8. It really works. Thanks.

  9. Very helpful, improves fonts in Debian Wheezy 64bit with Firefox.

  10. A very helpful post! Thank you.

  11. This has changed the font rendering big time. Many thanks.

  12. thanks a lot, very helpful.

  13. Wow this makes a huge difference, especially noticeable in the atom text editor :)

  14. I can’t tell you how much this improved the font rendering on my system. Thank you SO MUCH.

  15. Great!
    This begs the question: Why?
    Why is default font throughout Debian KDE distro so crappy?
    Unbelievable!


Leave a comment