ZWJ (Zero-width joiner) and Tatweel (Kashida) bug

Background:
When placing ZWJ (Zero-width joiner) Unicode character before or after an Arabic letter, it is supposed to force the Arabic letter take on a connected form on either side. The same goes for the Tatweel (or Kashida) character.

So, the 3 cases are as follows:
- when ZWJ precedes (i.e. comes before) an Arabic letter, the letter is forced to take on its “Final” form
- when ZWJ succeeds (i.e. comes after) an Arabic letter, the letter is forced to take on its “Initial” form
- when ZWJ precedes and succeeds an Arabic letter, the letter is forced to take on its “Medial” form

The same applies to the Tatweel (Kashida), however, it also adds a small horizontal line in order to elongate the space between letters. That is the purpose of the Tatweel character. Below is the word “شمس” with multiple Tatweel characters in between the letters.

شــــــــــــــــــــــــــــــــــــــــمــــــــــــــــــــــــــــــــــس

Below are the 3 letters of the above word in their respective Initial, Medial, and Final forms using the ZWJ character:

ش followed by ZWJ → ش‍
ZWJ + م + ZWJ → ‍م‍
س preceded by ZWJ → ‍س


The bug:
In Rive, however, you can only force the Arabic letter to connect from the left (i.e. by placing ZWJ after it) but not from the right (i.e. by placing ZWJ before it).

So in Rive, placing a ZWJ before the Arabic letter doesn’t render it in its correct “Final” form; instead, it renders the incorrect isolated form.
Additionally, placing a ZWJ before and after the Arabic letter doesn’t render it in its correct “Medial” form; instead, it renders its incorrect “Initial” form.

For testing, you can copy the the ZWJ and Tatweel characters from here:
https://unicode-explorer.com/c/200D
https://unicode-explorer.com/c/0640

I have attached a Rive file that shows the bug:
- The artboards on the left show how the letter ش is incorrectly rendered in Rive when it interacts with ZWJ and Tatweel characters (here, 2 out of 4 case are incorrect).
- The artboards on the right show the correct shaping of the Arabic letter ش when it interacts with ZWJ and Tatweel characters (to demonstrate this, I essentially some screenshots from Google Docs).

Additionally, I have confirmed that this bug is seen in Rive for all Arabic letters.

Please let me know if you have any questions. Thanks!

zwj_and_tatweel_bug.rev