Repository navigation
Round HVAR advance deltas like HarfBuzz - #427
Merged
Merged
Conversation
- Round the varied advances from HVAR to whole units, as HarfBuzz does - Subsets of fonts with set variations no longer truncate advances like 851.9999 to 851 - Make the two HVAR tests check exact advances
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As found in #426: fontkit adds the HVAR delta to the advance without rounding it, so varied advances come out fractional (
oein Source Sans 3 atwght: 200is851.9999999999999). Writing them intohmtxtruncates them, so the subset gets 851, where fontTools' instancer and HarfBuzz give 852.roundf, and as fontkit already does with gvar deltastest/variations.jsrounded the advance themselves; they now check the exact advance and fail without the fixnpm testpasses (699 passing, 7 pending), andnpm run format:checkis clean.