The Problem: Third-Party Font Requests
Google Fonts is the most popular font service on the web. WordPress themes routinely add two or three Google Fonts to every page. Each one triggers a cascade of network requests: a DNS lookup to fonts.googleapis.com, a CSS fetch, another DNS lookup to fonts.gstatic.com, and then the actual font file downloads.
On a cold load — a visitor who hasn’t cached the fonts — this can add 300–600ms to your page’s time-to-first-meaningful-paint. On mobile connections, it’s worse. And because the font CSS is often render-blocking, text may be invisible while fonts load.
The Privacy Problem
Every Google Fonts request sends the visitor’s IP address to Google’s servers. In the EU, German data protection authorities have ruled that this constitutes a GDPR violation — Google Fonts usage has resulted in fines for website operators. Self-hosting fonts is the recommended compliance solution.
How Pageflare Self-Hosts Fonts
Pageflare scans your static export for Google Fonts references in HTML <link> tags and CSS @import statements. For each font family it finds, it downloads the font files directly from Google’s CDN, converts them to woff2 format (the most compressed format supported by all modern browsers), and saves them to a /fonts/ directory in your export.
<!-- Before: third-party request -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700" rel="stylesheet">
<!-- After: self-hosted -->
<style>
@font-face {
font-family: 'Inter';
src: url('/fonts/inter-400.woff2') format('woff2');
font-weight: 400;
font-display: swap;
}
</style>The font-display: swap property is added automatically. This tells the browser to render text immediately using a fallback font, then swap to the custom font when it finishes loading. Visitors see content instantly — no invisible text while fonts load.
The Benefits
Self-hosted fonts eliminate DNS lookups to Google’s servers entirely. On subsequent visits, the fonts are served directly from your CDN with the same cache headers as the rest of your site. Visitors who’ve cached your site before get instant font rendering from their browser cache — no network request needed at all.
The combined effect — eliminating two DNS lookups, removing render-blocking font CSS, and adding font-display: swap — typically improves Largest Contentful Paint by 200–400ms on cold loads. And you’re GDPR-compliant from day one.