From: Kenichi Handa <handa@m17n.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: RLM and LRM are composed?
Date: Thu, 01 Apr 2010 21:55:49 +0900 [thread overview]
Message-ID: <tl7sk7f1gdm.fsf@m17n.org> (raw)
In-Reply-To: <83eiizy5bg.fsf@gnu.org> (message from Eli Zaretskii on Thu, 01 Apr 2010 10:56:03 +0300)
In article <83eiizy5bg.fsf@gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:
> > But, the detection of non-spacing mark is done by
> > (= (aref char-width-table CH) 0).
> Hmm.. and why is this wrong?
All formatting characters has width 0 but they are not
combining characters that Unicode expect to be combined with
a preceding base character.
> Anyway, (aref char-width-table #x200f) => 0, so it sounds like the
> current detection should have worked. What am I missing?
The situation is a little bit complicated. For U+200F, we
set this list in the composition-function-table.
(["\\c.\\c^+" 1 compose-gstring-for-graphic]
[nil 0 compose-gstring-for-graphic])
This should read as follows (provided that the buffer
position of U+200F is POS).
(cond
((save-excursion (goto-char (1- POS)) (looking-at "\\c.\\c^+"))
(compose-gstring-for-graphic
(composition-get-gstring (1- POS) (mathc-end 0) ...)))
(t (compose-gstring-for-graphic
(composition-get-gstring POS (1+ POS) ...))))
Here as U+200F doesn't has category "^" (combining), the
second condition succeeds, and compose-gstring-for-graphic
tries to compose just one char U+200F. The problem here is
that the original intention of the second condition is for
an independent combining character not following a base
character, not for a non-combining character of zero width.
What compose-gstring-for-graphic does for a single character
is to adjust the metrics of the glyph to display it as if it
is a spacing character so that a user can edit that
character easily.
Please give me more time to consider the detail of the
current situation.
For your 2nd question:
> 2. Is it a bug or a feature that composed characters don't go through
> the display table? If it's a feature, what is its purpose?
perhaps we should apply the display table at least to a
character that is composed only by itself (i.e. one-char
composition as in the above case).
---
Kenichi Handa
handa@m17n.org
prev parent reply other threads:[~2010-04-01 12:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-29 16:06 RLM and LRM are composed? Eli Zaretskii
2010-03-29 16:53 ` Eli Zaretskii
2010-04-01 6:39 ` Kenichi Handa
2010-04-01 7:56 ` Eli Zaretskii
2010-04-01 12:55 ` Kenichi Handa [this message]
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=tl7sk7f1gdm.fsf@m17n.org \
--to=handa@m17n.org \
--cc=eliz@gnu.org \
--cc=emacs-devel@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.