Font path specifications are, by default, located in /etc/fonts/fonts.conf
file, and this file should not be changed as it is overwritten by package
upgrades. File /etc/fonts/local.conf should have all the local modifications
and additions to the /etc/fonts/fonts.conf file which is system-wide, and
$HOME/.fonts should have modifications and additions which is specific for
certain user. However, regarding font paths, once specified in either of
*.conf files, they cannot be excluded - that is, all <dir>...</dir> directives
are added togehter to form search path in all files. For example, my problem
was that Helvetica font could not be rendered anti-aliased, and lot of web
sites use this font in their CSS (such as http://www.theregister.co.uk/). The
only solution was to remove the directory where these fonts have been
installed from the search path of the fontconfig. However, this specific path
was in fonts.conf file, which should never be changed. Therefore, my
suggestion is that these font paths should be moved to local.conf where they
can be manipulated easily and without fear of overwritting it with next
fontconfig upgrade build. The change is trivial, as it consists of a patch
file already present in the fontconfig ebuild that should point to local.conf
instead of font.conf.
Steps to Reproduce:
1. change fonts.conf to include all /usr/share/fonts/* directories except
for /usr/share/fonts/Type1 dir.
2. fc-cache -fv
3. emerge fontconfig
4. fc-cache -fv searches thru /usr/share/fonts/Type1 again
Helvetica font is back in its ugly form.
Move <dir></dir> directives to /etc/fonts/local.conf where they can be
I agree totally.
The <dir> tags should be in local.conf because it depends on each user and they
can be preserved.
I have wrotten to fontconfig mailing list to questioning about this problem
They certainly can't put all fonts in local.conf
in fontconfig-2.4 which is stable on all arches you can now specify directories to exclude in local.conf.