summaryrefslogtreecommitdiff
path: root/src/xterm.c
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2000-10-12 05:22:46 +0000
committerKenichi Handa <handa@m17n.org>2000-10-12 05:22:46 +0000
commita4249304d84bb8d27071501c2c9a35e550d01c68 (patch)
tree9061d53c58d8928566071061d8aebe1f052876d5 /src/xterm.c
parent8a0eba09cf7eef32296d1517df4a457903fd8739 (diff)
downloademacs-a4249304d84bb8d27071501c2c9a35e550d01c68.tar.gz
(x_produce_glyphs): Handle unibyte_display_via_language_environment
correctly.
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/xterm.c b/src/xterm.c
index ff821edab19..ef707abfcfe 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1798,6 +1798,17 @@ x_produce_glyphs (it)
int font_not_found_p;
struct font_info *font_info;
int boff; /* baseline offset */
+ /* We may change it->multibyte_p upon unibyte<->multibyte
+ conversion. So, save the current value now and restore it
+ later.
+
+ Note: It seems that we don't have to record multibyte_p in
+ struct glyph because the character code itself tells if or
+ not the character is multibyte. Thus, in the future, we must
+ consider eliminating the field `multibyte_p' in the struct
+ glyph.
+ */
+ int saved_multibyte_p = it->multibyte_p;
/* Maybe translate single-byte characters to multibyte, or the
other way. */
@@ -1810,6 +1821,7 @@ x_produce_glyphs (it)
|| !NILP (Vnonascii_translation_table)))
{
it->char_to_display = unibyte_char_to_multibyte (it->c);
+ it->multibyte_p = 1;
it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display);
face = FACE_FROM_ID (it->f, it->face_id);
}
@@ -1817,6 +1829,7 @@ x_produce_glyphs (it)
&& !it->multibyte_p)
{
it->char_to_display = multibyte_char_to_unibyte (it->c, Qnil);
+ it->multibyte_p = 0;
it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display);
face = FACE_FROM_ID (it->f, it->face_id);
}
@@ -2016,6 +2029,7 @@ x_produce_glyphs (it)
if (it->glyph_row)
x_append_glyph (it);
}
+ it->multibyte_p = saved_multibyte_p;
}
else if (it->what == IT_COMPOSITION)
{