[Fontconfig] blacklisting doesn't work

Patrick Lam plam at MIT.EDU
Sat Oct 22 23:26:29 EST 2005


Keith Packard wrote:
> You know, the timestamp of the global cache file *doesn't matter* -- all
> of the directories are scanned when you use a global cache, so any
> changes in the config will be reflected in the global cache
> automatically.

I don't think that's quite true.  FcDirScanConfig checks for a global
cache for a directory (FcGlobalCacheReadDir), then for a per-dir cache,
and then scans the directory.  If FcGlobalCacheReadDir finds the scanned
directory, it returns the cached data, without checking to see that the
data is out of date or not.

Now, FcGlobalCacheLoad does check the global cache time against the
directory time:

        if (stat ((char *) name_buf, &dir_stat) < 0 ||
            dir_stat.st_mtime > cache_stat.st_mtime)
		// skip dir

but this doesn't check for config updates.  I still think we need an
extra clause checking the whole cache file against the whole config
file, otherwise fontconfig will be impervious to changes in the config.

pat



More information about the Fontconfig mailing list