unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: handa@gnu.org (K. Handa)
To: Richard Wordingham <richard.wordingham@ntlworld.com>
Cc: 20140@debbugs.gnu.org
Subject: bug#20140: 24.4; M17n shaper output rejected
Date: Sat, 21 Mar 2015 17:33:17 +0900	[thread overview]
Message-ID: <87pp8292cy.fsf@gnu.org> (raw)
In-Reply-To: <20150318222040.4066e6e9@JRWUBU2> (message from Richard Wordingham on Wed, 18 Mar 2015 22:20:40 +0000)

In article <20150318222040.4066e6e9@JRWUBU2>, Richard Wordingham <richard.wordingham@ntlworld.com> writes:
[...]
> I extract and analyse what was rendered as shaped ('accepted') and what
> was not ('rejected'), quoting the monitoring output.  I suspect the
> problem is the strict testing of the from and to fields in Lisp function
> font-shape-gstring, which is defined in file font.c.
[...]
> The shaping of the following, with vowels or MEDIAL RA that should be
> rendered before the consonant, was rejected:

> mflt_run( 1A3E 1A6E 1A6C 1A65) produced ( 1A6E>872:1:1 1A3E>810:0:3
1A6C>869:0:3 1A65>862:0:3) 

If U+1A6E is displayed before U+1A3E, and they are in
different grapheme cluster, when you move point forward one
step by one, the cursor must move back and forth as below
(cursor is indicated by dashes):

 display: SPC 1A6E 1A3E+1A6C+1A65 SPC
 step 1:  ---    
 step 2:           --------------
 step 3:      ----
 step 4:                          ---

Is that what you want?

At least, the support for all Indic scripts (they have
characters in logical order as your example of Tai Tham
text) treats re-ordered glyphs as one grapheme cluster.
That is not only Emacs but also gtk (pango) applications.
Please try to move cursor over this Devanagri text "हिंदी" on
Emacs, gedit, and, for instance, firefox.  They all treat
that text as 2 grapheme clusters "हिं" and "दी".  The first
one corresponds to character the sequence U+935 U+93F, and
U+93F (vowel I) is displayed before U+935 (base cosonant).

[...]

> There does appear to be a work around, which is to have m17n declare
> the orthographic syllables it receives to be 'grapheme clusters'.

I think that's the right solution; i.e. make all combined
and out-of-ordered glyphs as one cluster.

> It solves at least some of the problems above.

Which one is not solved by it?

> However, it then makes editing of the 'clusters' more
> difficult.  Note that there are examples above with 5
> characters in a cluster, and this is by no means the
> limit.

But, it seems that the current behavior is accepted, at
least, by Indic people.

By the way, I long ago proposed these commands which enables
you to move point into a grapheme cluster (by suppressing
composing of a cluster temporarily).  It worked in old Emacs (I
don't remember the version), but not in the latest Emacs.

(defun forward-char-intrusive ()
  (interactive)
  (setq disable-point-adjustment t)
  (forward-char 1))

(defun backward-char-intrusive ()
  (interactive)
  (setq disable-point-adjustment t)
  (forward-char -1))

(global-set-key (kbd "C-S-f") 'forward-char-intrusive)
(global-set-key (kbd "C-S-b") 'backward-char-intrusive)

---
K. Handa
handa@gnu.org





  parent reply	other threads:[~2015-03-21  8:33 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-18 22:20 bug#20140: 24.4; M17n shaper output rejected Richard Wordingham
2015-03-19  3:43 ` Eli Zaretskii
2015-03-21  8:33 ` K. Handa [this message]
2015-03-21 17:20   ` Wolfgang Jenkner
2015-03-21 17:58   ` Richard Wordingham
2015-03-21 18:26     ` Eli Zaretskii
2015-03-25 14:25     ` K. Handa
2015-03-25 21:45       ` Richard Wordingham
2015-04-05 19:48       ` Richard Wordingham
2022-02-03 21:21 ` Lars Ingebrigtsen
2022-02-04  7:37   ` Eli Zaretskii
2022-02-05 22:52     ` Richard Wordingham via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-06  8:11       ` Eli Zaretskii
2022-02-06 22:09         ` Richard Wordingham via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-07 14:04           ` Eli Zaretskii
2022-02-07 23:38             ` Richard Wordingham via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-08 22:13         ` Richard Wordingham via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-12 18:54           ` Eli Zaretskii
2022-02-13 16:04       ` Eli Zaretskii
2022-02-13 20:53         ` Richard Wordingham via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-14 13:19           ` Eli Zaretskii
2022-02-14 22:14             ` Richard Wordingham via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-15  1:27               ` Richard Wordingham via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-16 15:13                 ` Eli Zaretskii
2022-02-16 15:12               ` Eli Zaretskii
2022-02-16 15:11           ` Eli Zaretskii
2022-02-13 19:49       ` Eli Zaretskii
2022-02-13 21:11         ` Richard Wordingham via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-14 13:26           ` Eli Zaretskii
2022-02-14 23:26             ` Richard Wordingham via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-15 14:40               ` Eli Zaretskii
2022-02-15 21:06                 ` Richard Wordingham via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-16 13:15                   ` Eli Zaretskii
2022-02-16 19:01                     ` Richard Wordingham via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-16 19:20                       ` 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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pp8292cy.fsf@gnu.org \
    --to=handa@gnu.org \
    --cc=20140@debbugs.gnu.org \
    --cc=richard.wordingham@ntlworld.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).