Closed jbhannah closed 4 years ago
Thank you! Can I ask you to link the documentation of benefits that you are referring to?
Sure, I've added a link in the PR description. Specifically, setting font-display: swap
tells the browser to draw the text immediately, and swap in the custom font face once the browser finishes downloading it from the server. The font packages in the KyleAMathews/typefaces repo also use this technique.
Thanks Jesse! I will check it out this weekend. Really appreciate this information and the PR!
Not a problem! Both this and my other PR are things I came across in converting my homepage to use self-hosted fonts and doing other performance optimizations, and figured they'd be worth giving back.
figured they'd be worth giving back
Thanks Jesse! I greatly appreciate it!
I haven't had a chance to read the Lighthouse document that you linked yet but should be able to get to it this week. Will prioritize your PR that fixes the incorrect web font subset paths in both the CSS and the CSS template files for a patch that we push to npm so that this fix is available. Be back in touch about the proposal here when I have a chance to inform myself about the change that you are making.
Allows for faster rendering while waiting for fonts to download, per recommendations from Lighthouse audit on decreasing time-until-rendered.