Skip to content
This repository has been archived by the owner on Aug 9, 2023. It is now read-only.

cu2qu/ufo: must use PointToSegmentPen with outputImpliedClosingLine=True #185

Merged

Conversation

anthrotype
Copy link
Member

When collecting a glyph's segments, we can't simply call the glyphs' draw method with the GetSegmentsPen, but we must initialize the PointToSegmentPen explicitly with outputImpliedClosingLine=True.
By default PointToSegmentPen does not outputImpliedClosingLine -- unless last and first point on closed contour are duplicated.
Because we are converting multiple glyphs at the same time, we want to make sure the _get_segments function returns the same number of segments, whether or not the last and first point overlap.

Fixes googlefonts/fontmake#572

Also see: fonttools/fonttools#1720

When collecting a glyph's segments, we can't simply call the glyphs' draw
method with the GetSegmentsPen, but we must initialize the
PointToSegmentPen explicitly with outputImpliedClosingLine=True.

By default PointToSegmentPen does not outputImpliedClosingLine -- unless
last and first point on closed contour are duplicated.

Because we are converting multiple glyphs at the same time, we want to
make sure the _get_segments function returns the same number of segments,
whether or not the last and first point overlap.

Fixes googlefonts/fontmake#572

Also see: fonttools/fonttools#1720
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

contours of zero width can't be exported into a variable font
1 participant