If you've ever encountered a Fontconfig warning similar to the line below, there are a couple changes you can make to prevent and fix this annoying problem in Linux.
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated.
Create folder, move file
Older versions of Fontconfig expected the configuration file (.fonts.conf) to be in the user's home directory. Now, Fontconfig expects this file -- renamed fonts.conf -- in the ~/.config/fontconfig directory.
So run these commands to create the folder, as well as move (and rename) the conf file to the new, proper, location:
# mkdir ~/.config/fontconfig
# mv ~/.fonts.conf ~/.config/fontconfig/fonts.conf
Edit config file
On many systems the Fontconfig warning gripes about a file named 50-user.conf file, located in /etc/fonts/conf.d.
So, if you continue to see the Fontconfig warning -- even after creating the new ~/.config folders -- you probably need to comment two lines that reference the old deprecated location:
<include ignore_missing="yes" deprecated="yes">~/.fonts.conf.d</include>
<include ignore_missing="yes" deprecated="yes">~/.fonts.conf</include>
This article is published as part of the IDG Contributor Network. Want to Join?