[Fontconfig] Re: Structure of cache files

Matthias Clasen mclasen at redhat.com
Fri Sep 23 13:52:26 EST 2005

On Thu, 2005-09-22 at 23:28 -0400, Patrick Lam wrote:
> 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).

Thats true.

> >>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.

It would probably be worth pointing this out in the fc-cache man page.

More information about the Fontconfig mailing list