all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: handa@m17n.org
Cc: emacs-bidi@gnu.org, jasonr@gnu.org, emacs-devel@gnu.org
Subject: Re: Arabic support
Date: Sat, 04 Sep 2010 10:13:47 +0300	[thread overview]
Message-ID: <83d3suhtg4.fsf@gnu.org> (raw)
In-Reply-To: <83pqwvhsbm.fsf@gnu.org>

> Date: Fri, 03 Sep 2010 16:25:49 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-bidi@gnu.org, emacs-devel@gnu.org, jasonr@gnu.org
> 
> Am I missing something?

I think I found what I was missing.  This part:

> During the buffer scan that delivers characters to PRODUCE_GLYPHS, if
> the next character to be delivered is a composed character, then
> composition_reseat_it and next_element_from_composition are called.
> If they succeed to compose the character with one or more following
> characters, the whole sequence of characters that where composed is
> recorded in the glyph row as a single element of type IT_COMPOSITION.
> This single element is expanded into the actual font glyphs when the
> glyph row is drawn by the terminal-specific draw_glyphs method.  The
> bidi reordering treats this single element as if it were a single
> glyph, and thus does not reorder its font glyphs.  So this single
> element winds up in the glyph row in the position corresponding to the
> first character of the composed sequence.

is inaccurate, and therefore leads to incorrect conclusions.  A
(hopefully) more correct description is this:

  During the buffer scan that delivers characters to PRODUCE_GLYPHS,
  if the next character to be delivered is a composed character, then
  composition_reseat_it and next_element_from_composition are called.
  If they succeed to compose the character with one or more following
  characters, the whole sequence of characters that where composed is
  recorded in the `struct composition_it' object that is part of the
  buffer iterator.  The composed sequence could produce one or more
  font glyphs (called "grapheme clusters") on the screen.  Each of
  these grapheme clusters is then delivered to PRODUCE_GLYPHS in the
  direction corresponding to the current bidi scan direction.  In
  particular, if the bidi iterator currently scans the buffer
  backwards, the grapheme clusters are delivered back to front.  This
  reorders the grapheme clusters as appropriate for the current bidi
  context.

If this is correct, then the conclusion is that the font driver's
`shape' method should return the grapheme clusters in LGSTRING in
logical order; they will be reordered correctly by
next_element_from_composition, composition_reseat_it, and
set_iterator_to_next, as described above.

Did I get it right this time?

  parent reply	other threads:[~2010-09-04  7:13 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-26  1:10 Arabic support Kenichi Handa
2010-08-27  9:56 ` Eli Zaretskii
2010-08-28 10:15   ` Amit Aronovitch
2010-08-29  5:07     ` James Cloos
2010-08-29  5:13     ` James Cloos
2010-08-30  2:07     ` Kenichi Handa
2010-08-30 13:42       ` Amit Aronovitch
2010-08-30 14:11         ` [emacs-bidi] " Amit Aronovitch
2010-09-03  7:35           ` Kenichi Handa
2010-09-03  7:54             ` [emacs-bidi] " Amit Aronovitch
2010-09-01  2:55         ` Kenichi Handa
2010-09-01  4:58           ` Eli Zaretskii
2010-09-01  5:06             ` Kenichi Handa
2010-09-01  7:12           ` [emacs-bidi] " Stefan Monnier
2010-09-03  7:17             ` Kenichi Handa
2010-08-30  7:47   ` Kenichi Handa
2010-08-30 14:06     ` Eli Zaretskii
2010-09-01  2:17       ` Kenichi Handa
2010-09-01  3:47         ` "Martin J. Dürst"
2010-09-02  7:45           ` 大嶋 俊祐
2010-09-02  9:31             ` Eli Zaretskii
2010-09-02 12:58               ` "Martin J. Dürst"
2010-09-02 14:13                 ` [emacs-bidi] " Eli Zaretskii
2010-09-01  6:11         ` Eli Zaretskii
2010-09-01  7:08           ` Kenichi Handa
2010-09-01 17:55             ` Eli Zaretskii
2010-09-02  2:13               ` Jason Rumney
2010-09-02 11:53             ` Eli Zaretskii
2010-09-02 12:00               ` Eli Zaretskii
2010-09-02 13:09                 ` [emacs-bidi] " Jason Rumney
2010-09-02 14:29                   ` Eli Zaretskii
2010-09-02 14:37                     ` [emacs-bidi] " Jason Rumney
2010-09-02 13:01               ` Kenichi Handa
2010-09-02 14:04                 ` Eli Zaretskii
2010-09-03  1:00                   ` Kenichi Handa
2010-09-03  9:16                     ` Eli Zaretskii
2010-09-03 10:18                       ` David Kastrup
2010-09-03 11:08                       ` Kenichi Handa
2010-09-03 14:54                         ` Eli Zaretskii
2010-09-03 13:25                     ` Eli Zaretskii
2010-09-03 14:32                       ` Amit Aronovitch
2010-09-03 14:43                         ` Eli Zaretskii
2010-09-04  7:13                       ` Eli Zaretskii [this message]
2010-09-06  6:04                         ` Kenichi Handa
2010-09-04 15:29                     ` Eli Zaretskii
2010-09-02 13:48       ` Jason Rumney
2010-09-02 14:49         ` Eli Zaretskii
2010-09-06 13:45   ` Thamer Mahmoud
2010-09-07  4:22     ` TAKAHASHI Naoto
  -- strict thread matches above, loose matches on Subject: below --
2010-09-07 15:08 mhibti
2010-09-13  6:40 ` Eli Zaretskii
2010-09-16  2:07   ` Kenichi Handa
2010-09-22  3:54     ` Kenichi Handa
2010-09-22 12:27       ` Thamer Mahmoud

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=83d3suhtg4.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-bidi@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=handa@m17n.org \
    --cc=jasonr@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 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.