Can my variable font axis snap instead of slide?

spf173spf173 Posts: 1
edited January 2023 in Type Design Software
Hello! I’m working on designing my first variable font and I’d like the styles to “snap” from one to the next instead of interpolating. I’ve set them up as whole numbers, so basically I’d like to eliminate the possibility of decimals in the selection. Problem is, I can’t figure out how to do this. Is it a Variable font setting? Do I need to do some scripting? I'm working in Glyphs at the moment, but I also have access to Robofont. Thanks!

Comments

  • At the font-internal level, there are essentially two ways to do this.

    One is to set your avar table mapping such that an entire input range maps to a single value. There will be some unavoidable tiny gaps between the ranges, but you can make them so small as to be practically irrelevant.

    For example, let us pretend that you have an input weight range from 0 to 10. And the output weights are 100-900.

    Map 0 to 100 and 1.5 to 100
    Map 1.501 to 200 and 2.5 to 200
    Map 2.501 to 300 and 3.5 to 300

    and so on

    Another option is to use alternate glyphs, and have the font swap to an alternate glyph at the appropriate axis settings. I have been using this approach in a font currently in development, and am pretty happy with it, BUT there are some as-yet-unresolved bugs in Adobe apps’ support for it, such that either I have to map it to a feature that could be turned off (weird to have an OpenType feature override an axis setting when that was unintended), or I need to map it to two features, and the one that works in Adobe apps can be turned off (in those apps only).

    Unfortunately, my particular workflow is using FontLab 8 and UFO+FontMake, so I am not entirely familiar with the particular details of how (or IF) this works in Glyphs or RoboFont.
Sign In or Register to comment.