From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.bugs Subject: bug#50951: 28.0.50; Urdu text is not displayed correctly Date: Wed, 07 Sep 2022 15:18:21 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <83mtnsc63i.fsf@gnu.org> <83sfxjbox7.fsf@gnu.org> <87pmsnwlvo.fsf@igel.home> <837devbgrl.fsf@gnu.org> <8335pjbewj.fsf@gnu.org> <83zgrr9zn1.fsf@gnu.org> <87edwq7srx.fsf_-_@gnus.org> <87y1uy6mn5.fsf@zohomail.eu> <83wnaij974.fsf@gnu.org> <87tu5m6jrw.fsf@zohomail.eu> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9621"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?Q?Goj=C5=8D?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Cc: Eli Zaretskii , larsi@gnus.org, 50951@debbugs.gnu.org To: Rah Guzar Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 07 08:19:14 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oVoP4-0002Jx-08 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Sep 2022 08:19:14 +0200 Original-Received: from localhost ([::1]:36448 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oVoP2-0003us-Rn for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Sep 2022 02:19:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34594) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVoOs-0003ue-Vc for bug-gnu-emacs@gnu.org; Wed, 07 Sep 2022 02:19:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36282) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oVoOs-0005yI-KS for bug-gnu-emacs@gnu.org; Wed, 07 Sep 2022 02:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oVoOs-0006yg-83 for bug-gnu-emacs@gnu.org; Wed, 07 Sep 2022 02:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: YAMAMOTO Mitsuharu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Sep 2022 06:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50951 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 50951-submit@debbugs.gnu.org id=B50951.166253151026784 (code B ref 50951); Wed, 07 Sep 2022 06:19:02 +0000 Original-Received: (at 50951) by debbugs.gnu.org; 7 Sep 2022 06:18:30 +0000 Original-Received: from localhost ([127.0.0.1]:53214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVoOM-0006xv-Aq for submit@debbugs.gnu.org; Wed, 07 Sep 2022 02:18:30 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:59762) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVoOH-0006xi-DF for 50951@debbugs.gnu.org; Wed, 07 Sep 2022 02:18:28 -0400 Original-Received: from mathent.math.s.chiba-u.ac.jp (mathent [192.168.32.5]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id D6DF1F08EA; Wed, 7 Sep 2022 15:18:21 +0900 (JST) (envelope-from mituharu@math.s.chiba-u.ac.jp) In-Reply-To: <87tu5m6jrw.fsf@zohomail.eu> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:241727 Archived-At: On Mon, 05 Sep 2022 22:03:47 +0900, Rah Guzar via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote: > > At your suggestion, I tried hb-view and it renders Noto Nastaliq fine. > Similarly Libre Office which also uses harfbuzz as far as I understand, > also renders it fine. Which is why I said that the problem is limited to > emacs. Probably the following change will fix the problem: diff --git a/src/hbfont.c b/src/hbfont.c index 2721a66120..01db522909 100644 --- a/src/hbfont.c +++ b/src/hbfont.c @@ -598,6 +598,8 @@ hbfont_shape (Lisp_Object lgstring, Lisp_Object direction) make_fixnum (xoff), make_fixnum (yoff), make_fixnum (wadjust))); + else + LGLYPH_SET_ADJUSTMENT (lglyph, Qnil); } return make_fixnum (glyph_len); The other shapers except uniscribe_shape need to be changed, too. Alternatively, one could clear garbage entries at the caller side: diff --git a/src/composite.c b/src/composite.c index 22422cca09..249d7587f6 100644 --- a/src/composite.c +++ b/src/composite.c @@ -876,7 +876,8 @@ fill_gstring_body (Lisp_Object gstring) } LGLYPH_SET_ADJUSTMENT (g, Qnil); } - if (i < LGSTRING_GLYPH_LEN (gstring)) + len = LGSTRING_GLYPH_LEN (gstring); + for (; i < len; i++) LGSTRING_SET_GLYPH (gstring, i, Qnil); } YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp