Specific Google Font not rendering in React app

I have a specific google font, https://fonts.google.com/specimen/Nunito?preview.text=Hi!&preview.text_type=custom&query=nunito, that I want to use. I have used other Google fonts and they work fine. I have a few Sass files, a _fonts.scss partial that uses the @import rule for Google fonts. I have another file, Hero.scss that uses the font-family associated with the font. For whatever reason, Nunito does not render on either Firefox or Chrome. When I use a different font, like Fraunces, it works fine though. Dev tools shows me that my text has the font-family set, but it just doesn't render the font.
1 Reply
vince
vinceOP•2y ago
Here's some specific code:
// _fonts.scss
@import url("https://fonts.googleapis.com/css2?family=Nunito&display=swap");
// _fonts.scss
@import url("https://fonts.googleapis.com/css2?family=Nunito&display=swap");
// Hero.scss
h1 {
font-family: "Nunito", sans-serif;
}
// Hero.scss
h1 {
font-family: "Nunito", sans-serif;
}
I fixed it immediately after sending this. I didn't add my fonts partial to my App.scss 😂 Spent an hour banging my head on the wall because of that
Want results from more Discord servers?
Add your server