terminal: glyph protocol parser and response encoder#12352
Open
terminal: glyph protocol parser and response encoder#12352
Conversation
c7ca915 to
75aff66
Compare
2 tasks
75aff66 to
24f8919
Compare
Contributor
Author
|
Updates:
|
mitchellh
added a commit
that referenced
this pull request
Apr 23, 2026
This code was motivated by the need for the glyph protocol handler (#12352) to be able to validate the provided `glyf` payload, without having to link freetype or anything (because libghostty-vt needs to be static). As such it's written specifically to meet those needs, but in such a way that it can be expanded if we find a need for more in-depth inspection of `glyf`s in the future.
24f8919 to
f403485
Compare
This adds the core parse/encode for the still in-development and experimental terminal glyph protocol: raphamorim/rio#1542 The only cross-cutting change necessary was changing the APC identification logic which previously only looked at a single byte to support multi-byte identifiers since the glyph protocol uses `25a1`.
f403485 to
3d896ca
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important: this DOES NOT hook up the glyph protocol to Ghostty or libghostty. Its just the parser.
This adds the core parse/encode for the still in-development and experimental terminal glyph protocol: raphamorim/rio#1542
The only cross-cutting change necessary was changing the APC identification logic which previously only looked at a single byte to support multi-byte identifiers since the glyph protocol uses
25a1.For DoS protection, the default limits any glyph-related APC command size to 1 megabyte.
Warning
Since this protocol is still in development and discussion, there is no promise the implementation will stay within Ghostty or that any of the APIs exposed by this will remain stable. We're just getting ahead of it.