font-display: swap
-
I added
font-display: swapto line 132 of the fontmanager.php file so I get a little more love from the Lighthouse optimize scan thingie. :)
$newfontsCSS .= '@font-face{ font-family: "'.FontManager::$customFonts[$i]['fontname'].'"; src: url("'.$url.'") format("'.$fileformat.'"); font-display: swap; } ';Maybe something to put in the source code permanently?
-
-
Dear @iamerwin
An Update:
Armin is delayed currently, sorry that he hasn't responded yet, A follow up on your issue will come as soon as possible.Once again sorry for the inconvenience & if i can help further let me know :)
Best wishes
Richard -
"Instructs the browser to use the fallback font to display the text until the custom font has fully downloaded. This is also known as a “flash of unstyled text” or FOUT."
not sure if i want a flash of unstyled text
i believe you can just use this custom css in lay options -> custom html&css:
body{
font-display: swap;
}that should work and this way your change in the php file wont be overwritten when you update lay theme next time
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login