Prevent two ligatures one behind the other

Hi!

one Question: lets assume you have a typeface with a lot of opt. ligatures. e.G. an “ar” and a standard “fi” ligature. Than you want to prevent that in the word “Grafik” the two ligatures are one behind the other. Only the “ra” should be used. How you can code a rule which prevent this?

this was obviously wrong:

With an ignore statement. This is explained here: https://glyphsapp.com/tutorials/features-part-4-positional-alternates

You will end up with something like this: ignore sub @lig @AllLetters' @AllLetters';

sorry. this did not work out. But I’m also not at all an opentype pro tbh. I tried to understand and transform the article in my case but no positive result.

  • the @AllLetters also includes all ligatures, so it is automatic generated, right?
  • than I need to say “ignore the 2nd lig” —this is the code you wrote me (?!)

this is what I put in calt, but it makes no different at all right now:
ignore sub @lig @lig' @AllLetters';

my lig class looks like this
r_f r_t r_v r_y r_z t_z r_a f_i f_t

and “AllLetters” is automatic generated and includes all glyphs.

Thank you!

You want to prevent the second ligature, right? Your code assumes that it is already there: @lig @lig, that is two ligatures after each other. Perhaps you want try the code line I gave you above. Followed by the ligature substitutions including the tick marks for the original letters.

As for AllLetters, you need to add it first, and then automate it. I believe it is a predefined option in the gear menu in the bottom left of Font Info > Features.

Thank you. I tried several thing. See Screenshots attached. I also talked with a good friend of mine, but we did found a solution. This is what we tried:

your solution:

other ideas

AllLetters Class:

  1. The order of the features matters. You cannot prevent ligatures that are in a feature that comes later.
  2. You need to mark the affected (substituted) sequence with tick marks in the sub rule. You need to repeat the marked sequence of the ignore rule, otherwise it cannot apply.
  3. The ignore statement must come before the rules to which it is supposed to apply.
  4. The ignore statement is only valid until the end of the lookup. It does not affect the next feature.

Try this:

ignore sub @lig @AllLetters' @AllLetters';
sub r' f' by r_f;
sub r' t' by r_t;

… and so on. You may need to make your own classes if you also want to prevent non-letter ligatures like in your calt feature. The @AllLetters class does not apply to parentheses and figures.

sorry for late repsonse. Well… nice – that works! Thank you!