[Fontconfig] Tutorial or guidance for using fontconfig

Keith Packard keithp at keithp.com
Thu Jan 15 08:49:11 PST 2009


On Thu, 2009-01-15 at 11:02 +0100, Jesper L.Nielsen wrote:

> 1: Since the NFS mount is mounted as read/write, the first embedded  
> system that boots will create the cache. Does the building of cache  
> have a lock mechanism, or might this be a race condition?

It has a locking mechanism which should be proof against even NFS
semantics.

> 2: It seems the fontcache leaves a file for every font used as it  
> runs, and that the filenames have a hostname appended to them? If this  
> is true, would it at all be possible to generate a fontconfig-cache on  
> the NFS server, if the embedded system doesn't share the same  
> hostname? Wouldn't this just generate a whole bunch of files for each  
> embedded device?

One per directory, not one per font. And, the file names have a
'platform' name embedded in them, not a host name.

> 3: Is the format of the cache files platform independent?

No, they are binary files which depend on the byte order and padding
used by the C compiler. Normally I wouldn't do this, but fontconfig
mmap's the files and uses their contents directly to reduce memory usage
and startup time.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20090115/52532328/attachment.pgp 


More information about the Fontconfig mailing list