changeset 90301:1f534e44acca

(produce_glyphs): Sync to HEAD.
author Kenichi Handa <handa@m17n.org>
date Mon, 20 Feb 2006 04:30:12 +0000
parents 3f03e10f330e
children 0e4cba8d42b4
files src/term.c
diffstat 1 files changed, 20 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/term.c	Mon Feb 20 04:30:00 2006 +0000
+++ b/src/term.c	Mon Feb 20 04:30:12 2006 +0000
@@ -1777,13 +1777,26 @@
     }
   else if (CHAR_BYTE8_P (it->c))
     {
-      /* We must send the raw 8-bit byte as is to the terminal.
-	 Although there's no way to know how many columns it occupies
-	 on a screen, it is a good assumption that a single byte code
-	 has 1-column width.  */
-      it->pixel_width = it->nglyphs = 1;
-      if (it->glyph_row)
-	append_glyph (it);
+      if (unibyte_display_via_language_environment
+	  && (it->c >= 0240))
+	{
+	  it->char_to_display = unibyte_char_to_multibyte (it->c);
+	  it->pixel_width = CHAR_WIDTH (it->char_to_display);
+	  it->nglyphs = it->pixel_width;
+	  if (it->glyph_row)
+	    append_glyph (it);
+	}
+      else
+	{
+	  /* Coming here means that it->c is from display table, thus
+	     we must send the raw 8-bit byte as is to the terminal.
+	     Although there's no way to know how many columns it
+	     occupies on a screen, it is a good assumption that a
+	     single byte code has 1-column width.  */
+	  it->pixel_width = it->nglyphs = 1;
+	  if (it->glyph_row)
+	    append_glyph (it);
+	}
     }
   else
     {