OMGF Pro v5.2.10 - Improving Google Fonts For WordPress
Compared to the free version of OMGF, OMGF Pro comes packed with several advanced features, allowing you to improve your WordPress site’s Google Fonts implementation.
Related items
Related Optimizers Plugins
Perfmatters - The #1 Web Performance Plugin For WordPress
by Kinsta
We developed the perfmatters plugin with simplicity in mind.
Smush Pro - Image Optimization For WordPress
by WPMU DEV
Benchmarked - The fastest, easiest and best-performing image compression plugin for WordPress.
BerqWP - Core Web Vitals & PageSpeed Optimization WordPress Plugin
by Berqier
BerqWP is a 100% automatic All-In-One speed optimization plugin that ensures your website passes the core web vitals assessment and boosts your website speed score to 90+ for mobile and desktop dev...
Compared to the free version of OMGF, OMGF Pro comes packed with several advanced features, allowing you to improve your WordPress site’s Google Fonts implementation.
Increase GDPR Compliance
If you’re loading fonts directly from Google’s servers, their logging the IP addresses of all your visitors.
In fact, on January 20th, 2022, a German court ruled that loading Google Fonts from their server is in breach of GDPR, because it exposes unnecessary personal data to a US based company.
To keep using Google Fonts, you need to host them locally. There is no alternative.
Fortunately, OMGF Pro does exactly that. 🙂
OMGF Pro complements the free version of OMGF with advanced detection schemes:
To keep using Google Fonts, you need to host them [on your server]. There is no alternative.
- Webfont Loader or,
webfont.js, - Inline
@importor@font-facestatements, @importand@font-facestatements embedded in CSS files,- Google’s Early Access API, etc.
- Basically, anything! This includes Material Icons, Material Symbols and resource hints, i.e.
dns-prefetch,preloadorpreconnectheaders!
Maximize Performance
- Define a Fallback Font Stack: Reduce Cumulative Layout Shift by properly implementing font-display swapping and defining a (stack of) fallback font-families for each of your fonts,
- Easily replace unwanted Google Fonts with a System Font of your choice,
- Ensure text remains visible during webfont load by forcing the font-display (swap) attribute throughout all your stylesheets and @font-face statements,
- Preload fonts: easily preload key requests from within the Management panel.
Reduce Fonts Bloat
OMGF Pro goes beyond locally hosting Google Fonts and provides you with tools to Reduce bloat caused by other plugins and themes:
- Remove Google Fonts loaded asynchronously with JavaScript,
- Easily unload font-styles (e.g. italics) and/or font-weights (e.g. bold) you don’t use,
- Define which subsets should be loaded for all fonts throughout your WordPress configuration. This can reduce the size of your Google Fonts stylesheets by ~90% for the most popular fonts!
Recent releases
Release history
- Note: this release detects stylesheets which were skipped before, so optionally run Save & Optimize once after updating to add them to your cache. Nothing breaks if you don't.
- couldn't match the hyphen separating the subset from the font-weight (e.g., source-sans-pro-normal-latin-400.woff2), so no rule ever matched. The subset is now matched against the @font-face rule's
- unicode-range, and only falls back to the filename for rules which don't define one.
- Optimize Local/External Stylesheets skipped any link element written over multiple lines (or with a line break inside its href attribute), while browsers load those just fine. The pattern used to find them couldn't match line breaks, but could run past the > which ends an element. Both are fixed, and line breaks are now stripped from the URL before it's requested, just like browsers do.
- @import statements spread over multiple lines weren't detected. CSS allows whitespace (incl. line breaks) after @import and inside url(), and a backslash followed by a line break is a line continuation inside a string, but none of those were matched. A raw line break inside the URL is still ignored, because that's an unterminated string, which browsers don't load either.
- Smart Optimize (Unused Fonts) could return a blank page when an inline @import statement was fully unloaded. The pattern used to remove that statement removed everything between the first @import and the last occurrence of the stylesheet's URL, and exceeded PCRE's runtime limits on documents larger than ~100KB, in which case the entire document was replaced with nothing (accompanied by a 'preg_replace_callback(): Passing null to parameter #3 ($subject)' deprecation notice). Matching is now confined to a single @import statement, and a failed search/replace leaves the document untouched.
- Smart Optimize (Unused Fonts) didn't remove any @font-face rules from stylesheets whose fonts are split into subsets. The subset was matched against the font file's URL using a pattern which
- Smart Optimize (Unused Fonts) now removes a stylesheet's link element from the HTML entirely when all of its @font-face rules are unloaded, instead of leaving behind a request for an empty stylesheet. Generated stylesheets always start with a header comment, which meant they were never detected as empty. This also fixes the deregistration of fully unloaded Async Stylesheets.
- an unused Material Icons stylesheet wasn't removed from the HTML. Its cached URL was looked up in the wrong list, so it was never recognized, and clearing the link element's href attribute left behind a request for the page itself. Its link element is now removed entirely.
- the classes which collect @import statements (and the one which adds the Material Icons subset) registered their filters once per instance, while they're constructed on every processing run. Because nothing ever removed those filters, they stacked up within a single request, which meant the same @import could be optimized several times over, and the Material Icons subset could be added to the subset list more than once.
View changelog
- with Magic Fallbacks enabled, the first click on a Replace checkbox checked all corresponding "Don't Load" checkboxes, but left the Replace checkbox itself unchecked.
- with Magic Fallbacks enabled, a Replace checkbox stayed disabled after unchecking the Preload checkbox(es) of the corresponding font family.
- A corrupted (non-array) Fallback Font Stack option no longer causes a fatal error ('Cannot access offset of type string on string') when opening the Optimize Fonts settings screen.
- Magic Fallback aliases were incorrectly stored as font families during Save & Optimize, causing a 'could not find a matching fallback font' notice.
- Magic Fallbacks no longer tries to find a fallback for icon fonts (e.g., Material Icons/Symbols) and no longer shows a 'could not find a matching fallback font' notice for them.
- Smart Optimize now purges the page cache on taxonomy archives, the homepage and WooCommerce product pages by switching supported caching plugins (LiteSpeed, W3 Total Cache, WP-Optimize, WP Rocket, WP Super Cache) to URL-based purging, so the detection script no longer re-runs on every page load for URLs without a single post-ID.
View changelog
- Security: Hardened Smart Optimize and local stylesheet processing to prevent a path traversal vulnerability. Props Patchstack.
- Muli was renamed to Mooli. This fix provides an alias for it.
Frequently asked questions
Is OMGF Pro GPL licensed?
What is the latest version of OMGF Pro?
How much does OMGF Pro cost on GPLCoffee?
Which WordPress and PHP versions does OMGF Pro support?
Is OMGF Pro safe to download?
Auto-updates included
Install it once, update automatically.
The GPLC Connector installs this plugin from your wp-admin and rolls out new versions to your connected sites - up to 25. Included with 12-month and Geek Lifetime plans (plus legacy 6-month).