Introducing Glyph Protocol for Terminals
Key point
Glyph Protocol has been proposed to render icons in terminals without patched fonts.
Details
The Glyph Protocol has been introduced, allowing terminal applications to directly register and render vector glyphs at runtime instead of relying on patched fonts like Nerd Font.
The core consists of two parts.
- register: The application registers
glyfoutlines to Unicode PUA codepoints. - query: Check whether a specific codepoint is covered by system / session / both / free.
Transport uses APC (Application Program Command) instead of OSC, and all messages are delivered as frames prefixed with 25a1 (WHITE SQUARE). Supported formats are returned as a bitfield in the response; in v1, glyf is mandatory, with COLR v0/v1 extendable later.
The design also considers security. Registration targets are restricted to PUA, preventing phishing that would swap out characters in regular text. Up to 1024 entries can be registered per session, and when exceeded, the oldest entries are evicted FIFO.
On the terminal side, implementation is underway first in Rio, and example code for Bubble Tea, Ratatui, and Ink has also been released. Since glyphs use a TrueType glyf subset rather than SVG, existing rasterizers already included in text rendering can be reused, and the wire size is also explained to be smaller than SVG.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.