CodeNewbie Community 🌱

Discussion on: How to add google font to react?

Collapse
 
terabytetiger profile image
Tyler V. (he/him)

CORS is always the worst kind of error - essentially your localhost page isn't recognized as allowed to communicate with Google Fonts for one reason or another.

I would start by looking through the responses here and see if any of the solutions from others sound like they might be your situation:

I am using Google Webfonts on my website. In the console on Chrome I get the following warning:

Blink is considering rejecting non spec-compliant cross-origin web font requests: fonts.gstatic.com/s/raleway/v8/0dT.... Please use Access-Control-Allow-Origin to make these requests spec-compliant.

Upon inspecting the request headers there appears to not be any Access-Control…

It looks like your CSS is correct though - I would guess the issue is something outside of your CSS file.

Collapse
 
hannaali profile image
hannaalibr

You discover free fonts with different styles discover right at fontesdeletras.io/