I have a variable font with wght and ital axis. So three (roman) masters:
Light [weight: 58] ; Regular [weight: 116]; Bold [weight: 198];
After different tests, I eventually decided that my final exported instances would be:
Light [weight: 80] ; Regular [weight: 116]; Bold [weight: 168];
Everything is fine for the static instances. But I would like my variable font to display specific values i.e. ranging from 300 (light) to 700 (bold).
What would you recommend as the best way to easily do that?
I’m not entirely sure what you mean. It sounds like you are trying to do two things:
Limit your variable font’s axis range to [80, 168] instead of the full [58, 198]. Correct?
Map your internal axis values (displayed in your font editor) to external ones (displayed when using the exported font).
For 1. you need to think of the fact that your axis range is defined by masters. You need a master for each axis limit. In Glyphs, you can do the following:
Add a master at wght=80, add a master at wght=168. You can use an instance with that coordinate and then use Instance as Master.
Add a Variable Font Setting in Exports. Add a custom parameter “Disable Masters”. Add the names of the lightest and heaviest masters (58 and 198), since you don’t want them included in the exported variable font.
Another option is to use fontTools, if you’re comfortable with Python: instancer — fontTools Documentation. It’s by far the fastest way, but requires some coding. Not more than a few lines, though. Feel free to ask here if you need help.
For 2., simply add a custom parameter “Axis Location” to all masters an instances, with the new values you want them to be mapped to. So, for example, add the parameter to your Regular instance and give it the value wght=400. That’s all it takes. Make sure you have the parameter on all masters and instances and that the values are mapped correctly.
Thanks a lot Sebastian!
That’s exactly what I want to achieve. I was on the right path but missed the “Disable Masters” parameter I guess. Now I only have a conflict with some glyphs using Alternate layers ($, ¢, ฿) but I’ll take a closer look tomorrow and try to solve it.