summaryrefslogtreecommitdiff
path: root/src/ftfont.c
diff options
context:
space:
mode:
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)
char *str, *end;
Lisp_Object adstyle;
+#ifdef FC_FONTFORMAT
+ if ((FcPatternGetString (p, FC_FONTFORMAT, 0, &fcstr) == FcResultMatch)
+ && xstrcasecmp ((char *) fcstr, "bdf") != 0
+ && xstrcasecmp ((char *) fcstr, "pcf") != 0)
+ /* Not a BDF nor PCF font. */
+ return Qnil;
+#endif
if (FcPatternGetString (p, FC_STYLE, 0, &fcstr) != FcResultMatch)
return Qnil;
str = (char *) fcstr;
@@ -272,7 +279,7 @@ ftfont_pattern_entity (FcPattern *p, Lisp_Object extra)
}
else
{
- /* As this font is not scalable, parhaps this is a BDF or PCF
+ /* As this font is not scalable, perhaps this is a BDF or PCF
font. */
FT_Face ft_face;
@@ -730,7 +737,7 @@ ftfont_spec_pattern (Lisp_Object spec, char *otlayout, struct OpenTypeSpec **ots
if ((n = FONT_SLANT_NUMERIC (spec)) >= 0
&& n < 100)
- /* Fontconfig doesn't support reverse-italic/obligue. */
+ /* Fontconfig doesn't support reverse-italic/oblique. */
return NULL;
if (INTEGERP (AREF (spec, FONT_DPI_INDEX)))
@@ -1462,7 +1469,7 @@ ftfont_get_bitmap (struct font *font, unsigned int code, struct font_bitmap *bit
: ft_face->glyph->bitmap.pixel_mode == FT_PIXEL_MODE_LCD_V ? 8
: -1);
if (bitmap->bits_per_pixel < 0)
- /* We don't suport that kind of pixel mode. */
+ /* We don't support that kind of pixel mode. */
return -1;
bitmap->rows = ft_face->glyph->bitmap.rows;
bitmap->width = ft_face->glyph->bitmap.width;