Virtual Master as Stylistic Sets?

I have a font with 4 virtual master in some glyphs for a variable font project.

Beside the Variable version I will also need to generate a single font where the virtual masters are translated to stylistic sets.

Would it be possible to automatise this in some way, by fetching information from the virtual master layers and if there is something there, place that glyph as a stylistic set upon export?

Something like: {50, 0, 50} = ss02

It was hard to describe this, hope anyone can understand what I mean… :slight_smile:

Should be possible with a script. In my repo, there’s a similar script, ‘Stylistic Sets > Create ssXX from layer’. You can take it as a starting point.