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#33729: 27.0.50; Partial glyphs not rendered for Gujarati with Harfbuzz enabled (renders fine using m17n) Date: Mon, 24 Dec 2018 20:07:04 +0200 Message-ID: <83imzi94tz.fsf@gnu.org> References: <20181222151509.GC2244@macbook.localdomain> <83h8f5a7po.fsf@gnu.org> <20181222154945.GE2244@macbook.localdomain> <83bm5d9wsc.fsf@gnu.org> <20181222205948.GF2244@macbook.localdomain> <838t0gapcj.fsf@gnu.org> <20181223135109.GA6568@macbook.localdomain> <83va3k8c79.fsf@gnu.org> <20181224020847.GC6568@macbook.localdomain> <83lg4e9a7q.fsf@gnu.org> <20181224173723.GH6568@macbook.localdomain> 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 1545674769 14117 195.159.176.226 (24 Dec 2018 18:06:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 24 Dec 2018 18:06:09 +0000 (UTC) Cc: behdad@behdad.org, 33729@debbugs.gnu.org, far.nasiri.m@gmail.com, kaushal.modi@gmail.com To: Khaled Hosny Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 24 19:06:04 2018 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 1gbUc6-0003VV-Hb for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Dec 2018 19:06:02 +0100 Original-Received: from localhost ([127.0.0.1]:38419 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gbUeD-0002FQ-AS for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Dec 2018 13:08:13 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:53240) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gbUe5-0002FJ-Fu for bug-gnu-emacs@gnu.org; Mon, 24 Dec 2018 13:08:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gbUe2-0002ZM-97 for bug-gnu-emacs@gnu.org; Mon, 24 Dec 2018 13:08:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39840) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gbUe2-0002ZC-5q for bug-gnu-emacs@gnu.org; Mon, 24 Dec 2018 13:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gbUe1-0002IE-U9 for bug-gnu-emacs@gnu.org; Mon, 24 Dec 2018 13:08: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: Mon, 24 Dec 2018 18:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33729 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33729-submit@debbugs.gnu.org id=B33729.15456748468771 (code B ref 33729); Mon, 24 Dec 2018 18:08:01 +0000 Original-Received: (at 33729) by debbugs.gnu.org; 24 Dec 2018 18:07:26 +0000 Original-Received: from localhost ([127.0.0.1]:35614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gbUdR-0002HP-Vn for submit@debbugs.gnu.org; Mon, 24 Dec 2018 13:07:26 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:49911) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gbUdQ-0002HD-Bf for 33729@debbugs.gnu.org; Mon, 24 Dec 2018 13:07:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gbUdK-00024A-6o for 33729@debbugs.gnu.org; Mon, 24 Dec 2018 13:07:18 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35505) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gbUdG-00021m-6e; Mon, 24 Dec 2018 13:07:14 -0500 Original-Received: from [176.228.60.248] (port=3591 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gbUdF-0006l0-Ml; Mon, 24 Dec 2018 13:07:14 -0500 In-reply-to: <20181224173723.GH6568@macbook.localdomain> (message from Khaled Hosny on Mon, 24 Dec 2018 19:37:23 +0200) 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:153824 Archived-At: > Date: Mon, 24 Dec 2018 19:37:23 +0200 > From: Khaled Hosny > Cc: rgm@gnu.org, far.nasiri.m@gmail.com, behdad@behdad.org, > 33729@debbugs.gnu.org, kaushal.modi@gmail.com > > > Per previous discussions, we decided to use the Harfbuzz built-in > > methods for determining the script, since Emacs doesn't have this > > information, and adding it will just do the same as Harfbuzz does, > > i.e. find the first character whose script is not Common etc., using > > the UCD database. I think it was you who suggested to use the > > Harfbuzz built-ins in this case. > > The built-in HarfBuzz code is for getting the script for a given > character, but resolving characters with Common script is left to the > client. Suppose you have this string (upper case for RTL) ABC 123 DEF, > what HarfBuzz sees during shaping is three separate chunks of text ABC, > 123, DEF. The 123 part is all Common script characters and thus > hb_buffer_guess_segment_properties won’t be able to guess anything (and > based on the font and the script, this can cause rendering differences). > Emacs will have to resolve the script of Common characters before > applying bidi algorithm and pass that down to HarfBuzz. I'm not sure I understand: why does HarfBuzz care that 123 was in the middle if RTL text. Does it need to shape 123 specially in this case? (In general, AFAIK simple characters like 123 will not even go through HarfBuzz, as Emacs doesn't call the shaper for characters whose entry in composition-function-table is nil. So I guess 123 here should stand for some other characters, not for literal digits? IOW, I don't think I understand the example very well.)