How we export Google Fonts without calling Google

Most web pages download a “Google Font” from Google’s servers the moment they load, handing each visitor’s IP address to a company they never agreed to share it with. Sitastic exports sites that use the same fonts without any of that. Here is how.

Our rule is simple: an exported site talks to your host, and only your host. “Only” in the literal sense — no CDN, no icon host, no font host, no stock photo host. Fonts are the trickiest case of that rule to get right, because they are cross-referenced in CSS, hinted for every screen, and come in many weights, styles and subsets.

The naive way

Most builders paste a @import line from Google Fonts into the page. The browser then loads the CSS file from fonts.googleapis.com , which in turn loads the font files from fonts.gstatic.com . Two extra servers, two extra round trips, two extra chances to hand over an IP address.

What we do instead

When you export your site, Sitastic opens the Google Fonts CSS endpoint from your own browser and asks for the font family you picked, at the exact weights and styles your site actually uses, for the alphabets that actually appear on the page. It parses the resulting CSS, downloads each WOFF2 file it points at, writes those files into your export, and rewrites the CSS to point at your local copies.

The important nuances:

  • Weights you tried are not shipped. If you experimented with “Inter 900 Italic” for ten minutes and switched to “Inter 600”, only 600 lands in the export.
  • Subsets are trimmed. Noto Sans ships ~20 language subsets by default. We ship only the ones your text uses. For a site in English and Arabic, that is latin and arabic — roughly 1–2% of the default download.
  • Files are fingerprinted. Fonts get a content-hash filename, so a CDN or a visitor’s browser caches them indefinitely.
  • Licence notice is included. Google Fonts are released under the SIL Open Font License or Apache 2.0; we include the OFL/LICENSE file in the fonts folder so you can prove provenance.

Testing the rule holds

On every build, we export each of our 49 templates and run them against an automated privacy test: start a fresh browser profile, open the page, record every DNS lookup. If any lookup lands anywhere but the site’s own host, the build fails. This test caught two regressions in the last year; both were a font variant sneaking back in through a plugin.

What is still on you

If you paste an iframe for a video, or a map, or a social post, that iframe loads from its own host — which is why Sitastic’s cookie banner shows those as “click to load” by default. The privacy report after every export lists any remaining third-party host so you can decide what to do about each.

If you want to see this behaviour yourself, build any template, download the ZIP, open the fonts/ folder, and compare to the <link> tags in the original Google Fonts CSS. The difference, we hope, is uneventful.