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

[cubic-glyf] Fix drawPoints() contour ending with cubic offCurve #3190

Merged
merged 1 commit into from Jun 27, 2023

Conversation

behdad
Copy link
Member

@behdad behdad commented Jun 27, 2023

Fixes #3189

@behdad
Copy link
Member Author

behdad commented Jun 27, 2023

I added tests. But...

How should an all-offcurve cubic contour be represented in pointPen? It looks the same as a quadratic one, no?

@behdad
Copy link
Member Author

behdad commented Jun 27, 2023

How should an all-offcurve cubic contour be represented in pointPen? It looks the same as a quadratic one, no?

Oh, the lone cubic on-curve with None coordinates I think. Fixing.

@behdad
Copy link
Member Author

behdad commented Jun 27, 2023

How should an all-offcurve cubic contour be represented in pointPen? It looks the same as a quadratic one, no?

Oh, the lone cubic on-curve with None coordinates I think. Fixing.

I don't see the respective code for quadratic in Glyph.drawPoints.

Copy link
Collaborator

@justvanrossum justvanrossum left a comment

Choose a reason for hiding this comment

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

LGTM!

@behdad
Copy link
Member Author

behdad commented Jun 27, 2023

Thanks. Thoughts on the other issue?

@behdad behdad merged commit 9974a74 into main Jun 27, 2023
10 checks passed
@behdad behdad deleted the cubic-drawPoints branch June 27, 2023 15:48
@justvanrossum
Copy link
Collaborator

How should an all-offcurve cubic contour be represented in pointPen? It looks the same as a quadratic one, no?

That is a design flaw in the point pen protocol, that is reflected in UFO outlines, too.

@behdad
Copy link
Member Author

behdad commented Jun 27, 2023

Filed #3191.

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.

[glyf-1 cubic curves] Last cubic segment becomes quadratic
2 participants