(face_for_char): Handle invalid charset property

correctly.
(font_for_char): Likewise.
This commit is contained in:
Kenichi Handa 2008-12-03 05:30:38 +00:00
parent 2cf4d521ac
commit b1bde62298
2 changed files with 12 additions and 6 deletions

View file

@ -1,3 +1,9 @@
2008-12-03 Kenichi Handa <handa@m17n.org>
* fontset.c (face_for_char): Handle invalid charset property
correctly.
(font_for_char): Likewise.
2008-12-03 Chong Yidong <cyd@stupidchicken.com>
* font.c (Fopen_font): Compute pixel size correctly.

View file

@ -894,9 +894,7 @@ face_for_char (f, face, c, pos, object)
else
{
charset = Fget_char_property (make_number (pos), Qcharset, object);
if (NILP (charset))
id = -1;
else if (CHARSETP (charset))
if (CHARSETP (charset))
{
Lisp_Object val;
@ -905,6 +903,8 @@ face_for_char (f, face, c, pos, object)
charset = XCDR (val);
id = XINT (CHARSET_SYMBOL_ID (charset));
}
else
id = -1;
}
font_deferred_log ("font for", Fcons (make_number (c), charset), Qnil);
@ -966,9 +966,7 @@ font_for_char (face, c, pos, object)
else
{
charset = Fget_char_property (make_number (pos), Qcharset, object);
if (NILP (charset))
id = -1;
else if (CHARSETP (charset))
if (CHARSETP (charset))
{
Lisp_Object val;
@ -977,6 +975,8 @@ font_for_char (face, c, pos, object)
charset = XCDR (val);
id = XINT (CHARSET_SYMBOL_ID (charset));
}
else
id = -1;
}
font_deferred_log ("font for", Fcons (make_number (c), charset), Qnil);