Verify that every font pattern loaded from cache has both FC_FILE and
FC_FAMILY entries. Attempt to fix bug #2219.
This commit is contained in:
parent
d53461812d
commit
fce87a189b
|
@ -1,3 +1,10 @@
|
|||
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:
|
||||
|
|
|
@ -294,10 +294,18 @@ FcCacheFontSetAdd (FcFontSet *set,
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue