From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: handa@gnu.org (K. Handa) Newsgroups: gmane.emacs.bugs Subject: bug#20140: 24.4; M17n shaper output rejected Date: Sat, 21 Mar 2015 17:33:17 +0900 Message-ID: <87pp8292cy.fsf@gnu.org> References: <20150318222040.4066e6e9@JRWUBU2> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1426926861 25982 80.91.229.3 (21 Mar 2015 08:34:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 21 Mar 2015 08:34:21 +0000 (UTC) Cc: 20140@debbugs.gnu.org To: Richard Wordingham Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 21 09:34:11 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YZErA-0007aD-2n for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Mar 2015 09:34:08 +0100 Original-Received: from localhost ([::1]:47012 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YZEr9-0006uF-9O for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Mar 2015 04:34:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34574) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YZEr5-0006tz-MV for bug-gnu-emacs@gnu.org; Sat, 21 Mar 2015 04:34:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YZEr4-0002xr-Fn for bug-gnu-emacs@gnu.org; Sat, 21 Mar 2015 04:34:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41551) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YZEr4-0002xl-Cl for bug-gnu-emacs@gnu.org; Sat, 21 Mar 2015 04:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YZEr4-0005ly-70 for bug-gnu-emacs@gnu.org; Sat, 21 Mar 2015 04:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: handa@gnu.org (K. Handa) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Mar 2015 08:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20140 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20140-submit@debbugs.gnu.org id=B20140.142692681522141 (code B ref 20140); Sat, 21 Mar 2015 08:34:02 +0000 Original-Received: (at 20140) by debbugs.gnu.org; 21 Mar 2015 08:33:35 +0000 Original-Received: from localhost ([127.0.0.1]:59559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YZEqc-0005l2-8l for submit@debbugs.gnu.org; Sat, 21 Mar 2015 04:33:34 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:55573 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YZEqZ-0005kt-Kt for 20140@debbugs.gnu.org; Sat, 21 Mar 2015 04:33:32 -0400 Original-Received: from fl1-122-134-88-3.iba.mesh.ad.jp ([122.134.88.3]:59731 helo=tinhau) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1YZEqY-0005Gj-Tx for 20140@debbugs.gnu.org; Sat, 21 Mar 2015 04:33:31 -0400 Original-Received: from handa by tinhau with local (Exim 4.80) (envelope-from ) id 1YZEqL-0007d2-Ea; Sat, 21 Mar 2015 17:33:17 +0900 In-Reply-To: <20150318222040.4066e6e9@JRWUBU2> (message from Richard Wordingham on Wed, 18 Mar 2015 22:20:40 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:100736 Archived-At: In article <20150318222040.4066e6e9@JRWUBU2>, Richard Wordingham 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)=20 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: ---=20=20=20=20 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 "=E0=A4=B9=E0=A4=BF=E0= =A4=82=E0=A4=A6=E0=A5=80" on Emacs, gedit, and, for instance, firefox. They all treat that text as 2 grapheme clusters "=E0=A4=B9=E0=A4=BF=E0=A4=82" and "=E0=A4= =A6=E0=A5=80". 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