Contributors: everpress, xaverb
Tags: googlefonts, google, fonts, gdpr, lgf, font, speed
Requires at least: 4.6
Tested up to: 6.3
Stable tag: 0.22.0
Requires PHP: 5.6+
License: GPLv2 or later
Donate link: https://evp.to/donate
Host your used Google fonts on your server and make your site more GDPR compliant 💯.
About 50 mio* sites use Google Fonts and in January 2022 a German court has ruled that using Google Fonts is a violation of Europe’s GDPR (General Data Protection Regulation).
more on wptavern.com
- Upload the entire
local-google-fonts
folder to the/wp-content/plugins/
directory - Activate the plugin through the 'Plugins' menu in WordPress
- Go to Settings => Google Fonts and decide which fonts should get loaded locally
Yes, if you check the option to load fonts automatically. Otherwise each font set must be manually triggered.
Yes. The open source fonts from Google Fonts are published under a licenses that allow you to use them on any website, no matter if it’s commercial or personal.
It's easy to check if your site is loading fonts from a third party source (check 2nd screenshot above):
- Open the dev tools (Cmd + Opt + I on Mac or F12, or Ctrl + Shift + I on Windows)
- Go to the Network tab and select the Fonts type
- Reload your page to see all fonts loaded on your site.
- Check the Domain column if it contains domains from a third party (Google is fonts.gstatic.com)
If you host your fonts locally with Local Google Fonts there should be no fonts loaded from the Google servers.
Fonts are discovered once they are used. Try to browse your front end first and get back to the settings page.
The plugin currently only checks fonts embedded via wp_enqueue_style
if you use Google fonts via @import
you have to change that first.
The DIVI theme has a custom implementation of Google Fonts. To use LGF with DIVI disable Improve Google Fonts Loading on the Performance Settings page of DIVI.
Woff2 is the successor of the woff format and and offers a 30% average compression gain over the original format. It is also supported by over 96% of browsers (source).
Slider Revolution uses it's own way to load Google Fonts and LGF cannot handle them. Slider Revolution has a built in feature for their sliders.
- Goto Slider Revolution
- Click on "Global" in the top navigation
- Find the "Fonts" section and Choose "Cache Fonts Local" on "Enable Google Fonts download"
- Save your settings.
You may have loaded a subset which doesn't included required characters. Check additional subsets on the settings page and reload your font.
- fixed: missing
$user_agent
variable - fixed: missing
$tmp_file
variable
- fixed: issue downloading fonts with WordPress 6.2 caused by the
download_url
method
- make sure files are loaded via https if requested
- new filter
lgf_folder_url
andlgf_folder
- always append timestamp to prevent caching
- please reload fonts manually if you encounter problems after the update
- completely rewriting the way fonts are loaded which to drop the need for a third party API and support more (deprecated) fonts.
- better support for multi site (thanks @ravanh)
- the original style sheet is used for better compatibility
- added Settings link on the plugins list page
- added button to manually fetch homepage for used fonts
- only woff2 fonts are now loaded for better subset support
- removed unused seed variable
- do not use
remove_query_arg
to strip args as it can break some URLs
- remove
ver
query argument from URLs as they are added by WordPress. Please review settings as fonts may have to be reloaded - introduced upgrade class for future updates
- added: welcome message after plugin activation
- added Codeable banner
- fixed: PHP warning on missing key
- using absolute path to support Google Fonts in Mailster.
- using custom mirror to prevent down times
- added info if https://google-webfonts-helper.herokuapp.com/ is down
- improved: better explanations on errors.
- improved: Higher propriety for wp_resource_hints to catch them all. Fixes #8
- implemented an alias method for no longer supported fonts.
- fixed: Syntax error on older PHP versions
- Do not handle fonts sources with more than 30 families (why would you need that?)
- Add option to choose subsets for each font family
- Disable functionality in the customizer
- fixed: problem on customizer in Neve theme
- fixed wrong domain on translations
- update F.A.Q. for DIVI theme
- fixed: rending issue on some fonts (please reload fonts if you use one of these: "exo-2", "inter", "jost" or "montserrat")
- fixed: some styles are not recognized and therefore not loaded.
- improved: info about loaded font files on the admin screen
- added timestamp to loaded font files to prevent cached fonts get loaded.
- new: options to load fonts automatically
- updated required WP version to 4.6
- remove Text Domain header
- added missing translatable strings
- better handling of multiple "family" arguments in the URL
- loading all variants if none explicit are requested
- cache API requests
- respect font-display
- removes DNS prefetch and preconnect to Google server from page header
- added option to flush everything
- you may have to reload fonts so please check the settings page
- improved handling of fonts
- only loading required font files
- supports now different types of variant declarations
- add variants to list only if available in the source
- added some css to improve settings page
- you may have to reload fonts so please check the settings page
- add explanation info on settings page
- show info when no font is found
- better handling of translated strings
- initial release