From 21d57daf1ccf7775aed4551c5715e3efd4f5082b Mon Sep 17 00:00:00 2001 From: Vinta Chen Date: Mon, 26 Oct 2026 12:42:56 +0800 Subject: [PATCH] fix: block text rendering until web fonts load font-display: optional gives the web fonts only ~100ms; on a cold cache, or once GitHub Pages' max-age=600 expires and the font must revalidate, they miss that window and the whole page view renders in Georgia/Avenir Next until reload. Co-Authored-By: Claude --- website/static/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/static/style.css b/website/static/style.css index 19c30a7d..e0987539 100644 --- a/website/static/style.css +++ b/website/static/style.css @@ -8,7 +8,7 @@ @font-face { font-family: "Cormorant Garamond"; font-weight: 600; - font-display: optional; + font-display: block; src: url("/static/fonts/cormorant-garamond-600-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; } @@ -16,7 +16,7 @@ @font-face { font-family: "Manrope"; font-weight: 400 800; - font-display: optional; + font-display: block; src: url("/static/fonts/manrope-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; }