unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Rah Guzar <aikrahguzar@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 50951@debbugs.gnu.org
Subject: bug#50951: Fwd: bug#50951: 28.0.50; Urdu text is not displayed correctly
Date: Sat, 2 Oct 2021 16:19:01 +0200	[thread overview]
Message-ID: <CAP094xBGBWrhr2c-ZwpN08p9qH6eP_u7Nq_M1t1HYi9K1YYZyA@mail.gmail.com> (raw)
In-Reply-To: <83mtnrbmk4.fsf@gnu.org>


[-- Attachment #1.1: Type: text/plain, Size: 4656 bytes --]

On Sat, Oct 2, 2021 at 3:09 PM Eli Zaretskii <eliz@gnu.org> wrote:

> The way to investigate such problems is to see what does hb-view, a
> program that is part of the HarfBuzz installation, produce for the
> same text with the same font.  If hb-view produces correct display,
> but Emacs doesn't, then the problem is indeed in Emacs; otherwise the
> problem is probably with the font, and in any case should be taken up
> with the HarfBuzz developers.
>

I tried hb-view with NotoNastaliqUrdu and the text:
 خوبی اپنی قسمت کی
This is what I get
[image: urduhbtestnoto.png]
While in emacs I discovered how it is displayed depends a lot on the font
size.

For the same text at size 16, I get

[image: emacsq16.png]

At size 24 it looks almost correct
[image: emacsq24.png]
At size 32 it is really bad again
[image: emacsq32.png]
And the issue seem to be glyph placement rather than shaping.

NotoNastaliqUrdu seems to be the only font with this issue. I am not sure
if the problem is due to Nastaliq.
The other two Nastaliq fonts seem to handle joining characters through
composition. If I change font using

(set-fontset-font t 'arabic (font-spec :family "Jameel Noori Nastaleeq"
:size 32))

and move cursor to the word "قسمت" which has 4 characters, the cursor
encompasses all of them and "C-u C-x u"
gives

-----------------------------------------------------------------------------------------------------------------------
             position: 157 of 283 (55%), column: 11
            character: ق‎ (displayed as ق‎) (codepoint 1602, #o3102, #x642)
              charset: unicode (Unicode (ISO10646))
code point in charset: 0x0642
               script: arabic
               syntax: w which means: word
             category: .:Base, R:Right-to-left (strong), b:Arabic
             to input: type "C-x 8 RET 642" or "C-x 8 RET ARABIC LETTER QAF"
          buffer code: #xD9 #x82
            file code: #xD9 #x82 (encoded by coding system utf-8-unix)
              display: composed to form "قسمت" (see below)

Composed with the following character(s) "سمت" using this font:
  ftcrhb:-pdms-Jameel Noori
Nastaleeq-normal-normal-normal-*-32-*-*-*-*-0-iso10646-1
by these glyphs:
  [0 3 1578 11352 50 1 51 30 1 nil]
with these character(s):
  س (#x633) ARABIC LETTER SEEN
  م (#x645) ARABIC LETTER MEEM
  ت (#x62a) ARABIC LETTER TEH

Character code properties: customize what to show
  name: ARABIC LETTER QAF
  general-category: Lo (Letter, Other)
  decomposition: (1602) ('ق')

There are text properties here:
  fontified            nil
-----------------------------------------------------------------------------------------------------------------------------

Changing to NotoNastaliqUrdu using

(set-fontset-font t 'arabic (font-spec :family "NotoNastaliqUrdu" :size 32))

the cursor moves through one character at a time and moving the cursor to
the beginning of the same word
"C-u C-x =" gives

-----------------------------------------------------------------------------------------------------------------------------------------
             position: 157 of 282 (55%), column: 11
            character: ق‎ (displayed as ق‎) (codepoint 1602, #o3102, #x642)
              charset: unicode (Unicode (ISO10646))
code point in charset: 0x0642
               script: arabic
               syntax: w which means: word
             category: .:Base, R:Right-to-left (strong), b:Arabic
             to input: type "C-x 8 RET 642" or "C-x 8 RET ARABIC LETTER QAF"
          buffer code: #xD9 #x82
            file code: #xD9 #x82 (encoded by coding system utf-8-unix)
              display: composed to form "ق" (see below)

Composed using this font:
  ftcrhb:-GOOG-Noto Nastaliq
Urdu-normal-normal-normal-*-32-*-*-*-*-0-iso10646-1
by these glyphs:
  [0 0 1602 16 0 -6 6 35 -26 [3 -16 0]]
  [0 0 1602 983 0 0 0 0 0 nil]
  [0 0 1602 284 8 -1 8 24 6 [0 -23 8]]

Character code properties: customize what to show
  name: ARABIC LETTER QAF
  general-category: Lo (Letter, Other)
  decomposition: (1602) ('ق')

There are text properties here:
  fontified            t
-----------------------------------------------------------------------------------------------------------------------------------------

(Are you sure that LibreOffice uses NotoNastaliqUrdu for the text you
> type there?  They could use a different font under the hood.)
>

LibreOffice uses something else by default and when I changed to
NotoNastaliqUrdu the appearance changes
and is the same as what I get with hb-view.

[-- Attachment #1.2: Type: text/html, Size: 6234 bytes --]

[-- Attachment #2: urduhbtestnoto.png --]
[-- Type: image/png, Size: 28533 bytes --]

[-- Attachment #3: emacsq16.png --]
[-- Type: image/png, Size: 1642 bytes --]

[-- Attachment #4: emacsq24.png --]
[-- Type: image/png, Size: 3916 bytes --]

[-- Attachment #5: emacsq32.png --]
[-- Type: image/png, Size: 4810 bytes --]

  reply	other threads:[~2021-10-02 14:19 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-01 20:11 bug#50951: 28.0.50; Urdu text is not displayed correctly Rah Guzar
2021-10-02  6:07 ` Eli Zaretskii
     [not found]   ` <CAP094xCyzg62eHeYCUkWy+eBCbEXC_AAU5YFbhTCcCR0cAOCQw@mail.gmail.com>
2021-10-02 11:43     ` bug#50951: Fwd: " Rah Guzar
2021-10-02 12:18       ` Eli Zaretskii
2021-10-02 12:47         ` Rah Guzar
2021-10-02 13:09           ` Eli Zaretskii
2021-10-02 14:19             ` Rah Guzar [this message]
2021-10-02 14:50               ` Eli Zaretskii
     [not found]                 ` <CAP094xBq9YjL6xS56t-C3uhSH69TawhsCrF2FdSMySeDpZfGNw@mail.gmail.com>
2021-10-02 15:09                   ` Eli Zaretskii
2021-10-02 15:18                     ` Rah Guzar
2021-10-02 14:18           ` Andreas Schwab
2021-10-02 14:40             ` Eli Zaretskii
2021-10-02 15:07             ` Rah Guzar
2021-10-02 15:14               ` Eli Zaretskii
     [not found]                 ` <CAP094xAoHdQZoPL9y6aZOq-WGZe0cYtNsm9Trm+yBiyjyZ4j7g@mail.gmail.com>
2021-10-02 15:54                   ` Eli Zaretskii
2021-10-02 16:06                     ` Rah Guzar
2021-10-02 16:09                       ` Eli Zaretskii
2022-09-04 21:07                         ` Lars Ingebrigtsen
2022-09-05 11:22                           ` Eli Zaretskii
2022-09-05 11:57                           ` Rah Guzar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-05 12:29                             ` Eli Zaretskii
2022-09-05 13:03                               ` Rah Guzar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-05 13:55                                 ` Eli Zaretskii
     [not found]                                   ` <87pmg97vsg.fsf@zohomail.eu>
2022-09-05 15:47                                     ` Eli Zaretskii
2022-09-06  4:26                                 ` Visuwesh
2022-09-06 11:05                                   ` Eli Zaretskii
2022-09-06 13:18                                     ` Visuwesh
2022-09-07  6:18                                 ` YAMAMOTO Mitsuharu
2022-09-07 11:27                                   ` Eli Zaretskii
2022-09-08  6:06                                     ` Visuwesh
2022-09-09 15:00                                       ` Rah Guzar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-17 16:37                                         ` Rah Guzar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-17 17:00                                           ` Eli Zaretskii
2022-09-20  3:41                                           ` YAMAMOTO Mitsuharu
2022-09-20 11:07                                             ` Eli Zaretskii
2022-09-21  2:20                                               ` YAMAMOTO Mitsuharu
2022-09-21  2:25                                                 ` YAMAMOTO Mitsuharu
2022-09-22  5:37                                                 ` Eli Zaretskii
2022-09-25  7:18                                                   ` YAMAMOTO Mitsuharu
2022-09-26  7:18                                                     ` Eli Zaretskii
2022-09-27  0:29                                                       ` YAMAMOTO Mitsuharu
2022-09-20 12:35                                             ` Rah Guzar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-11 10:26                                       ` Visuwesh
2022-09-11 11:11                                         ` Visuwesh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAP094xBGBWrhr2c-ZwpN08p9qH6eP_u7Nq_M1t1HYi9K1YYZyA@mail.gmail.com \
    --to=aikrahguzar@gmail.com \
    --cc=50951@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).