From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: how reliable is rendering of complex scripts? Date: Tue, 06 Oct 2015 19:17:35 +0300 Message-ID: <838u7gx97k.fsf@gnu.org> References: <20151002.073900.472512461.wl@gnu.org> <83pp0x7mnq.fsf@gnu.org> <20151004.063952.389316157.wl@gnu.org> <83zizz1590.fsf@gnu.org> <838u7i1kpn.fsf@gnu.org> <834mi526l3.fsf@gnu.org> <83wpv1xgrc.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1444166483 30745 80.91.229.3 (6 Oct 2015 21:21:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 6 Oct 2015 21:21:23 +0000 (UTC) Cc: emacs-devel@gnu.org To: johnw@newartisans.com, handa@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 06 23:21:11 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from eggs.gnu.org ([208.118.235.92]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZjZfZ-0000Ws-Au for ged-emacs-devel@m.gmane.org; Tue, 06 Oct 2015 23:21:09 +0200 Original-Received: from lists.gnu.org ([208.118.235.17]:60387) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjUyI-0002Gq-Q1 for ged-emacs-devel@m.gmane.org; Tue, 06 Oct 2015 12:20:10 -0400 Original-Received: from localhost ([::1]:52539 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjUyI-0007eX-Jt for ged-emacs-devel@m.gmane.org; Tue, 06 Oct 2015 12:20:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjUvq-0006fg-GZ for emacs-devel@gnu.org; Tue, 06 Oct 2015 12:17:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZjUvn-0006VR-O3 for emacs-devel@gnu.org; Tue, 06 Oct 2015 12:17:38 -0400 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:32975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjUvn-0006V5-Df; Tue, 06 Oct 2015 12:17:35 -0400 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NVT009003JLBZ00@mtaout28.012.net.il>; Tue, 06 Oct 2015 19:17:06 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NVT00AN83WINS00@mtaout28.012.net.il>; Tue, 06 Oct 2015 19:17:06 +0300 (IDT) In-reply-to: <83wpv1xgrc.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.184 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x Xref: news.gmane.org gmane.emacs.devel:191022 Archived-At: > Date: Mon, 05 Oct 2015 22:22:15 +0300 > From: Eli Zaretskii > Cc: emacs-devel@gnu.org > > > The ZWNJ seems to work fine, but the ZWJ does not produce the behavior > > documented here: > > > > http://persian.nmelrc.org/persianword/zwj.htm > > > > That is, ZWJ does not extend the heh into a "heh do chesm" (heh with two > > eyes), it just adds space before or after the final-form (circular) heh. > > I tried to fix that, but I'm not sure it helped. Maybe I simply don't > understand how to write entries for composition-function-table. > Perhaps Handa-san could help. I found a subtle bug in the Emacs bidi reordering engine that affected this. After fixing it, the display is more reasonable in these cases. The only remaining problem is display of sequences where the zero-width controls are not between 2 Arabic letters, e.g. a u+0647 followed by ZWJ and a newline, in a left-to-right paragraph, a relatively rare situation (it does work correctly in R2L paragraphs). The special requirements for treating ZWJ and ZWNJ during the bidi reordering are hard to implement, and the advice in the UBA is incompatible with the design of the Emacs display engine. I will have to think about this some more. One thing that still bothers me is that even though the shaping of the Arabic letters is clearly affected by ZWJ and ZWNJ after the fix, the "C-u C-x =" command doesn't say there was a character composition there. Perhaps Handa-san could explain why is that. Is it a bug?