Chatacter sets for Opentype random contextual alternates

jul gordon's picture

Due to typophile.com I found out how I can program an opentype feature for random contextual alternates. (If anybody is interested and didn´t find it yet: http://typophile.com/node/19625)

this is the code I found:

feature salt {
lookup rotate {
sub @set_1 @set_1' by @set_2;
sub @set_2 @set_1' by @set_3;
sub @set_3 @set_1' by @set_4;
sub @set_4 @set_1' by @set_5;
sub @set_5 @set_1' by @set_1;
} rotate;
lookup rotate;
} salt;

Yet, I wonder in which order I should put the charakter sets to make it work.
Do I have to do it like this: A, A.alt1, A.alt2, A.alt3, B, B.alt1, B.alt2, B.alt3
or rather A-Z, then A.alt1-Z.alt1 and so on?
Actually, the last example shows the way I did it, but it didn´t work exept that (logical enough) the liga feature I added before, doesn´t work anymore.

Or is there a completely other way to arrange the glyphs?

I ask this instead of just trying it because takes such a long time to re-arrange the glyphs. So, if anybody doesn´ t know the answer to my first question, but knows how to change the arrangement of glyphs fast, I appreciate it, too.

thanks a lot!

Syndicate content Syndicate content