Around 13 o'clock on Sep 7, Zenith Lau wrote:

> Sorry, do you mean that, "store the mapping table in the file system", 
> you are talking about the first idea?

I can either use a sequence of directories to encode the source font path, 
or I can create a file which maps path names to file names.  

In the first method, with the mapping:

        /usr/share/fonts -> /var/cache/fontconfig/share

the cache file:

        /usr/share/fonts/truetype/kochi/fonts.cache-1

would live in:

        /var/cache/fontconfig/share/truetype/kochi/fonts.cache-1

This is done by simply replacing the prefix of the path matching the left 
hand of the mapping with the right hand of the mapping.

The library would automatically take care of creating any necessary 
directories to create the matching directory heirarchy.

In the second method, with the mapping:

        /usr/share/fonts -> /var/cache/fontconfig/share

I'd create a cache mapping file (cache.map?), that file would live in

        /var/cache/fontconfig/share/cache.map

It would contain an entry like:

        truetype/kochi/fonts.cache-1 00001.cache-1

and the cache file

        /usr/share/fonts/truetype/kochi/fonts.cache-1

would like in:

        /var/cache/fontconfig/share/00001.cache-1

I would keep the "cache.map" file synchronized with the cache file 
contents somehow; programs would be required to open the mapping file to 
locate cache files for each directory.

> For the "configurable prefix mapping", how do it exists? 
> Also it is permissable that, there are many "<dir>" in the fonts.conf.
> Is it possible to store the mapping as properties of the "<dir>" elements?

That's a good idea -- I hadn't thought of that.  I'd thought, instead, of 
creating new configuration data which mapped names.  I like the directory 
property better.  Thanks.

Keith Packard        XFree86 Core Team        HP Cambridge Research Lab


_______________________________________________
Fonts mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/fonts

Reply via email to