Programster's Blog

Tutorials focusing on Linux, programming, and open source

Debian 8 Gnome Desktop - Improve Font Rendering

The default font setup in Debian Gnome desktop are pretty awful. To improve this, run the following commands:

mkdir -p $HOME/.config/fontconfig/
gedit $HOME/.config/fontconfig/fonts.conf

Then save the file with the following contents.

<?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>

Now log out and in again. You should see a noticeable difference, especially with smaller fonts.

I also found it was better to open the tweak tool and change the default fonts to Deja Vu Sans Book and Deja Vu Sans Condensed, whilst also reducing the font size to 10.

References