Closed mtyaka closed 6 years ago
Rebased from 9f75f6ff3d6d87468b08dc72a7989ec077b6ffcf.
@mtyaka I believe you have commit bit. Your PRs seem to have dpes on each other. Merge when ready. I suggest using Rebase and Merge mode.
Thanks for all the reviews @pointlessone. I don't have merge permissions on this repo.
@pointlessone Thanks for inviting me to the contributors team. For some reason though, the merge button is still greyed out for me.
@mtyaka How about now?
@pointlessone Still no.
@mtyaka Try now?
@pointlessone It works now, thank you!
When encoding a font subset, the
search_range
field should be calculated as(maximum power of 2 <= numTables)*16
.Currently TTFunk is correctly calculating the maximum power of two (
2^x
), but then instead of settingsearch_range
to the actual value of2^x * 16
, it sets it tox * 16
, which is not correct.The incorrect entry for
search_range
causes the font to fail OpenType Sanitizer (OTS) validation. Because OTS is used in both Chrome and Firefox, the validation error means that the subset font generated with TTFunk currently cannot be used in the browser.Testing
To reproduce the issue generate a new subset and save it to disk. Then run the OTS validator on it.
Install OTS and run
ots-sanitize
:NOTE
With this patch in place,
ots-sanitize
fails due to a different error, which will be fixed in a separate PR.