From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#33944: 27.0.50; harfbuzz: Noto Sans Mandaic not rendered correctly Date: Tue, 01 Jan 2019 17:28:42 +0200 Message-ID: <83a7kk4ct1.fsf@gnu.org> References: <87wonoo35z.fsf@turtle-trading.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1546356427 32251 195.159.176.226 (1 Jan 2019 15:27:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 1 Jan 2019 15:27:07 +0000 (UTC) Cc: 33944@debbugs.gnu.org To: Benjamin Riefenstahl Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 01 16:27:02 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 1geLwc-0008Hr-9N for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Jan 2019 16:27:02 +0100 Original-Received: from localhost ([127.0.0.1]:37994 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1geLyj-00071s-7w for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Jan 2019 10:29:13 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:37866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1geLyb-00071j-5w for bug-gnu-emacs@gnu.org; Tue, 01 Jan 2019 10:29:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1geLyY-0000k6-2B for bug-gnu-emacs@gnu.org; Tue, 01 Jan 2019 10:29:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56152) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1geLyX-0000k0-VO for bug-gnu-emacs@gnu.org; Tue, 01 Jan 2019 10:29:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1geLyX-00061e-Od for bug-gnu-emacs@gnu.org; Tue, 01 Jan 2019 10:29:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Jan 2019 15:29:01 +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.154635653923152 (code B ref 33944); Tue, 01 Jan 2019 15:29:01 +0000 Original-Received: (at 33944) by debbugs.gnu.org; 1 Jan 2019 15:28:59 +0000 Original-Received: from localhost ([127.0.0.1]:44089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1geLyV-00061M-7D for submit@debbugs.gnu.org; Tue, 01 Jan 2019 10:28:59 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:32777) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1geLyS-00061D-3T for 33944@debbugs.gnu.org; Tue, 01 Jan 2019 10:28:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1geLyO-0000ez-RF for 33944@debbugs.gnu.org; Tue, 01 Jan 2019 10:28:55 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45219) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1geLyO-0000et-OB; Tue, 01 Jan 2019 10:28:52 -0500 Original-Received: from [176.228.60.248] (port=2895 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1geLyO-00005p-CD; Tue, 01 Jan 2019 10:28:52 -0500 In-reply-to: <87wonoo35z.fsf@turtle-trading.net> (message from Benjamin Riefenstahl on Tue, 01 Jan 2019 15:36:40 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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] X-Received-From: 208.118.235.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:154063 Archived-At: > From: Benjamin Riefenstahl > Date: Tue, 01 Jan 2019 15:36:40 +0100 > > This may be a more general problem, but Noto Sans Mandaic reproduces it > for me: You mean, with other fonts that support Arabic shaping the problem doesn't happen? > I save this code in a file "reproduce.el" and execute it with "emacs -Q > -l reproduce.el": > > (set-fontset-font t '(?\u0840 . ?\u085B) "Noto Sans Mandaic 20") > > (set-char-table-range > composition-function-table '(?\u0840 . ?\u085B) > (list ["[\u0840-\u085B]+" 0 arabic-shape-gstring])) > > (setq bidi-paragraph-direction t) >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 ‘right-to-left’ and ‘left-to-right’ override that. Any other value is treated as nil. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Did you set it to t on purpose? If so, can you explain why? > (insert "\u0856\u0844\u0845") > > The problem is that the second and third character from the right are > not combined as they should. This works in hb-view and it also works, > if I remove the setting of bidi-paragraph-direction. What happens if bidi-paragraph-direction is set to one of the valid values? > 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 = HB_DIRECTION_INVALID; if (EQ (direction, QL2R)) dir = HB_DIRECTION_LTR; else if (EQ (direction, QR2L)) dir = HB_DIRECTION_RTL; /* If the caller didn't provide a meaningful DIRECTION, let HarfBuzz guess it. */ if (dir != HB_DIRECTION_INVALID) hb_buffer_set_direction (hb_buffer, dir); Do we call hb_buffer_set_direction, and if so, with what value? Thanks.