Ligature sequence ramdomness

So the code sequence for dlig's goes like this:

sub A A by A_A;
sub K A by K_A;
sub R A by R_A;

I understand why K_A gets priority over A_A, but why A_A gets priority over R_A?
Or vice-versa.

agisaak's picture

The opentype implementation can sometimes sort ligature ordering in rather arcane ways (see the comments on ligatures at

If you want complete control over how your ligatures are prioritized, you should include explicit lookup declarations in your code. For example, if you want your RA ligature to take priority over other ligatures, include the following:

feature dlig {

lookup HighestPriority { # This lookup will be applied to the text run first.
sub R A by R_A;
} HighestPriority;

lookup LowerPriority { # These substitutions will be applied after R_A substitutions.
sub A A by A_A;
sub K A by K_A;
} LowerPriority;

} dlig;

Syndicate content Syndicate content