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

From: Eli Zaretskii <[email-masked]>
Date: Wed, 20 Sep 2017 10:25:57 +0300

> From: handa <[email-masked]>
> Cc: [email-masked], [email-masked],
> 	[email-masked]
> Date: Tue, 19 Sep 2017 21:18:31 +0900
> 
> In article <[email-masked]>, Eli Zaretskii <[email-masked]> writes:
> 
> > I don't see this in Unicode, but maybe I'm missing something.
> 
> > Anyway, what would you suggest as a solution to this issue?  Should we
> > install the arabic-font-shape-gstring function into Emacs?  Do we need
> > to do something else in addition?  E.g., do we need to make the
> > display of ZWNJ optional?
> 
> As I don't know what is the right thing, I'm asking here.
> 
> If users never ever want to put cursor on ZWNJ,
> arabic-font-shape-gstring-ZWNJ-absorb is the solution.
> 
> If users want a thin space to be able to handle ZWNJ directly,
> arabic-font-shape-gstring-ZWNJ-as-space is the solution.
> 
> If it depends on a situation or a user's prefernce, it is better to have
> a user customizable variable to switch between them.

Maybe we should go with an option.  I will try to come up with a patch
for that.

> By the way, I've just tried arabic-shape.el on Windows, and found that
> arabic-font-shape-gstring-ZWNJ-as-space worked, which means Windows text
> laout backend on Windows (uniscribe?) also returns ZWNJ glyph.

Yes, it does.

> And, without arabic-font-shape-gstring-ZWNJ-as-space, I see a
> strange cursor display.  Is it the "glitch" you mentioned?

Yes.  Do you understand what is the reason for that?

Thanks.