Skip to content

Glyph: do not error on invalid starting points#177

Merged
vancluever merged 2 commits into
mainfrom
skip-invalid-glyph-points
Jun 10, 2026
Merged

Glyph: do not error on invalid starting points#177
vancluever merged 2 commits into
mainfrom
skip-invalid-glyph-points

Conversation

@vancluever

@vancluever vancluever commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Fixes #175

This updates our glyph outline processing logic so that it just simply skips invalid starting points (a point on a new contour that is not on-curve, or an end point that is a first point) rather than error out.

These points appear to be present in some glyphs in DejaVu Sans (particularly in the successive end point form, in the form of two points being marked as end points a row). I'm not too sure if there are cases where these would ever be correct, but I'm currently working under the assumption that they are not.

This makes it easier to use these types idiomatically.
This updates our glyph outline processing logic so that it just simply
skips invalid starting points (a point on a new contour that is not
on-curve, or an end point that is a first point) rather than error out.

These points appear to be present in some glyphs in DejaVu Sans
(particularly in the successive end point form, in the form of two
points being marked as end points a row). I'm not too sure if there are
cases where these would ever be correct, but I'm currently working under
the assumption that they are not.
@vancluever vancluever added the bug Something isn't working label Jun 10, 2026
@vancluever vancluever merged commit 026696e into main Jun 10, 2026
2 checks passed
@vancluever vancluever deleted the skip-invalid-glyph-points branch June 10, 2026 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

error.MalformedGlyph for 'u' from DejaVuSans

1 participant