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: Wed, 13 Sep 2017 23:02:56 +0900

In article 
<CALp2H_2w50RrBiaWV1dpg760cUpamy1nZdRgrwJKAjESq3no3Q@mail.gmail.com>, Nima 
Aryan <nimawebgard@gmail.com> writes:

> I can confirm that this code solves the problem for many fonts I tested
> including:
>    DejaVu Sans, Vazir Code, Inconsolata-g, Office Code Pro, Ubunto, Meslo,
> ...

Thank you for testing my code.

> The fonts I still see some problems are 'Droid Sans Regular' which shows
> hallow boxes and Noto Sans which shows a narrow width bar.

That's perhaps because they define those glyphs for ZWNJ.

To avoid that problem, there are two ways:
(1) display ZWNJ with a glyph for space (if the font has a glyph for space)
(2) do not generate a glypgh for ZWNJ

Please try the attached new version.  It tries (1).  If you change the
value of arabic-font-shape-gstring to
`arabic-font-shape-gstring-ZWNJ-absorb, it tries (2).

As an editor, I think (1) is better, but an Arabic/Persian user may have
different opinion.

---
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]