bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#8703: truncated unicode glyphs in X11


From: Kenichi Handa
Subject: bug#8703: truncated unicode glyphs in X11
Date: Wed, 25 May 2011 12:57:16 +0900

In article <83tycpfz78.fsf@gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:

> > Date: Thu, 19 May 2011 22:17:02 +0200
> > From: Bertram Felgenhauer <bertram.felgenhauer@googlemail.com>
> > 
> > I have tracked down the regression using git-bisect, and found it
> > was introduced by
> > 
> > http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=5d747e944fd5a15bb36f865efc214024803c5fcf

> For those using bzr, this is revision 100011 on the emacs-23 branch or
> revision 99634.13.1 on the trunk.  Perhaps Handa-san could take a look
> at this, as he made that change.

Thank you for the report.  I've just installed a fix
(attached) to emacs-23 branch.  Could you please try it?

---
Kenichi Handa
handa@m17n.org

=== modified file 'src/xdisp.c'
--- src/xdisp.c 2011-05-09 09:59:23 +0000
+++ src/xdisp.c 2011-05-25 01:18:58 +0000
@@ -5922,9 +5922,21 @@
          int pos = (it->s ? -1
                     : STRINGP (it->string) ? IT_STRING_CHARPOS (*it)
                     : IT_CHARPOS (*it));
+         int c;
+
+         if (it->what == IT_CHARACTER)
+           c = it->char_to_display;
+         else
+           {
+             struct composition *cmp = composition_table[it->cmp_it.id];
+             int i;
 
-         it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display, pos,
-                                      it->string);
+             c = ' ';
+             for (i = 0; i < cmp->glyph_len; i++)
+               if ((c = COMPOSITION_GLYPH (cmp, i)) != '\t')
+                 break;
+           }
+         it->face_id = FACE_FOR_CHAR (it->f, face, c, pos, it->string);
        }
     }
 #endif






reply via email to

[Prev in Thread] Current Thread [Next in Thread]