Subject: Re: bug#50951: 28.0.50; Urdu text is not displayed correctly

From: Eli Zaretskii <[email-masked]>
Date: Sat, 02 Oct 2021 09:07:29 +0300

> From: Rah Guzar <[email-masked]>
> Date: Fri, 1 Oct 2021 22:11:32 +0200
> 
> Starting with 'emacs -Q' and using the menu bar to paste urdu text

> حرف نہیں جاں بخشی میں اس کی خوبی اپنی قسمت کی
> ہم سے جو پہلے کہہ بھیجا سو مرنے کا پیغام کیا

> the text is not rendered properly, some characters which should be
> joined together are instead rendered individually.  
>
> It look like this
> 2021-10-01T21:43:10,566697499+02:00.png
> 2021-10-01T21:49:10,611532571+02:00.png

Can you give a few specific examples of characters that should be
joined, but aren't?  Please name the characters and also give they
positions relative to the beginning of this text, as I don't read
Urdu, so the images are useless for me without some additional data
and explanations.

> Changing the font to a Nastaliq font more common for Urdu via
> 
> (set-fontset-font t 'arabic (font-spec :family "NotoNastaliqUrdu"))
> 
> the text is again rendered improperly but in a different way with chracters overlapping each other when they
> shouldn't, others have gaps where they should be joined. It looks like this
> 
> 2021-10-01T22:02:00,166113989+02:00.png
> while it should look like this 
> 
> 2021-10-01T22:05:28,910692941+02:00.png

So isn't this a matter of finding a proper font, in particularly given
the "Nastaliq vs Naskh" issues?  NotoNastaliqUrdu is not the only font
supporting Nastaliq, so perhaps other fonts fare better?

Since Urdu uses the Arabic characters, Emacs uses character
composition rules for Arabic when displaying this text.  Do you know
if the composition rules for Urdu are different?

Also, which version of HarfBuzz do you have installed?

Thanks.