mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-30 08:09:04 +00:00
(font_parse_xlfd): Check DPI and AVGWIDTH properties more rigidly.
This commit is contained in:
parent
4fa58085e3
commit
087048cd5d
@ -1,3 +1,11 @@
|
||||
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
|
||||
|
11
src/font.c
11
src/font.c
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user