On Fri, 6 Sep 2002, Keith Packard wrote:
>Fontconfig currently stores cached information about fonts in
>per-directory files called 'fonts.cache-<version>'. These are stored
>right in the font directories which means they'll get copied and managed
>automatically as people move fonts around.
>
>However, storing cached information in what is ostensibly a read-only
>directory is "unfriendly" and violates the FSH guidelines. This data is
>just cached versions of data available from the font files themselves and
>so the FSH says it should live (somehow) in /var/cache.
>
>I'm open to suggestions, but here's one simplistic possibility:
>
>Create a shadow heirarchy in /var/cache/fonts which mirrors the
>various font directory heirarchies and populate that at appropriate points
>with fonts.cache files.
>
>I'd do this by creating a new table of "cache prefix" mappings:
>
> /usr/share/fonts -> /var/cache/fonts/share
>
>This mapping would direct any fonts.cache files related to directories
>under /usr/share/fonts to be stored in /var/cache/fonts/share by simply
>replacing the /usr/share/fonts prefix with /var/cache/fonts/share:
>
> /usr/share/fonts/truetype/arphic/fonts-cache-1 ->
>
> /var/cache/fonts/share/truetype/arphic/fonts-cache-1
>
>Any directories not matching a configured prefix would map to themselves;
>this makes the existing configuration and cache files compatible.
>
>Does this seem like a good plan? Can anyone come up with a better way of
>moving the storage of fonts.cache into /var/cache?
Just had an idea...
/var/cache/fonts/fonts-cache-db
- like a table of contents. Maps a font directory in the
system to a fontcache file in the /var/cache/fonts directory
ie:
[/var/cache/fonts/fonts-cache-db] (or a better name)
/usr/share/fonts/TrueType:fonts.cache.ABCD-1
/usr/share/fonts/Type1:fonts.cache.BCDE-1
/usr/share/fonts/TTF/korean:fonts.cache.345C-1
Where /usr/share/fonts/TrueType is the font dir, : the separator,
fonts.cache.ABCD-1 the filename. fonts.cache.xxxx-y where xxxx
is a 4 digit hex identifier, and -y is the fontcache version.
Just a thought. Feel free to use/abuse/flame. ;o)
--
Mike A. Harris ftp://people.redhat.com/mharris
OS Systems Engineer
XFree86 maintainer
Red Hat Inc.
_______________________________________________
Fonts mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/fonts