aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2008-12-03 05:30:38 +0000
committerKenichi Handa2008-12-03 05:30:38 +0000
commitb1bde62298d30e1f44497e19cf970d34a7850d64 (patch)
treeb31527e8b28bb3575c9b2cfdec803cfeac877b85
parent2cf4d521ac33da1905b549374eb6c3b3b0e86867 (diff)
downloademacs-b1bde62298d30e1f44497e19cf970d34a7850d64.tar.gz
emacs-b1bde62298d30e1f44497e19cf970d34a7850d64.zip
(face_for_char): Handle invalid charset property
correctly. (font_for_char): Likewise.
-rw-r--r--src/ChangeLog6
-rw-r--r--src/fontset.c12
2 files changed, 12 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index d32c53c9bb0..cc91c56522d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12008-12-03 Kenichi Handa <handa@m17n.org>
2
3 * fontset.c (face_for_char): Handle invalid charset property
4 correctly.
5 (font_for_char): Likewise.
6
12008-12-03 Chong Yidong <cyd@stupidchicken.com> 72008-12-03 Chong Yidong <cyd@stupidchicken.com>
2 8
3 * font.c (Fopen_font): Compute pixel size correctly. 9 * font.c (Fopen_font): Compute pixel size correctly.
diff --git a/src/fontset.c b/src/fontset.c
index 9053fbdc1f3..efa26ae7679 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -894,9 +894,7 @@ face_for_char (f, face, c, pos, object)
894 else 894 else
895 { 895 {
896 charset = Fget_char_property (make_number (pos), Qcharset, object); 896 charset = Fget_char_property (make_number (pos), Qcharset, object);
897 if (NILP (charset)) 897 if (CHARSETP (charset))
898 id = -1;
899 else if (CHARSETP (charset))
900 { 898 {
901 Lisp_Object val; 899 Lisp_Object val;
902 900
@@ -905,6 +903,8 @@ face_for_char (f, face, c, pos, object)
905 charset = XCDR (val); 903 charset = XCDR (val);
906 id = XINT (CHARSET_SYMBOL_ID (charset)); 904 id = XINT (CHARSET_SYMBOL_ID (charset));
907 } 905 }
906 else
907 id = -1;
908 } 908 }
909 909
910 font_deferred_log ("font for", Fcons (make_number (c), charset), Qnil); 910 font_deferred_log ("font for", Fcons (make_number (c), charset), Qnil);
@@ -966,9 +966,7 @@ font_for_char (face, c, pos, object)
966 else 966 else
967 { 967 {
968 charset = Fget_char_property (make_number (pos), Qcharset, object); 968 charset = Fget_char_property (make_number (pos), Qcharset, object);
969 if (NILP (charset)) 969 if (CHARSETP (charset))
970 id = -1;
971 else if (CHARSETP (charset))
972 { 970 {
973 Lisp_Object val; 971 Lisp_Object val;
974 972
@@ -977,6 +975,8 @@ font_for_char (face, c, pos, object)
977 charset = XCDR (val); 975 charset = XCDR (val);
978 id = XINT (CHARSET_SYMBOL_ID (charset)); 976 id = XINT (CHARSET_SYMBOL_ID (charset));
979 } 977 }
978 else
979 id = -1;
980 } 980 }
981 981
982 font_deferred_log ("font for", Fcons (make_number (c), charset), Qnil); 982 font_deferred_log ("font for", Fcons (make_number (c), charset), Qnil);