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