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

Glyphs using a single shape overlapping itself failed to be flattened #51

Closed
newforms opened this issue Jan 23, 2018 · 6 comments
Closed
Labels
bug Something that is now the way it's supposed to be

Comments

@newforms
Copy link

dulcmmrvwaava-8

Overlaps aren't removed in glyphs using a single shape, overlapping itself (i.e. "P", "e", "6", "9", etc.).

@rsms
Copy link
Owner

rsms commented Jan 23, 2018

The bug is in fontbuild at

if len(contours) > 1:
manager = BooleanOperationManager()
glyph.clearContours()
manager.union(contours, glyph.getPointPen())

An optimization looks at a glyph's contours and if there's only a single contour—as the case with e.g. "e"—it skips the expensive union boolean operation. There's probably a cheap way to check if there's any overlap even for single-contour glyphs.

@rsms rsms added the bug Something that is now the way it's supposed to be label Jan 23, 2018
@rsms
Copy link
Owner

rsms commented Jan 24, 2018

I have a fix for this, but it increases build times by a considerable amount of time (29s -> 43s). Before pushing a fix for this, I want to investigate if I can speed up the process.

@rsms
Copy link
Owner

rsms commented Jan 24, 2018

I wasn't able to find a way to speed things up, so considering 57238c6 to fix this.

@rsms rsms closed this as completed Jan 24, 2018
@rsms
Copy link
Owner

rsms commented Jan 24, 2018

Here's a build with the fix
Inter-UI-2.5-57238c6c82.zip

@rsms
Copy link
Owner

rsms commented Jan 24, 2018

Beta release with these changes incorporated: https://github.com/rsms/inter/releases/tag/v2.5-beta

@newforms
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is now the way it's supposed to be
Projects
None yet
Development

No branches or pull requests

2 participants