Using Google Fonts in GatsbyUpdated: December 6, 2020
Google Fonts is a great resource for adding beautiful fonts to your website.
Adding fonts to a Gatsby project is as easy as installing the
Then, add your favorite fonts to your
In the example above, I am using
display: swap. The
font-display property defines how font files are loaded and displayed by the browser.
swap tells the browser to use the fallback font to display the text, until the custom font has fully downloaded (aka "flash of unstyled text").
If you are looking for inspiration or help in choosing the right fonts for your project, make sure to check out Google Fonts and FontPair.