+2005-01-04 Keith Packard <keithp@keithp.com>
+
+ * src/fccache.c: (FcCacheFontSetAdd):
+ Verify that every font pattern loaded from cache has
+ both FC_FILE and FC_FAMILY entries.
+ Attempt to fix bug #2219.
+
2004-12-29 Keith Packard <keithp@keithp.com>
* README:
font = FcNameParse (name);
if (font)
{
+ FcChar8 *family;
+
if (FcDebug () & FC_DBG_CACHEV)
printf (" dir cache file \"%s\"\n", file);
ret = FcPatternAddString (font, FC_FILE, path);
- if (ret && (!config || FcConfigAcceptFont (config, font)))
+ /*
+ * Make sure the pattern has the file name as well as
+ * already containing at least one family name.
+ */
+ if (ret &&
+ FcPatternGetString (font, FC_FAMILY, 0, &family) == FcResultMatch &&
+ (!config || FcConfigAcceptFont (config, font)))
{
frozen = FcPatternFreeze (font);
ret = (frozen != 0);