Entry & Exit points for cursive kashida

Hello Everyone. First time posting!

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.

Here’s the exported outcome on Illustrator:

And here’s how the syntax looks like:

LOOKUPS:

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];

Thanks for the help in advance!

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.

Sorry about the wrong headline.

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).

Here’s how it looks like in glyphs:

Sorry if I wasn’t clear in the beginning. Thanks again!

Just replace the kashida + letter by the elongated letter. No need to put in the zero width glyph, is there?

Working with classes so it gives out “Cannot substitute by multiple ligature glyphs”

Can you show the code?

LOOKUPS:

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];

Can you explain what you are trying to do? That seems to be a bit too complicated.

What I’m trying to do is essentially this>

substitute this string:

initial/medial form > kashida-ar > medial/final form

with this string:

elongated init/medi form > elongated medi/fina form

and the next step would be:

init/medi form > kashida-ar > kashida-ar > medi/fina form

to:

even more elongated init/medi form > even more elongated medi/fina form

Two things.

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.

Understandable. Thank you so much!

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?

Ah yes, you probably need to split this up into individual glyphs, sorry. Like this:

sub beh-ar.init kashida-ar by beh-ar.init.long;

This should also answer your question about substituting kashida.

I came up with this but posted to late.

	sub @Default' kashida-ar kashida-ar by @Longer;
	sub @Default' kashida-ar by @Long;
	sub kashida-ar kashida-ar @Default' by @Longer;
	sub kashida-ar @Default' by @Long;
} long;

lookup cleanup {
	delete kashida-ar' @Longer;
	delete kashida-ar' @Longer;
	delete kashida-ar' @Long;
	delete @Longer kashida-ar';
	delete @Longer kashida-ar';
	delete @Long kashida-ar';
} cleanup;

Sorry for the late reply.

IT WORKS! Thanks a lot and sorry for the hassle.