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

[varlib] add --drop-implied-oncurves option #3147

Merged
merged 4 commits into from Jun 5, 2023

Conversation

anthrotype
Copy link
Member

Follow up from #3146

I decided to add this to varLib directly instead of ufo2ft, since the method for dropping the oncurve points was already here.

The option is False by default.
Don't expect much savings, mostly in the hundred of bytes for normal fonts so usually not worth rebuilding yours.

I was thinking of adding a tolerance to increase the chances of pruning oncurves (right now it has to be exactly in the middle, we use math.isclose). But maybe another time, I just need this for testing purposes (diffing against fontc)

@anthrotype anthrotype force-pushed the varlib-drop-implied-oncurves branch 2 times, most recently from 144d5a1 to 7bd6d2a Compare June 2, 2023 14:49
For the test, I used the Tests/varLib/data/Build.designspace as starting point, modified the 'a' glyph so that 1 on-curve point (the first one) becomes impliable for all the masters.
@anthrotype anthrotype force-pushed the varlib-drop-implied-oncurves branch from 7bd6d2a to 0690703 Compare June 2, 2023 14:50
@anthrotype anthrotype requested a review from behdad June 2, 2023 14:52
Copy link
Member

@behdad behdad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor comment. LGTM otherwise. Thanks.

as per review #3147 (comment)

Also, don't do same work multiple times when dropping points from flags/endPtsOfContours arrays since these are supposed to be the same for all interpolatable glyphs
@anthrotype anthrotype merged commit d673fad into main Jun 5, 2023
10 checks passed
@anthrotype anthrotype deleted the varlib-drop-implied-oncurves branch June 5, 2023 11:28
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