Custom Font's need "font-display: swap;" #28515
jar53
started this conversation in
Feature Request
Replies: 2 comments 6 replies
-
Definitely agree, not sure why this isn't already integrated. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Wow, I didn't know swap doesn't work with custom fonts?? I normally use custom fonts instead of Google fonts, because it loads much faster, but not supporting (font-display: swap;), is a bit contradictory to having custom fonts for better performance. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Prerequisites
What problem is your feature request going to solve? Please describe.
Custom fonts do not have the option to be able to use font-display: swap; We can manually add it into our WordPress code but that is just a ridiculous amount of work when the Google font-swap button could dynamically work for all fonts including custom fonts. This would help overall Lighthouse scores for all users using this option. This would help load times and ensure that text is loaded on the device even if the font isn't loaded.
Describe the solution you'd like
Simply add another button next to the google font button and or just add the font-display: swap to all fonts including google fonts with the single button.
Describe alternatives you've considered
I can manually add the CSS in Elementor but it doesn't load in time for it to even work. I've tried scripting, as well as CSS and neither of them works, it would be very nice to add this additional work.
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions