Performance & Core Web Vitals

Web Fonts — Performance and GDPR: Why You Should Host Google Fonts Locally and How to Do It in 20 Minutes

Text
Contents

Fonts loaded directly from Google's servers (fonts.googleapis.com) send the user's IP address to Google before any consent is given — which a German court ruled a GDPR violation back in 2022, and which Poland's Electronic Communications Law has reinforced. They also delay text rendering and add a connection to an external domain. The solution: the same fonts (the open license allows it) hosted locally on your own server, limited to 2–3 variants, in WOFF2 format, with font-display: swap i preload for the heading font. In WordPress and Elementor, it's a setting or a plugin — no code required.

Thesis: fonts are the most common case of “the GDPR issue nobody thought of”

Cookie banner, privacy policy, consent checkboxes in forms — all done. Yet on every visit, your site connects to Google for fonts, sending the user's IP address before the banner even appears. The Munich court ruling (January 2022) awarded a user damages for exactly this; the wave of payment demands in Germany showed the scale of the issue. In Poland, since November 2024 the Electronic Communications Law has treated such connections like any other processing that requires a legal basis. Context in our article on cookie banners.

In terms of performance: external fonts mean an extra DNS lookup, a TLS connection and a CSS download before the fonts themselves are fetched. On a phone with a weak signal, that's hundreds of milliseconds of text delay.

Three problems — one solution

ProblemGoogle Fonts from Google's serverLocal fonts
GDPR / Electronic Communications LawUser's IP sent to Google before consentZero transfer to third parties
EfficiencyDNS + TLS + CSS + fonts from a third-party domainFonts from the same domain, cache, preload
DependencyA change to or outage of Google's service = a change in how your site looksFull control
LicenseOFL — freeOFL — free, can be copied and hosted
Cost of a change—20 minutes, one-time

The Google Fonts license (SIL OFL) lets you download the files and host them yourself — more on licenses in our article on font licenses.

Step 1. Check what you have

Open your site → browser developer tools (F12) → Network tab → “Font” filter. You'll see where the fonts load from (the domain), how many there are, and their sizes. A typical finding: 8–14 font files (4 typefaces × several weights × italics) from fonts.gstatic.com, totaling 400–800 kB. The site actually uses two typefaces in three weights.

Step 2. Limit the variants

Principle: 2 typefaces, 3–4 files total at most. E.g., headings: one typeface in weight 700; body text: one typeface in 400 and 600; italics only if used. Each additional file adds 20–60 kB and a separate request.

Variable fonts — a single file contains all weights and is often lighter than three separate ones. If a typeface has a variable version, use it.

Step 3. Download and host locally

Elementor: Settings → Advanced → Google Fonts: Load Google Fonts Locally — since version 3.x, Elementor downloads the fonts and serves them from your server with a single toggle. Alternatively: Elementor → Custom Fonts — you upload WOFF2 files manually and select them in your project.

Block theme: Appearance → Editor → Styles → Typography — the font library lets you install Google fonts (downloaded to your server) or upload your own.

Classic theme / any theme: a plugin for hosting Google Fonts locally (automatically replaces Google references with local copies) or manually: download WOFF2, @font-face in a child theme.

After the change: Network tab — zero requests to Google domains for fonts. Also check maps, plugins and widgets — they can load fonts from Google too (e.g., an embedded map).

Step 4. font-display i preload

  • font-display: swap — text appears immediately in a system font and is swapped once the font loads; without it, text is invisible for up to 3 s (FOIT). Elementor and plugins offer this as an option.
  • preload for the heading font (one file, the one visible above the fold) — the browser downloads it in parallel with the CSS, not after it. Don't preload them all — it backfires.
  • Swapping fonts can cause layout shift (CLS) — you can limit it by choosing a fallback font with similar metrics (size-adjust) or by using an optimization plugin.

Step 5. Format and compression

WOFF2 — the only format you need in 2026; browser support is complete. TTF/OTF/WOFF/EOT — unnecessary and heavier. If you upload manually: WOFF2 only, with a character subset of latin + latin-ext — Polish characters are in latin-ext; Cyrillic, Greek, Vietnamese — drop them unless you use them. A subset can cut the file size in half.

System fonts — the zero-cost option

System font stack (system-ui, -apple-system, Segoe UI, Roboto, …) — zero downloads, instant text, and a look that matches the user's device. For sites where typography isn't part of the brand identity (dashboards, documentation, some blogs) — the best choice. For business sites, usually a compromise: a brand font for headings (one file), a system font for body text. Typeface selection principles — in the article on typography in web design.

Adobe Fonts and paid fonts

Adobe Fonts load from Adobe servers — the same GDPR issue, plus they expire along with the subscription. Fonts purchased with a web license — check whether the license allows self-hosting (most do) and whether it has a pageview limit. External font servers that are "GDPR-compliant" exist, but hosting locally is simpler and has no dependencies.

What you gain — rough estimates

A site with 12 Google font files → 3 local WOFF2 files with preload: font transfer from ~600 kB to ~120 kB, no two external connections, text visible 300–800 ms sooner on mobile. In Core Web Vitals — typically an improvement in LCP (if the LCP element is heading text) and CLS (if the swap wasn't matched). It's one of the items on the list of external scripts and resources to clean up.

From our experience

Local fonts have been on our deployment checklist since 2022 — after the first demand letters in Germany. When taking over sites: Google fonts in most cases, often in 10+ variants, of which the project uses three.

Moving fonts to local hosting, limiting variants and configuring preload — as part of website maintenance and optimization, along with the rest of the external resources.

FAQ — web fonts

Is Google Fonts GDPR-compliant?

Loaded from Google's servers, it's problematic because it sends the user's IP address to Google before consent (Munich court ruling, 2022). Downloaded and hosted on your own server, it's fine, and the SIL OFL license allows it. Check the Network tab to see where your site loads its fonts from.

How many fonts should a website load?

Two typefaces in a total of 3–4 files (e.g., headings 700, body text 400 and 600). Each additional file adds 20–60 kB and a separate request. Variable fonts let you have all weights in a single file. Format: WOFF2 only, with a latin + latin-ext subset.

How do you host Google Fonts locally in Elementor?

Elementor → Settings → Advanced → the option to load Google Fonts locally — Elementor downloads the files to your server. Alternatively, upload WOFF2 files in the Custom Fonts section and select them in the typography settings. After making the change, check that your site doesn't connect to Google domains.

Author: Adrian Kamiński — Websky Studio, Poznań. We have been building sites with locally hosted fonts since 2022 — for GDPR compliance, performance and independence from external services.

Your feedback

Was this article helpful?

One click — it helps me choose future topics.

Share article

Websky Newsletter

New posts straight to your email.

Once a month — practical insights on WordPress, WooCommerce, SEO and AI. No spam, unsubscribe with one click.

  • Case studies from Polish projects
  • Checklists and templates to download
  • Google and WordPress changes in a nutshell

Your data goes to Websky Studio only. You can unsubscribe with one click in every message.

Core Web Vitals

A slow website is a cost, not a detail.

I'll measure LCP, INP, and CLS on your website, pinpoint the culprits, and show you before/after results. No rebuilding everything from scratch.

Test your site speed