From: Kenichi Handa <handa@gnu.org>
To: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Cc: 11860@debbugs.gnu.org, smias@yandex.ru
Subject: bug#11860: 24.1; Arabic - Harakat (diacritics, short vowels) don't appear
Date: Sun, 19 Aug 2012 21:51:44 +0900 [thread overview]
Message-ID: <87boi7hwnz.fsf@gnu.org> (raw)
In-Reply-To: <wlvcgfuyjt.wl%mituharu@math.s.chiba-u.ac.jp> (message from YAMAMOTO Mitsuharu on Sun, 19 Aug 2012 16:32:38 +0900)
In article <wlvcgfuyjt.wl%mituharu@math.s.chiba-u.ac.jp>, YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> writes:
> 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.
Almost right. We can't tell that the order in a grapheme
cluster is in physical or logical; it's just in "drawing"
order.
For instance, when we have an Arabic text "AbCdEf"
(consonants:uppercase, vowels:lowercase), the gstring that
should be returned by a shaper should be "XYZ" (where X is
actually a grapheme cluster for "Ab", Y for "Cd", Z for
"Ef"). Here how glyphs in each cluster should be ordered
depends on metrics of glyphs. If a glyph for "A" has
positive xadvance, and a glyph for "b" has negative lbearing
(and zero xadvance), the order should be "Ab" because the
display engine should draw A and b in that order to make b
aligned on/under A. But, if a glyph for "b" has
non-negative lbearing (and zero xadvance), the order should
be "bA".
> 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.
I don't have the codes of Mac port at hand now. How did you
identify boundaries of grapheme clusters? Do Core Text and
NSLayoutManager return that information?
Anyway, perhaps w32uniscribe.c should do the similar
reordering, or should be fixed to do that reordering
correctly.
---
Kenichi Handa
handa@gnu.org
next prev parent reply other threads:[~2012-08-19 12:51 UTC|newest]
Thread overview: 71+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-04 9:17 bug#11860: 24.1; Arabic - Harakat (diacritics, short vowels) don't appear Steffan
2012-07-04 20:22 ` Eli Zaretskii
2012-07-05 17:53 ` Steffan
2012-08-05 5:27 ` Steffan
2012-08-05 15:49 ` Eli Zaretskii
2012-08-13 0:02 ` Kenichi Handa
2012-08-18 2:45 ` Kenichi Handa
2012-08-18 7:14 ` Eli Zaretskii
2012-08-18 9:19 ` Kenichi Handa
2012-08-18 15:33 ` Eli Zaretskii
2012-08-19 7:32 ` YAMAMOTO Mitsuharu
2012-08-19 12:51 ` Kenichi Handa [this message]
2012-08-19 13:20 ` Kenichi Handa
2012-08-19 18:44 ` Eli Zaretskii
2012-08-19 18:53 ` Werner LEMBERG
2012-08-20 17:24 ` Eli Zaretskii
2012-08-19 3:02 ` Jason Rumney
2012-08-19 13:37 ` Kenichi Handa
2012-08-19 16:16 ` Jason Rumney
2012-08-19 18:54 ` Eli Zaretskii
2012-08-20 14:57 ` Kenichi Handa
2012-08-20 17:16 ` Eli Zaretskii
2012-08-21 9:20 ` Kenichi Handa
2012-08-19 18:52 ` Eli Zaretskii
2012-08-19 17:56 ` Eli Zaretskii
2012-08-19 4:34 ` YAMAMOTO Mitsuharu
2012-09-09 4:06 ` YAMAMOTO Mitsuharu
2012-09-11 14:49 ` Kenichi Handa
2012-09-11 17:48 ` Eli Zaretskii
2012-09-12 13:14 ` Kenichi Handa
2012-09-12 16:34 ` Eli Zaretskii
2012-09-13 6:07 ` Kenichi Handa
2012-09-13 17:00 ` Eli Zaretskii
2012-09-13 23:26 ` Kenichi Handa
2012-09-16 12:03 ` Kenichi Handa
2012-09-16 12:41 ` Eli Zaretskii
2012-09-16 15:43 ` Stefan Monnier
2012-09-16 15:50 ` Eli Zaretskii
2012-09-17 14:08 ` Kenichi Handa
2012-09-17 16:58 ` Stefan Monnier
2012-08-19 18:22 ` Eli Zaretskii
2012-08-21 13:16 ` Kenichi Handa
2012-08-21 17:32 ` Eli Zaretskii
2012-08-22 9:15 ` Kenichi Handa
2012-08-22 19:52 ` Steffan
2012-08-23 2:50 ` Eli Zaretskii
2012-08-22 21:40 ` Steffan
2012-08-23 2:49 ` Eli Zaretskii
2012-08-27 21:10 ` Steffan
2012-08-29 8:09 ` Kenichi Handa
2012-09-01 13:59 ` Eli Zaretskii
2012-09-03 13:55 ` Kenichi Handa
2012-09-03 15:53 ` Eli Zaretskii
2012-09-04 9:03 ` Kenichi Handa
2012-08-29 8:57 ` Steffan
2012-09-01 14:06 ` Eli Zaretskii
2012-09-03 15:31 ` Steffan
2012-09-03 16:28 ` Eli Zaretskii
2012-09-04 17:18 ` Eli Zaretskii
2012-09-03 16:24 ` Steffan
2012-09-03 17:49 ` Steffan
2012-09-06 2:09 ` YAMAMOTO Mitsuharu
2012-09-06 8:52 ` Steffan
2012-09-06 9:56 ` YAMAMOTO Mitsuharu
2012-09-06 10:47 ` Eli Zaretskii
2012-09-06 14:52 ` Steffan
2012-09-10 16:13 ` Steffan
2020-08-17 22:45 ` Stefan Kangas
2020-08-18 4:40 ` Eli Zaretskii
2020-08-18 9:47 ` Stefan Kangas
[not found] <14231341502795@web11e.yandex.ru>
2012-07-05 17:16 ` Eli Zaretskii
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87boi7hwnz.fsf@gnu.org \
--to=handa@gnu.org \
--cc=11860@debbugs.gnu.org \
--cc=mituharu@math.s.chiba-u.ac.jp \
--cc=smias@yandex.ru \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.