How to fix Google fonts not loading in Nuxt static sites deployed on Netlify
How to add google fonts to a gatsby project with gatsby-plugin-web-font-loader
Benjamin Looi / June 19, 2021
What is gatsby-plugin-web-font-loader
gatsby-plugin-web-font-loader is a Gatsby plugin to asynchronously load webfonts using Web Font Loader. Can load fonts from Google Fonts, Typekit, Fonts.com, and Fontdeck, as well as self-hosted web fonts. In this article, we will explain only for Google Fonts.
Installation
With npm:
npm install --save gatsby-plugin-web-font-loaderOr with Yarn:
yarn add gatsby-plugin-web-font-loaderUsage
In your gatsby-config.js file, load in the plugin along with which web fonts to load. For example:
// gatsby-config.js
module.exports = {
plugins: [
{
resolve: "gatsby-plugin-web-font-loader",
options: {
google: {
families: ["Droid Sans", "Droid Serif"],
},
},
},
],
}
If you would like to explicitly request the variation you want:
google: {
families: ["Open Sans Condensed:300,700"]
}
Additional Information
Thanks for reading! 😁Comments
Related Posts
This article describes how to upgrade Gatsby starter blog (or any other gatsby starter template)
TailwindCSS v4 changed the setup flow. AI coding agents still reach for old config files and deprecated commands, so developers need to check the official docs before accepting setup code.
Related Projects
Open Resume
A resume builder with AI coaching, server-side rendering, local state persistence, and Cloudflare Workers deployment.
The Eco Garden Cat Project
A bilingual cat welfare platform for a real colony in Cambodia, with TNVR tracking, KHQR donations, public ledgers, adoption inquiries, volunteer sign-ups, and an admin CMS.


