From: Kenichi Handa Date: Mon, 5 Dec 2011 07:48:29 +0000 (+0900) Subject: ftfont.c (get_adstyle_property): If the font is not BDF nor PCF, return Qnil (Bug... X-Git-Tag: emacs-pretest-24.0.93~231 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c3c9e25e5d2c222d9f79a503c714b48c06078c08;p=emacs.git ftfont.c (get_adstyle_property): If the font is not BDF nor PCF, return Qnil (Bug#8046, Bug#10193). --- diff --git a/src/ChangeLog b/src/ChangeLog index 69e3eda2630..d897fadd292 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-12-05 Kenichi Handa + + * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF, + return Qnil (Bug#8046, Bug#10193). + 2011-12-05 Kenichi Handa * coding.c (encode_designation_at_bol): New args charbuf_end and diff --git a/src/ftfont.c b/src/ftfont.c index c48346b0147..ec1a4ca6a78 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;