Wakamai-Fondue / wakamai-fondue-engine

The engine that powers Wakamai Fondue
Apache License 2.0
51 stars 12 forks source link

Detect hinting #40

Closed RoelN closed 3 years ago

RoelN commented 3 years ago

This isn't perfect, as theoretically a font could contain hints per glyph and none of these "helper tables", and a rasterizer could decide to hint the font anyway — but that sounds like a very edgy edge case. Since lib-font doesn't report hinting per glyphs, checking for the presence of these helper tables is adequate.

Note that we exclude the prep table when it contains a specific, short string of instructions. This is because this is added in the build/verification process of Google Fonts. Although it does give some instruction on how to deal with a hinting-related issue, the presence of merely this short prep table shouldn't be considered proper hinting. So we exclude this.

⚠️ This doesn't currently pass tests as the lib-font version on npm isn't up to date with the latest fixes that allow it to detect hinting-related tables!

pascalw commented 3 years ago

@RoelN looks like lib-font 2.0.6 is out on NPM! Also there are merge conflicts, can you fix those?

RoelN commented 3 years ago

@pascalw Thanks for the review! All's well now, merging!