-
Notifications
You must be signed in to change notification settings - Fork 22
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
Web Font optimization #12
Comments
addyosmani
added a commit
that referenced
this issue
Apr 19, 2018
Tried using webfontloader: <script>
WebFontConfig = {
google: {
families: ['Montserrat:400,600', 'Teko:300,400,500,600']
}
};
(function (d) {
var wf = d.createElement('script'), s = d.scripts[0];
wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js';
wf.async = true;
s.parentNode.insertBefore(wf, s);
})(document);
</script> But no dice on performance. We saw some regressions using it. Going to experiment with a few other options from https://github.com/zachleat/web-font-loading-recipes/#experiments-in-progress |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looking at the network panel for the initial route, we see two references to Web Font files. Both of these are referenced from gstatic:
some of our web fonts are flagged in the Lighthouse render-blocking stylesheet audit, delaying paints by ~1.5s:
Lighthouse's text visible during font-loads audit passes as well:
What are things we want to do here?
'Montserrat', sans-serif
appears to be in use for most of our text. Worth dropping Roboto entirely?font-display
on it ourselves? Per CSS Tricks "If you embed fonts using a third party service like Google Fonts or TypeKit, there's not much you can do at the moment. Third party services control the content of a @font-face they host, so perhaps consider hosting your own fonts"References:
Dropping Roboto will reduce the paint delays down to 740ms:
The text was updated successfully, but these errors were encountered: