Swap Google Fonts Display


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!


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


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.




  • First release!