mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-06-13 00:25:28 -04:00
fix Inter italics on Chrome, and only declare latin and latin-ext unicode ranges
This commit is contained in:
@@ -2,6 +2,14 @@
|
|||||||
@use "~@fontsource/roboto-mono/scss/mixins" as RobotoMono;
|
@use "~@fontsource/roboto-mono/scss/mixins" as RobotoMono;
|
||||||
@use "~@fontsource/comic-neue/scss/mixins" as ComicNeue;
|
@use "~@fontsource/comic-neue/scss/mixins" as ComicNeue;
|
||||||
|
|
||||||
|
// stylelint-disable scss/operator-no-unspaced
|
||||||
|
// prettier-ignore
|
||||||
|
$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-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
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Inter typeface - https://rsms.me/inter/
|
* Inter typeface - https://rsms.me/inter/
|
||||||
*
|
*
|
||||||
@@ -11,12 +19,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Variable
|
// Variable
|
||||||
@include Inter.fontFaceVariable($fontName: "Inter var", $type: "full");
|
@include Inter.fontFaceVariable($fontName: "Inter var", $type: "full", $unicodeMap: $latin-only);
|
||||||
|
|
||||||
// Legacy
|
// Legacy
|
||||||
@include Inter.fontFace($fontName: "Inter", $weight: 400);
|
@include Inter.fontFace($fontName: "Inter", $weight: 400, $unicodeMap: $latin-only);
|
||||||
@include Inter.fontFace($fontName: "Inter", $weight: 500);
|
@include Inter.fontFace($fontName: "Inter", $weight: 500, $unicodeMap: $latin-only);
|
||||||
@include Inter.fontFace($fontName: "Inter", $weight: 700);
|
@include Inter.fontFace($fontName: "Inter", $weight: 700, $unicodeMap: $latin-only);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Roboto Mono typeface - https://fonts.google.com/specimen/Roboto+Mono
|
* Roboto Mono typeface - https://fonts.google.com/specimen/Roboto+Mono
|
||||||
@@ -27,12 +35,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Variable
|
// Variable
|
||||||
@include RobotoMono.fontFaceVariable($fontName: "Roboto Mono var");
|
@include RobotoMono.fontFaceVariable($fontName: "Roboto Mono var", $unicodeMap: $latin-only);
|
||||||
@include RobotoMono.fontFaceVariable($fontName: "Roboto Mono var", $style: italic);
|
@include RobotoMono.fontFaceVariable($fontName: "Roboto Mono var", $style: italic, $unicodeMap: $latin-only);
|
||||||
|
|
||||||
// Legacy
|
// Legacy
|
||||||
@include RobotoMono.fontFace($fontName: "Roboto Mono", $weight: 400);
|
@include RobotoMono.fontFace($fontName: "Roboto Mono", $weight: 400, $unicodeMap: $latin-only);
|
||||||
@include RobotoMono.fontFace($fontName: "Roboto Mono", $weight: 700);
|
@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, $style: italic, $unicodeMap: $latin-only);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Comic Neue typeface - http://comicneue.com/
|
* Comic Neue typeface - http://comicneue.com/
|
||||||
|
|||||||
@@ -55,6 +55,12 @@ pre,
|
|||||||
.monospace {
|
.monospace {
|
||||||
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
|
||||||
|
em {
|
||||||
|
font-style: italic;
|
||||||
|
font-variation-settings: "ital" 1, "slnt" -10;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// all code
|
// all code
|
||||||
code {
|
code {
|
||||||
font-size: 0.925em;
|
font-size: 0.925em;
|
||||||
letter-spacing: 0;
|
letter-spacing: normal;
|
||||||
page-break-inside: avoid; // stylelint-disable-line plugin/no-unsupported-browser-features
|
page-break-inside: avoid; // stylelint-disable-line plugin/no-unsupported-browser-features
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user