As you probably know by the ruling of the German court, Google Fonts do not comply with GDPR (more details). This means that their use is now prohibited in this country, and there is a high probability that other EU countries may soon follow.
Let’s see what methods you can use to make your WordPress sites GDPR-compliant (again).
How to use fonts in GDPR-compliant way
The German court’s ruling only applies to fonts which are hosted and served to each visitor from Google’s servers. Hosting the same fonts locally or using a different provider is perfectly acceptable, though.
Let’s explore these options.
Oh, and before you ask. Loading fonts from your own the server has no perceivable impact on the page load speed – even if you use tens of font files and do not cache them.
#1. Switch to locally hosted fonts in your theme and plugins.
There is a chance that your theme already gives you a way to host fonts locally.
The most popular WordPress themes already do. Here are some links to their documentation pages.
However, themes are not the only ones that can load fonts. The same goes with plugins. Fortunately, in their case, the simplest solution is to just stop using the Google fonts in them so that the text can be displayed with your theme’s default font (at that point it should be loaded locally).
#2. Switch to a locally hosted font using a plugin.
If your WordPress theme doesn’t provide you with a method to switch to local fonts, you can use a free plugin called OMGF or a paid one Perfmatters (this one gives you much more than just local font loading). Both of them scan your site and let you download the fonts to your own server.
#3. Switch to a GDPR-compliant font using Cloudflare’s HTML rewriting.
Last but not least, a more advanced solution is to overwrite links to your Google Fonts using a CDN service called Cloudflare.
To explain it as simply as possible, Cloudflare works like a proxy that grabs the HTML of your site before it reaches the visitor’s browser. It can then replace all links to Google fonts and switch them to any you like. They can be either local or from GDPR-compliant providers like Bunny Fonts CDN.
Do you know of any other GDPR-compliant alternative to Google Fonts CDN?
Do you know of any other solutions or services that offer replacement fonts? Please share in the comments below.