+2009-07-28 Kenichi Handa <handa@m17n.org>
+
+ * font.c (font_parse_xlfd): Check DPI and AVGWIDTH properties more
+ rigidly.
+
+ * xfont.c (xfont_list_pattern): Don't ignore the return value of
+ font_parse_xlfd. Check font properties more rigidly.
+
2009-07-27 Dan Nicolaescu <dann@ics.uci.edu>
* s/netbsd.h (SIGNALS_VIA_CHARACTERS): Remove, already defined in bsd-common.h
}
}
- ASET (font, FONT_DPI_INDEX, INTERN_FIELD (XLFD_RESY_INDEX));
+ val = INTERN_FIELD (XLFD_RESY_INDEX);
+ if (! NILP (val) && ! INTEGERP (val))
+ return -1;
+ ASET (font, FONT_DPI_INDEX, val);
val = INTERN_FIELD (XLFD_SPACING_INDEX);
if (! NILP (val))
{
p = f[XLFD_AVGWIDTH_INDEX];
if (*p == '~')
p++;
- ASET (font, FONT_AVGWIDTH_INDEX,
- font_intern_prop (p, f[XLFD_REGISTRY_INDEX] - 1 - p, 0));
+ val = font_intern_prop (p, f[XLFD_REGISTRY_INDEX] - 1 - p, 0);
+ if (! NILP (val) && ! INTEGERP (val))
+ return -1;
+ ASET (font, FONT_AVGWIDTH_INDEX, val);
}
else
{