I would like to ask if there is any way to declare a class name (or more appropriately, a short name) for an exact sequence of glyphs?
For example, I want to do the following substitution:
lookup example {
sub a b c d e f m' by g;
} example;
I would be using the same sequence {a b c d e f} many times in different lookups. In order to keep it short and avoid redundancy, is it possible to declare a class name for the sequence as:
my_sequence = {a b c d e f };
and then, the lookup as:
lookup example {
sub my_sequence m' by g;
} example;
So whenever this exact sequence occurs, the "m" followed by it will be replaced by a "g".
I am also interested in combining two sequences like the following:
sequence1 = {a b c d e f };
sequence2 = {g h i j k l m };
sequence3 = {sequence1 sequence2 };
Using Glyph classes doesn't solve the purpose here as it matches individual items against a rule, and not the entire sequence. Please advise if anyone knows of a workaround or a feature for this scenario.
Comments
@mnop = [m-p];
@ghij = [g-j];
lookup SingleSubstitution1 {
sub @mnop by @ghij;
} SingleSubstitution1;
feature rlig {
sub a b c d e f @mnop' lookup SingleSubstitution1;
} rlig;