From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rah Guzar via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#50951: 28.0.50; Urdu text is not displayed correctly Date: Tue, 20 Sep 2022 14:35:47 +0200 Message-ID: <87illii5aq.fsf@zohomail.eu> References: <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> Reply-To: Rah Guzar Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29185"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.8.9; emacs 28.1.50 Cc: 50951@debbugs.gnu.org, Rah Guzar , Eli Zaretskii , larsi@gnus.org, Visuwesh To: YAMAMOTO Mitsuharu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 20 17:13:11 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 1oaevu-0007O3-KX for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 20 Sep 2022 17:13:10 +0200 Original-Received: from localhost ([::1]:59266 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oaevt-0001Hw-Lm for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 20 Sep 2022 11:13:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46638) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oacdV-0002rc-Jo for bug-gnu-emacs@gnu.org; Tue, 20 Sep 2022 08:46:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57437) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oaccY-0004Mo-5J for bug-gnu-emacs@gnu.org; Tue, 20 Sep 2022 08:45:18 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oaccY-0002pM-0F for bug-gnu-emacs@gnu.org; Tue, 20 Sep 2022 08:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Rah Guzar Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Sep 2022 12:45: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.166367789310841 (code B ref 50951); Tue, 20 Sep 2022 12:45:01 +0000 Original-Received: (at 50951) by debbugs.gnu.org; 20 Sep 2022 12:44:53 +0000 Original-Received: from localhost ([127.0.0.1]:56515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaccO-0002om-JR for submit@debbugs.gnu.org; Tue, 20 Sep 2022 08:44:52 -0400 Original-Received: from sender11-pp-o93.zoho.eu ([31.186.226.251]:25826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaccL-0002od-5P for 50951@debbugs.gnu.org; Tue, 20 Sep 2022 08:44:50 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1663677874; cv=none; d=zohomail.eu; s=zohoarc; b=fwwb86/ncyapJOQ6OwU4eKmfR2XAb/Cx/vcJ/BtSfAZsHHkLCgb8yIelpbP6ouO4BT065iQj6YdZsrefAtUppAvSdEesFBjeegeTEGGbf2AhwZmOuv2ejyZYYh+SBPhtW06Ubs8eiBsJD8oEfNeYVsC9Av9UEbZ+U6rIt0t2wgM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1663677874; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=uYvq0c/bGqP2ujZrxlZVGq0suMKdAg3UAFL06la/e3I=; b=H+8gUQKeCAaCcEjvolxItCpjS0K9XQWMIfZW/YB2nXuzzufHM+MClk94UzmxNMv7aGOMdiazZzn3Z2fqqGeuUtm/YM9dmBopWgakg7s+g+0wfT9CA4CVzVe+LelNrbKyfz50R7NUOV1QESaJl4qDV0K4ZIDylbNWS3Z1CWyvTQ0= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=zohomail.eu; spf=pass smtp.mailfrom=rahguzar@zohomail.eu; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1663677874; s=zoho; d=zohomail.eu; i=rahguzar@zohomail.eu; h=References:From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:In-reply-to:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=uYvq0c/bGqP2ujZrxlZVGq0suMKdAg3UAFL06la/e3I=; b=DMVjdMJmyQu5w2tne1mY8kS2HVJ0W6Pb/VSvEGYZ2ZR/6C9e0H7jeUgS5zlzx2t1 V63JLHBFZWWa8lbSmDjoH8FKtsm6EstXBOB01eyw++8e7x4uLTcW4o8rF7DrdecEncC ZOUb4bes6EATZtAjZ3c+XPHDmkFyRhFvFL1Zqqlw= Original-Received: from localhost (emp-85-90.eduroam.uu.se [130.238.85.90]) by mx.zoho.eu with SMTPS id 1663677870936802.4672122769103; Tue, 20 Sep 2022 14:44:30 +0200 (CEST) In-reply-to: X-ZohoMailClient: External 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:243175 Archived-At: Hi, Thank you so much for this patch. Rendering is perfect in my cursory tests after applying this patch. One last problem which is unrelated to this patch: the beginning of some lines is often clipped. For example for me the word, =D8=AA=D9=86=DB=81=D8=A7=D8=A6=DB=8C is shown clipped and is visible from the end of the second of two dots at the top if it is at the beginning of the line. This seems to be the case even for fonts which don't misbehave otherwise. My solution has been to set `bidi-paragraph-direction` to `left-to-right` but that is not ideal. Thanks a lot again, Rah Guzar YAMAMOTO Mitsuharu writes: > On Sun, 18 Sep 2022 01:37:39 +0900, > Rah Guzar wrote: >> >> >> I finally tested the patches and both of them improve the situation by a >> lot but problems still remain. One word that is not rendered by >> accurately by them is >> >> =DB=81=D9=86=DA=AF=D8=A7=D9=85 >> >> Where is problem is fourth character which is >> character: =DA=AF=E2=80=8E (displayed as =DA=AF=E2=80=8E) (codep= oint 1711, #o3257, #x6af) >> charset: unicode-bmp (Unicode Basic Multilingual Plane (U+0000..= U+FFFF)) >> code point in charset: 0x06AF >> script: arabic >> >> This character should be rendered as a circle and two slanted lines >> which seem to get clipped. > > Thanks for testing. > > 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 =3D composition_gstring_from_id (it->cmp_it.id); > 32425 it->pixel_width > 32426 =3D composition_gstring_width (gstring, it->cmp_it.from, it->cmp_= it.to, > 32427 &metrics); > 32428 if (it->pixel_width =3D=3D 0) > 32429 { > 32430 it->glyph_not_available_p =3D true; > 32431 it->phys_ascent =3D it->ascent; > 32432 it->phys_descent =3D it->descent; > 32433 it->pixel_width =3D 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. > > YAMAMOTO Mitsuharu > mituharu@math.s.chiba-u.ac.jp > > [2. text/x-patch; avoid-zero-width-grapheme-clusters.diff]...