Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

weight axis uses a non-standard scale #17

Closed
jfkthame opened this issue May 4, 2018 · 4 comments
Closed

weight axis uses a non-standard scale #17

jfkthame opened this issue May 4, 2018 · 4 comments

Comments

@jfkthame
Copy link

jfkthame commented May 4, 2018

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.

@caraya
Copy link

caraya commented Nov 10, 2018

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;
}

@nathanchase
Copy link

nathanchase commented May 18, 2020

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?

@jfkthame
Copy link
Author

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.)

@nathanchase
Copy link

nathanchase commented May 18, 2020

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/).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants