[Fontconfig] Re: Structure of cache files

Patrick Lam plam at MIT.EDU
Fri Sep 23 13:28:08 EST 2005


Matthias Clasen wrote:
>>It can't possibly be platform-independent if it's to be mmapped...
>>otherwise you end up making another copy of the data before you can use
>>it, which eliminates the whole space savings benefit.
> 
> Well, you can't use it as C structures, thats true. But if you look at
> e.g. the GTK+ icon cache or the xdgmime cache formats, it is possible to
> design e.g. a hashtable in a way which allows it to be directly used
> out of a platform-neutral mmapped file.

I don't think that works as well here, since there are more complicated
data structures, especially ones that get returned to the user (so they
definitely need to be duplicated).

>>I've tested it on multiple platforms before, but please test it again.
>>It was designed to work on multiple platforms, by keeping one copy per
>>platform (all the copies are stored in the same file, but in different
>>sections).
> 
> Ah, how does that work ? Do I have to run fc-cache on all platforms I
> want to have caches for ?

Yes, you do.

pat



More information about the Fontconfig mailing list