Is it possible to detect how many OpenType stylistic sets a font has in code?
Hello community,
I am working on a small script that has to do with toggling OpenType style sets. I've figured out how to actually turn on a specific stylistic set using this syntax:
textVariable.textRange.characterAttributes.stylisticSets = STYLYSTIC_SET_NUMBER;
The problem is that, by default, all fonts that support stylistic sets have 20 such sets defined in the UI, with most of them grayed out if not actually available. However, when I try to loop through the available Stylistic Set options of a selected text using a for loop, even the grayed out ones are picked up.
Do you know if there is a way to validate the actual available style sets so that I can count them properly?
