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

Drop impliable oncurves either before or after rounding #3156

Merged
merged 6 commits into from Jun 8, 2023

Conversation

anthrotype
Copy link
Member

@anthrotype anthrotype commented Jun 7, 2023

Currently (#3146) we only compute implied oncurves after coordinates have already been rounded. We should compute if an oncurve point is in between previous/next off-curve points both before they get rounded and afterwards, and accept it either way.
The TTGlyphPens need to allow leaving the coordinates un-rounded, so that ufo2ft can set round=noRound when building master interpolatable TTFs; then it can send these to varLib.build and have the impied points dropped (when impliable for all masters).

We want to be able to compute implied oncurves both before coordinates have been rounded to integer and afterwards.
Also when ufo2ft builds interpolatable master TTFs, we want to turn off the rounding so that varLib can call dropImpliedOnCurvePoints on the un-rounded coordinates, so we need an option to disable rounding the coordinates in the ttGlyphPens
…var expects

ufo2ft will no longer send varLib already-rounded master glyf tables (to give it an opportunity to compute implied oncurves on the pre-rounded coords) so when retrieving coordinates off the glyf table in order to compute gvar deltas we have to round
ofter the rounding gives us an opportunity to make an oncurve impliable, for points that were not equidistant become so after round, so why not take it!
@behdad
Copy link
Member

behdad commented Jun 7, 2023

LGTM. Thanks.

@anthrotype anthrotype merged commit f5c43ce into main Jun 8, 2023
10 checks passed
@anthrotype anthrotype deleted the drop-before-and-after-round branch June 8, 2023 10:57
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.

None yet

2 participants