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

Handle rounding of component transforms when calculating glyph hashes #69

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

jenskutilek
Copy link
Contributor

Update calculation of composite glyph hashes to match ufo2ft. Fixes #65.

@rimas-kudelis
Copy link
Contributor

Is it possible to cover this with a test? Or is it already covered by the existing tests?

@jenskutilek
Copy link
Contributor Author

It's possible. I'll look for a suitable test case. The TTFs included in the tests have no instructions on composites (most TTFs in the wild don't have them).

@rimas-kudelis
Copy link
Contributor

Oh, I was wondering about that, if you don't mind.

If I compose a glyph from other glyphs, will the hinting instructions of these included glyphs be applied by default, or do I have to hint the new glyph explicitly?

@jenskutilek
Copy link
Contributor Author

jenskutilek commented Sep 5, 2024

Yes, the instructions of the referenced glyphs will be applied, and after that, any instructions that are in the composite glyph*. For example, if you want to improve the centering of an accent over a base glyph.

_* If I understand it correctly, to be more precise, each component will be grid-fitted on its own in its original untransformed state, then those grid-fitted outlines are composed into the composite glyph, possibly with offsets, scaling, and rounding to the grid via a flag, and then the instructions of the composite glyph are evaluated to grid-fit the combined outlines again.

@rimas-kudelis
Copy link
Contributor

Is there something you're still wanting to do in this pull request?

@benkiel benkiel merged commit 8f2a9e0 into robotools:master Sep 13, 2024
2 checks passed
@benkiel
Copy link
Member

benkiel commented Sep 13, 2024

@jenskutilek thanks! Merged

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.

Some glyph hashes are calculated incorrectly
3 participants