aboutsummaryrefslogtreecommitdiffstats
path: root/src/ftfont.c
diff options
context:
space:
mode:
authorPaul Eggert2011-12-10 16:56:50 -0800
committerPaul Eggert2011-12-10 16:56:50 -0800
commit8f50130c565eaf0ad7c49e4ad044c3291ecdfa71 (patch)
treec8129448cbbf387fe82667ccac02983592c688f1 /src/ftfont.c
parent85a83e2e2585a1906dec5168ed96ad521b5849ed (diff)
parent7b9d523a07395ecea505be88f45c33d73aea7038 (diff)
downloademacs-8f50130c565eaf0ad7c49e4ad044c3291ecdfa71.tar.gz
emacs-8f50130c565eaf0ad7c49e4ad044c3291ecdfa71.zip
Merge from trunk.
Diffstat (limited to 'src/ftfont.c')
-rw-r--r--src/ftfont.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/ftfont.c b/src/ftfont.c
index 9da4a98d692..2f0643a31e0 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -164,6 +164,13 @@ get_adstyle_property (FcPattern *p)
164 char *str, *end; 164 char *str, *end;
165 Lisp_Object adstyle; 165 Lisp_Object adstyle;
166 166
167#ifdef FC_FONTFORMAT
168 if ((FcPatternGetString (p, FC_FONTFORMAT, 0, &fcstr) == FcResultMatch)
169 && xstrcasecmp ((char *) fcstr, "bdf") != 0
170 && xstrcasecmp ((char *) fcstr, "pcf") != 0)
171 /* Not a BDF nor PCF font. */
172 return Qnil;
173#endif
167 if (FcPatternGetString (p, FC_STYLE, 0, &fcstr) != FcResultMatch) 174 if (FcPatternGetString (p, FC_STYLE, 0, &fcstr) != FcResultMatch)
168 return Qnil; 175 return Qnil;
169 str = (char *) fcstr; 176 str = (char *) fcstr;
@@ -272,7 +279,7 @@ ftfont_pattern_entity (FcPattern *p, Lisp_Object extra)
272 } 279 }
273 else 280 else
274 { 281 {
275 /* As this font is not scalable, parhaps this is a BDF or PCF 282 /* As this font is not scalable, perhaps this is a BDF or PCF
276 font. */ 283 font. */
277 FT_Face ft_face; 284 FT_Face ft_face;
278 285
@@ -730,7 +737,7 @@ ftfont_spec_pattern (Lisp_Object spec, char *otlayout, struct OpenTypeSpec **ots
730 737
731 if ((n = FONT_SLANT_NUMERIC (spec)) >= 0 738 if ((n = FONT_SLANT_NUMERIC (spec)) >= 0
732 && n < 100) 739 && n < 100)
733 /* Fontconfig doesn't support reverse-italic/obligue. */ 740 /* Fontconfig doesn't support reverse-italic/oblique. */
734 return NULL; 741 return NULL;
735 742
736 if (INTEGERP (AREF (spec, FONT_DPI_INDEX))) 743 if (INTEGERP (AREF (spec, FONT_DPI_INDEX)))
@@ -1462,7 +1469,7 @@ ftfont_get_bitmap (struct font *font, unsigned int code, struct font_bitmap *bit
1462 : ft_face->glyph->bitmap.pixel_mode == FT_PIXEL_MODE_LCD_V ? 8 1469 : ft_face->glyph->bitmap.pixel_mode == FT_PIXEL_MODE_LCD_V ? 8
1463 : -1); 1470 : -1);
1464 if (bitmap->bits_per_pixel < 0) 1471 if (bitmap->bits_per_pixel < 0)
1465 /* We don't suport that kind of pixel mode. */ 1472 /* We don't support that kind of pixel mode. */
1466 return -1; 1473 return -1;
1467 bitmap->rows = ft_face->glyph->bitmap.rows; 1474 bitmap->rows = ft_face->glyph->bitmap.rows;
1468 bitmap->width = ft_face->glyph->bitmap.width; 1475 bitmap->width = ft_face->glyph->bitmap.width;