changeset 90516:43ea66432bf9

(ftfont_list): Pay attention to the case that FC_CAPABILITY is not defined.
author Kenichi Handa <handa@m17n.org>
date Wed, 05 Jul 2006 11:28:20 +0000
parents 83058d9ed764
children 8d91029af77a
files src/ftfont.c
diffstat 1 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/ftfont.c	Mon Jul 03 03:50:08 2006 +0000
+++ b/src/ftfont.c	Wed Jul 05 11:28:20 2006 +0000
@@ -470,8 +470,15 @@
 			     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 @@
 			  || this > FC_WEIGHT_MEDIUM)))
 		continue;
 	    }
+#ifdef FC_CAPABILITY
 	  if (otf_script[0])
 	    {
 	      FcChar8 *this;
@@ -521,6 +529,7 @@
 		  || ! 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);