[tex-live] fc-cache documentation ?

Werner LEMBERG wl at gnu.org
Mon Aug 29 12:32:07 CEST 2016


> At least in Linux fontconfig allows cache per user but it is a
> frequent source of problems.  I do not know why the developers
> decided that fontconfig will update its cache automatically and IMHO
> it was the right decision.

Yes, this is what Joe User wants!  You install a font, and an
application that uses fontconfig sees this font within 30 seconds or
after a new start (whatever happens earlier).  The former, however,
needs some additional code in the application which is usually
missing, so a restart makes everything work fine.

However, if no font cache exists – on Windows, there is no global font
cache for the system but usually a per-application/per-user cache –
fontconfig doesn't provide a means to find out in advance whether
creating and/or updating the cache will be expensive.  In case of
lilypond (and XeTeX probably also), it looks like the application
freezes in an endless loop, since scanning fonts can take a very long
time.  For example, scanning `NotoCJKSans.ttc' takes more than a
minute on my not so slow notebook.

Another issue is that (some?) fontconfig versions before 2.11 scan the
user's font directory `~/.fonts' (or the equivalent directory of
Windows) again and again: A cache entry gets created but it is
immediately invalidated.  If you have a large amount of fonts in that
directory, fontconfig slows down considerably.  Meanwhile, there's fix
for this behaviour, so I recommend to upgrade to the latest fontconfig
version 2.11.


    Werner



More information about the tex-live mailing list