]> git.eshelyaron.com Git - emacs.git/commitdiff
(ftfont_list): Pay attention to the case that
authorKenichi Handa <handa@m17n.org>
Wed, 5 Jul 2006 11:28:20 +0000 (11:28 +0000)
committerKenichi Handa <handa@m17n.org>
Wed, 5 Jul 2006 11:28:20 +0000 (11:28 +0000)
FC_CAPABILITY is not defined.

src/ftfont.c

index 82ea697b92e5cadf89adbf9f51c6f2f33a5d9540..fa5208312a84505f0bd53865a6af46e11a3ce671 100644 (file)
@@ -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);