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

pathops turns cubics into quadratics #72

Open
simoncozens opened this issue Oct 20, 2023 · 0 comments
Open

pathops turns cubics into quadratics #72

simoncozens opened this issue Oct 20, 2023 · 0 comments

Comments

@simoncozens
Copy link

Test case:

from ufoLib2.objects import Contour, Point, Glyph
from pathops import union
ufo_glyph = Glyph()
pen = ufo_glyph.getPen()
contours = [
   Contour(points=[
   Point(371, 515, type='curve'),
   Point(414, 515),
   Point(443, 490),
   Point(445, 434, type='curve'),
   Point(447, 379),
   Point(447, 323),
   Point(445, 266, type='curve'),
   Point(443, 210),
   Point(415, 185)])]
union(contours, pen)
print([node.type for node in ufo_glyph[0]])
# ['curve', None, None, 'curve', None, 'qcurve', None, None]
assert not any(node.type == "qcurve" for node in ufo_glyph[0])
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

No branches or pull requests

1 participant