GNU bug report logs - #11860
24.1; Arabic - Harakat (diacritics, short vowels) don't appear

Previous Next

Package: emacs;

Reported by: Steffan <smias <at> yandex.ru>

Date: Wed, 4 Jul 2012 18:43:12 UTC

Severity: normal

Found in version 24.1

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: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Kenichi Handa <handa <at> gnu.org>, 11860 <at> debbugs.gnu.org, smias <at> yandex.ru
Subject: bug#11860: 24.1; Arabic - Harakat (diacritics, short vowels) don't appear
Date: Sun, 19 Aug 2012 16:32:38 +0900
>>>>> On Sat, 18 Aug 2012 18:33:21 +0300, Eli Zaretskii <eliz <at> gnu.org> said:

> And w32uniscribe.c sets that flag to TRUE a few lines before it calls
> ScriptShape, because Emacs itself reorders characters:

>   for (i = 0; i < nitems; i++)
>     {
>       int nglyphs, nchars_in_run;
>       nchars_in_run = items[i+1].iCharPos - items[i].iCharPos;
>       /* Force ScriptShape to generate glyphs in the same order as
> 	 they are in the input LGSTRING, which is in the logical
> 	 order.  */
>       items[i].a.fLogicalOrder = 1;  <<<<<<<<<<<<<<<<<<<<<<<<

IIUC, the resulting gstring should be ordered as:

  * in the logical order between the grapheme clusters because Emacs
    itself reorders them.
  * in the physical order between the glyphs inside a single grapheme
    cluster because drawing and metric calculation routines for a
    grapheme cluster do not know about the direction.

The font backend driver on the Mac port is implemented as above, and
seems to work correctly.  The APIs used for shaping generates glyphs
either in the physical order (Core Text) or in the logical order
(NSLayoutManager), so I had to reorder the information about the
generated glyphs locally by maintaining a permutation on the glyph
indices.  You can look at the variable `permutation' in the function
`mac_ctfont_shape' (for Core Text, in src/macfont.c) or the function
`mac_font_shape_1' (For NSLayoutManager, in src/macappkit.m) in the
source of the Mac port.

				     YAMAMOTO Mitsuharu
				mituharu <at> math.s.chiba-u.ac.jp




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

Previous Next


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