From bcdb4b249b9e726aad03104fd07cf0b237723d8a Mon Sep 17 00:00:00 2001 From: Lamont Crook Date: Fri, 17 Jul 2026 11:08:16 -0600 Subject: [PATCH] Load Adobe Fonts (Typekit) nav font async instead of render-blocking Lighthouse traces (throttling-method=devtools) show the LCP regression on /docs/library/blocks/cards is not caused by the cards aspect-ratio change: the LCP breakdown shows ~4.5s of "resource load delay" before any block CSS/ JS/images even start fetching, because a render-blocking, cross-origin Typekit stylesheet (chained to a second p.typekit.net request) monopolizes network priority under mobile throttling. This link bypassed the existing async font-loading pattern already used for fonts.css. Moving it into loadFonts() lets it load as a progressive enhancement, same as the Roboto fallback fonts, cutting local devtools-throttled mobile LCP from 7.3s to 3.9s. --- head.html | 2 -- scripts/scripts.js | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/head.html b/head.html index 8ee3445..14e36d7 100644 --- a/head.html +++ b/head.html @@ -7,6 +7,4 @@ - - diff --git a/scripts/scripts.js b/scripts/scripts.js index 34716e7..3fd8f90 100644 --- a/scripts/scripts.js +++ b/scripts/scripts.js @@ -36,6 +36,9 @@ function buildHeroBlock(main) { */ async function loadFonts() { await loadCSS(`${window.hlx.codeBasePath}/styles/fonts.css`); + // Adobe Fonts (quasimoda) for the nav; loaded async so it never blocks LCP, + // the Roboto fallback in fonts.css covers text until this swaps in + loadCSS('https://use.typekit.net/mvi1kov.css'); try { if (!window.location.hostname.includes('localhost')) sessionStorage.setItem('fonts-loaded', 'true'); } catch (e) {