3

I would like to add a new directory to my user's font directories. To achieve that, I've added the following file:

$ cat ~/.config/fontconfig/conf.d/dropbox-fonts.conf 
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <dir>~/Dropbox/fonts</dir>
</fontconfig>

The reason for using a separate file is that it's easier for me to define it with Puppet.

However, the fonts are not picked up. As soon as I create a symlink from ~/Dropbox/fonts to ~/.fonts/fonts they are picked up.

How can I define an additional font directory in a separate file?

2
  • 1
    Could you run FC_DEBUG=1024 fc-cache, to check that your new config file is being loaded without errors?
    – JigglyNaga
    May 18 '16 at 8:56
  • @JigglyNaga - that was useful, thanks! The problem was that the config file did not have a numerical prefix, e.g. 10-blabla.conf . It works now May 18 '16 at 11:56
4

The configuration file was not being picked up since it is apparently necessary to have a numerical prefix for the files placed in conf.d directories, e.g. ~/.config/fontconfig/conf.d/10-dropbox-fonts.conf works, while ~/.config/fontconfig/conf.d/dropbox-fonts.conf does not.

The leading 10- in the file name makes the difference.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.