Calt and rlig priority? can someone explain?

Salam and Hi,

a little problem:

i have a calt rule for to change seen and meem when they meet to be like this (i chose calt instead of rlig)

sub seen-ar’ meem-ar by seen-ar.alt
sub seen-ar.alt meem-ar’ by meem-ar.alt

and i also have an rlig for meem_reh-ar.rlig

now when in a word i have seen_meem_reh in order i want the ligature to win and show, so i want to see a normal seen followed by meem_reh-ar.rlig, but calt seems to win… what should i do?

can someone explain how these things fall in priority ?

also, does the order of code lines in calt and rlig affect who overrides the other in-case of conflict?

another question: how can i code: sub this’ this by that except when these follows as third litters ?

You can control it by reordering the features (actually the lookups in the features). If the calt feature comes first, then the alternates shaped are already in place.

You might need to add several lookups to the rlig feature. Some for the normal ligature substitutions and some for the contextual subs.

Or you need to add an extra sub like ‘sub seen-ar.alt meem-ar.alt reh-ar by …’

Or in calt before the mentioned subs, do ‘ignore sub seen-ar’ meem-ar reh-ar;’

(All typed on the phone so it might have typos)

1 Like

Thanks @GeorgSeifert !
i’ll try these inshaAllah

الحمد لله!
@GeorgSeifert yup it worked amazingly (ignore sub)