Substituting glyphs at export with #ifdef tag in variable fonts not working since 3.2

Hi, I’m having problems exporting my variable font with alternate layers that I want to substitute at a certain weight range. I’m using the #ifdef tag at exports, and since the update glyphs gives me an error message when trying to export. It used to work fine before updating to 3.2.

Can you shoe the code you use?

It’s #ifdef, not ifdef.

Sure

The “Add Feature” parameter needs a “rlig” in the text field. And you don’t need to the “#ifdef” in the code. And you don’t need the “Feature for Feature Variations” parameter if you don’t have any bracket (alternate) layers.

Or you add the “rlig” feature to the features in Font Info > Features. There you would need to the “#ifdef” in the code.

So like this? Somehow it doesn’t recognize the alternate layers, and gives an error message saying:

Unknown glyph “A.alt”
Found in: feature ‘rlig’, line 3.

I have the alternate layers set up properly and like I said everything used to work fine before.

Näyttökuva 2024-04-10 kello 15.35.41

Do you have an A.alt in your font? Why are you writing this feature?

The feature will be automatically written based on the alternate layers you have in your project.

1 Like

OK now I got it to work again! Thank you everyone and sorry for the trouble, I’m a real beginner at this stuff.