Local Fonts

A court in Germany fined a website owner for using Google fonts because they show the IP address of the visitor, in breach of GDPR. People are looking to host fonts locally.

GeneratePress has this Adding Local Fonts page in the documentation on how to pull down Google fonts and host them locally using this tool – google-webfonts-helper (now relocated – (so use this link to google webfonts helper) that identifies the files for Google fonts.

I have already done this on the e-commerce site and I am working my way through other sites. That said, in WP 6.2 it looks as though WP will incorporate some method of doing this without having to add custom CSS and without having to temporarily add php code to the functions file to allow uploading .woff and .woff2 files.

The code one needs to add to the functions file is to allow uploading .woff files, which to protect against malicious code being injected, are normally not allowed.

WP Tavern has a couple of articles on local fonts, and suggests Bunny Fonts as a plugin as an easier way to replace Google fonts. I read the documentation for Bunny Fonts and it seemed just as straightforward to use the GeneratePress method. And there is every reason to think that the same GeneratePress method would work on any theme, not that I have tried it. And it would work with any web font that one might buy and download.