Support » Plugin: PhastPress » Changing swap to auto in CSS

  • Resolved Gulshan Kumar

    (@thegulshankumar)


    Google says, Ensure text remains visible during webfont load

    To fix the issue, they suggest using font-display: auto;

    @font-face {
      font-family: 'Arvo';
      font-display: auto;
      src: local('Arvo'), url(https://fonts.gstatic.com/s/arvo/v9/rC7kKhY-eUDY-ucISTIf5PesZW2xOQ-xsNqO47m55DA.woff2) format('woff2');
    }

    I notice this plugin inline Google font CSS with swap mode.
    Can I change Google font-swap to auto using any hooks if available?

    Thanks & Regards,
    Gulshan

Viewing 1 replies (of 1 total)
  • Plugin Author Albert Peschar

    (@kiboit)

    Hi Gulshan,

    Thanks for your message and for trying out PhastPress.

    We added font-display: swap because Google suggested it. When using font-display: auto, many browsers will not show the text until the font loads.

    See: https://developers.google.com/web/updates/2016/02/font-display

    It’s possible that Google’s recommendations changed in the meantime. Which tool or resource are you using that suggests using font-display: auto?

    At the moment there is no hook that would allow you to change the font-display setting that PhastPress generates.

    –Albert

Viewing 1 replies (of 1 total)
  • The topic ‘Changing swap to auto in CSS’ is closed to new replies.