GNU bug report logs - #50951
28.0.50; Urdu text is not displayed correctly

Previous Next

Package: emacs;

Reported by: Rah Guzar <aikrahguzar <at> gmail.com>

Date: Fri, 1 Oct 2021 20:19:01 UTC

Severity: normal

Tags: moreinfo

Found in version 28.0.50

Done: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Rah Guzar <rahguzar <at> zohomail.eu>
To: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
Cc: 50951 <at> debbugs.gnu.org, Rah Guzar <rahguzar <at> zohomail.eu>, Eli Zaretskii <eliz <at> gnu.org>, larsi <at> gnus.org, Visuwesh <visuweshm <at> gmail.com>
Subject: bug#50951: 28.0.50; Urdu text is not displayed correctly
Date: Tue, 20 Sep 2022 14:35:47 +0200
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,
تنہائی
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 <mituharu <at> math.s.chiba-u.ac.jp> 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
>>
>> ہنگام
>>
>> Where is problem is fourth character which is
>>         character: گ‎ (displayed as گ‎) (codepoint 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 = 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.
>
> 				     YAMAMOTO Mitsuharu
> 				mituharu <at> math.s.chiba-u.ac.jp
>
> [2. text/x-patch; avoid-zero-width-grapheme-clusters.diff]...




This bug report was last modified 2 years and 241 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.