Add fallbacks for system fonts to reduce layout shift.

Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
2026-01-03 18:08:15 -08:00
parent 54e942c85f
commit 5460d759b0
3 changed files with 112 additions and 2 deletions

View File

@@ -43,3 +43,23 @@
@include font-raleway(400);
@include font-raleway(700);
@include font-stixgeneral();
/* Generated from chatgpt-adjust-fallback.py */
@font-face {
font-family: "Raleway Fallback";
src: local("Arial");
size-adjust: 100.09%;
ascent-override: 94.00%;
descent-override: 23.40%;
line-gap-override: 0.00%;
}
@font-face {
font-family: "Lora Fallback";
src: local("Times New Roman");
size-adjust: 111.79%;
ascent-override: 100.60%;
descent-override: 27.40%;
line-gap-override: 0.00%;
}

View File

@@ -9,8 +9,8 @@ $background-color-dark: #1b1d1f;
$standard-border-width: .075rem;
$standard-border: $standard-border-width solid $border-color;
$font-heading: "Lora", serif;
$font-body: "Raleway", serif;
$font-heading: "Lora", "Lora Fallback", serif;
$font-body: "Raleway", "Raleway Fallback", sans-serif;
$font-code: "Inconsolata", monospace, "STIXGeneral";
$warning-background-color: #ffee99;