From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Benjamin Riefenstahl Newsgroups: gmane.emacs.bugs Subject: bug#33944: 27.0.50; harfbuzz: Noto Sans Mandaic not rendered correctly Date: Tue, 01 Jan 2019 19:34:15 +0100 Message-ID: <87zhsk6xco.fsf@turtle-trading.net> References: <87wonoo35z.fsf@turtle-trading.net> <83a7kk4ct1.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1546367592 31506 195.159.176.226 (1 Jan 2019 18:33:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 1 Jan 2019 18:33:12 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 33944@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 01 19:33:07 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1geOqg-00086B-M3 for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Jan 2019 19:33:06 +0100 Original-Received: from localhost ([127.0.0.1]:38932 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1geOsn-0004oB-7L for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Jan 2019 13:35:17 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:56939) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1geOsd-0004nt-MQ for bug-gnu-emacs@gnu.org; Tue, 01 Jan 2019 13:35:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1geOsY-00087B-M0 for bug-gnu-emacs@gnu.org; Tue, 01 Jan 2019 13:35:07 -0500 Original-Received: from debbugsout.gnu.org ([209.51.188.43]:44729) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1geOsY-00086s-Iy for bug-gnu-emacs@gnu.org; Tue, 01 Jan 2019 13:35:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1geOsY-00023W-92 for bug-gnu-emacs@gnu.org; Tue, 01 Jan 2019 13:35:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Benjamin Riefenstahl Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Jan 2019 18:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33944 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33944-submit@debbugs.gnu.org id=B33944.15463676647847 (code B ref 33944); Tue, 01 Jan 2019 18:35:02 +0000 Original-Received: (at 33944) by debbugs.gnu.org; 1 Jan 2019 18:34:24 +0000 Original-Received: from localhost ([127.0.0.1]:44135 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1geOrw-00022V-Ij for submit@debbugs.gnu.org; Tue, 01 Jan 2019 13:34:24 -0500 Original-Received: from odoacer.turtle-trading.net ([93.241.193.16]:55225) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1geOru-00022G-SM for 33944@debbugs.gnu.org; Tue, 01 Jan 2019 13:34:23 -0500 Original-Received: from justinian.turtle-trading.net ([192.168.2.118]) by odoacer.turtle-trading.net with esmtp (Exim 4.80) (envelope-from ) id 1geOrn-0000qI-Sh; Tue, 01 Jan 2019 19:34:15 +0100 Original-Received: from benny by justinian.turtle-trading.net with local (Exim 4.89) (envelope-from ) id 1geOrn-0003Ek-IS; Tue, 01 Jan 2019 19:34:15 +0100 In-Reply-To: <83a7kk4ct1.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 01 Jan 2019 17:28:42 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:154069 Archived-At: Eli Zaretskii writes: > You mean, with other fonts that support Arabic shaping the problem > doesn't happen? Now that you asked, I get the same problem with some words in Syriac, like with this: (set-fontset-font t '(?\u0700 . ?\u07FF) "Serto Mardin 20") (setq bidi-paragraph-direction 'right-to-left) (insert "\u0718\u0726\u0720\u0713\u0717\u073F") The characters should all be connected, but the third and fourth are not in this case. >> From the doc string of bidi-paragraph-direction: > > If this is nil (the default), the direction of each paragraph is > determined by the first strong directional character of its text. > The values of =E2=80=98right-to-left=E2=80=99 and =E2=80=98left-to-righ= t=E2=80=99 override that. > Any other value is treated as nil. > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > Did you set it to t on purpose? If so, can you explain why? No, that was a mistake. OTOH it seems that "is treated as nil" is not true, because "t" has the same effect as "right-to-left". > What happens if bidi-paragraph-direction is set to one of the valid > values? With right-to-left the same happens, with left-to-right it's good again (same as with the default). >> The commit that breaks this is the last one, 48776b7011 "Provide text >> directionality and language to HarfBuzz shaper". Before that commit it >> works for me. > > Can you run Emacs under a debugger and see what value of 'dir' do we > come up with in this snippet from ftfont.c: > > hb_direction_t dir =3D HB_DIRECTION_INVALID; > if (EQ (direction, QL2R)) > dir =3D HB_DIRECTION_LTR; > else if (EQ (direction, QR2L)) > dir =3D HB_DIRECTION_RTL; > /* If the caller didn't provide a meaningful DIRECTION, let HarfBuzz > guess it. */ > if (dir !=3D HB_DIRECTION_INVALID) > hb_buffer_set_direction (hb_buffer, dir); > > Do we call hb_buffer_set_direction, and if so, with what value? With "t" or right-to-left we have dir =3D=3D HB_DIRECTION_LTR, and yes we go into that function. With the default (nil) or left-to-right we have dir =3D=3D HB_DIRECTION_RTL and we also call that function. Is this switched around somewhere? Thanks for looking into this, benny