Swap Google Fonts Display

Описание

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

Quick Links

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

Luckily Google Fonts now supports setting font-display via a new query parameter. By setting font-display to swap, the browser uses the fallback font and when downloading actual font is complete, it just swaps the font!

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

Установка

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

Отзывы

17.06.2020
Cleaned up a bunch of my "Ensure text remains visible during webfont load" issues from PageSpeed Insights. Would be cool if this also supported FontAwesome, but it's great regardless.
Посмотреть все 7 отзывов

Участники и разработчики

«Swap Google Fonts Display» — проект с открытым исходным кодом. В развитие плагина внесли свой вклад следующие участники:

Участники

Перевести «Swap Google Fonts Display» на ваш язык.

Заинтересованы в разработке?

Посмотрите код, проверьте SVN репозиторий, или подпишитесь на журнал разработки по RSS.

Журнал изменений

1.0.6

  • Bug fixes while using W3 Total Cache
  • Bug fixes while using custom wp-includes folder

1.0.5

  • Support for W3 Total Cache

1.0.4

  • Automatically add font-display:swap to all css files when using LiteSpeed cache

1.0.3

  • Checks entire HTML for Google Fonts (previously only)

1.0.2

  • Support for Web Font Loader

1.0.1

  • Removed unwanted CSS and JS files
  • Removed unwanted boilerplate php files
  • Prevent multiple display swaps (if already added by theme/plugins)
  • Added donation link

1.0

  • First release!