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.

6 Thoughts on “Making ugly fonts pretty in Arch Linux

  1. twiebe on May 5, 2015 at 11:05 pm said:

    Thanks Kris for the great tip and thanks to Arch for pointing out the new inclusion mechanism. A small correction, for Debian Jessie at least:

    fontconfig/fonts.conf needs to be placed within the XDG_CONFIG_HOME, which by default is ~/.config.

    Therefor the correct path would be: ~/fontconfig/fonts.conf

    • Arch is definitely a LOT different than Debian, but I’m sure your comment will be helpful to the occasional Debian user who stops to read this post.

      Cheers,
      Kris

  2. cannnot copy the text man… enable right click on this website.

  3. Having ~/.fonts.conf is deprecated (as per /etc/fonts/conf.d/50-user.conf; you’d need to place it into the ~/fontconfig/fonts.conf now) and only works for a single user.
    To achieve system-wide effect, place the xml config inside /etc/fonts/conf.avail/29-prettify.conf and enable loading by symlinking it: ln -s /etc/fonts/conf.avail/29-prettify.conf /etc/fonts/conf.d/29-prettify.conf (or while in /etc/fonts/conf.d directory: ln -s ../conf.avail/29-prettify.conf).

    Otherwise, the xml config provided really works well. Thanks!

  4. Szász Edu&aac on February 12, 2012 at 7:04 pm said:

    Don't you want to share a way to make this setting the system default for all users?

Post Navigation