Join us on Facebook!
— Written by Triangles on July 10, 2015 • updated on June 10, 2016 • ID 5 —
No more jagged garbage and horrible kerning thanks to a small configuration file.
During the installation of Debian testing + Xfce, both latest versions, I experienced a horrible font rendering for the entire desktop. Tweaking the font settings by removing hinting solved the issue for most of the applications, except for Chrome and Chromium.
What really worked for me was adding a small configuration file for Fontconfig in my home directory. Put the following XML in
~/.fonts.conf (create the file if it does not exist):
<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <match target="font"> <edit name="antialias" mode="assign"><bool>true</bool></edit> </match> <match target="font"> <edit name="hintstyle" mode="assign"><const>hintnone</const></edit> </match> <match target="font"> <edit mode="assign" name="hinting"><bool>false</bool></edit> </match> </fontconfig>
With that piece of XML we are basically telling Fontconfig to disable hinting for any font in the system, but leaving antialias on.
Quoting from the official Fontconfig website:
fonts.conf contains configuration information for the fontconfig library consisting of directories to look at for font information as well as instructions on editing program specified font patterns before attempting to match the available fonts.
It seems that the Appearance manager in Xfce does not fully configure the environment. Restart Chrome/Chromium and your font rendering issue should be fixed.
Recently I faced a new warning:
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 14: reading configurations from ~/.fonts.conf is deprecated. please move it to /home/[your-home]/.config/fontconfig/fonts.conf manually
which basically means that putting the font configuration in
~/.fonts.conf is now deprecated and no longer supported in the future. Just move that file into
/home/[your-home]/.config/fontconfig/ and everything will be fine.