ftfont.c (get_adstyle_property): If the font is not BDF nor PCF, return Qnil (Bug#8046, Bug#10193).

This commit is contained in:
Kenichi Handa 2011-12-05 16:48:29 +09:00
parent 2ab04b9565
commit c3c9e25e5d
2 changed files with 12 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2011-12-05 Kenichi Handa <handa@m17n.org>
* ftfont.c (get_adstyle_property): If the font is not BDF nor PCF,
return Qnil (Bug#8046, Bug#10193).
2011-12-05 Kenichi Handa <handa@m17n.org>
* coding.c (encode_designation_at_bol): New args charbuf_end and

View file

@ -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;