bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#28339: 25.2; Emacs shows ZWNJ character (Zero Width non-Joiner) as S


From: handa
Subject: bug#28339: 25.2; Emacs shows ZWNJ character (Zero Width non-Joiner) as Space
Date: Mon, 11 Sep 2017 08:08:08 +0900

Hi,

I found why Emacs shows ZWNJ with space.
Emacs on GNU/Linux renders ZWNJ (unless it is absorbed by a rendering
engine) with a glyph defined in a font.  As Vazir Code (and Dejavu Sans)
defines a spacing glyph for ZWNJ, Emacs displays a space.  As Courier New
defines a vertical bar glyph for ZWNJ, Emacs displays a vertivcal bar.
And as Freeserif defines a zero-width glyph, Emacs displays a 1-dot
width space.

So, please try this:

At first, load the attached code to tell Emacs that a glyph of ZWNJ have
1-dot width.

Then, tell Emacs to use the same font for Arabic and ZWNJ as this;

(let ((spec (font-spec :family "Vazir Code")))
  (set-fontset-font nil 'arabic spec)
  (set-fontset-font nil #x200c spec))

One problem with this solution is that if a font has some actual glyph
 (e.g. vertical bar as Courier New), that bar is anyway displayed.

---
K. Handa
handa@gnu.org

Attachment: arabic-shape.el
Description: application/emacs-lisp


reply via email to

[Prev in Thread] Current Thread [Next in Thread]