GNU bug report logs -
#12364
24.2.50; wrong overhang display for gstring compositions
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 12364 in the body.
You can then email your comments to 12364 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12364
; Package
emacs
.
(Thu, 06 Sep 2012 02:38:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 06 Sep 2012 02:38:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Steps to Reproduce:
1. $ emacs -Q &
2. evaluate (set-fontset-font t 'arabic (font-spec :family "arial" :size 30))
3. C-u C-\ arabic RET
4. u S u
At this moment, the two grapheme clusters look connected.
5. C-b C-p
Now the two grapheme clusters look unconnected.
See also the "u-S-u" example in the first screenshot in
http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-09/msg00178.html .
I think at least the two occurrences of the following line in xdisp.c
are wrong.
int first = (s->first_glyph - glyphs) + (s->cmp ? 1 : s->nchars);
The value of s->cmp seems to be NULL for the "gstring" cases.
YAMAMOTO Mitsuharu
mituharu <at> math.s.chiba-u.ac.jp
In GNU Emacs 24.2.50.1 (x86_64-apple-darwin12.1.0, X toolkit, Xaw3d scroll bars)
of 2012-09-06 on YAMAMOTO-no-iMac.local
Bzr revision: 109895 yamaoka <at> jpl.org-20120905224543-v2x5qiqin2b83lnv
Windowing system distributor `The X.Org Foundation', version 11.0.11204000
Configured using:
`configure '--enable-checking' '--with-jpeg=no' '--with-gif=no'
'--with-tiff=no' 'CFLAGS=-g3''
Important settings:
value of $LANG: ja_JP.UTF-8
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12364
; Package
emacs
.
(Thu, 06 Sep 2012 08:19:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 12364 <at> debbugs.gnu.org (full text, mbox):
> Date: Thu, 06 Sep 2012 11:37:26 +0900
> From: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
>
> Steps to Reproduce:
>
> 1. $ emacs -Q &
> 2. evaluate (set-fontset-font t 'arabic (font-spec :family "arial" :size 30))
> 3. C-u C-\ arabic RET
> 4. u S u
> At this moment, the two grapheme clusters look connected.
> 5. C-b C-p
> Now the two grapheme clusters look unconnected.
Not reproducible on Windows XP.
Are you using the latest libm17n-flt and libotf libraries, and the
latest fonts?
> I think at least the two occurrences of the following line in xdisp.c
> are wrong.
>
> int first = (s->first_glyph - glyphs) + (s->cmp ? 1 : s->nchars);
>
> The value of s->cmp seems to be NULL for the "gstring" cases.
These two lines are not executed here, when the above recipe is used.
Maybe that's why I don't see the problem.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12364
; Package
emacs
.
(Fri, 07 Sep 2012 08:48:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 12364 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
>>>>> On Thu, 06 Sep 2012 11:37:26 +0900, YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp> said:
> Steps to Reproduce:
> 1. $ emacs -Q &
> 2. evaluate (set-fontset-font t 'arabic (font-spec :family "arial" :size 30))
> 3. C-u C-\ arabic RET
> 4. u S u
> At this moment, the two grapheme clusters look connected.
> 5. C-b C-p
> Now the two grapheme clusters look unconnected.
> See also the "u-S-u" example in the first screenshot in
> http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-09/msg00178.html .
> I think at least the two occurrences of the following line in xdisp.c
> are wrong.
> int first = (s->first_glyph - glyphs) + (s->cmp ? 1 : s->nchars);
> The value of s->cmp seems to be NULL for the "gstring" cases.
I tried making a fix. The change for xterm.c is so the box cursor can
invert the left overhang of the succeeding glyph. The attached
screenshots show the difference between with (first) and without
(second) the patch with respect to the following steps.
1. emacs -Q -D &
2. (set-frame-font "Times-32") C-j
3. C-u y
4. C-a C-SPC C-e M-o b
5. C-a C-SPC C-e M-o i
6. C-b C-b
YAMAMOTO Mitsuharu
mituharu <at> math.s.chiba-u.ac.jp
=== modified file 'src/xdisp.c'
*** src/xdisp.c 2012-09-05 03:37:32 +0000
--- src/xdisp.c 2012-09-07 01:21:28 +0000
***************
*** 23050,23056 ****
{
int x = 0, i;
struct glyph *glyphs = s->row->glyphs[s->area];
! int first = (s->first_glyph - glyphs) + (s->cmp ? 1 : s->nchars);
int end = s->row->used[s->area];
for (i = first; i < end && s->right_overhang > x; ++i)
--- 23050,23057 ----
{
int x = 0, i;
struct glyph *glyphs = s->row->glyphs[s->area];
! int first = (s->first_glyph - glyphs
! + (s->first_glyph->type == COMPOSITE_GLYPH ? 1 : s->nchars));
int end = s->row->used[s->area];
for (i = first; i < end && s->right_overhang > x; ++i)
***************
*** 23073,23079 ****
int i, k, x;
int end = s->row->used[s->area];
struct glyph *glyphs = s->row->glyphs[s->area];
! int first = (s->first_glyph - glyphs) + (s->cmp ? 1 : s->nchars);
k = -1;
x = 0;
--- 23074,23081 ----
int i, k, x;
int end = s->row->used[s->area];
struct glyph *glyphs = s->row->glyphs[s->area];
! int first = (s->first_glyph - glyphs
! + (s->first_glyph->type == COMPOSITE_GLYPH ? 1 : s->nchars));
k = -1;
x = 0;
=== modified file 'src/xterm.c'
*** src/xterm.c 2012-09-07 01:27:44 +0000
--- src/xterm.c 2012-09-07 03:41:30 +0000
***************
*** 2975,2980 ****
--- 2975,2981 ----
XSetClipMask (next->display, next->gc, None);
next->hl = save;
next->num_clips = 0;
+ next->clip_head = s->next;
}
}
}
[after.png (image/png, inline)]
[before.png (image/png, inline)]
Reply sent
to
YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
:
You have taken responsibility.
(Tue, 11 Sep 2012 04:02:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
:
bug acknowledged by developer.
(Tue, 11 Sep 2012 04:02:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 12364-done <at> debbugs.gnu.org (full text, mbox):
>>>>> On Fri, 07 Sep 2012 17:47:23 +0900, YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp> said:
> I tried making a fix. The change for xterm.c is so the box cursor can
> invert the left overhang of the succeeding glyph.
I've just installed the patch.
YAMAMOTO Mitsuharu
mituharu <at> math.s.chiba-u.ac.jp
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 09 Oct 2012 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 12 years and 258 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.