[Fontconfig] fontconfig performance problems + FcConfigUptoDate() bug

Keith Packard keithp at keithp.com
Thu Jul 1 04:36:27 EST 2004


Around 18 o'clock on Jun 30, Lubos Lunak wrote:

> A problem with this approach is that fontconfig doesn't seem to notice font
> changes while the app is already running - is this a bug or feature?

The basic plan is to update the database whenever the application is
discovering available fonts through the listing API.  However, Qt (and
Mozilla, at least) pre-caches the set of available fonts at startup, so
these applications never see font changes after startup.  Fixing those 
applications to check for font changes with FcConfigUptoDate is a 
reasonable solution here.



> However FcConfigUptoDate() doesn't seem to work. See the attached patch. 
> First there's an obvious misplaced parenthesis making it return always false, 
> and second, even this call fails to detect font changes (e.g. adding a new 
> font to /usr/X11R6/lib/X11/fonts/truetype).

Thanks!  Not surprising that this code is horribly broken; it's never been 
used...

> May I suggest this information is simply dumped to one file and read-only 
> mmap()-ed into memory,

Yeah, I'm thinking we'll have to restructure the fonts.cache file format 
to be mmap'able.  I don't see a huge issue here; the cache file names are 
nicely versioned giving us cross-compatibility.

I'll release an updated 2.2 version shortly with your patch, as well as a
new 2.3 development snapshot.

-keith


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20040630/7c3a699d/attachment.pgp


More information about the Fontconfig mailing list