# HG changeset patch # User Kenichi Handa # Date 1074149822 0 # Node ID 63ecd4967d2450ba5b81ff396ab8d94c03785a6a # Parent 1c9ca166e8723ac74343821fe0bdac27e2175373 (x_produce_glyphs): Call FACE_FOR_CHAR with POS and OBJECT args for composition too. diff -r 1c9ca166e872 -r 63ecd4967d24 src/xdisp.c --- a/src/xdisp.c Thu Jan 15 02:43:15 2004 +0000 +++ b/src/xdisp.c Thu Jan 15 06:57:02 2004 +0000 @@ -18152,6 +18152,7 @@ struct font_info *font_info; int boff; /* baseline offset */ struct composition *cmp = composition_table[it->cmp_id]; + int pos; /* Maybe translate single-byte characters to multibyte. */ it->char_to_display = it->c; @@ -18162,7 +18163,9 @@ } /* Get face and font to use. Encode IT->char_to_display. */ - it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display, -1, Qnil); + pos = STRINGP (it->string) ? IT_STRING_CHARPOS (*it) : IT_CHARPOS (*it); + it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display, + pos, it->string); face = FACE_FROM_ID (it->f, it->face_id); get_char_face_and_encoding (it->f, it->char_to_display, it->face_id, &char2b, it->multibyte_p, 0); @@ -18250,7 +18253,7 @@ { int left, right, btm, top; int ch = COMPOSITION_GLYPH (cmp, i); - int face_id = FACE_FOR_CHAR (it->f, face, ch, -1, Qnil); + int face_id = FACE_FOR_CHAR (it->f, face, ch, pos, it->string); face = FACE_FROM_ID (it->f, face_id); get_char_face_and_encoding (it->f, ch, face->id,