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

From: Benjamin Riefenstahl <[email-masked]>
Date: Sat, 16 Sep 2017 20:05:23 +0200

>> From: Benjamin Riefenstahl <[email-masked]>
>> I thought that with OpenType at least that depends on the font?

Eli Zaretskii writes:
> It does, but Handa-san seems to say that even the best fonts don't
> consider ZWNJ part of any grapheme cluster, and always leave it alone.

It breaks shaping and ligatures, so the result is not a cluster by
definition, I think.  To the contrary, it breaks the cluster.  Or maybe
the terminology confuses me.

>> For editing, I would like a hair-line type glyph to delete.
>
> We already have a solution for deleting a character which was composed
> with the preceding one(s).  So I think this aspects doesn't have to be
> a factor in our decision how to display ZWNJ.

What I mean is, I would want to see something that I can delete (and
re-add) on its own, with the only other conseqence that the neighboring
characters change shape.

>> * Hightlighting ZWNJ in read-only text while searching for it with
>>   incremental search.
>
> In general, search should ignore ZWNJ and similar controls, at least
> the "folding" search.

I was thinking about searching explicitly for ZWNJ, e.g. to find and
delete wrong uses, or to find out how another auther has achieved a
particular effect.

>> * User-specified replacement via display tables. 
>
> We already have the glyphless-char-display-control feature for that.

Right, I was thinking, if I wanted to implement ZWNJ as a glyph and I
did not want to rely on the font to provide a glyph, I would create my
own glyph and use that.  But I would want the user to be able to replace
it.

benny