This format can reduce the filesize considerably compared to JPG and PNG files, and using it is pretty easy with gatsby-image and gatsby-plugin-sharp.. Or even try out some of the font loading strategies from Zach Leatherman. Gatsby starter with Styled Components. Although using Typefaces is self-hosting our fonts, it does not provide us with much control over our setup. or with Yarn: yarnadd gatsby-plugin-prefetch-google-fonts. In gatsby-config.js export an object in the module with a plugins property, as follows: Creating a Gatsby Site. edited it to ensure you have an error-free learning experience. Next, we need to set up a typography.js configuration file where we’ll choose our web fonts or theme, as well as any additional base styling. add the plugin to your gatsby-config.js inside the plugins array. Disables Font Awesome auto CSS insertion and instead inserts it at compile time. Plugin configuration (gatsby-config.js): We’ll include the local plugin in our project, list all local and external fonts and their properties (including the font name, and the CSS file URL), and include all preconnect URLs. This example shows how to set up the Open Sans font. After your first configuration, you can just specify the fonts you want to use for your project in gatsby-config.js and you can automagically use the desired fonts in … With the help of a friend, what solved the issue was putting the