Плюсы, минусы, подводные камни
Плюсы, минусы, подводные камни
OpenType 1.8 или OT1.8 появился в 2016
Hello world!
343кб
Основные оси:
wght
wdth
ital
slnt
opsz
Кастомных осей может быть сколько угодно. Они должны быть названы 4 буквами, но заглавными: SOFT
, WONK
, GRAD
.
@font-face {
font-family: 'MyFont';
src: url('../fonts/link.woff2');
font-style: normal;
font-weight: 500;
}
...
@font-face {
font-family: 'MyFont';
src: url('../fonts/link-italic.woff2');
font-style: italic;
font-weight: 500;
}
...
@font-face {
font-family: 'MyFont';
src: url('../fonts/link-Thin.woff2');
font-style: normal;
font-weight: 100;
}
...
@font-face {
font-family: 'MyFont';
src: url('../fonts/link-italic-Extra-bold.woff2');
font-style: italic;
font-weight: 900;
}
...
@font-face {
font-family: 'MyFontVF';
src: url('../fonts/MyFontVF.woff2') format('woff2 supports variations'),
url('../fonts/MyFontVF.woff2') format('woff2-variations');
font-weight: 200 900;
font-stretch: 50% 200%;
}
body {
font-family: 'MyFont', sans-serif;
}
@supports (font-variation-settings: normal) {
body {
font-family: 'MyFontVF', sans-serif;
}
}
Основные оси:
wght
— font-weight
wdth
— font-stretch
ital
— font-style
slnt
— font-style
opsz
— font-optical-sizing
font-weight
font-stretch
font-stretch
ultra-condensed
— 50%extra-condensed
— 62.5%condensed
— 75%semi-condensed
— 87.5%normal
— 100%semi-expanded
— 112.5%expanded
— 125%extra-expanded
— 150%ultra-expanded
— 200%font-style
font-style
НЕ РАБОТАЕТ 🥺
font-optical-sizing
НЕ РАБОТАЕТ 🥺
font-optical-sizing
Возможные значения:
auto
none
font-variation-settings
font-variation-settings
font-variation-settings
font-variation-settings
font-variation-settings
👎font-feature-settings
font-kerning
font-language-override
font-size-adjust
font-synthesis
font-variant
font-variant-alternates
font-variant-caps
font-variant-east-asian
font-variant-ligatures
font-variant-numeric
font-variant-position
Я в будущее смотрю с оптимизмом…
Noize MC