I don’t know if I messed up with my code or if it is potentially a bug.
I’m working on a variable Arabic font at the moment and I added conditional replacement to some letters.
Problem: the rlig feature, which is recommended for use in this case, already contains lam-alef required ligatures. Putting the conditional code in the same feature seems to lead to unexpected behaviour.
Example : Let’s say I switch kaf-ar to kafswash-ar over 40 wdth. I combine this code with the lam-alef substitution.
#ifdef VARIABLE
condition 40 < wdth < 100;
sub kaf-ar.init by kafswash-ar.init;
sub kaf-ar.medi by kafswash-ar.medi;
#endif
script arab;
lookup rlig_arab_0 {
lookupflag IgnoreMarks;
sub lam-ar.init alef-ar.fina by lam_alef-ar;
sub lam-ar.medi alef-ar.fina by lam_alef-ar.fina;
} rlig_arab_0;
The above code doesn’t change the kaf. The lam-alef ligature works as expected.
By reversing the order of both, it changes the kaf, but the lam-alef ligature breaks over 40 wdth.
I’ve found that by putting the conditional code in an empty feature (in my case, liga or any stylistic set) resolves the problem. But it’s not appropriate since it can be deactivated by the user. I already use rclt too, and for some reason I can’t get rvrn to work on InDesign. I don’t know what to do to make it hidden to the user and working at the same time.
Thanks in advance.