From e7c804c9dae52f6c811cf25626c2912fb6cb54e3 Mon Sep 17 00:00:00 2001 From: ctao Date: Sat, 25 Jul 2026 15:36:31 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20zero=20font=20jumping=20on=20navigation?= =?UTF-8?q?=20=E2=80=94=20preload=20both=20brand=20fonts=20+=20font-displa?= =?UTF-8?q?y:=20optional=20(no=20late=20swaps;=20brand-approved=20Arial=20?= =?UTF-8?q?if=20cold)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/Base.astro | 1 + src/styles/global.css | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/layouts/Base.astro b/src/layouts/Base.astro index 84247bf..065ce3b 100644 --- a/src/layouts/Base.astro +++ b/src/layouts/Base.astro @@ -45,6 +45,7 @@ const links = [ {/* Brand typography (BRAND D.3): Inter (body) + Space Grotesk (headlines), self-hosted latin woff2 (variable) — @font-face lives in global.css. */} + diff --git a/src/styles/global.css b/src/styles/global.css index b1c44e0..059cbc5 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -75,12 +75,12 @@ /* Self-hosted brand fonts — latin subset, variable weight, swap + metric-matched fallback */ @font-face { - font-family: "Inter"; font-weight: 400 700; font-display: swap; + font-family: "Inter"; font-weight: 400 700; font-display: optional; src: url("/fonts/inter-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } @font-face { - font-family: "Space Grotesk"; font-weight: 500 700; font-display: swap; + font-family: "Space Grotesk"; font-weight: 500 700; font-display: optional; src: url("/fonts/space-grotesk-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }