Skip to content

Fix CFF2 bug with black rectangles - #5

Merged
laurmaedje merged 1 commit into
mainfrom
fix-black-rects
Jun 3, 2026
Merged

Fix CFF2 bug with black rectangles#5
laurmaedje merged 1 commit into
mainfrom
fix-black-rects

Conversation

@laurmaedje

Copy link
Copy Markdown
Member

CFF2 does not have an endchar operator and ttf-parser does not emit explicit .close() calls for CFF2 outlines. Having an unclosed path can have adverse effects on the render, so we explicitly close the path. Note that this is a no-op if the path was already closed through ttf-parser.

@laurmaedje
laurmaedje merged commit 099f3b1 into main Jun 3, 2026
2 checks passed
@laurmaedje
laurmaedje deleted the fix-black-rects branch June 4, 2026 10:44
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.

1 participant