-
Notifications
You must be signed in to change notification settings - Fork 645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CORS issue when using Google Fonts #444
Comments
Hey @brandoncc, To me it looks like Light (300) and Bold (700) does not exist for Sorts Mill Goudy It should just be:
|
I had a slightly different problem (using this library in a WebView on a iOS device), but for me it worked to add these resources in the head of the html file:
|
To add some important context: This is definitely not a CORS issue. This happens when you use webfontloader to request a Google Font with a list of weights and a style, like italic/bold. For example, When this happens, Webfontloader has a bug that adds the style as a "subset", see the code here for context. So in this case, it would request Roboto with the subset "italic". According to Google Fonts API documentation, the The simple fix is to not include weights if you're requesting a style, as in Joemidi's answer. But if you want both (a non-standard weight and a different style, e.g. Roboto 300 italic) then you can't use Webfontloader to do that. This workaround is fine for me, so I won't add a PR to fix the underlying bug, but I thought it was worth explaining. |
Here is my configuration:
Unfortunately, I have a CORS error from the Google Fonts:
This has been an issue for a very long time, and I'm hoping there is a solution. I opened this SO question a year ago.
My current machine is Brave on MacOS Big Sur.
The text was updated successfully, but these errors were encountered: