[Fontconfig] fc-cache is not always caching newly installed fonts.

Keith Packard keithp at keithp.com
Tue Oct 30 10:48:35 PDT 2007


On Fri, 2007-10-26 at 15:27 +0200, Jan Claeys wrote:
> Op woensdag 24-10-2007 om 17:22 uur [tijdzone +0800], schreef Huang
> Peng:
> > I can use 'fc-cahce -f' to re-create all caches. It's easy for me and
> > most of Linux hackers.:) But it's difficult for ordinary desktop
> > users.  And I can not add 'fc-cache -f' in POST-INSTALL script of a
> > font package, because it is too slow. Especially, when users install
> > many font packages at the same time (like installing a OS, many font
> > packages will be installed). It will invoke 'fc-cache -f' many times.
> > It waste much time. That is the problem. Hope can find an acceptable
> > solution.
> 
> I think Debian & Ubuntu do (something like) this at the moment, and it's
> really slow indeed.  But recently apt/dpkg has grown a "hooks" system
> that allows for running such commands only once after installing all
> selected packages.  That should make the wait-times acceptable.

I've just rewritten the debian fontconfig hook that runs when fonts are
installed -- it runs 'fc-cache -f' only on the directory receiving the
fonts (to make sure updates are re-cached). Then it runs 'fc-cache -s'
to make sure any directories leading to the new fonts are cached as
well. All of these are run after all fonts are installed, so each
directory is only cached once (well, twice currently, but I think that's
a bug somewhere).

Performance is quite reasonable now.

-- 
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/20071030/6432a51e/attachment.pgp 


More information about the Fontconfig mailing list