GNU bug report logs - #20173
24.4; Rendering misallocates combining marks on ligatures

Previous Next

Package: emacs;

Reported by: Richard Wordingham <richard.wordingham <at> ntlworld.com>

Date: Mon, 23 Mar 2015 01:07:02 UTC

Severity: normal

Found in version 24.4

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Richard Wordingham <richard.wordingham <at> ntlworld.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 20173 <at> debbugs.gnu.org
Subject: bug#20173: 24.4; Rendering misallocates combining marks on ligatures
Date: Mon, 23 Mar 2015 22:41:07 +0000
On Mon, 23 Mar 2015 17:38:52 +0200
Eli Zaretskii <eliz <at> gnu.org> wrote:

> > Date: Mon, 23 Mar 2015 01:06:26 +0000
> > From: Richard Wordingham <richard.wordingham <at> ntlworld.com>

> Is it possible that some rule(s) are missing from the end of
> lisp/language/misc-lang.el?  Could you please take a look and see if
> something needs to be fixed/added in how we set up the compositions
> for Arabic?

There's no relevant problem there.  I demonstrated the bug to myself by
first rendering Tai Tham <NA, TONE-2, SIGN AA> and confirming that
TONE-2 rendered above the first component of the ligature NAA, fromed
from <NA, SIGN AA>.  I then hacked my font so that the glyph for TONE-2
was decomposed into the glyphs for MAI KANG and TONE-2, in that order,
and observing TONE-2 being rendered on the second component of the
ligature.  I then turned to Arabic so that a custom font would not be
needed to demonstrate the bug.

As to what needs fixing in the Arabic section of misc-lang.el:

Clusters containing letters should be limited to letters and marks on
them.  Otherwise, the digits 1, 2, 3 are reversed in a variable name
like بج١٢٣د.  (I'm not sure why the problem doesn't appear with بج١٢٣.)

(set-char-table-range
 composition-function-table
 '(#x600 . #x6FF)
 (list ["[\u0600-\u06FF]+" 0 font-shape-gstring]))

should change to something like

(set-char-table-range
 composition-function-table
 '(#x610 . #x615)
 (list
 ["[\u0610-\u0615\u0621-\u065F\u066E-\u06D3\u06D5-\u06EF\u06FA-\u06FC\u06FF]+"
 0
 font-shape-gstring]))

; Skip punctuation

(set-char-table-range
 composition-function-table
 '(#x621 . #x65F)
 (list 
 ["[\u0610-\u0615\u0621-\u065F\u066E-\u06D3\u06D5-\u06EF\u06FA-\u06FC\u06FF]+"
0 font-shape-gstring]))

; skip digits and punctuation

(set-char-table-range
 composition-function-table
 '(#x66E . #x6D3)
 (list 
 ["[\u0610-\u0615\u0621-\u065F\u066E-\u06D3\u06D5-\u06EF\u06FA-\u06FC\u06FF]+"
 0 font-shape-gstring]))

; skip punctuation

(set-char-table-range
 composition-function-table
 '(#x6D5 . #x6EF)
 (list
 ["[\u0610-\u0615\u0621-\u065F\u066E-\u06D3\u06D5-\u06EF\u06FA-\u06FC\u06FF]+"
  0 font-shape-gstring]))

; Skip digits

(set-char-table-range
 composition-function-table
 '(#x6FA . #x6FC)
 (list 
 ["[\u0610-\u0615\u0621-\u065F\u066E-\u06D3\u06D5-\u06EF\u06FA-\u06FC\u06FF]+"
0 font-shape-gstring]))

; Skip symbols

(set-char-table-range
 composition-function-table
 '(#x6FF . #x6FF)
 (list
 ["[\u0610-\u0615\u0621-\u065F\u066E-\u06D3\u06D5-\u06EF\u06FA-\u06FC\u06FF]+"
0 font-shape-gstring]))

There are more elegant ways of expressing this, which is just as well,
for there are also blocks Arabic Supplement (U+0750 to U+077F) and
Arabic Extended-A (U+08A0 to U+08FF).  Being an international script,
the Arabic script has a lot of letters, just like the Latin script.

Richard.




This bug report was last modified 4 years and 282 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.