This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Add font display to widget fonts and icons

6 years ago · Last reply by Andrew Misplon 6 years ago

Hi,

As per google page speed insights recommendations, I would like to add font display swap CSS feature.

One for example wp-content/plugins/so-widgets-bundle/css/slider/fonts/slider.woff?8p86w5

another example:

wp-content/plugins/so-widgets-bundle/icons/fontawesome/webfonts/fa-brands-400.woff2

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

3
  1. Andrew Misplon Staff 6 years, 6 months ago

    Hi Silvia

    Thanks for reaching out.

    As far as I’m aware, font-display: swap isn’t applicable for font icons like the slider icons or Font Awesome Brands.

    Here is an explanation of why that’s the case: https://www.zachleat.com/web/font-display-icon-fonts/.

    When you load an icon font, you often never want the fallback text to render. It isn’t a typical Flash of Unstyled Text (FOUT) scenario. If the fallback text for an icon font renders, who knows what you might see.

    Hope that helps.

  2. Silvia Spoerl 6 years, 6 months ago

    Hi Andrew, thanks for the advice.

    In this case, is it possible to limit the icon families to only font awesome so that only the font awesome icons are loaded?

  3. Andrew Misplon Staff 6 years, 6 months ago

    Hi :) The font families loaded are a function of the icons selected in the widgets you’re making use of. Have you tried Autoptimize? Be sure to check your site’s functionality after changing any of the Autoptimize settings.

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread