Re: fontconfig 2.4.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> "Albert" == Albert Chin <fontconfig@xxxxxxxxxxxxxxxxxxxxxxxxx> writes:

Albert> If no global /var/cache/fontconfig exists, will fontconfig
Albert> internally cache the font directories? Suboptimal but I just
Albert> want to make sure fontconfig will still work if no global
Albert> cache exists.

fonts.conf.in now has:

        <cachedir>@FC_CACHEDIR@</cachedir>
        <cachedir>~/.fontconfig</cachedir>

and the lib uses the first <cachedir/> that it can write to for saving
new cache files.

So if the global dir does not exist, ~/.fontconfig will be used.

I beleive that, if you add additional ones after ~/.fontconfig, cache
files in them will get used until and unless the lib writes out a new
cache file for the given font dir to ~/.fontconfig (or @FC_CACHEDIR@
if the process has write perms there).

So, an ideal case -- if every box mounts the nfs export at the same
mountpoint -- is to mount an nfs tree that contains at least these
three directory trees (in addition to anything non-font-related, of
course):

      the fonts themselves
      a configuration dir
      a cache dir

and have each box create a symlink in /etc/fonts/conf.d -- be sure
the symlink's name starts with digits -- pointing to a file in the
config dir on the nfs mount.  That file can specify <dir/> entries
for directories on the mount and <cachedir/> entries for matching
cache files.

The just create the cache files for each platform.

That said, I find that the caching is fast enough that it isn't a big
deal for each user to have a significantly-populated cache dir in
their $HOME.  My ~/.fontconfig currently has cache files for just the
fonts in my ~/.fonts dir.  That cache dir uses 0.70% as much disk
space as the fonts dir does.  (1928k vs 275324k for 728 font files.)

I also suspect mmap(2) performace is significantly better on most
current kernels when the files are on a local device rather than on
an nfs mount.  Not using nfs-mounted cache files may be a significant
performance win.  Especially if the export is available campus-wide.

-JimC
-- 
James Cloos <cloos@xxxxxxxxxxx>         OpenPGP: 0xED7DAEA6
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig

[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux