How to self-host google fonts: gdpr-compliant css generator
- Step 1Paste your Google Fonts URL — Copy the link from fonts.googleapis.com (e.g., "family=Inter:wght@400;700&display=swap") and paste into the JAD generator. Or just enter the family names.
- Step 2Get the rewritten CSS — The tool fetches the upstream CSS, rewrites every gstatic.com URL to a relative ./woff2/ path, and produces a self-contained @font-face block ready to drop into your stylesheet.
- Step 3Run the curl script — Save the included shell script as fetch-fonts.sh, chmod +x, run it once from your fonts directory. Every WOFF2 lands in ./woff2/. Commit the result alongside your CSS — your site is now Google-free.
Frequently asked questions
Is the rewritten CSS legally compliant?+
Yes — the WOFF2 files are served under the SIL Open Font License (most Google Fonts) which permits redistribution. The CSS file itself is plain text describing @font-face declarations, freely distributable. Always retain the licence file from the upstream font for compliance.
Will I miss out on Google Fonts updates?+
Yes — once you self-host, you control the version. Re-run the generator whenever you want to refresh. Most teams view this as a feature: pinning the font version makes deploys reproducible.
What about variable fonts?+
Google Fonts serves variable variants for many families. The CSS API responds with the variable WOFF2 when you request a weight range (e.g., [email protected]). The JAD generator preserves this; you get a variable font with no extra effort.
Can I batch-fetch via the curl script?+
Yes. The script uses --silent --location to follow redirects and includes proper User-Agent strings. Run it once at deploy time; the WOFF2 files cache forever and don't need re-fetching.
Privacy first
Every JAD Font tool runs entirely in your browser using opentype.js and the wawoff2 WASM Brotli encoder. Your fonts never leave your device — verified by zero outbound network requests during processing.