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

Last updated: 16th August 2018
First published: 16th August 2018

This blog is created by Stuart Page

I'm a freelance web developer and technology consultant based in Surrey, UK, with over 10 years experience in web development, DevOps, Linux Administration, and IT solutions.

Need support with your infrastructure or web services?

Get in touch