1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2026-06-13 00:25:28 -04:00

multi-axis variable fonts are such a mess...

This commit is contained in:
2021-11-12 10:10:27 -05:00
parent 0e609f0d7b
commit 3444e54db6
2 changed files with 10 additions and 7 deletions
+2 -5
View File
@@ -6,7 +6,6 @@
// prettier-ignore // prettier-ignore
$latin-only: ( $latin-only: (
latin: (U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD), latin: (U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD),
latin-ext: (U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF)
); );
// stylelint-enable scss/operator-no-unspaced // stylelint-enable scss/operator-no-unspaced
@@ -40,9 +39,7 @@ $latin-only: (
// Legacy // Legacy
@include RobotoMono.fontFace($fontName: "Roboto Mono", $weight: 400, $unicodeMap: $latin-only); @include RobotoMono.fontFace($fontName: "Roboto Mono", $weight: 400, $unicodeMap: $latin-only);
@include RobotoMono.fontFace($fontName: "Roboto Mono", $weight: 400, $style: italic, $unicodeMap: $latin-only);
@include RobotoMono.fontFace($fontName: "Roboto Mono", $weight: 700, $unicodeMap: $latin-only); @include RobotoMono.fontFace($fontName: "Roboto Mono", $weight: 700, $unicodeMap: $latin-only);
@include RobotoMono.fontFace($fontName: "Roboto Mono", $weight: 700, $style: italic, $unicodeMap: $latin-only);
/*! /*!
* Comic Neue typeface - http://comicneue.com/ * Comic Neue typeface - http://comicneue.com/
@@ -52,5 +49,5 @@ $latin-only: (
* https://github.com/crozynski/comicneue/blob/master/OFL.txt * https://github.com/crozynski/comicneue/blob/master/OFL.txt
*/ */
@include ComicNeue.fontFace($fontName: "Comic Neue", $weight: 400); @include ComicNeue.fontFace($fontName: "Comic Neue", $weight: 400, $unicodeMap: $latin-only);
@include ComicNeue.fontFace($fontName: "Comic Neue", $weight: 700); @include ComicNeue.fontFace($fontName: "Comic Neue", $weight: 700, $unicodeMap: $latin-only);
+8 -2
View File
@@ -56,10 +56,16 @@ pre,
font-family: settings.$font-stack-mono-variable; font-family: settings.$font-stack-mono-variable;
} }
// Chrome doesn't automatically slant multi-axis Inter var, for some reason // Chrome doesn't automatically slant multi-axis Inter var, for some reason.
// Adding "slnt" -10 fixes Chrome but then over-italicizes in Firefox. AHHHHHHHHHH.
em { em {
font-style: italic; font-style: normal;
font-variation-settings: "ital" 1, "slnt" -10; font-variation-settings: "ital" 1, "slnt" -10;
// Roboto Mono doesn't have this problem, but the above fix breaks it, of course.
code {
font-style: italic;
}
} }
} }