From unknown Mon Jun 23 13:53:40 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#20173 <20173@debbugs.gnu.org> To: bug#20173 <20173@debbugs.gnu.org> Subject: Status: 24.4; Rendering misallocates combining marks on ligatures Reply-To: bug#20173 <20173@debbugs.gnu.org> Date: Mon, 23 Jun 2025 20:53:40 +0000 retitle 20173 24.4; Rendering misallocates combining marks on ligatures reassign 20173 emacs submitter 20173 Richard Wordingham severity 20173 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 22 21:06:48 2015 Received: (at submit) by debbugs.gnu.org; 23 Mar 2015 01:06:48 +0000 Received: from localhost ([127.0.0.1]:32890 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YZqpM-00053f-F1 for submit@debbugs.gnu.org; Sun, 22 Mar 2015 21:06:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55208) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YZqpL-00053T-4x for submit@debbugs.gnu.org; Sun, 22 Mar 2015 21:06:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YZqpF-0007I8-5f for submit@debbugs.gnu.org; Sun, 22 Mar 2015 21:06:41 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:50322) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YZqpF-0007I4-37 for submit@debbugs.gnu.org; Sun, 22 Mar 2015 21:06:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56930) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YZqpE-00013u-4v for bug-gnu-emacs@gnu.org; Sun, 22 Mar 2015 21:06:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YZqpA-0007HV-5C for bug-gnu-emacs@gnu.org; Sun, 22 Mar 2015 21:06:40 -0400 Received: from know-smtprelay-omc-9.server.virginmedia.net ([80.0.253.73]:44897) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YZqp9-0007HH-SU for bug-gnu-emacs@gnu.org; Sun, 22 Mar 2015 21:06:36 -0400 Received: from JRWUBU2 ([81.103.224.4]) by know-smtprelay-9-imp with bizsmtp id 6p6a1q00W06JmVd01p6a1y; Mon, 23 Mar 2015 01:06:34 +0000 X-Originating-IP: [81.103.224.4] X-Spam: 0 X-Authority: v=2.1 cv=dJgomYpb c=1 sm=1 tr=0 a=pLuj3OkTrmEUIJBpyvkqVg==:117 a=pLuj3OkTrmEUIJBpyvkqVg==:17 a=IkcTkHD0fZMA:10 a=NLZqzBF-AAAA:8 a=HJCtSMsd4aOmwCstIqEA:9 a=QEXdDO2ut3YA:10 Date: Mon, 23 Mar 2015 01:06:26 +0000 From: Richard Wordingham To: bug-gnu-emacs@gnu.org Subject: 24.4; Rendering misallocates combining marks on ligatures Message-ID: <20150323010626.530d3395@JRWUBU2> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.3 (----) When a ligature of two base characters has two combining marks on the first component but none on the second, the second combining mark is rendered as though it applied to the second component. A good example is the Arabic sequence =D9=84=D9=91=D9=8E=D8=A7 (lam, shadda, fatha, alef -= ) id 1Ya4SU-0002Pd-J4 for submit@debbugs.gnu.org; Mon, 23 Mar 2015 11:40:07 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:43746) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ya4SR-0002P4-Q1 for 20173@debbugs.gnu.org; Mon, 23 Mar 2015 11:40:04 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NLO004008LYWO00@a-mtaout20.012.net.il> for 20173@debbugs.gnu.org; Mon, 23 Mar 2015 17:39:06 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NLO0045V8T5VC20@a-mtaout20.012.net.il>; Mon, 23 Mar 2015 17:39:06 +0200 (IST) Date: Mon, 23 Mar 2015 17:38:52 +0200 From: Eli Zaretskii Subject: Re: bug#20173: 24.4; Rendering misallocates combining marks on ligatures In-reply-to: <20150323010626.530d3395@JRWUBU2> X-012-Sender: halo1@inter.net.il To: Richard Wordingham Message-id: <83wq27raer.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 8BIT References: <20150323010626.530d3395@JRWUBU2> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 20173 Cc: 20173@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Mon, 23 Mar 2015 01:06:26 +0000 > From: Richard Wordingham > > When a ligature of two base characters has two combining marks on the > first component but none on the second, the second combining mark is > rendered as though it applied to the second component. A good example > is the Arabic sequence لَّا (lam, shadda, fatha, alef - U+064E, U+0627), where the shadda is rendered on the lam part of > lam-alif ligature and the fatha on the alif part. This problem is not > restricted to right-to-left scripts; I encountered the problem when > debugging left-to-right rendering. Lam-alif is one of the most > reliably generated ligatures bearing marks on different components. Is it possible that some rule(s) are missing from the end of lisp/language/misc-lang.el? Could you please take a look and see if something needs to be fixed/added in how we set up the compositions for Arabic? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 23 18:41:25 2015 Received: (at 20173) by debbugs.gnu.org; 23 Mar 2015 22:41:25 +0000 Received: from localhost ([127.0.0.1]:34265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YaB2C-0005dr-GZ for submit@debbugs.gnu.org; Mon, 23 Mar 2015 18:41:24 -0400 Received: from know-smtprelay-omc-9.server.virginmedia.net ([80.0.253.73]:43637) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YaB2A-0005df-4n for 20173@debbugs.gnu.org; Mon, 23 Mar 2015 18:41:23 -0400 Received: from JRWUBU2 ([81.103.224.4]) by know-smtprelay-9-imp with bizsmtp id 7AhF1q01C06JmVd01AhFdV; Mon, 23 Mar 2015 22:41:15 +0000 X-Originating-IP: [81.103.224.4] X-Spam: 0 X-Authority: v=2.1 cv=dJgomYpb c=1 sm=1 tr=0 a=pLuj3OkTrmEUIJBpyvkqVg==:117 a=pLuj3OkTrmEUIJBpyvkqVg==:17 a=IkcTkHD0fZMA:10 a=NLZqzBF-AAAA:8 a=mDV3o1hIAAAA:8 a=t1OBdkjkgCQXMNE6nlUA:9 a=QEXdDO2ut3YA:10 Date: Mon, 23 Mar 2015 22:41:07 +0000 From: Richard Wordingham To: Eli Zaretskii Subject: Re: bug#20173: 24.4; Rendering misallocates combining marks on ligatures Message-ID: <20150323224107.4532b1cc@JRWUBU2> In-Reply-To: <83wq27raer.fsf@gnu.org> References: <20150323010626.530d3395@JRWUBU2> <83wq27raer.fsf@gnu.org> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 20173 Cc: 20173@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On Mon, 23 Mar 2015 17:38:52 +0200 Eli Zaretskii wrote: > > Date: Mon, 23 Mar 2015 01:06:26 +0000 > > From: Richard Wordingham > Is it possible that some rule(s) are missing from the end of > lisp/language/misc-lang.el? Could you please take a look and see if > something needs to be fixed/added in how we set up the compositions > for Arabic? There's no relevant problem there. I demonstrated the bug to myself by first rendering Tai Tham and confirming that TONE-2 rendered above the first component of the ligature NAA, fromed from . I then hacked my font so that the glyph for TONE-2 was decomposed into the glyphs for MAI KANG and TONE-2, in that order, and observing TONE-2 being rendered on the second component of the ligature. I then turned to Arabic so that a custom font would not be needed to demonstrate the bug. As to what needs fixing in the Arabic section of misc-lang.el: Clusters containing letters should be limited to letters and marks on them. Otherwise, the digits 1, 2, 3 are reversed in a variable name like =D8=A8=D8=AC=D9=A1=D9=A2=D9=A3=D8=AF. (I'm not sure why the problem d= oesn't appear with =D8=A8=D8=AC=D9=A1=D9=A2=D9=A3.) (set-char-table-range composition-function-table '(#x600 . #x6FF) (list ["[\u0600-\u06FF]+" 0 font-shape-gstring])) should change to something like (set-char-table-range composition-function-table '(#x610 . #x615) (list ["[\u0610-\u0615\u0621-\u065F\u066E-\u06D3\u06D5-\u06EF\u06FA-\u06FC\u06FF= ]+" 0 font-shape-gstring])) ; Skip punctuation (set-char-table-range composition-function-table '(#x621 . #x65F) (list=20 ["[\u0610-\u0615\u0621-\u065F\u066E-\u06D3\u06D5-\u06EF\u06FA-\u06FC\u06FF= ]+" 0 font-shape-gstring])) ; skip digits and punctuation (set-char-table-range composition-function-table '(#x66E . #x6D3) (list=20 ["[\u0610-\u0615\u0621-\u065F\u066E-\u06D3\u06D5-\u06EF\u06FA-\u06FC\u06FF= ]+" 0 font-shape-gstring])) ; skip punctuation (set-char-table-range composition-function-table '(#x6D5 . #x6EF) (list ["[\u0610-\u0615\u0621-\u065F\u066E-\u06D3\u06D5-\u06EF\u06FA-\u06FC\u06FF= ]+" 0 font-shape-gstring])) ; Skip digits (set-char-table-range composition-function-table '(#x6FA . #x6FC) (list=20 ["[\u0610-\u0615\u0621-\u065F\u066E-\u06D3\u06D5-\u06EF\u06FA-\u06FC\u06FF= ]+" 0 font-shape-gstring])) ; Skip symbols (set-char-table-range composition-function-table '(#x6FF . #x6FF) (list ["[\u0610-\u0615\u0621-\u065F\u066E-\u06D3\u06D5-\u06EF\u06FA-\u06FC\u06FF= ]+" 0 font-shape-gstring])) There are more elegant ways of expressing this, which is just as well, for there are also blocks Arabic Supplement (U+0750 to U+077F) and Arabic Extended-A (U+08A0 to U+08FF). Being an international script, the Arabic script has a lot of letters, just like the Latin script. Richard. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 23 23:42:42 2015 Received: (at 20173) by debbugs.gnu.org; 24 Mar 2015 03:42:42 +0000 Received: from localhost ([127.0.0.1]:34377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YaFjl-0005YF-F1 for submit@debbugs.gnu.org; Mon, 23 Mar 2015 23:42:41 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:42262) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YaFjh-0005Xz-RU for 20173@debbugs.gnu.org; Mon, 23 Mar 2015 23:42:39 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NLP003005T96B00@a-mtaout22.012.net.il> for 20173@debbugs.gnu.org; Tue, 24 Mar 2015 05:42:30 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NLP003GV6AU0P60@a-mtaout22.012.net.il>; Tue, 24 Mar 2015 05:42:30 +0200 (IST) Date: Tue, 24 Mar 2015 05:42:18 +0200 From: Eli Zaretskii Subject: Re: bug#20173: 24.4; Rendering misallocates combining marks on ligatures In-reply-to: <20150323224107.4532b1cc@JRWUBU2> X-012-Sender: halo1@inter.net.il To: Richard Wordingham Message-id: <837fu7qcx1.fsf@gnu.org> References: <20150323010626.530d3395@JRWUBU2> <83wq27raer.fsf@gnu.org> <20150323224107.4532b1cc@JRWUBU2> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 20173 Cc: 20173@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Mon, 23 Mar 2015 22:41:07 +0000 > From: Richard Wordingham > Cc: 20173@debbugs.gnu.org > > On Mon, 23 Mar 2015 17:38:52 +0200 > Eli Zaretskii wrote: > > > > Date: Mon, 23 Mar 2015 01:06:26 +0000 > > > From: Richard Wordingham > > > Is it possible that some rule(s) are missing from the end of > > lisp/language/misc-lang.el? Could you please take a look and see if > > something needs to be fixed/added in how we set up the compositions > > for Arabic? > > There's no relevant problem there. I demonstrated the bug to myself by > first rendering Tai Tham and confirming that > TONE-2 rendered above the first component of the ligature NAA, fromed > from . I then hacked my font so that the glyph for TONE-2 > was decomposed into the glyphs for MAI KANG and TONE-2, in that order, > and observing TONE-2 being rendered on the second component of the > ligature. I then turned to Arabic so that a custom font would not be > needed to demonstrate the bug. Sorry, I'm not sure I understand you. If the setting of composition rules for Arabic is not the culprit, then what is? AFAIK, there are no rules that guide Emacs's shaping except what's in composition-function-table. Beyond that, the only other factor is the font backend and how it shapes glyphs given the chunks of text Emacs presents to it. > As to what needs fixing in the Arabic section of misc-lang.el: Thanks, I will look into these. From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 24 04:28:46 2015 Received: (at 20173) by debbugs.gnu.org; 24 Mar 2015 08:28:46 +0000 Received: from localhost ([127.0.0.1]:34476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YaKCb-0005EC-Mn for submit@debbugs.gnu.org; Tue, 24 Mar 2015 04:28:46 -0400 Received: from know-smtprelay-omc-9.server.virginmedia.net ([80.0.253.73]:58910) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YaKCZ-0005Dy-Ir for 20173@debbugs.gnu.org; Tue, 24 Mar 2015 04:28:44 -0400 Received: from JRWUBU2 ([81.103.224.4]) by know-smtprelay-9-imp with bizsmtp id 7LUd1q01K06JmVd01LUdSY; Tue, 24 Mar 2015 08:28:37 +0000 X-Originating-IP: [81.103.224.4] X-Spam: 0 X-Authority: v=2.1 cv=dJgomYpb c=1 sm=1 tr=0 a=pLuj3OkTrmEUIJBpyvkqVg==:117 a=pLuj3OkTrmEUIJBpyvkqVg==:17 a=kj9zAlcOel0A:10 a=NLZqzBF-AAAA:8 a=mDV3o1hIAAAA:8 a=zsJd4dzC6xolN8TzPtkA:9 a=CjuIK1q_8ugA:10 Date: Tue, 24 Mar 2015 08:28:28 +0000 From: Richard Wordingham To: Eli Zaretskii Subject: Re: bug#20173: 24.4; Rendering misallocates combining marks on ligatures Message-ID: <20150324082828.6bad0649@JRWUBU2> In-Reply-To: <837fu7qcx1.fsf@gnu.org> References: <20150323010626.530d3395@JRWUBU2> <83wq27raer.fsf@gnu.org> <20150323224107.4532b1cc@JRWUBU2> <837fu7qcx1.fsf@gnu.org> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 20173 Cc: 20173@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On Tue, 24 Mar 2015 05:42:18 +0200 Eli Zaretskii wrote: > If the setting of composition > rules for Arabic is not the culprit, then what is? AFAIK, there are > no rules that guide Emacs's shaping except what's in > composition-function-table. Beyond that, the only other factor is the > font backend and how it shapes glyphs given the chunks of text Emacs > presents to it. The font backend on Unixy systems consists of three components - m17n (shaping control), libotf (OTL look-up implementation) and Freetype (glyph rendering). The glue between them is in Emacs, most relevantly in function ftfont_drive_otf() in ftfont.c. My analysis of the problem, which could quite easily be wrong, is as follows. To control the positioning of marks for the mark2ligature lookup, it is necessary to record in some fashion which component of the ligature a mark applies to. I cannot see this information being stored. The information should be generated and used by libotf, but needs to be stored between callbacks of ftfont_drive_otf() by m17n. (The initial settings are implicit in the sequence of codepoints.) Storing this information would, so far as I can see, require a change to ftfont_drive_otf(). I may be able to change my font to work round this bug; I can certainly change it to hide the symptom I observed. The solution will be to categorise the ligature NAA as a base glyph rather than as a ligature glyph. There are other places where the HarfBuzz rendering system, which aims to be compatible with Windows, uses this information. In particular, marks applied to a ligature are only allowed to ligate if they apply to the same component of a ligature, and mark2mark positioning only applies if the two marks apply to the same component. This logic is described as 'the most tricky part of the OpenType specification'. Part of the trickiness may be that it seems not to have been published externally (possibly not even internally) by Microsoft. The guiding principle seems to be that one should do the right things to the marks on a ligature of Arabic consonants. I have become well-acquainted with this logic because the 'same component logic' seems to be applied by HarfBuzz regardless of whether the marks are preceded by a base glyph or a ligature glyph. The Windows logic seems similar, but is subtly different. I hit problems with the Tai Tham NAA ligature, because the marks above on its two components do interact. The marks below should probably also interact, but combinations where I would expect them to have to interact seem not to occur in natural text. > > As to what needs fixing in the Arabic section of misc-lang.el: > Thanks, I will look into these. You might want to first check whether composed Arabic is usable. Doesn't making each word a grapheme cluster makes editing unpleasant? It might be worth restricting the clustering to cursively connected sequences of letters within a word. Richard. From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 24 13:03:58 2015 Received: (at 20173) by debbugs.gnu.org; 24 Mar 2015 17:03:59 +0000 Received: from localhost ([127.0.0.1]:35214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YaSFC-0001hv-8Q for submit@debbugs.gnu.org; Tue, 24 Mar 2015 13:03:58 -0400 Received: from mtaout25.012.net.il ([80.179.55.181]:60641) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YaSF9-0001hg-KE for 20173@debbugs.gnu.org; Tue, 24 Mar 2015 13:03:57 -0400 Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0NLQ00B00745BI00@mtaout25.012.net.il> for 20173@debbugs.gnu.org; Tue, 24 Mar 2015 18:58:53 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NLQ009DA7650M20@mtaout25.012.net.il>; Tue, 24 Mar 2015 18:58:53 +0200 (IST) Date: Tue, 24 Mar 2015 19:03:38 +0200 From: Eli Zaretskii Subject: Re: bug#20173: 24.4; Rendering misallocates combining marks on ligatures In-reply-to: <20150324082828.6bad0649@JRWUBU2> X-012-Sender: halo1@inter.net.il To: Richard Wordingham Message-id: <834mpaqqdx.fsf@gnu.org> References: <20150323010626.530d3395@JRWUBU2> <83wq27raer.fsf@gnu.org> <20150323224107.4532b1cc@JRWUBU2> <837fu7qcx1.fsf@gnu.org> <20150324082828.6bad0649@JRWUBU2> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 20173 Cc: 20173@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Tue, 24 Mar 2015 08:28:28 +0000 > From: Richard Wordingham > Cc: 20173@debbugs.gnu.org > > On Tue, 24 Mar 2015 05:42:18 +0200 > Eli Zaretskii wrote: > > > If the setting of composition > > rules for Arabic is not the culprit, then what is? AFAIK, there are > > no rules that guide Emacs's shaping except what's in > > composition-function-table. Beyond that, the only other factor is the > > font backend and how it shapes glyphs given the chunks of text Emacs > > presents to it. > > The font backend on Unixy systems consists of three components - m17n > (shaping control), libotf (OTL look-up implementation) and Freetype > (glyph rendering). The glue between them is in Emacs, > most relevantly in function ftfont_drive_otf() in ftfont.c. > > My analysis of the problem, which could quite easily be wrong, is as > follows. To control the positioning of marks for the mark2ligature > lookup, it is necessary to record in some fashion which component of > the ligature a mark applies to. I cannot see this information being > stored. The information should be generated and used by libotf, but > needs to be stored between callbacks of ftfont_drive_otf() by m17n. > (The initial settings are implicit in the sequence of codepoints.) > Storing this information would, so far as I can see, require a change to > ftfont_drive_otf(). So this means that on Windows this problem does not exist? > You might want to first check whether composed Arabic is > usable. Doesn't making each word a grapheme cluster makes editing > unpleasant? I don't know; I don't speak or write any of the languages that use the Arabic script. I expect the users that do to come up and ask for features they miss. We already allow deletion of single codepoints, even when they are composed; we might as well provide similar features for movement or whatever. But the requests (and, perhaps, even the code) should come from people who actually use these scripts, otherwise it's a sure way to white elephants and other similar creatures. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 24 16:23:00 2015 Received: (at 20173) by debbugs.gnu.org; 24 Mar 2015 20:23:01 +0000 Received: from localhost ([127.0.0.1]:35282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YaVLo-0000BY-Kq for submit@debbugs.gnu.org; Tue, 24 Mar 2015 16:23:00 -0400 Received: from know-smtprelay-omc-9.server.virginmedia.net ([80.0.253.73]:35292) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YaVLm-0000BG-7C for 20173@debbugs.gnu.org; Tue, 24 Mar 2015 16:22:59 -0400 Received: from JRWUBU2 ([81.103.224.4]) by know-smtprelay-9-imp with bizsmtp id 7YNr1q01Q06JmVd01YNr46; Tue, 24 Mar 2015 20:22:51 +0000 X-Originating-IP: [81.103.224.4] X-Spam: 0 X-Authority: v=2.1 cv=dJgomYpb c=1 sm=1 tr=0 a=pLuj3OkTrmEUIJBpyvkqVg==:117 a=pLuj3OkTrmEUIJBpyvkqVg==:17 a=kj9zAlcOel0A:10 a=NLZqzBF-AAAA:8 a=mDV3o1hIAAAA:8 a=ocZjt1zslHqfznHGdGoA:9 a=CjuIK1q_8ugA:10 a=kxP1Ac1UQvUA:10 a=gm3xJ2JEwEIA:10 a=SewdA3Cv8G8A:10 a=ncZ9vwaUYPMA:10 Date: Tue, 24 Mar 2015 20:22:51 +0000 From: Richard Wordingham To: Eli Zaretskii Subject: Re: bug#20173: 24.4; Rendering misallocates combining marks on ligatures Message-ID: <20150324202251.4922de45@JRWUBU2> In-Reply-To: <834mpaqqdx.fsf@gnu.org> References: <20150323010626.530d3395@JRWUBU2> <83wq27raer.fsf@gnu.org> <20150323224107.4532b1cc@JRWUBU2> <837fu7qcx1.fsf@gnu.org> <20150324082828.6bad0649@JRWUBU2> <834mpaqqdx.fsf@gnu.org> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 20173 Cc: 20173@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On Tue, 24 Mar 2015 19:03:38 +0200 Eli Zaretskii wrote: > So this means that on Windows this problem does not exist? Correct. The Arabic test sequence renders properly in Emacs 24.4.1 on Windows 7. Richard. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 27 05:04:53 2015 Received: (at 20173) by debbugs.gnu.org; 27 Mar 2015 09:04:54 +0000 Received: from localhost ([127.0.0.1]:37807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YbQCD-0006AK-KG for submit@debbugs.gnu.org; Fri, 27 Mar 2015 05:04:53 -0400 Received: from know-smtprelay-omc-11.server.virginmedia.net ([80.0.253.75]:58090) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YbQCA-0006A4-S3 for 20173@debbugs.gnu.org; Fri, 27 Mar 2015 05:04:51 -0400 Received: from JRWUBU2 ([81.103.224.4]) by know-smtprelay-11-imp with bizsmtp id 8Z4k1q02406JmVd01Z4kqS; Fri, 27 Mar 2015 09:04:44 +0000 X-Originating-IP: [81.103.224.4] X-Spam: 0 X-Authority: v=2.0 cv=J/vyd3bS c=1 sm=1 a=pLuj3OkTrmEUIJBpyvkqVg==:17 a=kj9zAlcOel0A:10 a=NLZqzBF-AAAA:8 a=mDV3o1hIAAAA:8 a=glEgdktuV1PAvUaosNoA:9 a=CjuIK1q_8ugA:10 a=pLuj3OkTrmEUIJBpyvkqVg==:117 Date: Fri, 27 Mar 2015 09:04:44 +0000 From: Richard Wordingham To: Eli Zaretskii Subject: Re: bug#20173: 24.4; Rendering misallocates combining marks on ligatures Message-ID: <20150327090444.322e6639@JRWUBU2> In-Reply-To: <834mpaqqdx.fsf@gnu.org> References: <20150323010626.530d3395@JRWUBU2> <83wq27raer.fsf@gnu.org> <20150323224107.4532b1cc@JRWUBU2> <837fu7qcx1.fsf@gnu.org> <20150324082828.6bad0649@JRWUBU2> <834mpaqqdx.fsf@gnu.org> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 20173 Cc: 20173@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On Tue, 24 Mar 2015 19:03:38 +0200 Eli Zaretskii wrote: > > Date: Tue, 24 Mar 2015 08:28:28 +0000 > > From: Richard Wordingham > > Cc: 20173@debbugs.gnu.org > > You might want to first check whether composed Arabic is > > usable. Doesn't making each word a grapheme cluster makes editing > > unpleasant? > I don't know; I don't speak or write any of the languages that use the > Arabic script. I expect the users that do to come up and ask for > features they miss. We already allow deletion of single codepoints, > even when they are composed; we might as well provide similar features > for movement or whatever. I forgot that grapheme clustering is done in m17n, not Emacs itself. The m17n code (in ARAB-OTF.flt) is reasonable - it clusters letters with combining marks. It *seems* I have a problem with tpu-forward-char and tpu-backward-char; it's as though there's an initialisation fault which stops them stepping through the Arabic compositions at first. It may be an issue with the presumably underlying forward-char and backward-char; I haven't investigated further. I'll have to record the exact actions provoking the problem before I formally record a bug. Richard. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 27 05:54:34 2015 Received: (at 20173) by debbugs.gnu.org; 27 Mar 2015 09:54:34 +0000 Received: from localhost ([127.0.0.1]:37827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YbQyH-0007NM-KV for submit@debbugs.gnu.org; Fri, 27 Mar 2015 05:54:33 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:53164) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YbQyF-0007N8-6H for 20173@debbugs.gnu.org; Fri, 27 Mar 2015 05:54:32 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NLV00H0078SRQ00@a-mtaout20.012.net.il> for 20173@debbugs.gnu.org; Fri, 27 Mar 2015 12:54:24 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NLV00HZE7IOKFB0@a-mtaout20.012.net.il>; Fri, 27 Mar 2015 12:54:24 +0300 (IDT) Date: Fri, 27 Mar 2015 12:54:22 +0300 From: Eli Zaretskii Subject: Re: bug#20173: 24.4; Rendering misallocates combining marks on ligatures In-reply-to: <20150327090444.322e6639@JRWUBU2> X-012-Sender: halo1@inter.net.il To: Richard Wordingham Message-id: <83619mbwa9.fsf@gnu.org> References: <20150323010626.530d3395@JRWUBU2> <83wq27raer.fsf@gnu.org> <20150323224107.4532b1cc@JRWUBU2> <837fu7qcx1.fsf@gnu.org> <20150324082828.6bad0649@JRWUBU2> <834mpaqqdx.fsf@gnu.org> <20150327090444.322e6639@JRWUBU2> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 20173 Cc: 20173@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Fri, 27 Mar 2015 09:04:44 +0000 > From: Richard Wordingham > Cc: 20173@debbugs.gnu.org > > On Tue, 24 Mar 2015 19:03:38 +0200 > Eli Zaretskii wrote: > > > > Date: Tue, 24 Mar 2015 08:28:28 +0000 > > > From: Richard Wordingham > > > Cc: 20173@debbugs.gnu.org > > > > You might want to first check whether composed Arabic is > > > usable. Doesn't making each word a grapheme cluster makes editing > > > unpleasant? > > > I don't know; I don't speak or write any of the languages that use the > > Arabic script. I expect the users that do to come up and ask for > > features they miss. We already allow deletion of single codepoints, > > even when they are composed; we might as well provide similar features > > for movement or whatever. > > I forgot that grapheme clustering is done in m17n, not Emacs itself. > The m17n code (in ARAB-OTF.flt) is reasonable - it clusters letters > with combining marks. It *seems* I have a problem with tpu-forward-char > and tpu-backward-char; it's as though there's an initialisation fault > which stops them stepping through the Arabic compositions at first. It > may be an issue with the presumably underlying forward-char and > backward-char; I haven't investigated further. I'll have to record > the exact actions provoking the problem before I formally record a bug. Please try in "emacs -Q" without activating the TPU emulation. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 17 18:45:41 2020 Received: (at 20173-done) by debbugs.gnu.org; 17 Aug 2020 22:45:41 +0000 Received: from localhost ([127.0.0.1]:33395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k7nsn-0004sD-CT for submit@debbugs.gnu.org; Mon, 17 Aug 2020 18:45:40 -0400 Received: from mail-yb1-f179.google.com ([209.85.219.179]:46597) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k7nsi-0004rt-NV for 20173-done@debbugs.gnu.org; Mon, 17 Aug 2020 18:45:36 -0400 Received: by mail-yb1-f179.google.com with SMTP id x10so10261129ybj.13 for <20173-done@debbugs.gnu.org>; Mon, 17 Aug 2020 15:45:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=UojEG2miZrDa+nXMt/DHYrDTB8Pv2lFz52fQJTtbadU=; b=NpVAVUA1dRHz0wkDbX88z3W2IcmpkSn/YvRT2bx0EeJZ7uW3exxyCvzDzajNgXE2Ae q9n3CLO/zBZVDXZ8CKpuIY2unBI7/hSrB751WhDi7RhTrCTrnf1jwKHc+AO5gHVYzm2o PjajSU0vzMikx7f3+c2zfpimW3KhC4RfqXjxUgSON33Hwad/PLABIStq4528NuqcEw5V xIDQDVywCKHD29u/cjld2XFLaeZoBfj8N9PO0+YzcH1euy774gRXgQZgWvrvdCbtLwb1 0RwL1y5pnfotK2Z0Jg4huRCs0r3+llq5PbHPrsmRTqb0/QIr+wdL80xHFtD44p/+29DW PGCA== X-Gm-Message-State: AOAM533lkbW1NICPji4Lvy6B5e9ozBJi0xdEIMGluNy0brXSPgnvcALr vEBVYUVhBRCEZ1CGqS7zBkAHLMHWMCftPfsGp7I= X-Google-Smtp-Source: ABdhPJzFguvyL3twZq6YYrApv4UDgIZC/Y1SEul+bKrepb2ajop6XyFf1e0Mcdt6c0z6FZOazkx+j6VVUo3Mh4uuyTU= X-Received: by 2002:a5b:508:: with SMTP id o8mr25746125ybp.43.1597704327264; Mon, 17 Aug 2020 15:45:27 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 17 Aug 2020 22:45:26 +0000 From: Stefan Kangas In-Reply-To: <83619mbwa9.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 27 Mar 2015 12:54:22 +0300") References: <20150323010626.530d3395@JRWUBU2> <83wq27raer.fsf@gnu.org> <20150323224107.4532b1cc@JRWUBU2> <837fu7qcx1.fsf@gnu.org> <20150324082828.6bad0649@JRWUBU2> <834mpaqqdx.fsf@gnu.org> <20150327090444.322e6639@JRWUBU2> <83619mbwa9.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Date: Mon, 17 Aug 2020 22:45:26 +0000 Message-ID: Subject: Re: bug#20173: 24.4; Rendering misallocates combining marks on ligatures To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 20173-done Cc: Richard Wordingham , 20173-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Eli Zaretskii writes: >> Date: Fri, 27 Mar 2015 09:04:44 +0000 >> From: Richard Wordingham >> Cc: 20173@debbugs.gnu.org >> >> On Tue, 24 Mar 2015 19:03:38 +0200 >> Eli Zaretskii wrote: >> >> > > Date: Tue, 24 Mar 2015 08:28:28 +0000 >> > > From: Richard Wordingham >> > > Cc: 20173@debbugs.gnu.org >> >> > > You might want to first check whether composed Arabic is >> > > usable. Doesn't making each word a grapheme cluster makes editing >> > > unpleasant? >> >> > I don't know; I don't speak or write any of the languages that use the >> > Arabic script. I expect the users that do to come up and ask for >> > features they miss. We already allow deletion of single codepoints, >> > even when they are composed; we might as well provide similar features >> > for movement or whatever. >> >> I forgot that grapheme clustering is done in m17n, not Emacs itself. >> The m17n code (in ARAB-OTF.flt) is reasonable - it clusters letters >> with combining marks. It *seems* I have a problem with tpu-forward-char >> and tpu-backward-char; it's as though there's an initialisation fault >> which stops them stepping through the Arabic compositions at first. It >> may be an issue with the presumably underlying forward-char and >> backward-char; I haven't investigated further. I'll have to record >> the exact actions provoking the problem before I formally record a bug. > > Please try in "emacs -Q" without activating the TPU emulation. More information was requested, but none was given within 5 years, so I'm closing this bug. If this is still an issue, please reply to this email (use "Reply to all" in your email client) and we can reopen the bug report. Best regards, Stefan Kangas From unknown Mon Jun 23 13:53:40 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 15 Sep 2020 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator