]> git.eshelyaron.com Git - emacs.git/commitdiff
(ftfont_pattern_entity): If the pattern doesn't contain
authorKenichi Handa <handa@m17n.org>
Tue, 1 Aug 2006 02:40:50 +0000 (02:40 +0000)
committerKenichi Handa <handa@m17n.org>
Tue, 1 Aug 2006 02:40:50 +0000 (02:40 +0000)
FC_SPACING, don't assuce FC_MONO.

src/ftfont.c

index 6c85bbf7896954df08b5f3f282e6436d9b2790e2..9bdb2146d2ccbe97b8daf1bb1edd8994bbe7da3c 100644 (file)
@@ -140,7 +140,7 @@ ftfont_pattern_entity (p, frame, registry)
     ASET (entity, FONT_SIZE_INDEX, make_number (0));
 
   if (FcPatternGetInteger (p, FC_SPACING, 0, &numeric) != FcResultMatch)
-    numeric = FC_MONO;
+    numeric = -1;
   file = FcStrCopy (file);
   if (! file)
     return Qnil;
@@ -151,7 +151,8 @@ ftfont_pattern_entity (p, frame, registry)
 
   if (FcPatternAddString (p, FC_FILE, file) == FcFalse
       || (charset && FcPatternAddCharSet (p, FC_CHARSET, charset) == FcFalse)
-      || FcPatternAddInteger (p, FC_SPACING, numeric) == FcFalse)
+      || (numeric >= 0
+         && FcPatternAddInteger (p, FC_SPACING, numeric) == FcFalse))
     {
       FcPatternDestroy (p);
       return Qnil;