[tex-live] fc-cache documentation ?

Reinhard Kotucha reinhard.kotucha at web.de
Mon Aug 29 02:57:42 CEST 2016

On 2016-08-28 at 08:50:06 +0100, Philip Taylor wrote:

 > Philip Taylor wrote:
 > One quick check for cache validity would be to record the
 > last-modified date of each of the font directories and compare the
 > current value with the recorded value; if the current value is more
 > recent, the cache is potentially invalid; if the current value is
 > earlier than the recorded date, an internal consistency check error
 > should be signalled.

If XeTeX consults fontconfig only in order to map font names to file
names, a list of file names should be sufficient.  LuaTeX is different
in this respect because it converts OTF to Lua and thus has to
recreate the cache whenever a newer version of a particular font is

Creating cache files is an expensive operation.  LuaTeX rebuilds the
cache whenever you try to access a font which doesn't exist.  Maybe
XeTeX does something similar.

However, LuaTeX rebuilds the cache also if you misspelled the font
name in your TeX file.

It would be nice to determine first whether the cache has to be
updated at all.  Comparing directory listings is an inexpensive
operation.  XeTeX could use fontconfig (fonts.conf) in order to
obtain a list of directories containing fonts and in LuaTeX,
luaotfload maintains a list of font directories by itself.

Checking in advance whether rebuilding the caches is necessery at all
by an inexpensive operation can save a lot of time, especially when
people misspell font names in their TeX files.

Phil, I really appreciate your suggestion.  There is no reason to
update the caches if nothing had changed.  And detecting changes in a
few directories is a cheap operation which takes only a few


Reinhard Kotucha                            Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                    mailto:reinhard.kotucha at web.de

More information about the tex-live mailing list