Synchronising stylistic sets results in duplicate production names

Hi there, I apologise if this is an issue that should rather be discussed elsewhere, as it is connected to the “Synchronise ssXX glyphs” script by Rainer. (

For a quick digitalisation of some handwriting I am using the random calt feature (also with Rainer’s script, thank you!). As I have alternates only for some of the glyphs, I used the synchronise script. All works well, the random calt feature builds and compiles perfectly. Alas, when exporting the font, Glyphs gives me a “duplicate production names” error. If I disable export of the glyphs in question (the ones which had to be copied into higher stylistic sets in order to synchronise), the otf doesn’t compile (feature.fea 33, or something).

tl;dr: duplicating glyphs to synchronise stylistic sets gives duplicate production names error, disabling the duplicates gives calt otf error because of unsynchronised stylistic sets.

How would I go about solving this issue? many thanks in advance!

The script needs an update. I’ll look into it. Slightly better place to discuss this: open an issue on the GitHub page of the repository.

Thank you very much for your response, as mentioned, I wasn’t sure as to what the issue was more closely related to. I look forward to the script update, as it really is incredibly useful!

I think I fixed it. Please update and try again.

Hi and thank you for your rapid response! I’m afraid to say I’m still getting the same error (I completely reimported the scripts from your GitHub repo twice, but to no avail, sadly). Is there any way I can help you resolve the issue?

Is it possible the font you’re working on already has duplicate production names? Try exporting before and after running the script, please. If it works before, but not after, it’s the script.

Just found the problem and uploaded a fix. Please try again.

1 Like

I’m terribly sorry, but yes, I have tested that with exactly that possibility in mind. My findings were: Font exports fine at first. Then I run the script to synchronise the sets, and then it immediately gives me “duplicate production names” as an error. I did not run any other scripts (e.g. your randomiser script, which works fine). It is definitely the Synchronise ssXX glyphs script.

We posted at the same exact second! I will test promptly. Thank you very much!

True heroes still roam this world. It works! Thank you ever so much! Where’s that “buy me a coffee” button when you need it? Your help is very much appreciated! Have a great day.

1 Like

Thanks! We can have coffee when we meet at one or another conference or workshop. :slight_smile:

I’d appreciate that! I have one suggestion that @LucasFonts just mentioned elsewhere regarding a solution to unsynchronised stylistic sets. If you are building a randomise feature for rotating through your glyph variants and you have some glyphs with more and some with less alternates, you could adapt the classes you are rotating through so that the glyphs with less variants simply reappear in higher classes again. For instance, if you have only four Bs, you can start at the first B again in class 4:
@calt03 [space A.ss03 B.ss03 C.ss03]
@calt04 [space A.ss04 B C.ss04]
@calt05 [space A.ss05 B.ss02 C.ss05]
Not only would this circumvent the (now resolved) issue of duplicate production names but also reduce the file size, as no duplication is needed. So maybe an idea for the “generate pseudorandom calt feature from ssXX glyphs” script (which currently only builds classes up until the glyph with the lowest .ssXX). Anyhow, good night, and thanks for your support.

Yes, I did that for a font with up to 24 variants per glyph. With only 20 stylistic sets available, this could be problematic in the above mentioned automation. And because differences were very subtle, I choose not to make stylistic sets in the first place. Character Variants cv01 - cv99 could help building pseudo randomness for bigger sets automatically, but in my case it wouldn’t make sense to expose all the variants by whatever means, so I built the classes in Excel probably, it’s long ago.

To use stylistic set suffixes might be a not optimal idea. Because the glyphs are not accessed by a stylistic set feature but calt?

Maybe .rand01 would be better? This shows more what the glyphs are intended for. And we are emulating the rand feature, after all.

The script does not care about the stylistic sets, just about glyph suffixes .ssXX. Should be easy to adapt to a different suffix structure, or simply rename the glyphs afterwards with Cmd-Sift-F.