Text rendering problem using OpenType font and cursive lookups with mixed RIGHT_TO_LEFT flag

Hi,

I am developing an OpenType font with the following cursive feature.

feature curs {  
  lookup cursivejoinrtl;  # RIGHT_TO_LEFT flag set between Hah, Meem, Yeh and final Meem
  lookup rehwawcursive; # RIGHT_TO_LEFT flag clear between Waw and Hah
} curs;

Here is the rendering of the word وحميم in TextEdit.

Using HarfBuzz I got the following result.

The same rendering problem occurs when using Safari. It seems that is related to Core Text.

I reported the issue to Feedback Assistant over a year ago but haven't had a response yet. So I'm posting the problem on this forum.

Any support on this matter would be greatly appreciated.

Text rendering problem using OpenType font and cursive lookups with mixed RIGHT_TO_LEFT flag
 
 
Q