Arabic ligature

Would you please let me know, how can i ignore some ligatures in the certain combination?
like this one. in the sample no.1 i want to ignore the first ligature and in the sample no. 2 the second one

Thanks

Please read the tutorials about contextual and positional alternates. It explains how to make a contextual substitution in feature code with the tick mark ('), and how to exclude certain contexts with the ignore statement.

I read the article but i didn’t find anything to ignore the ligatures
dose it look right to you?

lookup calt7 {
lookupflag IgnoreMarks RightToLeft;
ignore sub [ beh_meem-ar.medi peh_meem-ar.medi teh_meem-ar.medi ]’ beh_meem-ar.medi;
} calt7;

Please tell me what is the problem

Thanks,

Hi,
Any replay?

Thanks

Sorry that bobody has replied yet. Haba you tried ‘ignore sub glyphA glyphB by glyphsC;’

Thanks for the replay
so
lookup calt7 {
lookupflag IgnoreMarks RightToLeft;
ignore sub beh_meem-ar.medi’ beh_meem-ar.medi;
} calt7;

is that right?
here is the sample, all i want is, that the second ligature “beh_meem-ar.medi” would be ignore (decompose) when it comes after itself
having no.2 instead of no.1

The ignore statement must come before a rule. Then the rule will be executed except in the case of the ignore statement. E.g.:

lookup calt7 {
  lookupflag IgnoreMarks RightToLeft;
  ignore sub beh_meem-ar.medi' beh_meem-ar.medi;
  sub beh_meem-ar.medi by beh_meem-ar.medi.alt;
} calt7;

This will always substitute beh_meem-ar.medi with its .alt variant, except when another medial beh-meem ligature follows immediately after.

Thanks for the replay but here is a the problem if i want to ignore (numbers of ligatures) what is the solution? i should have .alt variant for all of them? is there any way to have them in .inti .medi and .fina forms?
something like

lookup calt7 {
lookupflag IgnoreMarks RightToLeft;
ignore sub beh_meem-ar.medi’ beh_meem-ar.medi;
sub beh_meem-ar.medi by beh-ar.medi meem-ar.medi;
} calt7;

I am not sure I understand. You want to prevent a ligature? Can you tell me what is the desired output, in a sequence of glyph names?

Does the code you posted not work as you intend? It must come after the ligature and positional features.

Have you read the Features tutorials, and Tal Leming’s OpenType Cookbook?

Exactly i want to prevent a ligature in the certain combination
i posted the code right after the ligature and positional features
All i want to prevent a first ligature

script arab;
language FAR;
lookupflag IgnoreMarks RightToLeft;
sub beh-ar.medi meem-ar.medi by beh_meem-ar.medi;
sub peh-ar.medi meem-ar.medi by peh_meem-ar.medi;
sub teh-ar.medi meem-ar.medi by teh_meem-ar.medi;
sub theh-ar.medi meem-ar.medi by theh_meem-ar.medi;
sub noon-ar.medi meem-ar.medi by noon_meem-ar.medi;
sub yeh-ar.medi meem-ar.medi by yeh_meem-ar.medi;
sub yeh-farsi.medi meem-ar.medi by yeh_meem-ar.medi;
sub yehHamzaabove-ar.medi meem-ar.medi by yehHamzaabove_meem-ar.medi;
ignore sub [ beh_meem-ar.medi peh_meem-ar.medi teh_meem-ar.medi theh_meem-ar.medi noon_meem-ar.medi yeh_meem-ar.medi yehHamzaabove_meem-ar.medi ]’ [ beh_meem-ar.medi peh_meem-ar.medi teh_meem-ar.medi theh_meem-ar.medi noon_meem-ar.medi yeh_meem-ar.medi yehHamzaabove_meem-ar.medi ];
sub beh_meem-ar.medi by beh-ar.medi meem-ar.medi;
sub peh_meem-ar.medi by peh-ar.medi meem-ar.medi;
sub teh_meem-ar.medi by teh-ar.medi meem-ar.medi;
sub theh_meem-ar.medi by theh-ar.medi meem-ar.medi;
sub noon_meem-ar.medi by noon-ar.medi meem-ar.medi;
sub yeh_meem-ar.medi by yeh-ar.medi meem-ar.medi;
sub yehHamzaabove_meem-ar.medi by yehHamzaabove-ar.medi meem-ar.medi;

Heading

Well, you have two possibilities:
First, you can change your ligature feature, and started with and ignore statement.

ignore sub beh-ar.medi' meem-ar.medi' beh-ar.medi meem-ar.medi;
sub beh-ar.medi' meem-ar.medi' by beh_meem-ar.medi;

Second, you can add contextual alternate feature, where you disband a ligature again after you created it in the previous feature. You would need to specify a context and a so-called one-to-many substitution, like sub beh_meem-ar.medi' beh_meem-ar.medi by beh-ar.medi meem-ar.medi; but I am not sure this is possible yet, a contextual one-to-many substitution. Sorry, cannot test myself, not on my Mac right now.

Thank you
The first possibilities it works but the number of combinations its more than 500, so i’ll leave it for the future until one-to-many substitution its possible.

You could write a little Python script that produces the code for you.

I wish i Could
is there any references?

Start with the primer I wrote, takes an hour:
https://glyphsapp.com/tutorials/scripting-glyphs-part-1

Thanks a lot!