Display ZWJ and ZWNJ in glyph edit view

i was working on a font and realized ZWJ and ZWNJ did not apply for text mode of the glyph edit window.(they are working in text preview window without kerning support.)

as you know ZWJ and ZWNJ are control characters. ZWJ reset the glyph shape to the connected form and ZWNJ reset the shape of the glyph to isolated form. they could be added from both sides to the glyph and interfere in opentype init/medi/fina/isol works. here are some examples:


(to choose between display or not to display kerning in Glyphs app:)in harfbuzz both ZWJ and ZWNJ are ignored from the kerning between two glyphs. i don’t know the concept comes from the ot spec or not, but this is a good strategy and makes a lot of works easier. also in some shapers(like DW) ZWJ and ZWNJ are not ignored from kernings. i don’t know which way Glyphs would follows, but harfbuzz method is better IMO.

final result in firefox(harfbuzz):(there is negative kerning between yehFarsi-ar.fina and kaf-ar.init and it’s working with a ZWNJ beteen them(compare with text preview in the first image))

The edit view is not fully supporting all opentype/Unicode text layout (e.g. it didn’t do mark positioning). If you like to see a certain shape, you can add that directly (e.g. with the Cmd+F dialog).

i think it’s an important issue for Arabic users, we use ZWNJ(famous as half space) kind of a lot in Farsi, I hope you reconsider and add it to the list.

I know things are very complicated than i can imagine, but at least for ZWJ and ZWNJ it seems not. These two(if exist in the font) break text to seperated shaping sessions with forced letter forms in the beginning and/or at the end of each session. AFAIK these two have not different rules for bidi texts or any further complexities…

Thank you.

Do you mean you like to use the ZWJ and ZWNJ when using the font or inside of Glyphs? The former should be possible already and the later can be easily worked around. I’ll have a look.

No, the problem is just inside the Glyphs.