Another question: Is it possible to add to subtract classes from classes or glyphs from classes?
Something like this @consonants = [b c d] @vowels = [a e] @lowercase = [@consonants + @vowels]
or something this @lowercase = [abcde] @consonants = @lowercase - [a e]
It sort of lets you with adding classes or at least opt click shows what you would expect but there is also the error message of invalid character “+”…so is there another way to do that?
and what about the first question…say that we want a class of SmallCaps then what is the code we need to have that will automatically populate that class with all the .sc glyphs using the $[name endswith '.sc'] predicate token?
(in the tutorial sample image there is something needed to include before the $[name endswith ‘.sc’] but it is hidden behind the popup menu)
Instead of subtracting @FlorianPircher suggests in this post using name in class(SomeClass) predicate token.
trying something based off of @TimAhrens example this but it doesn’t work
@lowercase = [a b c d e];
@vowels = [a e];
@all_lowercase = [$[name in class(lowercase)]];
@all_lowercase_except_vowels = [$[name in class(lowercase) AND NOT name in class(vowels)]];
getting this error:
Problem expanding glyph class predicate “$[name in class(lowercase) AND NOT name in class(vowels)]”: Use of undefined class name “vowels” in predicate expression: “name in {“(null)”} AND NOT name in class(vowels)”
Thank you for reporting this. The token expansion code runs into an edge case here which is why it is currently not working. You can work around this by creating a Lowercase and a vowels class in the Classes section of the Features tab. See this demo file: