Skip to content

Properly terminate in subroutines with an endchar operator#22

Merged
laurmaedje merged 3 commits intomainfrom
endchar
May 4, 2026
Merged

Properly terminate in subroutines with an endchar operator#22
laurmaedje merged 3 commits intomainfrom
endchar

Conversation

@LaurenzV
Copy link
Copy Markdown
Collaborator

@LaurenzV LaurenzV commented May 1, 2026

According to the Type2 specification, subroutines can have the endchar operator:

image

When desubroutinizing a glyph, we should therefore abort in case we encounter such an instruction, instead of keeping decompiling new instructions. See also the diff of the test in the second commit, which now matches what fonttools emits when desubroutinizing this font.

@LaurenzV LaurenzV requested a review from laurmaedje May 1, 2026 12:39
@laurmaedje laurmaedje merged commit 43cf8a3 into main May 4, 2026
6 checks passed
@laurmaedje laurmaedje deleted the endchar branch May 4, 2026 09:15
@laurmaedje
Copy link
Copy Markdown
Member

Let me know if I should cut a release.

@LaurenzV
Copy link
Copy Markdown
Collaborator Author

LaurenzV commented May 4, 2026

Not urgent I think. I let codex do an “audit” and it found a few more things (some of which related to variable fonts handling), so might be worth fixing those first as well.

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