-
Notifications
You must be signed in to change notification settings - Fork 493
[cu2qu] handle case when all points in cubic segments are equal #3904
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
Conversation
Okay, note that kurbo also has this quirk, so merging this will actually break a bunch of diffs. I'll open an issue there to discuss. |
I am getting a weird error: call to undeclared function 'None'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] I'll isolate this with a reproducer and file a bug upstream but for now this works
probably because kurbo's cu2qu code is a port of fonttools |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great, thanks!
…-quad approximation apply's Behdad's suggestion here: linebender/kurbo#484 (comment)
…o a line or point Fixes #484 intended to match fonttools/fonttools#3904 Note the above fonttools PR only handles 3 to 4 consecutive cubic control points, whereas in here I also consider intersections when a point is collinear and lies in between the other two.
…o a line or point Fixes #484 intended to match fonttools/fonttools#3904 Note the above fonttools PR only handles 3 to 4 consecutive cubic control points, whereas in here I also consider intersections when a point is collinear and lies in between the other two.
…o a line or single point (#485) Fixes #484 This is intended to match fonttools/fonttools#3904 ~~In addition to the above fonttools PR which only handles 3 to 4 consecutive cubic control points, in here I also consider intersections when a point is collinear and lies in between the endpoints of the other line. I think this is a logical consequence if we agree that when there are 3 consecutive equal points at the front/back of cubic bezier then there's an intersection at the common (start/end) point.~~ ~~kurbo's `try_approx_quadratic` uses `Line::crossing_point` method, so I modified that one to behave like that~~.
@cmyr I'm not going to rush releasing a new fonttools with this given it's relatively minor. But when we do push this, we'll have to concurrently do kurbo as well |
…o a line or single point (#485) Fixes linebender/kurbo#484 This is intended to match fonttools/fonttools#3904 ~~In addition to the above fonttools PR which only handles 3 to 4 consecutive cubic control points, in here I also consider intersections when a point is collinear and lies in between the endpoints of the other line. I think this is a logical consequence if we agree that when there are 3 consecutive equal points at the front/back of cubic bezier then there's an intersection at the common (start/end) point.~~ ~~kurbo's `try_approx_quadratic` uses `Line::crossing_point` method, so I modified that one to behave like that~~.
Fixes #3903 and supersedes it
I applied behdad's suggestion