From bc5f6c42bc869c2fd4685d6fed458ed2542d17aa Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 5 Jul 2006 11:28:20 +0000 Subject: [PATCH] (ftfont_list): Pay attention to the case that FC_CAPABILITY is not defined. --- src/ftfont.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/ftfont.c b/src/ftfont.c index 82ea697b92e..fa5208312a8 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -470,8 +470,15 @@ ftfont_list (frame, spec) FC_CHARSET, FC_FILE, NULL); if (! objset) goto err; - if (otf_script[0] && ! FcObjectSetAdd (objset, FC_CAPABILITY)) - goto err; + if (otf_script[0]) + { +#ifndef FC_CAPABILITY + goto finish; +#else /* not FC_CAPABILITY */ + if (! FcObjectSetAdd (objset, FC_CAPABILITY)) + goto err; + } +#endif /* not FC_CAPABILITY */ fontset = FcFontList (NULL, pattern, objset); if (! fontset) @@ -512,6 +519,7 @@ ftfont_list (frame, spec) || this > FC_WEIGHT_MEDIUM))) continue; } +#ifdef FC_CAPABILITY if (otf_script[0]) { FcChar8 *this; @@ -521,6 +529,7 @@ ftfont_list (frame, spec) || ! strstr ((char *) this, otf_script)) continue; } +#endif /* FC_CAPABILITY */ entity = ftfont_pattern_entity (fontset->fonts[i], frame, registry); if (! NILP (entity)) val = Fcons (entity, val); -- 2.39.5