comparison src/fontset.c @ 90725:6d8c81691fc8

(Finternal_char_font): Fix previous change.
author Kenichi Handa <handa@m17n.org>
date Tue, 12 Dec 2006 11:31:07 +0000
parents f5dc0b9a442c
children 6588c6259dfb
comparison
equal deleted inserted replaced
90724:96bde39d99b2 90725:6d8c81691fc8
2029 int face_id; 2029 int face_id;
2030 int c; 2030 int c;
2031 struct frame *f; 2031 struct frame *f;
2032 struct face *face; 2032 struct face *face;
2033 Lisp_Object charset, rfont_def; 2033 Lisp_Object charset, rfont_def;
2034 int charset_id; 2034 int cs_id;
2035 2035
2036 if (NILP (position)) 2036 if (NILP (position))
2037 { 2037 {
2038 CHECK_CHARACTER (ch); 2038 CHECK_CHARACTER (ch);
2039 c = XINT (ch); 2039 c = XINT (ch);
2040 f = XFRAME (selected_frame); 2040 f = XFRAME (selected_frame);
2041 face_id = DEFAULT_FACE_ID; 2041 face_id = DEFAULT_FACE_ID;
2042 pos = -1; 2042 pos = -1;
2043 charset_id = -1; 2043 cs_id = -1;
2044 } 2044 }
2045 else 2045 else
2046 { 2046 {
2047 Lisp_Object window, charset; 2047 Lisp_Object window, charset;
2048 struct window *w; 2048 struct window *w;
2065 w = XWINDOW (window); 2065 w = XWINDOW (window);
2066 f = XFRAME (w->frame); 2066 f = XFRAME (w->frame);
2067 face_id = face_at_buffer_position (w, pos, -1, -1, &dummy, pos + 100, 0); 2067 face_id = face_at_buffer_position (w, pos, -1, -1, &dummy, pos + 100, 0);
2068 charset = Fget_char_property (position, Qcharset, Qnil); 2068 charset = Fget_char_property (position, Qcharset, Qnil);
2069 if (CHARSETP (charset)) 2069 if (CHARSETP (charset))
2070 charset_id = XINT (CHARSET_SYMBOL_ID (charset)); 2070 cs_id = XINT (CHARSET_SYMBOL_ID (charset));
2071 else 2071 else
2072 charset_id = -1; 2072 cs_id = -1;
2073 } 2073 }
2074 if (! CHAR_VALID_P (c, 0)) 2074 if (! CHAR_VALID_P (c, 0))
2075 return Qnil; 2075 return Qnil;
2076 face_id = FACE_FOR_CHAR (f, FACE_FROM_ID (f, face_id), c, pos, Qnil); 2076 face_id = FACE_FOR_CHAR (f, FACE_FROM_ID (f, face_id), c, pos, Qnil);
2077 face = FACE_FROM_ID (f, face_id); 2077 face = FACE_FROM_ID (f, face_id);
2078 rfont_def = fontset_font (FONTSET_FROM_ID (face->fontset), c, face, 2078 rfont_def = fontset_font (FONTSET_FROM_ID (face->fontset), c, face, cs_id);
2079 charset_id);
2080 #ifdef USE_FONT_BACKEND 2079 #ifdef USE_FONT_BACKEND
2081 if (enable_font_backend) 2080 if (enable_font_backend)
2082 { 2081 {
2083 if (VECTORP (rfont_def) && ! NILP (AREF (rfont_def, 4))) 2082 if (VECTORP (rfont_def) && ! NILP (AREF (rfont_def, 4)))
2084 { 2083 {