[web-php] PR #753: Font display swap fix
| From: | oxou | Date: | Sun, 29 Jan 2023 20:24:54 +0000 |
| Subject: | [web-php] PR #753: Font display swap fix | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-30753@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/web-php/pull/753
Author: oxou
What
font-family: swap does is Fallback text is immediately rendered in the next
available system typeface in the font stack until the custom font loads, in which case the new
typeface will be swap ped in
This fixes the issue on slow connections where fonts on the page are invisible while the remote font
is still downloading, this provides a fallback to the system fonts until the remote font has been
downloaded.
More information about it here:
- https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display
- https://developer.chrome.com/docs/lighthouse/performance/font-display/