Using Alternate and Intermediate layers together

I’m having trouble making intermediate and alternate layers together at the moment.

Conceptually it’s very confusing for me because I’m working towards a VF and I understand that an alternate layer essentially becomes another glyph.

I have the following file which also doesn’t work. I have 2 masters and inserted a intermediate layer, then alternates after the intermediate layer and it’s not working.

Works just with alternate layers.

If I add an intermediate layer in, it breaks:

Test file attached:
test.glyphs (15.7 KB)

For OTVars, you can also keep the alternate glyph if that makes it easier for you. In the OT feature code you would put a condition with axis limits. I am reworking the respective tutorials. For the time being, you can see its documentation in the Glyphs 3 release notes, look for ‘feature code preprocessor macros’.


Thanks @mekkablue, I still don’t understand why my setup doesn’t work though.

I think using the condition in the feature would be easier to conceptualise and work with though, the predicate tokens are very cool. Where would I put the OTVar code, a feature tag (would it be rvrn? and how do I make that compatible in the same file for static and variable fonts?)

I found the problem and fixed it. Thanks for the test file.

Great. In the mean time how do I use the predicate tokens in the feature code for the doing the same thing as a ‘rename glyph parameter’ or ‘alternate layer’ feature, for both static and VFs (is it a rvrn feature using predicate tokensin the case of VF?)

For static instances, you still need the Rename parameter.

And you don’t need tokens for this. The syntax is mentioned in the release notes and a tutorial will be finished, soon.

And don’t use the rvrn feature. It will not be able to switch glyphs that are access by OpenType features.

The above file still doesn’t work as expected in Glyphs app. Can you give an indication of when the tutorial will come out – I can’t figure out how to use the syntax from the release notes for the above purpose of using the condition feature for swapping out glyphs within a certain subspace of the designspace.

I’m about to start production on a variable font and I am trying to decide whether to stay in Glyphs 2 and convert to a fontmake workflow (due to the need to swap out glyphs across a 2 axes variable font) or convert to a Glyphs 3 native workflow.

Can you post your current code?

I don’t have any code right now because it’s unclear where this code might go:

condition 600 < wght < 900;
sub dollar by dollar.bold;

Where does that go? I asked if it was the RVRN feature but Georg said no due to the issue with other glyphs accessed by open type.

Put it into a “rlig” feature.

This seems against the spec? Can I use the same solution here if doubling up the glyph substitution pathway and use RVRN addFeatureVariation doesn't work on a glyph that's also being swapped by another opentype feature · Issue #1371 · fonttools/fonttools · GitHub

rvrn looks like is might be the right feature to put your substitutions in and I have asked to change the wording several times.
From the discussion you linked, too:
addFeatureVariation doesn't work on a glyph that's also being swapped by another opentype feature · Issue #1371 · fonttools/fonttools · GitHub

So if you just like to substitute the dollar you are fine, but if you like to switch, it will not work with rvrn so to avoid confusion, use a working feature like rlig to avoid future confusion.

I see. The file still doesn’t work as expected by the way…

What is not working? Can you send me the .glyphs file?

The file originally supplied in the first post.

The variable font export does work. The single instances don’t. I’ll have a look.

Hi Georg any updates on the instances working?

I did’t have time to fix this.

I have the same problem using alternate combined with intermediate masters. How was it solved?