Skip to content
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

Fonts downloaded via Google Fonts are not identical to Google's source font repo #8457

Open
Gitoffthelawn opened this issue Nov 3, 2024 · 4 comments

Comments

@Gitoffthelawn
Copy link

Describe the bug

Google Fonts does not offer the same files as the source repo for the Material Design Icons. I'll report the issue there as well, but given that Google Fonts is differing from the source, it may be very well be a mistake on Google Fonts, and not the other Google repo (so please, don't insta-close this issue report without first determining and communicating where the issue lies).

To Reproduce

STR:

  1. Download Material Design Icons from Google Fonts website. If you can't figure out how to do this, don't feel bad. Please see the UX issue I reported here.
  2. Download Material Design Icons from the source repo for the Material Design Icons.
  3. Extract the contents of the downloaded zip files.
  4. Compare the version numbers of the font files. Notice they are the same (e.g. v1.017 for MaterialIcons-Regular.ttf).
  5. Notice that the file sizes of the fonts aren't even close (e.g. 55% increase in size for the font file distributed via Google Fonts for MaterialIcons-Regular.ttf than distributed via the source repo).

Expected behavior

Fonts distributed via Google Fonts website to match source files.

@Gitoffthelawn
Copy link
Author

As promised, I created a corresponding issue report on the source repo as well: google/material-design-icons#1830

Hopefully this will help determine why the files are different, and if the files distributed by one of the repos need to be changed.

@vv-monsalve
Copy link
Collaborator

Hi @Gitoffthelawn, I've downloaded the exemplar case you mentioned above, MaterialIcons-Regular.ttf, both from the repository and the distributed version, and I can not replicate the reported issue.

The fonts match in version and file size, and after being compared with our tools, no difference was reported.

Image

Image

@Gitoffthelawn
Copy link
Author

@vv-monsalve Hi Viviana! Thanks for making the effort to compare the files. It's surprising that your results differ from mine. I will investigate further and report back. I'm quite busy, but I'll get this done as soon as possible.

One thing I did note is that the two font files you downloaded do appear to be non-identical. One is 356840 bytes and the other is 356884 bytes. The different isn't as large as I detected, but still indicates the files are not identical. Is one simply padded with nulls at the end, or are their actual differences? Can you run a hex comparison on them, please?

Kindly note that version numbers embedded within font files, although they can be useful, are often misleading as they don't indicate data corruption or changes made without the version number being bumped.

@tphinney
Copy link
Collaborator

tphinney commented Nov 6, 2024

It is certainly possible or even likely that the version being served to websites has had additional post-processing after being posted. That 44-byte difference is small, but apparently real.

Just last week I was crazy enough to try to diff two versions of TTX dumps of the current (Material Symbols) icon fonts, and, well, it became apparent that I need a better diff tool to do it—will be trying tkdiff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants