Pretty please
This is another one we have an active feature request for but haven’t implemented yet. It won’t be in this cycle, but it is on our radar.
Great, thanks @alexander
In the meantime we can use this plugin or this one to get the job done until you’ve implemented it.
Awesome. Thanks for sharing those resources.
Hi @JvP,
Wanted to reach out and let you know we’ve added this for the next release! You can try it out when we get the next beta pushed out. Here’s a screenshot:
You’re welcome!
I wonder if you could make it work with Font Awesome as well? In speed tests the Font Awesome fonts are listed as needing this optimization as well.
Good point. I’ll make a note to check into it before release.
What would the browser swap to on an icon font though?
You’d probably end up with the little unicode squares. But I can see how some developers would still prefer having a way to get around the speed test warning. We could just make it a separate filter that is independent from the new setting.
Update: For best practices, we’re going to add font-display: block;
to everything font awesome. Some of the site speed scanners are more interested in the presence of that property to dictate behavior. At least it will be there, and to Michael’s point, it will avoid letting the browser try to fallback to something.
Good call. It’s an argument I had with someone on my custom icons plugin. swapping fonts is meant to give users a readable, albeit unstyled, version of text. Icons don’t fit into that bill. If it’s a real concern, change over to SVG icons
Right, and it does help that you now have the ability to disable FA entirely if needed. That way you don’t need to load it if you switch to SVGs