[Fontconfig] separate cache file from directories?

Behdad Esfahbod behdad at cs.toronto.edu
Fri Jun 17 09:19:52 EST 2005


Hi,

I do not know the exact answer to your question, but the per-user
~/.fonts.cache-1 file is there for something along the same
lines.

behdad


On Thu, 16 Jun 2005, Han-Wen Nienhuys wrote:

>
> hi there,
>
> I've hit on a nasty problem with fontconfig within the MacOS X port of
> LilyPond. This program is delivered as a app-bundle, and can be
> installed by ordinary users, simply by drag & dropping the bundle
> somewhere.
>
> The problem is that MacOS ships with a bunch of fonts in
> /System/Library/Fonts. Whenever our application starts
> it scans this directory. This takes several minutes due to the oriental
> fonts. fc-cache cannot cache this directory, since it is not writable by
> ordinary users.
>
> I hope I'm missing an obvious solution, but a cursory glace at the FC
> sources indicate that cache files are always written in the font
> directory itself.
>
> Of course, I can kludge around this,
>
>   - mirror /System/Library/Fonts with symlinks in a writable directory
>     (I will probably use this kludge.)
>   - ask the user for their password, and run fc-cache with sudo
>   - write an installer that runs fc-cache.
>
> however, none of these strike me as elegant. It would be better if the
> cache could be stored separately from the directory, under control of
> the process-owner. This also makes more sense if -for some reason-
> applications decide to add system-wide read-only font directories that
> are normally not part of a fontconfig installation
> (/usr/share/texmf/fonts/type1 springs to mind).
>
>
>

--behdad
http://behdad.org/



More information about the Fontconfig mailing list