impallari/Cabin

weight axis uses a non-standard scale

Closed this issue · 4 comments

The weight axis ranges from 95..128, with the Regular face being at the beginning of the range. This will not interoperate well with weights as defined in OpenType or CSS, where a Regular face is expected to have weight:400. I would suggest re-scaling the axis to a range of, for example, 400..700 for the weight variation that is actually available.

Values from 1 to 999 and all intermediate values are valid so 100 - 900 are no longer the only way that you can write your weight declarations for variable fonts (they remain the standard for non variable fonts, however). You'll find yourself in this problem with every variable font you use, not just Cabin

Cabin also has predefined axes that give you the combinations that you need to get a given font weight. You can use font-variation-settings directly when defining my elements and classes or I use tools like wakamaifondue to get a list of all the predefined instances along with open type features available for the font. It also generates CSS that you can drop into your own stylesheets.

If you don't feel like using the tools, this CSS works for me in browsers that support variable fonts.

/* Variable instances */
.cabin-vf-beta-regular {
    font-variation-settings: "wght" 94, "wdth" 100;
}

.cabin-vf-beta-medium {
    font-variation-settings: "wght" 109, "wdth" 100;
}

.cabin-vf-beta-semibold {
    font-variation-settings: "wght" 116, "wdth" 100;
}

strong, 
b,
.cabin-vf-beta-bold {
    font-variation-settings: "wght" 128, "wdth" 100;
}

I'd also like to see the variable font range improved to be more uniform with conventions and combine the italicized Cabin with the non-italicized Cabin into a single variable font:

Weight: 100-900 (400 being normal, 700 being bold)
font-variation-settings: 'wght' 400; // default

Width: 0-100 (0 being condensed, 100 being normal width)
font-variation-settings: 'wdth' 100; // default

Italic: 0-1 (o being normal, 1 being italicized)
font-variation-settings: 'ital' 0; // default

Thoughts on how best to implement this @m4rc1e @graphicore @impallari @kalapi?

combine the italicized Cabin with the non-italicized Cabin

I disagree with this, unless there truly is an axis whereby the regular face gradually blends into the italic -- something hardly ever seen in practice.

Italic and Regular are two distinct faces (each of which may have variation axes such as width and weight), but there is no variation axis that links them. Package them together in a .ttc if you like, but don't create a spurious 'ital' axis.

(Unlike 'slnt', which makes perfectly good sense for a variable-slant Oblique style, if you have that in the family.)

I'm trying to pare down as much of Cabin, Cabin Condensed, Cabin Italic, and Cabin Condensed Italic into as few .woff2 variable font files as possible, so that they can be compressed and cached efficiently as webfonts. That was my rationale for using the ital axis, as I've seen many variable fonts do it that way (see examples at https://v-fonts.com/).