Glyphs substitution on variable font

Hi there,
I’m developing a variable font with weights variation.
I’m currently try to play with different lettershapes that change from weight to another without smooth variations but with a leap, a discrete variation. For that purpose I create two different and consecutive masters (750=MasterA, 751=MasterB). It’s working fine in illustrator, but when I try it in chrome is not working anymore: by setting the value 751 the shapes are distorted, and when I inspect the code the actual value I see is not 751 but 750,80. Is there a way to avoid chrome to use floating value?

Have you tried using alternate layers? Otherwise, for variable fonts, consider using the rvrn feature. Add the feature in Font Info > Features. Let’s say you have a weight axis (axis tag: wght) from 200 to 900 and you want the shapes to switch at 750. The code would look like this:

condition 750 < wght;
sub a by a.alt;
sub b by b.alt;

And so on. This means that you need to have an .alt (or whatever suffix you want to use) glyph for every glyph you want t substitute.

Does this make sense for your design? This technique would also mean your switching glyphs don’t need to be compatible with each other.

1 Like

Please don’t suggest the rvrn feature. This was discussed here several times.

Oh. Sorry. It was actually Rainer himself who introduced me to it last week on a project :smile: I shall try and find some threads explaining why it’s not a good idea. Thanks!

So basically I have to write the code posted above but in the rlig feature, if I understand correctly.
Thanks for the heads up. I missed the substitution tutorial. Sorry

Beware that this means you need to add the kerning for all substituted glyphs, as that will not simply be copied. Maybe consider using alternate layers (also known as bracket layers).

This tutorial should help you out, it covers multiple approaches: Glyphs Tutorials | Switching Shapes

What’s the word on rvrn in 2024?
Export with Alternate Layer does not work in Illustrator 2024 and InDesign 2024 (this is related to the known “more than 3 masters” bug.
If I use the officially supported replacement, things work fine.

Is there a script to convert a bracket layer (Alternate Layer) font with rvrn alternates?

Can you please send me a file where manually written feature variation code works and bracket layers don’t?

Please don’t use rvrn. It only only works with encoded glyphs and all subsequent opentype subscriptions will not work.

And rlig does work in Illustrator, just not reliably.

Thanks for the files. I tested it in Illustrator 2023, 2024 and Indesign 2024 and it works fine in all of them with the rlig feature.
As mentioned several times before, you shouldn’t use the rvrn feature. The .ss01 variants will never work with it. At least not how you set it up. You need to add sub K.rvrn by K.ss01.rvrn; to your ss01 feature. And that only works if both glyphs have the same breakpoint. The problem is that rvrn is always applied before all other features. So all glyphs that are accessed by OpenType features will never have variations.

Funny, I just updated my Illustrator form 2024 19.0 to 19.3
(Mac OS Sonoma 14.2.1 M2)
The bracket export still does not work.
The .rvrn version does. Including the .ss01 .

But I see, there are issues in the browser :white_check_mark: when ss01 activated.

Did you change anything before exporting the bracket font?
What version of Glyphs did you use? The last Beta?

no

yes

Hi Georg,
thanks for all your effort and tipps.
I also installed your fonts, and they both don’t work here on Illustrator.
Since I like things bullet-proof, I’ll probably opt for .rvrn (with the refined feature) for desktop and .rlig for the WOFF2.
If that works everywhere, this will be it for the time-being.
Adobe really made a mess with the last releases.

How did you installed them and what exact version of Illustrator do you have?

There is no reason to do it differently on different platforms.

As you mentioned elsewhere, activating the ss01 feature with rvrn glyphs inside breaks the interpolation in the browser. Therefore webfonts should follow your recommendation.

I’m on the latest version of Mac OS, Sonoma 14.2.1 and Illustrator 28.3 (before I had 28.0).
If I make all glyphs with the .rvrn replacement, they are fine in InDesign and in Illustrator. If not, they are not. I’ll test Windows and other software. But it seems to be the workaround for now.
I install fonts natively in the Font folder via FontBook. Expecting most users doing the same.

Can you try to install them in the adobe fonts folder?

I don’t think that is a solution. If tons only work when installed in a special way.

You know what is? Compiling them with fontmake.
Same font work everywhere perfect now. Sorry for bothering you.

I only like to understand why it works for me and not for you.

Can you send me that fontmake font?

I’ve sent you the file in the DM.
I only have a Font folder inside InDesign.
What Adobe font folder are you referring to?

I usually put everything here: /Library/Application Support/Adobe/Fonts. Make the folders if they are not there. And if so, restart all Adobe apps to make them pick up this folder.

Done, does not work in the same way.
FontCaches removed, software restarted.