canonical / ubuntu.com

The official website for the Ubuntu operating system
https://ubuntu.com
Other
191 stars 189 forks source link

Errors downloading font on ubuntu.com #10312

Closed mtruj013 closed 1 week ago

mtruj013 commented 3 years ago

Summary

These issues pop up on the ubuntu.com landing page, although no styling seems to be broken

Screenshot

Image Pasted at 2021-9-6 14-30

[If relevant, please include a screenshot.]

Browser details

[Optionally - if you can, copy the report generated by mybrowser.fyi - this might help us debug certain types of issues.]

bethcollins92 commented 3 years ago

@bartaz or @sowasred2012 do you know what's going on with these warnings?

bartaz commented 3 years ago

@bethcollins92 No, it seems to only happen in Firefox. And I also don't see same errors on vanillaframework.io, so not sure - does ubuntu.com use different font files?

bethcollins92 commented 3 years ago

@bartaz yeh it's weird it's only on firefox. Also, I can't see any different font files on ubuntu.com

bartaz commented 3 years ago

@bethcollins92 I guess it would need more investigation to better understand what these errors/warnings mean and what need to be changed to avoid them.

petesfrench commented 2 years ago

I don't get the font error on Firefox, but another set of errors mostly relating to the cookie policy: image

So not sure if this is still relevant.

petesfrench commented 2 years ago

@mtruj013 can you see if you can replicate this?

sowasred2012 commented 2 years ago

I couldn't see these errors on Firefox, but I checked Chrome and they appeared: Screenshot from 2022-01-19 15-11-20

The odd thing is that on subsequent page loads, six errors appear, not 10. I'll look into what the error means.

carkod commented 2 years ago

Looks like a browser thing to me. I got it the first time with Firefox, second time it didn't show up anymore, it's as if the browser was blocking them.

With Chrome I got no warnings at all.

Have you guys tried clicking on the link see if it loads the font in a separate tab?

petesfrench commented 3 weeks ago

We are loading fonts directly in our HTML: https://github.com/canonical/ubuntu.com/blob/main/templates/templates/base.html#L59 as well as in Vanilla https://github.com/canonical/vanilla-framework/blob/main/scss/_base_fontfaces.scss It looks like the Vanilla font types are being prioritized and thus the ones we include on u.com are not being used. One option would be to remove them entirely, or we could just not preload them