Let’s get this straight: The effort to host Google web fonts on your own server is immense! First of all you need to download all .eot, .woff, .woff2, .ttf and .svg files, then copy them onto your server and finally paste a CSS snippet.
Sounds easy? Well it could be, if Google would actually provide any direct links to download these files and a customized CSS for self-hosting them.
With this plugin you can download fonts and host them yourself.
Thanks to the
https://google-webfonts-helper.herokuapp.com/fonts API we can download it right to your webserver.
Okay enough nice talk, how does it work?!?
The plugin uses an external API to download fonts.
With the help of an React javascript interface we will generate the API request and than download its to:
- wordpress\wp-content\uploads\hassle-free-fonts
it's download as a zip formatted file, so we unpack it into
- wordpress\wp-content\uploads\hassle-free-fonts\fonts
So ones the fonts is downloaded to our server we can generate a css file.
- wordpress\wp-content\uploads\hassle-free-fonts\style.css
By default this file is empty. After generation the css style will be filled with @font-face structure to make the font available.
Simple and easy without any hassle.