# Web Fonts and Font Loading

> How a page gets its fonts. Web font files, the WOFF2 format, system font stacks and fallbacks, and what readers see while a font is still loading.

**Course:** [Typography](https://learn.benibix.com/learn/design-typography)  
**Time:** 12 min

**After this lesson you can:**

- Load a web font in CSS
- Write a fallback font stack
- Choose between web and system fonts

## How a web page loads its fonts

A web font is a font file sent with a web page, so text shows in that exact font on any device. Each weight and style is a separate file, often 20 to 100 kilobytes. A page with four weights downloads four files before its text looks right.

Fonts come in several file formats. OTF and TTF are the formats you install on a computer. WOFF2 is the one made for the web. It is compressed, so it is smaller, and every modern browser reads it. For a website, WOFF2 is the only format you need to ship.

While the file loads, the browser has to show something. It can hide the text until the font arrives. Or it can show a backup font first, then swap when the real one lands. Showing the backup is most often better, because readers can start at once.

That backup is the font fallback. In CSS you list fonts in order, ending with a general kind such as sans-serif. If the first is missing or slow, the browser tries the next. Pick a fallback close in size to your font, so the page does not jump when it swaps.

A system font stack skips the download. It asks for the fonts already on the device: one on Apple devices, another on Windows, another on Android. Nothing has to load, so text shows at once. The trade is that the page looks a little different on each device.

Web fonts give you a brand look everywhere and cost load time. System fonts are free and instant and look native. Many apps and dashboards use a system stack. Many brand and news sites use one or two web fonts, and keep them few.

The common mistake is loading too many files. Six weights and their italics can mean 12 downloads. Most pages need regular, bold and maybe italic. Cut the rest, or use one variable font, and the page gets faster with no visible loss.

```css
@font-face {
  font-family: "Brand Sans";
  src: url("/fonts/brand-sans.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
body { font-family: "Brand Sans", system-ui, sans-serif; }
```
Load one WOFF2 file, show the system font while it arrives, and swap when it lands.

![A web page on the left asks for fonts in order. First, a WOFF2 file travels from a server and is still loading. Second, the fallback font Georgia is shown on the page meanwhile. Third, the system font is already on the device and needs no download.](https://learn.benibix.com/diagrams/des3-font-loading.svg)

## Which one to pick

1. **Web font.** Pick it when the brand look must be the same on every device. Keep it to two or three files.
2. **System font stack.** Pick it for apps, tools and dashboards where speed matters more than a set look.

### Example: A news site cuts its font files

A news site loaded 10 font files before its headlines showed on slow phones. Together they came to about 600 kilobytes.

It kept 3 WOFF2 files and set a backup font to show text at once. Headlines now show in under a second. Then they swap to the brand font.

**Words in this lesson:** [Web Font](https://learn.benibix.com/term/design/web-font), [Font File Format](https://learn.benibix.com/term/design/font-file-format), [Font Fallback](https://learn.benibix.com/term/design/font-fallback), [System Font Stack](https://learn.benibix.com/term/design/system-font-stack)

> **The one difference.** A web font is downloaded with the page, so it looks the same everywhere. A system font is already on the device, so it shows at once.

**Question:** Which font file format should a website ship?

**Answer:** WOFF2, because it is compressed and every modern browser reads it. WOFF2 is made for the web. It is smaller than the formats you install on a computer, and every modern browser can read it.

---

Source: https://learn.benibix.com/learn/design-typography/web-fonts-and-font-loading
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-20
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
