Skip to content
Please note that GitHub no longer supports Internet Explorer.

We recommend upgrading to the latest Microsoft Edge, Google Chrome, or Firefox.

Learn more
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

Fira Code does not download on Chrome 79.x on Windows only #2328

Open
hmemcpy opened this issue Feb 2, 2020 · 11 comments
Open

Fira Code does not download on Chrome 79.x on Windows only #2328

hmemcpy opened this issue Feb 2, 2020 · 11 comments
Assignees

Comments

@hmemcpy
Copy link

@hmemcpy hmemcpy commented Feb 2, 2020

I noticed that my blog wasn't rendering the monospaced font correctly on Windows, and I noticed that I get a lot of warnings about it failing to download Fira Code:
image

It works fine in Chrome/Brave on macOS, does not work on Windows. It does, however, work on Edge (Chromium 70) on both Windows and Mac.

I asked on twitter, and many folks confirm they get the same error in Chrome on Windows.
I'm using Brave version 1.2.43 Chromium: 79.0.3945.130 (Official Build) (64-bit) if that helps

I managed to reproduce this on codepen: https://codepen.io/hmemcpy/pen/OJPKxLJ

macOS Windows
@rsheeter rsheeter self-assigned this Feb 3, 2020
@rsheeter

This comment has been minimized.

Copy link
Contributor

@rsheeter rsheeter commented Feb 3, 2020

Thank you for the report. I'm having trouble reproducing. Does this happen reliably for you?

@sladen

This comment has been minimized.

Copy link
Contributor

@sladen sladen commented Feb 3, 2020

Hello @hmemcpy

  1. is there by any chance that there is a local copy of the font installed (somewhere) on this particular machine?
  2. what does the Network debugging view show; is an HTTP GET occuring; and is the font being re-downloaded (might not be happening if already cached)?
  3. What is the file-size + SHA or MD5sum checksum of any downloaded/cached copy? (ie. is it bit-for-bit identical to a freshly-downloaded copy)
@hmemcpy

This comment has been minimized.

Copy link
Author

@hmemcpy hmemcpy commented Feb 3, 2020

Hello @sladen, @rsheeter,

Let me get that info for you. But I just tried again in a clean Windows 10 VM with just Chrome (79.0.3945.130 (Official Build) (64-bit)) installed - same thing, I'm afraid :(
image

@sladen

This comment has been minimized.

Copy link
Contributor

@sladen sladen commented Feb 3, 2020

Re-typed URL from screenshots (ideally confirm copy-and-paste)

whereas:

…q3bh3dSD vs. q3bL0fxyUs4tcw4W_GNsJV37Nv7g

(edit: lower-case-que, not lower-case-gee), then first URL works.

@hmemcpy

This comment has been minimized.

Copy link
Author

@hmemcpy hmemcpy commented Feb 3, 2020

What's interesting, if I request family=Fira%20Code:300 or family=Fira%20Code:400, then I get the correct font rendered fine. When both 300,400 are used I seem to have the problem. Still working on the hashes, one moment.

@sladen

This comment has been minimized.

Copy link
Contributor

@sladen sladen commented Feb 3, 2020

ls -sh1 uU9*
20K uU9eCBsR6Z2vfE9aq3bL0fxyUs4tcw4W_GNsJV37Nv7g.woff2
44K uU9NCBsR6Z2vfE9aq3bh3dSD.woff2
@hmemcpy

This comment has been minimized.

Copy link
Author

@hmemcpy hmemcpy commented Feb 3, 2020

Very odd, on my VM I get different sizes:

$ ls -sh1 uU*
36K uU9NCBsR6Z2vfE9aq3bh3dSD.woff2
32K uU9eCBsR6Z2vfE9aq3bL0fxyUs4tcw4W_GNsJVD7Ng.woff2

If it helps, I used this curl command which I copied from the Network tab, to download the font (I'm sure it doesn't really need all the headers, but just in case...):

curl -O 'https://fonts.gstatic.com/s/firacode/v7/uU9NCBsR6Z2vfE9aq3bh3dSD.woff2' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36' -H 'Referer: https://fonts.googleapis.com/css?family=Fira%20Code:300,400' -H 'Origin: https://cdpn.io' --compressed

Finally, the "broken" font (3dSD) doesn't also render properly in the Preview tab in network. It shows a generic serif font.

I'm sorry, not really a web dev, so not sure what else I can provide to be helpful...

@rsheeter

This comment has been minimized.

Copy link
Contributor

@rsheeter rsheeter commented Feb 3, 2020

300,400 is triggering delivery as a variable font whereas for just 300 or just 400 it's smaller as a static instance. I assume https://codepen.io/rs42/pen/QWweXyQ, which declares 300 and 400 to both come from the same src triggers the failure?

@hmemcpy

This comment has been minimized.

Copy link
Author

@hmemcpy hmemcpy commented Feb 3, 2020

Yes, I get the same failure in your codepen as well in the VM. Interestingly, on my main Windows machine (which has Fira Code TTFs installed locally), it did show the warnings, but also render Fira Code. So I removed the local font, refreshed the page, and got the failed result as well:

@rsheeter

This comment has been minimized.

@rsheeter

This comment has been minimized.

Copy link
Contributor

@rsheeter rsheeter commented Feb 3, 2020

Appears to be due to a bug in our toolchain that Fira Code triggers, likely only causing an issue on Windows where Chrome tries to use DWrite for variable fonts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.