I can’t figure out if this is even possible using tokens:
I have an SS11. In it is a list of upper and lower case *.ss11 glyphs.
In a manual CASE feature I would like to substitute all upper case glyphs, for which an SS11 alternate exists, with their corresponding SS11 variants.
Is it possible to create a token to select these glyphs (in the left side of the ‘by’)? sub $[ TOKEN? ]' by $[case == upper AND name endswith ".ss11"];
No, tokens cannot do this. It’s a tricker problem that it might appear. Glyph orders need to stay in sync, replacing text in glyph names can match parts you don’t want, and it’s still fairly limited even when that is all taken into account.
For code like sub # by #..ss01;, Glyphs can generate that for you when you enable automatic code generation in the ss01 feature.
For more custom needs, it’s best to write the code by hand or write a small script that generates the code you need.