[Fontconfig] pre-creating font caches in a different tree

Mike Frysinger vapier at gentoo.org
Tue Oct 4 11:45:53 PDT 2011

i'd like to run fc-cache against a different tree than "/".  a lot of utils 
have a "--root" flag for this sort of thing.  this is useful for distros which 
are preparing packages for installation.  it avoids having to run fc-cache on 
every system that deploys the fonts.

so if i ran `fc-cache -s --root /a/b/c`, it would look at /a/b/c/etc/fonts/ 
instead of /etc/fonts/.  then every dir that those config files said to use 
would transparently be prefixed with /a/b/c.  so if my config said 
<dir>/usr/share/fonts</dir> and <cachedir>/var/cache/fontconfig</cachedir>, it 
would instead scan /a/b/c/usr/share/fonts and store the cache in 

how hard do people envision this being ?

More information about the Fontconfig mailing list