You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This saves the extra request to Google Fonts to grab the CSS file which can significantly delay starting the download of the fonts.
Google Fonts doesn't recommend this as they want you to always be grabbing the latest versions of fonts but if you regularly rebuild your site then you'll generally be up-to-date.
This might be better actually as a Gatsby plugin. It'd be an HTML post-processor — it'd scan HTML for google font css strings and replace them with the font-face declarations.
The text was updated successfully, but these errors were encountered:
Another idea is to publish open source fonts (e.g. those on Google Fonts) to NPM along with font-face css and then you can just include the font-face css in your webpack project.
This saves the extra request to Google Fonts to grab the CSS file which can significantly delay starting the download of the fonts.
Google Fonts doesn't recommend this as they want you to always be grabbing the latest versions of fonts but if you regularly rebuild your site then you'll generally be up-to-date.
This might be better actually as a Gatsby plugin. It'd be an HTML post-processor — it'd scan HTML for google font css strings and replace them with the font-face declarations.
The text was updated successfully, but these errors were encountered: