On 1/22/07, Keith Packard <[EMAIL PROTECTED]> wrote:
On Sun, 2007-01-21 at 23:08 +1100, Angus Lees wrote:
> hrm. you're right - we need to run fc-cache on the directories we
> didn't need to symlink to ..
Would it be better to add the new font directories to the fontconfig
configuration instead of symlinking the files to /var?
I can do so, but the symlinking seems simpler. defoma tracks fonts by
filename, so its possible for fonts to be scattered anywhere in the
filesystem. How does the fontconfig searching/caching mechanism scale?
For example, a naive implementation would add 40+ <dir>s to cover the fonts
from tetex-extra alone. Is this ok?
defoma's priority mechanism for resolving FontName conflicts (in
fontconfig's case) also relies on using the symlinks to communicate that
information to fontconfig - but I suspect noone actually cares about that
feature so we can lose that..
Aside: are the cache files for <dir> directories always written to
/var/cache/fontconfig/ now?
Oh, and we need to use --force for all directories; updating font files
won't regenerate cache files otherwise.
Sure, I thought any change to the font files would trigger an mtime check
somewhere so we wouldn't need --force, but I guess you don't stat every
file. Just replace the fc-cache line in fontconfig.defoma with this:
Latest patch:
system('fc-cache', '--force', $PkgDir);
system('fc-cache', keys(%fccache_dirs)) if %fccache_dirs;
We now want:
system('fc-cache', '--force', $PkgDir, keys(%fccache_dirs));
--
- Gus