Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add font-display property #470

Merged
merged 1 commit into from
Jun 22, 2020
Merged

Add font-display property #470

merged 1 commit into from
Jun 22, 2020

Conversation

jbhannah
Copy link
Contributor

@jbhannah jbhannah commented Jan 30, 2019

Allows for faster rendering while waiting for fonts to download, per recommendations from Lighthouse audit on decreasing time-until-rendered.

Allows for faster rendering while waiting for fonts to download.
@chrissimpkins
Copy link
Member

Thank you! Can I ask you to link the documentation of benefits that you are referring to?

@jbhannah
Copy link
Contributor Author

jbhannah commented Feb 1, 2019

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.

@chrissimpkins
Copy link
Member

Thanks Jesse! I will check it out this weekend. Really appreciate this information and the PR!

@jbhannah
Copy link
Contributor Author

jbhannah commented Feb 4, 2019

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.

@chrissimpkins
Copy link
Member

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.

Copy link
Member

@chrissimpkins chrissimpkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much! Sorry for the delay

@chrissimpkins chrissimpkins merged commit 1eddf94 into source-foundry:master Jun 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants