Swap Google Fonts Display

Description

Inject font-display: swap to Google Fonts to ensure text remains visible during webfont load

How it works

Swap Google Fonts Display plugin will find all Google Fonts in a webpage and set its font-display to swap

By default browser will wait until the Google Fonts are downloaded to display the font. This is the reason for the error ‘ensure text remains visible during webfont load’ in Google PageSpeed Insights

Luckly Google Fonts now supports setting font-display via a new query parameter. By setting front-display to swap, the browser is use the fallback font and when downloading actuall font is complete, it just swap the font!

Note

Plugin can’t add font-display: swap to dynamically (via JS) injected Google Fonts

If you want more tips on optimizing WordPress for speed, checkout my blog – WP Speed Matters

Installation

Just install the plugin and active it. No further configuration is need

Contributors & Developers

“Swap Google Fonts Display” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.0

  • First release!