[Fontconfig] Re: fc-cache sometimes looses fonts
plam at MIT.EDU
Tue Nov 1 18:00:46 EST 2005
James Cloos wrote:
>>>>>>"Patrick" == Patrick Lam <plam at MIT.EDU> writes:
> Patrick> So I was suggesting this slightly evil thing. If you call
> Patrick> FcPatternGetString for an FC_FILE, then fontconfig will
> Patrick> silently append the path of the cache file to the path of the
> Patrick> file. ... ... ... The result is that no changes are visible
> Patrick> from the outside; no version number bumping or recompilation
> Patrick> required.
> OK. I get it now. Looks perfect.
I've implemented this now. It was kind of messy, I guess, because I had
to also copy the full pathname whenever I was duplicating an FcPattern
(and this happens a number of times). It would be nice if I could think
of a simpler solution, but this seems to work.
So, we have basenames in caches; these basenames are relative to the
cache file's (conceptual) location. (Even if we stuff them all in /var,
we know what directory the cache file belongs to.) So you can move your
directories all around the drive, or mount them in different places, and
things should continue working.
More information about the Fontconfig