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

Fix glyf loca null transform parsing #88

Conversation

mlwilkerson
Copy link
Contributor

Closes #87

Copy link
Contributor

@wezm wezm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well that's embarrassing on my part. Thanks for the issue and fix. One thing to resolve before merging is what is the provenance of the test font? In the fonts README we like to capture the source of fonts we include in the repo and their license. Or if it was hand made include a note in the woff2 README for how it was made.

@wezm
Copy link
Contributor

wezm commented Mar 2, 2023

@wezm wezm closed this Mar 2, 2023
@mlwilkerson
Copy link
Contributor Author

@wezm about the provenance and licensing (thanks for your concern about that!):

I built the test font with my own font builder, which is the font builder that builds all Font Awesome 6 fonts, including the Font Awesome 6 Free fonts, which are licensed under the SIL OFL 1.1 License. I used SVG sources for glyphs that are mostly from Font Awesome 5 Free, and one from Font Awesome 6 Free (itemized below).

If you wanted a cleaner, less mixed provenance for a test font, with open-source-friendly licensing, I think you could use exactly this Solid Style Font Awesome 6 Free woff2 font. It would just be needlessly large, since it has lots of icons in it. I haven't tried it to be 100% sure, but since it would have built by the same font builder, I'm 99% sure that it would reproduce the original issue here in the same way. I just preferred using a smaller font as a test fixture to make it a closer-to-minimal reproduction of the bug.

If there's a concern about how to possibility reproduce/rebuild this test font using the same font builder, that would not be directly available to an open source developer, since that font builder is Font Awesome's proprietary software. However, a Font Awesome Pro subscriber could achieve it by creating a kit with custom icon uploads that are just this same set of FA Free icons I used here, and then download the kit. The webfonts/custom-icons.woff2 file in that kit download zip archive would be built the same way as the test font.

It doesn't matter much about the SVGs that were the sources of the glyphs in the test font, since what matters here is how the font tables were being encoded (regardless of the particular glyphs). But to account for the licensing of those raw materials used in the test font:

The SVGs encoded as glyphs in the font are included from either Font Awesome 5 Free (license) (code points f0fc, f13d, and f45c), or Font Awesome 6 Free (license) (the .notdef glyph).

  • beer (f0fc), from FA5 Free, Solid style.
  • anchor (f13d), from FA5 Free, Solid style.
  • square-full (f45c), from FA5 Free, Solid style.
  • notdef, from FA6 Free, Solid style.

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

Successfully merging this pull request may close these issues.

Invalid parsing when loca or glyf have null transform
2 participants