GNU bug report logs - #41005
problem with rendering Persian text in Emacs 27

Previous Next

Package: emacs;

Reported by: hossein valizadeh <valizadeh.ho <at> gmail.com>

Date: Fri, 1 May 2020 18:34:01 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #110 received at 41005 <at> debbugs.gnu.org (full text, mbox):

From: Amin Bandali <bandali <at> gnu.org>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, valizadeh.ho <at> gmail.com, 41005 <at> debbugs.gnu.org,
 Pip Cet <pipcet <at> gmail.com>
Subject: Re: bug#41005: problem with rendering Persian text in Emacs 27
Date: Tue, 21 Jul 2020 13:53:25 -0400
[Message part 1 (text/plain, inline)]
Robert Pluim <rpluim <at> gmail.com> writes:

>>>>>> On Tue, 21 Jul 2020 08:40:56 -0400, Amin Bandali <bandali <at> gnu.org> said:
>
>     Amin> Hi Eli, Pip,
>     Amin> Thank you for working on this and fixing it on emacs-27 per the reports.
>
>     Amin> I have not been able to keep a close eye on GNU lists and trackers for a
>     Amin> while now, but I was wondering if there's been any more progress/updates
>     Amin> on this issue on master?  I sometimes read/write in Persian, and this
>     Amin> bug is quite an annoyance. :-)  Changing the text scale (C-x C-=) and/or
>     Amin> filling the paragraph (M-q) seems to sometimes help, but not always; and
>     Amin> the issue remains.
>
> emacs-27 gets merged to master on a regular basis, and the relevant
> commit is present in both:
>
> $ git branch --contains 30a7ee505a
> * emacs-27
> + master
>
> Are you still seeing issues with the latest master?
>
> Robert
>

Ah, great point!  This got me suspicious, so I went ahead and actually
tried both emacs-27 and master in a few different configurations myself.

It seems that with emacs-27, Xft rendering of Arabic/Persian text works
just fine, like it used to: <https://p.bndl.org/persian-emacs-xft.png>.

However, using Cairo+HarfBuzz, on both emacs-27 and master the issue is
still present: <https://p.bndl.org/persian-emacs-ftcrhb.png>.

Excerpts from M-x describe-char RET on a Persian character from Xft and
Cairo+HarfBuzz are at <https://p.bndl.org/persian-emacs-xft.txt> and
<https://p.bndl.org/persian-emacs-ftcrhb.txt> respectively, in case that
might be useful somehow.  The font used for typesetting the Persian text
is Vazir v22.1.0, available from
<https://github.com/rastikerdar/vazir-font/releases/download/v22.1.0/vazir-font-v22.1.0.zip>.

My .Xresources configuration for the Xft and Cairo+HarfBuzz setups, the
former only for emacs-27, and the latter for both emacs-27 and master:

Emacs.FontBackend: xft,x   
Emacs.font: Source Code Pro Medium:size=14

Emacs.FontBackend: ftcrhb,x
Emacs.font: Source Code Pro Medium:size=14

Lastly, it might be worth mentioning that if I recall correctly, when
using xfthb with emacs-27, I observe the same issue.  Which may suggest
that perhaps the issue is related to Emacs's HarfBuzz support.

Hope this is useful.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 4 years and 358 days ago.

Previous Next


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