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: Thu, 22 Sep 2022 08:37:24 +0300 Message-ID: <83h710t1ez.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> <835yhixq1r.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19509"; 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 Thu Sep 22 07:38:16 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 1obEud-0004xk-V9 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 22 Sep 2022 07:38:16 +0200 Original-Received: from localhost ([::1]:49228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obEuc-0002iL-Oo for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 22 Sep 2022 01:38:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56548) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obEuQ-0002eG-FA for bug-gnu-emacs@gnu.org; Thu, 22 Sep 2022 01:38:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36750) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1obEuQ-00037h-7d for bug-gnu-emacs@gnu.org; Thu, 22 Sep 2022 01:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1obEuP-00068P-OH for bug-gnu-emacs@gnu.org; Thu, 22 Sep 2022 01:38:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Sep 2022 05:38:01 +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.166382506023552 (code B ref 50951); Thu, 22 Sep 2022 05:38:01 +0000 Original-Received: (at 50951) by debbugs.gnu.org; 22 Sep 2022 05:37:40 +0000 Original-Received: from localhost ([127.0.0.1]:35828 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1obEu3-00067o-SM for submit@debbugs.gnu.org; Thu, 22 Sep 2022 01:37:40 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38598) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1obEu0-00067Z-CC for 50951@debbugs.gnu.org; Thu, 22 Sep 2022 01:37:38 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52302) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obEtu-0002YL-22; Thu, 22 Sep 2022 01:37:30 -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=EbNEMt+sCVMhlktB0ZMrhk8A7XTXcE25ajuqBQ1FDTE=; b=EIqNk+Z6SOVB 5zOgqIRMWcuAF/5gdynGDPJl2dUBUW5q3DCMV91QK+hrXpEuKyaTAx220b/sRnn0ad3JZfRGlx+tz O1AAYj0TVGex2nUWtbrAKiRfNzmhLwi7sWheKkpxSgGh1WfM+dRJxyq53qPoT6LRCYgGh6x34Npiy /a9PHm5ByEf16bdauC1OcwcWxoePkmeFgaXFvYYymRLysWfs+E0pAVA59KhxNYF9RUpU9izkobOsq RbIxWwKYyl2aaSkf3x14DBDMUVFmmL8DnZ0pz6q7fkt6A89x9Q13IC9x3eg3xd3qjzG+cnay/xZQR CvJkv2qS81M7BD+1A7Dv/A==; Original-Received: from [87.69.77.57] (port=2359 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 1obEtf-0001ht-Rw; Thu, 22 Sep 2022 01:37:29 -0400 In-Reply-To: (message from YAMAMOTO Mitsuharu on Wed, 21 Sep 2022 11:20:54 +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:243391 Archived-At: > Date: Wed, 21 Sep 2022 11:20:54 +0900 > From: YAMAMOTO Mitsuharu > Cc: rahguzar@zohomail.eu, > visuweshm@gmail.com, > larsi@gnus.org, > 50951@debbugs.gnu.org > > > 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. > > IIUC, the only "unsound" case is that the width of a grapheme cluster > is exactly 0 before rounding. I think such a case is quite rare. And > even for such a case, Emacs needs to put at least extra 1 pixel to > move the cursor to the position of the grapheme cluster. So the > adjustment made by the patch is minimum and necessary. > > The current (unpatched) master may put multiple pixels (space width of > the font as in Line 32433 above), and moreover the corresponding > glyphs are not displayed. If we keep this behavior for the "unsound" > case, the result would be much more apart from the optimal. Can you please point me to the place(s) in our code where this rounding takes place? Also, I asked whether you could elaborate on the rationale for adjusting the zero width to be 1 pixel, and I don't think you answered that particular question. What you are saying (AFAIU) is that heuristically the results of using this adjustment are better, at least in this case. I don't argue with that, but I wonder whether there's some rationale for this that isn't just heuristics? IOW, do you know how come hb-view doesn't have this problem? what do we do that produces the zero width where hb-view doesn't? Thanks.