Skip to content
webappsysv36the production system behind Adapte DijitalEN · TR · built in Istanbul
Order a site
  1. WebAppSys
  2. Notes
  3. Self-Hosted Fonts: Faster Pages, Fewer Third Parties

build08-self-hosted-fonts.md

Self-Hosted Fonts: Faster Pages, Fewer Third Parties

Why serving fonts from your own server makes pages faster and more private, how to do it with WOFF2 and variable fonts, and which settings stop text from jumping.

read
~4 min
updated
2026-11-19
type
guide
by
webappsys
cover.webp
Self-Hosted Fonts: Faster Pages, Fewer Third Parties

Self-hosting means serving font files from your own website instead of a font service's server. It removes a connection to a third party, which can make pages load faster and avoids sending visitors' IP addresses elsewhere. Use WOFF2 files, prefer variable fonts, include only the character sets you need, set font-display: swap and preload the one font used above the fold.

Typography gives a site its voice, and most sites load at least two fonts. The common shortcut is to link to a font service. It works, but every visitor's browser then contacts another server before your text can appear in the chosen font. Serving the files yourself is simple and has few downsides. This note is part of the website production system README.

Why self-host

  • SpeedNo extra connection to another domain before fonts start downloading.
  • PrivacyVisitors' browsers do not contact a third-party font server.
  • ControlFont files do not change unless you change them.
  • ReliabilityYour site does not depend on another service being available.

The privacy point has practical weight in Europe. When a page loads fonts from a third-party server, that server receives the visitor's IP address. Courts and data-protection authorities in the EU have raised questions about this. Requirements vary by country, so check guidance from your own data-protection authority if your visitors are in the EU or UK.

Licensing first

Only self-host fonts whose license allows it. Many open-source fonts, including most families distributed through open font libraries, use licenses such as the SIL Open Font License, which permits self-hosting. Commercial fonts often have separate web licenses. Keep the license file with the font files.

WOFF2 and variable fonts

WOFF2 is a compressed font format supported by all modern browsers. It is usually all you need. A variable font contains a whole range of weights in one file, so a design that uses regular, medium and bold may need one file instead of three.

Only the characters you need

A font file can contain thousands of characters for many languages. A subset contains only the ones your site uses, such as Latin plus Latin Extended for English and Turkish. Smaller files download faster. Font libraries often provide files split by script, and the browser downloads only the parts a page needs when you declare the character range.

  1. Download WOFF2 files for the scripts your site uses.
  2. Place them in your theme, for example in an assets/fonts folder.
  3. Declare each file with @font-face, including its weight range and unicode range.
  4. Set font-display: swap so text appears immediately in a fallback font.
  5. Preload only the main heading or body font that appears at the top of the page.

Stopping text from jumping

When a web font arrives after the fallback font has been shown, text can shift. Choose a fallback with similar proportions, keep line heights fixed and avoid swapping between very different fonts. Layout shift is one of the measurements search engines and browsers use to judge page experience, explained further in lean WordPress themes.

Two families are usually enough: one for headings and one for body text, plus a monospace font only if the design shows code. Each extra family is another download.

How we do it

Every WebAppSys theme ships with its fonts inside the theme folder, in WOFF2, split into Latin and Latin Extended files, declared with font-display: swap. No page contacts a font service. This site uses three families: a serif for headings, a sans-serif for text and a monospace for code, all self-hosted.

What to check on your site

Open your site, open the browser's developer tools and look at the network list. If you see requests to a font service's domain, your fonts are not self-hosted. A quick check of your theme and plugins usually reveals where the link is added.

Self-hosting fonts is one of the simplest improvements to speed and privacy. Use licensed WOFF2 files, keep only the characters you need and let text appear immediately while fonts load.

Frequently asked questions

Is self-hosting allowed for all fonts?

No. Check the license. Many open-source fonts allow it.

Will self-hosting always be faster?

Usually, because it removes an extra connection. File size and caching still matter.

Do I need a plugin?

No. A few lines of CSS in the theme are enough.

General information, not legal or financial advice. Search engines and platforms change their rules; check their official documentation before relying on any detail.

// Same branch

Related notes