Ligature substitution in sequence

Hi,
I have e_l.liga and l_l.liga ligatures, and I want to do the following: if a word has the ell sequence, do not substitute el with e_l.liga, but substitute ll with l_l.liga instead.

For example, in the word ‘hello’, instead of h(e_l.liga)lo, it should be he(l_l.liga)o. I can’t figure out how to do this, maybe someone has an idea?

You can do this by manually editing the liga feature code, placing the l_l.liga line before the e_l.liga line, like so:

sub l l by l_l.liga;
sub e l by e_l.liga;

…or with an ignore statement:

ignore sub e' l' l;
sub e' l' by e_l.liga;

Omg, it was so obvious) Thank you!

A tip for those who have the same question and have stumbled upon this topic looking for an answer: you can extend this solution to work in other sequences as well (e.g. hello and helmet):

ignore sub e' l' [l m];  
sub e' l' by e_l.liga;
1 Like

There is another solution. If there are some ligatures that you always prefer to be applied first, put them in an extra lookup:

lookup liga1 {
sub l l by l_l.liga;
} liga1;
lookup liga2 {
sub e l by e_l.liga;
} liga2;

Very useful solution, thanks!