Skip to content

Commit 19e9efd

Browse files
landing: drop Google Fonts preload + trim weights to 5
psi-swarm diagnose flagged the Google Fonts CSS chain as a 351ms render-blocker even with the preload + onload swap pattern in place — `rel=preload as=style` still kicks off a high-priority fetch on the critical path. Removed the preload tag; the media=print onload swap is enough by itself. Trimmed weights from 11 woff2 files (400-700 × 3 faces) to 5 (Space Grotesk 600, Inter 400/600, JetBrains 500), which is all the landing actually uses. System stack covers the moment before the swap completes — Tailwind tokens cascade through gracefully. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b8eb70e commit 19e9efd

1 file changed

Lines changed: 10 additions & 11 deletions

File tree

apps/landing-page-astro/src/layouts/Layout.astro

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,27 +50,26 @@ const OG_IMAGE = `${SITE_URL}/opengraph-image.png`;
5050
<meta name="twitter:image" content={OG_IMAGE} />
5151

5252
{/* Fonts — Inter (body), Space Grotesk (display), JetBrains Mono
53-
(mono). Same three faces the Next.js layout pulled via
54-
next/font Google CDN. Use the async preload + media-swap
55-
pattern so the stylesheet never blocks first paint; <noscript>
56-
fallback covers JS-off browsers. */}
53+
(mono). Trimmed weights to only what the landing actually uses
54+
(was 400-700 for each face × 3 = 11 woff2 files; now 5).
55+
Lighthouse psi-swarm flagged this chain as 351ms render-blocker
56+
even with preload+swap; dropping `preload as=style` (which still
57+
kicks off a high-priority fetch) cuts the LCP critical path so
58+
the stylesheet truly only loads after first paint via the
59+
media=print → onload swap trick. Fallback to system stack until
60+
the swap completes (Tailwind tokens cascade gracefully). */}
5761
<link rel="preconnect" href="https://fonts.googleapis.com" />
5862
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
59-
<link
60-
rel="preload"
61-
as="style"
62-
href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap"
63-
/>
6463
<link
6564
rel="stylesheet"
66-
href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap"
65+
href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@600&family=Inter:wght@400;600&family=JetBrains+Mono:wght@500&display=swap"
6766
media="print"
6867
onload="this.media='all'"
6968
/>
7069
<noscript>
7170
<link
7271
rel="stylesheet"
73-
href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap"
72+
href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@600&family=Inter:wght@400;600&family=JetBrains+Mono:wght@500&display=swap"
7473
/>
7574
</noscript>
7675
</head>

0 commit comments

Comments
 (0)