Hi Fabrice, thanks for your reply.
This is indeed interesting, but my problem is kinda backwards. I have the “fine” source text. When I check “Ligatures”, it becomes ‘\uFB01ne’. I wonder if I can somehow get that string, the one that is seen after I check ligatures (the 3 chars long one), from “fine”.
I need this because I want to make some words to change color in arabic languages. In the latest update, Adobe made it so animators correctly count characters (right-to-left, before it counted character left-to-right even if the text layer was RTL). The problem is that arabic has a lot of ligatures, and the Javascript that counts the characters to find the match and the animator that changes the colors count differently. Javascript counts 2 characters per ligature and animator counts one. I get the string via expressions, so I don’t know how to transform it from no ligatures to ligatures, so the Javascript counts characters the same way that the animator does.
I don’t know arabic so I work with some text I took from a lorem ipsum site. I have isolated some of the exceptions. One of them is this لإ which is seen as 2 characters by text.sourceText.length and as 1 by the animator. I observed the same behavior when dealing with the fi ligature so I figured out it’s the same problem and I am trying to fix the fi one.
I hope all of this make sense.