From: Bertram Felgenhauer <bertram.felgenhauer@googlemail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 8703@debbugs.gnu.org
Subject: bug#8703: truncated unicode glyphs in X11
Date: Fri, 20 May 2011 13:56:04 +0200 [thread overview]
Message-ID: <20110520115604.GA2413@24f89f8c-e6a1-4e75-85ee-bb8a3743bb9f> (raw)
In-Reply-To: <83tycpfz78.fsf@gnu.org>
Dear Eli,
Eli Zaretskii wrote:
> > 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.
>
> > Undoing a single change restores the correct behaviour for me:
> >
> > diff --git a/src/xdisp.c b/src/xdisp.c
> > index 3c9d385..20365ff 100644
> > --- a/src/xdisp.c
> > +++ b/src/xdisp.c
> > @@ -5926,8 +5926,7 @@ get_next_display_element (struct it *it)
> > : 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);
> > + it->face_id = FACE_FOR_CHAR (it->f, face, it->c, pos, it->string);
>
> Can you tell what are the values of it->c and it->char_to_display at
> this point, for one of the characters hose display is truncated?
For the example screenshot, I found the following cases where
it->c and it->char_to_display differ:
it->c it->char_to_display
8896 (N-ARY LOGICAL AND) 34 (QUOTATION MARK)
8801 (IDENTICAL TO) 32 (SPACE)
10233 (LONG RIGHTWARDS DOUBLE ARROW) 32 (SPACE)
it->char_to_display is the previous character in the string each time,
and indeed there's a possibility that this path is taken but
it->char_to_display was not set by get_next_display_element: when
it->what == IT_COMPOSITION and it->cmp_it.ch < 0.
The following patch also works for me:
diff --git a/src/xdisp.c b/src/xdisp.c
index 3c9d385..c9848fd 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -5902,6 +5902,8 @@ get_next_display_element (struct it *it)
it->char_to_display = it->c;
}
}
+ else if (it->what == IT_COMPOSITION && it->cmp_it.ch < 0)
+ it->char_to_display = it->c;
#ifdef HAVE_WINDOW_SYSTEM
/* Adjust face id for a multibyte character. There are no multibyte
For completeness: The behaviour seems to be independent of the font
being used. I tried with the 6x13 system font (which by its fixed
width nature displays fine, btw) and with "DejaVu Sans Mono" which
I used for the screenshots (sorry for not mentioning that in the
original report.)
Thanks,
Bertram
next prev parent reply other threads:[~2011-05-20 11:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-19 20:17 bug#8703: truncated unicode glyphs in X11 Bertram Felgenhauer
2011-05-20 10:23 ` Eli Zaretskii
2011-05-20 11:56 ` Bertram Felgenhauer [this message]
2011-05-20 14:36 ` Eli Zaretskii
2011-05-25 3:57 ` Kenichi Handa
2011-05-25 11:05 ` Bertram Felgenhauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110520115604.GA2413@24f89f8c-e6a1-4e75-85ee-bb8a3743bb9f \
--to=bertram.felgenhauer@googlemail.com \
--cc=8703@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).