I’m trying to import some custom fonts for my JS calculator. I’m having trouble with doing this in codepen, I’m not sure where to host the font-file to be able to supply a direct link to the page? I’ve been getting this error in my console:
“Font from origin ‘https://www.dropbox.com’ has been blocked from loading by Cross-Origin Resource Sharing policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://s.codepen.io’ is therefore not allowed access”
Can you please help - how can I add the google font in CSS settings of CodePen? I am trying to include the Lobster font using - https://fonts.googleapis.com/css?family=Lobster but that doesnt seem to be of any help. I event tried adding import statement in CSS but still no luck. Am I missing something?
I was having problems with this too. I think my bootstrap was overriding my font choices, so I had to give them classs or IDs. I then selected them in my CSS page and specified the fonts there.
I don’t know if anyone is still following this, but I have the same problem: linking to ttf files in dropbox, back when the Public folder was still public, everything worked fine. Now I’m hosting the same font file on cloudinary, and my css just ignores the call to it, to its url… I have no idea why that is, why it worked with Dropbox in the first place: if it is just a matter of referring the right url, which I did for all my images and videos (now moved to cloudinary too), why does it not work for fonts?
Google fonts will probably do, it’s just a course after all, but I can’t figure it out, nor do I find any useful posts about it.