[Fontconfig] Re: [patch]: mmapping FontConfig data structures

Behdad Esfahbod behdad at cs.toronto.edu
Sat Jun 11 03:11:47 EST 2005

On Fri, 10 Jun 2005, Patrick Lam wrote:

> Behdad Esfahbod wrote:
> Yes, it would indeed be better if the mmap file was created
> automatically, and there could be a configuration option which could
> prevent the mmap from being created.  Unfortunately, I can't think of a
> good way to prevent fontconfig from trying and failing, so I'd rather
> not create the mmap file automatically until someone (possibly me) comes
> up with a way to avoid continuous failure.  Ideally it would put
> something in the local fonts.conf file, but fontconfig doesn't have
> infrastructure to modify config files itself.

1. If cache file exists and is not an empty file and is up to
   date, use it.  Otherwise:

2. Check whether user has write permission on the target cache
   file.  Give up if not.

3. If the cache file exists, but is an empty file, give up if the
last modification time of the emtpy file is less than 24 hours

4. Create an empty file as the cache.

5. Create the cache in a temporary file.

6. If successful, rename the cache to the final name.

> Alternately, the user could run fc-mmap as part of the windowing
> environment login script, which would probably work.

That works too, yes, but not on older systems that you be simply
running modern apps, not dekstop.

> pat


More information about the Fontconfig mailing list