Fixing Slow LCP Caused by Web Font Headings in Core Web Vitals
When the largest element on a page is a heading that uses a web font, the heading text stays invisible until the font arrives. That delays the Core Web Vitals LCP (Largest Contentful Paint) until the font arrives, or until the block period ends. If you set font-display to swap in @font-face, the heading shows first in a fallback font available on the device, and the LCP is recorded at that time. On the page I tested, when I delayed the font response by 1.5 seconds, the LCP was 1528ms with block and 28ms with swap.
This applies when the top of a blog post or landing page has a large title set in a web font such as one from Google Fonts, and PageSpeed Insights or Lighthouse reports a slow LCP.
The test environment was Ubuntu 24.04, Node.js 22.23.4, Playwright 1.63.0, web-vitals 6.2.3, and Lighthouse 13.6.0. The browser was Chrome for Testing 153, bundled with Playwright. For the web font, I used the DejaVu Serif Bold file already on the test machine (about 350KB). A test server at localhost:8080 delayed only the font file by 1.5 seconds (4 seconds for one page). On the pages with CSS in an external file, I also delayed the CSS by 300ms. The headings were English only. I did not test Japanese web fonts, Firefox or Safari, real network conditions, or real user data (field data).
The heading is not a LCP candidate while it is hidden
The web.dev LCP article lists text that uses a web font during the font block period as something that is not eligible for LCP. The block period is the time during which text is drawn invisibly until the font arrives (see MDN's font-display reference). According to the web.dev web font best practices article, the block period is 2 to 3 seconds, and Chromium and Firefox hide text for up to 3 seconds even when you do not specify a value.
The test page has a 44px heading (h1) that wraps to three lines on a 412px-wide screen, followed by one short sentence. Only the heading uses a web font.
@font-face {
font-family: 'Heading';
src: url('/fonts/heading.ttf') format('truetype');
font-display: block; /* I compared this with swap, fallback, and optional, and with the line removed */
}
h1 { font-family: 'Heading', 'Liberation Serif', serif; font-size: 44px; line-height: 1.25; }
I opened the block and swap pages and captured screenshots partway through loading. With block, the heading area stays blank until the font arrives at 1.5 seconds, and only the sentence below is visible. With swap, the heading appears in the fallback font right after opening.

LCP for each font-display value
I opened each page in Playwright and recorded the LCP with onLCP from web-vitals and the LCP candidates received through PerformanceObserver. Each page was measured 5 times and the median is shown. The swap plus preload case and the swap case with CSS in an external file were measured 3 times, and their medians are reported.

| Page | FCP | LCP | Time the font finished loading |
|---|---|---|---|
| Not specified (auto) | 24ms | 1528ms | 1518ms |
block |
24ms | 1528ms | 1517ms |
swap |
28ms | 28ms | 1516ms |
fallback |
24ms | 116ms | 1516ms |
optional |
28ms | 28ms | 1518ms |
block (font takes 4 seconds) |
24ms | 3016ms | 4018ms |
The block and unspecified pages gave the same results. The LCP candidate records show that both first treated the sentence below (P) as a candidate at about 24ms, and then switched to the heading (H1) right after the font arrived.
{"fcp":24,"lcp":1528,"target":"html>body>h1","parts":[2,0,0,1526], …
"candidates":[{"t":24,"size":3136,"el":"P","url":""},{"t":1528,"size":101083,"el":"H1","url":""}]}
This is the second recording for the block page (abbreviated with "…"). parts is the LCP breakdown from web-vitals, in this order: TTFB, load delay, load duration, and render delay. Text LCP has no image to load, so almost all of the time spent waiting for the font went into the final render delay (1526ms).
The fallback LCP was 116ms, which is close to the 100ms block period in the web.dev table. By contrast, optional, which the same table lists with a 100ms block period, behaved the same as swap in my test environment, at 28ms.
On the block page where the font took 4 seconds, the LCP was 3016ms. The heading appeared in the fallback font at 3 seconds, and that time became the LCP. No new candidate was recorded when the font arrived at 4018ms.
After swap showed the heading, the heading got larger when the web font arrived (the fallback heading had a size of 59784, and the heading drawn in the web font on the block page had a size of 101083). In my test environment, no new LCP candidate was added. The LCP stayed at the time the fallback heading first appeared. The web.dev LCP article says that a change in an element's size or position does not create a new LCP candidate, and only the initial size and position are considered.
However, in my test page the heading grew from three lines to five when the web font was applied, pushing the sentence below off the screen (see the 1700ms screen in the image above). The sentence below appears first in the block page as well, so this shift happens with both block and swap. According to the web.dev article on improving CLS, loading a web font can cause layout shifts with either display behavior. As a fix, Chrome for Developers' article on fallback font adjustment describes matching the fallback font's size to the web font, for example with size-adjust.
A font in an external CSS file starts loading late
If you write @font-face in an external CSS file, the browser cannot tell that it needs the font until it has read the CSS. The web.dev article also notes that fonts are discovered late with external stylesheets, and recommends preload.
When I moved the block
@font-face into a CSS file and delayed the CSS by 300ms, the font request started at 315ms and the LCP increased to 1832ms. Adding preload to the head of the HTML started the font request at 7ms, and the LCP returned to 1524ms.
<link rel="preload" href="/fonts/heading.ttf" as="font" type="font/ttf" crossorigin>
<link rel="stylesheet" href="/css/block.css">
A font preload needs the crossorigin attribute even on the same origin (see MDN's rel="preload" reference).
| Page | FCP | LCP | Font request start |
|---|---|---|---|
CSS file, block |
320ms | 1832ms | 315ms |
CSS file, block + preload |
420ms | 1524ms | 7ms |
CSS file, swap |
324ms | 324ms | 314ms |
swap (CSS inline in HTML) |
28ms | 28ms | 9ms |
swap + preload (CSS inline in HTML) |
116ms | 116ms | 5ms |
preload reduced the LCP by about 300ms, but with block the heading still waits for the font to arrive. The CSS-file page with swap had a much earlier LCP, at 324ms, right after the CSS arrived.
On the other hand, in my test environment, adding preload delayed the first paint. On the CSS-file page the FCP went from 320ms to 420ms, and on the swap page the LCP went from 28ms to 116ms. The web.dev article on preloading optional fonts says that in Chrome 83 a change was made so that a preloaded optional font waits before the first paint. It does not explain the behavior for swap or block fonts. If you add preload to a heading font that uses swap, the LCP may not get shorter, so measure before and after adding it.
Lighthouse also reports it as render delay
I also measured the four pages with Lighthouse (mobile, no network throttling). On every page the LCP element was body > h1, and the LCP breakdown had only two parts: TTFB and "Element render delay".
block.html: score 100 / FCP 0.0 s / LCP 1.6 s (1560ms) / element body > h1 "Web fonts can hold back the largest heading on the page" / timeToFirstByte=7ms elementRenderDelay=1553ms
Font display: score 0 Est savings of 1,500 ms items=[{"url":"http://localhost:8080/fonts/heading.ttf","wastedMs":1500}]
swap.html: score 100 / FCP 0.1 s / LCP 0.1 s (66ms) / element body > h1 "Web fonts can hold back the largest heading on the page" / timeToFirstByte=4ms elementRenderDelay=62ms
Font display: score 1 items=[]
css-block.html: score 100 / FCP 0.4 s / LCP 1.9 s (1877ms) / element body > h1 "Web fonts can hold back the largest heading on the page" / timeToFirstByte=6ms elementRenderDelay=1871ms
Font display: score 0 Est savings of 1,500 ms items=[{"url":"http://localhost:8080/fonts/heading.ttf","wastedMs":1500}]
css-block-preload.html: score 100 / FCP 0.4 s / LCP 1.5 s (1539ms) / element body > h1 "Web fonts can hold back the largest heading on the page" / timeToFirstByte=7ms elementRenderDelay=1532ms
Font display: score 1 items=[]
The block font was listed in the "Font display" insight with an estimated saving of 1,500ms. According to Chrome for Developers' Font display insight article, the audit passes when font-display is swap or optional.
However, on the block page with preload added, the heading still waited for the font and the LCP was 1.5 seconds, yet "Font display" passed (score 1), and the font did not appear in the list. So even when Lighthouse's "Font display" audit passes, if the LCP element is text and the render delay is long, check the font-display value in @font-face directly, or you may miss the problem.
In this test, all four pages scored 100. For the three pages using block, the LCP was close to the value measured by web-vitals. For the swap page, Lighthouse reported 66ms, while web-vitals reported 28ms.





