-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Display swap #54
Comments
Check #44 for a similar example |
Thanks, will give it a try :) |
Tried it, with this code. But unfortunatly the fonts aren't loading. Am I doing something wrong? :)
|
try replacing the |
Didn't help :( Site keeps showing the default font when code above is added. Do I need to set something in my CSS? |
Any idea? :) |
@gizburdt As a workaround (and a complete copy/paste fix for your issue), try using the custom example in the README: webfontloader: {
custom: {
families: [
'Roboto:i3,i4,i5,i7,i9,n4',
'Nunito Sans:i6,i7,i8,i9,n4,n7,n8,n9',
],
urls: [
'https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;0,900;1,400&display=swap',
'https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,600;0,700;0,800;0,900;1,400;1,700;1,800;1,900&display=swap',
]
},
} The |
Works, thanks! |
Hi,
Looks like Google changed the url since this feature was released. Can you maybe tell me how to implement the display=swap for these fonts?
I'm referring to
400;0
and900;1
for example. With Roboto I have a400;0
and a400
How does my families: [] need to look like?The text was updated successfully, but these errors were encountered: