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 service.
Last but not least, you can switch from Google’s font service, to one that complies with GDPR. One of them is Bunny Fonts.
There are 2 ways you can do that.
The easiest one is to use a WP plugin called Replace Google Fonts with Bunny Fonts. The moment you install it, the plugin will replace all calls to your Google Fonts with calls to their own font bank. Auto-magically!
In fact, I use the this plugin on this site. So you can see how it works first hand.
But, if for any reason this solution is not for you, then there is one more you can use – overwrite links to 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, e.g. Bunny Fonts.
Here’s a guide on how to do this using Cloudflare service and HTML rewriter or a Cloudflare worker.
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.