Why my font doesn't load — 3 causes and how to check each

A font is the one resource on a page that can fail silently. An image doesn't load — you see a hole. Styles don't arrive — you see naked HTML. A font just gets quietly swapped for a system one, nothing is reported, and the page looks "almost right." That's why people hunt for hours.
Good news: in practice there are three causes, and all of them are one minute to check. Start with the check that eliminates half the options immediately.
First: did it fail to load, or load but not apply?
Two different diseases with two different cures.
- Open DevTools (F12) → the Network tab → filter by Font.
- Reload the page.
- Look at the status of the font request.
What you see:
- No request at all — the browser never even tried. That means the font isn't applied anywhere: the
@font-facerule is declared, but no element actually gets thatfont-family. Browsers are lazy: they download a font only when something needs painting with it. - A request with 404 or a CORS error — cause 1 or 2 below.
- A successful request (200) and still the wrong font — read the alphabet and weight sections.
Your second instrument is Elements → Computed → the Rendered Fonts block at the bottom. It shows which font the text is actually drawn with. Don't squint at letter shapes — it says so in writing.
Cause 1. The url() path resolves against the CSS file, not the page
The most common one, and the most annoying. Inside @font-face, the address in url() is resolved relative to the stylesheet, not the HTML page.
Styles in /css/style.css, fonts in /fonts/inter.woff2, and you wrote url("/fonts/inter.woff2") — works. Write url("fonts/inter.woff2") without the slash and the browser goes looking for /css/fonts/inter.woff2 and gets a 404.
How to check: click the red request in Network and read the full URL the browser actually hit. It's usually obvious at a glance.
How to fix: start the path with a slash (/fonts/…) so it resolves from the site root regardless of where the CSS lives. And check letter case in the filename: on your laptop Inter.woff2 and inter.woff2 are the same file, on the server they're two. That's the same trap as with CSS that doesn't apply.
Cause 2. CORS: a cross-domain font is blocked silently
Non-obvious and very common. Unlike images, fonts are always requested in CORS mode. If the file sits on another domain or a CDN, the server must return an Access-Control-Allow-Origin header — otherwise the browser downloads the file and refuses to use it.
The confusing part: in Network that request may show status 200. The file arrived. It just wasn't cleared for use.
How to check: open the Console tab. A CORS error is always written there in plain text, mentioning Access-Control-Allow-Origin and the font's URL.
How to fix: three options, easiest to most correct:
- move the font files to your own domain — fastest, and marginally quicker to load;
- add the allow header for fonts on your CDN (in cloud storage it's the CORS setting in the panel);
- if you're pulling the font from a third-party service, use their official
linktag — the headers are already set there.
Cause 3. Your alphabet didn't make it into the subset
This one hits non-Latin sites and looks genuinely bizarre: Latin text renders in the nice font, everything else in a system one. Or: the heading "Portfolio" is right, but "Портфолио" isn't.
It happens because fonts are often cut into subsets to keep files small — and the default subset is Latin, with other alphabets left out. The browser faithfully applies your font to every character it contains and falls back for the rest.
How to check: select a word in the affected alphabet and look at Rendered Fonts. Your font for Latin text, something system for the rest — diagnosis done.
How to fix: download or generate a file that includes the range you need. Font services usually have a checkbox for extra alphabets in their picker. If you subset the file yourself, keep the relevant Unicode ranges in the character set (Cyrillic, for instance, is U+0400–U+04FF).
Two smaller ones that keep coming back
The wrong weight. You loaded only font-weight: 400 but write font-weight: 700 in your styles. The browser can't find a bold file and fakes one by stretching the regular. Letters look "bold, but off." Fix it by loading the 700 file in its own @font-face block.
Text vanishes for a second. Not a bug — the default behaviour: the browser hides text while waiting for the font (up to three seconds) before showing a fallback. Add font-display: swap to @font-face and text appears immediately in a system font, then swaps when yours arrives. It also makes the page feel faster.
Why does the font work locally but not in production?
Three classics: a path without the leading slash that broke at a different URL depth; filename case (a Linux server cares, your laptop doesn't); or the font files simply never made it into the build — check they're in the public folder. Same logic as with images that don't load.
Do I need both woff2 and woff?
No. Every current browser understands woff2, and it's noticeably smaller. The second format only matters for very old versions — for a new project, one woff2 is fine.
The font loads, but the page jumps. Why?
That's the fallback being swapped for your font: the two have different letter widths. Pick a fallback with similar metrics and list it second in font-family — the jump becomes almost invisible.
The AI Architect 2027 course: step by step from computer basics to your own app and first customers. 543 short lessons on your phone.





