Working on a Muhaqqaq Revival and wishing to implement the cursive Kashida.
I exported the typeface for testing in the Adobe Support Fonts folder and included the feature as SALT and for some reason it’s not working, although it does work on Glyphs.
lookup kash1{
lookupflag IgnoreMarks;
sub @init.nokash' kashida-ar kashida-ar by @initkash2;
sub kashida-ar kashida-ar @fina.nokash' by @finakash2;
sub @init.nokash' kashida-ar by @initkash1;
sub kashida-ar @fina.nokash' by @finakash1;
} kash1;
lookup behWawKash{
lookupflag IgnoreMarks;
sub [beh-ar.medi theh-ar.medi]' kashida-ar kashida-ar by [beh-ar.medi.waw.kash2 theh-ar.medi.waw.kash2];
sub kashida-ar kashida-ar [waw-ar.fina]' by [waw-ar.fina.kash2];
sub [beh-ar.medi theh-ar.medi]' kashida-ar by [beh-ar.medi.waw.kash1 theh-ar.medi.waw.kash1];
sub kashida-ar [waw-ar.fina]' by [waw-ar.fina.kash1];
} behWawKash;
lookup delkash1{
lookupflag IgnoreMarks;
sub kashida-ar by zerowidthspace;
} delkash1;
lookup delkash{
lookupflag IgnoreMarks;
sub kashida-ar kashida-ar by zerowidthspace;
} delkash;
SALT:
sub @init.nokash' lookup kash1 kashida-ar' kashida-ar' lookup kash1 @fina.nokash' lookup kash1;
sub [beh-ar.medi theh-ar.medi]' lookup behWawKash kashida-ar' kashida-ar' lookup behWawKash [waw-ar.fina]' lookup behWawKash;
sub @init.nokash' lookup kash1 kashida-ar' lookup kash1 @fina.nokash' lookup kash1;
sub [beh-ar.medi theh-ar.medi]' lookup behWawKash kashida-ar' lookup behWawKash [waw-ar.fina]' lookup behWawKash;
sub kashida-ar' lookup delkash1 kashida-ar' lookup delkash1 [@finakash2 waw-ar.fina.kash2];
sub kashida-ar' lookup delkash1 [@finakash1 waw-ar.fina.kash1];
The headline speaks about exit/entry but you show code for contextual substitutions.
I don’t understand what the code is doing. But you seem to replace some kashidas by zerowidthspace. That might get in the way of the cursive attachment.
You can try FontGoggles to test your fonts. It will tell you what characters will be in the string after applying all features. That might give you some idea what happens.
So what I’m trying to do is to replace the original kashida with zerowidthspace and elongated forms. Problem is, they’re not aligned as glyphs and I’m relying on entry and exit points to align the elongated glyphs together, but in between, there’s the zerowidthspace with entry and exit points. It works on Glyphsapp but still not working on Adobe apps (also not working on Font Goggles).
lookup kash1{
lookupflag IgnoreMarks;
sub @init.nokash' kashida-ar kashida-ar by @initkash2;
sub kashida-ar kashida-ar @fina.nokash' by @finakash2;
sub @init.nokash' kashida-ar by @initkash1;
sub kashida-ar @fina.nokash' by @finakash1;
} kash1;
lookup behWawKash{
lookupflag IgnoreMarks;
sub [beh-ar.medi theh-ar.medi]' kashida-ar kashida-ar by [beh-ar.medi.waw.kash2 theh-ar.medi.waw.kash2];
sub kashida-ar kashida-ar [waw-ar.fina]' by [waw-ar.fina.kash2];
sub [beh-ar.medi theh-ar.medi]' kashida-ar by [beh-ar.medi.waw.kash1 theh-ar.medi.waw.kash1];
sub kashida-ar [waw-ar.fina]' by [waw-ar.fina.kash1];
} behWawKash;
lookup delkash1{
lookupflag IgnoreMarks;
sub kashida-ar by zerowidthspace;
} delkash1;
lookup delkash{
lookupflag IgnoreMarks;
sub kashida-ar kashida-ar by zerowidthspace;
} delkash;
SALT
sub @init.nokash' lookup kash1 kashida-ar' kashida-ar' lookup kash1 @fina.nokash' lookup kash1;
sub [beh-ar.medi theh-ar.medi]' lookup behWawKash kashida-ar' kashida-ar' lookup behWawKash [waw-ar.fina]' lookup behWawKash;
sub @init.nokash' lookup kash1 kashida-ar' lookup kash1 @fina.nokash' lookup kash1;
sub [beh-ar.medi theh-ar.medi]' lookup behWawKash kashida-ar' lookup behWawKash [waw-ar.fina]' lookup behWawKash;
sub kashida-ar' lookup delkash1 kashida-ar' lookup delkash1 [@finakash2 waw-ar.fina.kash2];
sub kashida-ar' lookup delkash1 [@finakash1 waw-ar.fina.kash1];
Firstly, the way you are trying to use kashida may be incompatible with many implementations. Some implementations expect it to be horizontal so it can be dynamically stretched for flushed text. So you will need to test quite a bit and possibly decide which apps to support.
Secondly. You do not need to (and should not) substitute with a zero-width glyphs. Better like this:
sub @init kashida-ar by @initlong;
sub @medi kashida-ar by @medilong;
sub [@initlong @medilong] [@medi @fina]' by [@medilong @finalong];
And something analogous for the very long variants.
For some reason though, when I try something like this
sub @init kashida-ar by @initlong;
it gives me ‘Cannot substitute by multiple ligature glyphs’. Which is why I replaced the kashida with zerowidthspace. Should I just replace the kashida with NULL or should I just make the kashida itself the one with multiple steps and just have a variant glyph form that just connects to the cursive kashida steps?