From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#50951: 28.0.50; Urdu text is not displayed correctly Date: Tue, 20 Sep 2022 14:07:12 +0300 Message-ID: <835yhixq1r.fsf@gnu.org> 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> <835yhzifuw.fsf@gnu.org> <87o7vqxuvs.fsf@gmail.com> <87h71gwpr5.fsf@zohomail.eu> <87mtayymk5.fsf@zohomail.eu> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18458"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rahguzar@zohomail.eu, larsi@gnus.org, 50951@debbugs.gnu.org, visuweshm@gmail.com To: YAMAMOTO Mitsuharu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 20 16:39:07 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 1oaeOw-0004en-Gq for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 20 Sep 2022 16:39:06 +0200 Original-Received: from localhost ([::1]:60696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oaeOv-00069f-Eb for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 20 Sep 2022 10:39:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46388) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oab6g-0007E6-NT for bug-gnu-emacs@gnu.org; Tue, 20 Sep 2022 07:08:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57225) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oab6g-0003LN-G1 for bug-gnu-emacs@gnu.org; Tue, 20 Sep 2022 07:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oab6g-00068j-Ac for bug-gnu-emacs@gnu.org; Tue, 20 Sep 2022 07:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Sep 2022 11:08: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.166367205323565 (code B ref 50951); Tue, 20 Sep 2022 11:08:02 +0000 Original-Received: (at 50951) by debbugs.gnu.org; 20 Sep 2022 11:07:33 +0000 Original-Received: from localhost ([127.0.0.1]:56303 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oab6C-000681-PF for submit@debbugs.gnu.org; Tue, 20 Sep 2022 07:07:33 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oab6A-00067n-H6 for 50951@debbugs.gnu.org; Tue, 20 Sep 2022 07:07:31 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35452) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oab5p-0003D8-5r; Tue, 20 Sep 2022 07:07:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ZPVr4rlWYggsaXhVU+qoD+0JkVF1r8ABImmHzIsdTtM=; b=RnopcGHuKtkA 4xQ9J+4qiFQ54SezuAXAt43mwmpX5vzltdiO2KWlxr0jqhUHV7U3pl9uXMJ+29cAVnTzvS4B12HKH pT6wb7ppqQ1zBOCu8XlMnaM9lOmkgJFu/zZ0LUQfUVK1TeNFIlSV1vltrsR5WhxULBifxs1Ikxh4z Q7unH6hT6CRe7g6eJTDKBPaOLH1tbRI9LnDS8cKWNxLfalkFI9Ucp4PO8CO0SKikI7QuucTxnQszU X+0PQOM7PD83Doc0QhdVZjglkXy7+q8A4DAS37lf0xsMwRmIpghDAsMVOzSoDksupZIqaFT+y8lG8 YAWlJ4YWrbx2sAbVK8SAIA==; Original-Received: from [87.69.77.57] (port=4984 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oab5l-0006jm-U9; Tue, 20 Sep 2022 07:07:07 -0400 In-Reply-To: (message from YAMAMOTO Mitsuharu on Tue, 20 Sep 2022 12:41:40 +0900) 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:243162 Archived-At: > Date: Tue, 20 Sep 2022 12:41:40 +0900 > From: YAMAMOTO Mitsuharu > Cc: Visuwesh , > Eli Zaretskii , > larsi@gnus.org, > 50951@debbugs.gnu.org > > The width of grapheme cluster corresponding to U+06AF (ARABIC LETTER > GAF) is rounded to zero, and Emacs does not display such clusters: > > xdisp.c: > 32424 gstring = composition_gstring_from_id (it->cmp_it.id); > 32425 it->pixel_width > 32426 = composition_gstring_width (gstring, it->cmp_it.from, it->cmp_it.to, > 32427 &metrics); > 32428 if (it->pixel_width == 0) > 32429 { > 32430 it->glyph_not_available_p = true; > 32431 it->phys_ascent = it->ascent; > 32432 it->phys_descent = it->descent; > 32433 it->pixel_width = face->font->space_width; > 32434 } > 32435 else > > The attached patch avoids zero-width grapheme clusters by adding 1 to > the width of the last glyph in such clusters. If the problem is rounding, I think we should do this adjustment only when the last glyph has a non-zero width that was rounded to zero, no? Otherwise, we are inventing adjustments out of thin air, which could adversely affect the displayed result, I think? Or maybe we should have a variable that controls this heuristic? Bottom line: I'm uneasy with messing with the grapheme cluster data without some sound basis. We delegate this job to a text-shaping engine for a reason. But if there is a sound basis for this adjustment, could you please elaborate on it? Thanks.