Making ugly fonts pretty in Arch Linux

In Arch Linux, fonts may be okay, but in some apps like Google Chrome, they aren’t.

*UPDATE* This works on Debian, Crunchbang, Archbang, OpenSuSE, and probably most distributions.

Here is how to fix the fonts once and for all in Arch. It’s as simple as copy and paste.

Take the following code:

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

and paste it into a file named .fonts.conf (notice the . before fonts.conf – it needs to be there).

Log out and then log back in and your fonts should be much better – even in Google Chrome.