8000 removeOverlaps: work around pathops.simplify error by anthrotype · Pull Request #2288 · fonttools/fonttools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

removeOverlaps: work around pathops.simplify error #2288

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

Merged
merged 6 commits into from
May 12, 2021

Conversation

anthrotype
Copy link
Member
@anthrotype anthrotype commented May 4, 2021

Sometimes skia-pathops simplify may fail (for unknown reasons which I'm still trying to debug).
It's a good idea to know the name of the offending glyph
google/fonts#3365

EDIT: It's actually even better to not fail at all. It turns out that if we round the path's coordinates to integers before passing it on to pathops.simplify, then it works -- at least for the two glyphs in the Noto Ethiopic and Telugu fonts which triggered this issue.

The effect of rounding before removing overlaps is minimal, since we are going to round afterwards anyway once we encode the glyf table; besides, we only try rounding when simplify fails with the unrounded float coordinates (the ones that we get from the instancer).

All in all, I believe the workaround is better than blocking those projects while the Skia bug is fixed upstream (https://bugs.chromium.org/p/skia/issues/detail?id=11958), which may take a while since we have no idea what's going on under the hood.

Sometimes skia-pathops simplify may fail (for unknown reasons which I'm still trying to debug).
It's a good idea to know the name of the offending glyph
google/fonts#3365
@anthrotype anthrotype changed the title removeOverlaps: print glyph name when pathops.simplify fails removeOverlaps: work around pathops.simplify error May 6, 2021
@anthrotype anthrotype force-pushed the remove-overlaps-print-glyph-error branch 2 times, most recently from 3e6a095 to d7b3b9f Compare May 6, 2021 13:02
@anthrotype anthrotype force-pushed the remove-overlaps-print-glyph-error branch from d7b3b9f to 84b8513 Compare May 6, 2021 13:16
@anthrotype anthrotype requested a review from rsheeter May 6, 2021 19:09
@anthrotype anthrotype force-pushed the remove-overlaps-print-glyph-error branch from a9dab1a to 5dd1877 Compare May 6, 2021 19:17
@anthrotype anthrotype force-pushed the remove-overlaps-print-glyph-error branch from 5dd1877 to 80598d3 Compare May 6, 2021 19:24
@anthrotype anthrotype merged commit 6adbf18 into main May 12, 2021
@anthrotype anthrotype deleted the remove-overlaps-print-glyph-error branch May 12, 2021 16:07
simoncozens pushed a commit to simoncozens/fonttools that referenced this pull request Oct 22, 2021
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.

2 participants
0