[Fontconfig] Problem with FcConfigUpdate() when directory timestamps are in the future

Sayamindu Dasgupta sayamindu at gmail.com
Thu Jan 31 11:36:57 PST 2008


Hi,
At the OLPC, we have been dealing with our web browser (which is based
on Xulrunner) hogging up 100% CPU during page rendering if the system
time is somehow set backwards. After some investigation, we found that
this was due to timestamps of some of the font directories set in the
future. Xulrunner calls FcConfigUptoDate() a bunch of times[1], which
returns FcFalse in each case, even after new caches have been created,
since the comparison in FcConfigUptoDate() is made between the
directory (and .conf file) mtimes (which is in the future) and the
value obtained from time() when the FcConfig is created.

In such a situation, is there a possible workaround for this ? I tried
to take advantage of the fact that newer versions of fontconfig stores
the font directory mtime in the cache[2], but I am not sure how to
handle the fact that the .conf configuration files may also have their
timestamps in the future.

Thanks,
Sayamindu


[1] http://lxr.mozilla.org/seamonkey/source/gfx/thebes/src/gfxFontconfigUtils.cpp#247
[2] https://bugs.freedesktop.org/show_bug.cgi?id=12107
-- 
Sayamindu Dasgupta
[http://sayamindu.randomink.org/ramblings]


More information about the Fontconfig mailing list