Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

anthrotype
Copy link
Member

Fixes #3903 and supersedes it

I applied behdad's suggestion

@cmyr
Copy link
Contributor

cmyr commented Aug 14, 2025

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
@anthrotype
Copy link
Member Author

note that kurbo also has this quirk

probably because kurbo's cu2qu code is a port of fonttools

Copy link
Contributor

@cmyr cmyr left a comment

Choose a reason for hiding this comment

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

great, thanks!

@anthrotype anthrotype merged commit a8d8700 into main Aug 18, 2025
11 checks passed
@anthrotype anthrotype deleted the fix-cu2qu-degenerate-cubic branch August 18, 2025 10:51
anthrotype added a commit to linebender/kurbo that referenced this pull request Aug 18, 2025
…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.
anthrotype added a commit to linebender/kurbo that referenced this pull request Aug 18, 2025
…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.
github-merge-queue bot pushed a commit to linebender/kurbo that referenced this pull request Aug 18, 2025
…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~~.
@anthrotype
Copy link
Member Author

anthrotype commented Aug 18, 2025

@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

flaviotore added a commit to flaviotore/kurbo that referenced this pull request Oct 9, 2025
…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~~.
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