aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ftfont.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ftfont.c b/src/ftfont.c
index 6c85bbf7896..9bdb2146d2c 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -140,7 +140,7 @@ ftfont_pattern_entity (p, frame, registry)
140 ASET (entity, FONT_SIZE_INDEX, make_number (0)); 140 ASET (entity, FONT_SIZE_INDEX, make_number (0));
141 141
142 if (FcPatternGetInteger (p, FC_SPACING, 0, &numeric) != FcResultMatch) 142 if (FcPatternGetInteger (p, FC_SPACING, 0, &numeric) != FcResultMatch)
143 numeric = FC_MONO; 143 numeric = -1;
144 file = FcStrCopy (file); 144 file = FcStrCopy (file);
145 if (! file) 145 if (! file)
146 return Qnil; 146 return Qnil;
@@ -151,7 +151,8 @@ ftfont_pattern_entity (p, frame, registry)
151 151
152 if (FcPatternAddString (p, FC_FILE, file) == FcFalse 152 if (FcPatternAddString (p, FC_FILE, file) == FcFalse
153 || (charset && FcPatternAddCharSet (p, FC_CHARSET, charset) == FcFalse) 153 || (charset && FcPatternAddCharSet (p, FC_CHARSET, charset) == FcFalse)
154 || FcPatternAddInteger (p, FC_SPACING, numeric) == FcFalse) 154 || (numeric >= 0
155 && FcPatternAddInteger (p, FC_SPACING, numeric) == FcFalse))
155 { 156 {
156 FcPatternDestroy (p); 157 FcPatternDestroy (p);
157 return Qnil; 158 return Qnil;