Commit 087048cd authored by Kenichi Handa's avatar Kenichi Handa
Browse files

(font_parse_xlfd): Check DPI and AVGWIDTH properties more rigidly.

parent 4fa58085
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
......
......@@ -1139,7 +1139,10 @@ font_parse_xlfd (name, font)
}
}
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))
{
......@@ -1151,8 +1154,10 @@ font_parse_xlfd (name, font)
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
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment