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

From: Rah Guzar <[email-masked]>
Date: Sat, 2 Oct 2021 14:47:37 +0200

On Sat, Oct 2, 2021 at 2:18 PM Eli Zaretskii <[email-masked]> wrote:

> What font displays them individually?  You should be able to tell that
> if you type "C-u C-x =" on one of these characters.
>
This is the default font that `emacs -Q` chooses. Using "C-u C-x =" I see,

ftcrhb:-PfEd-DejaVu Sans-normal-normal-normal-*-13-*-*-*-*-0-iso10646-1
(#x56F)

> So would it be correct to say that using a proper font solves the
> problem?
>

This is almost correct except that the font (NotoNastaliqUrdu) that causes
problems with emacs
works fine in libreoffice and both use harfbuzz.

> I don't think the problem is with compositions, because in the 2
> examples you described above, there are no character compositions.
>
> Moreover, our pattern for asking HarfBuzz to shape Arabic text is
> this:
>
>    "[\u0600-\u074F\u200C\u200D]+"
>
> which includes all of the characters, including U+06C1 which you say
> causes problems.
>
> You could try setting current-iso639-language to the symbol 'ur'
> (without the quotes), that should tell HarfBuzz to shape the text as
> appropriate for Urdu.  But I think the real problem is with the font,
> not with shaping.
>

Sorry, my lack of understanding of terminology got in the way here. I
thought composition referred to
joining characters together.

I did try setting `current-iso639-language` to the symbol `ur`. As you
expected it didn't make a difference.