Glyph protocol
Rio is the reference implementation of the Glyph Protocol, a terminal protocol created by Raphael Amorim that lets applications ship custom vector glyphs to the terminal at runtime, without requiring the user to install a patched font (Nerd Fonts, Powerline, etc.).
An application registers an outline for a Private Use Area codepoint, then simply prints that codepoint. The terminal rasterizes the registered outline at render time, at any font size, on any display. When the application exits, the registrations expire with the session.
Read the announcement: Introducing Glyph Protocol for terminals.
Color glyphs (OpenType
COLR) registered at runtime via Glyph Protocol, rendered in Rio.

Why
Terminal iconography today depends on out-of-band font distribution: the application picks PUA codepoints, the user installs a multi-megabyte patched font and switches their terminal to it, and the application emits codepoints hoping the mapping is right. If it isn't, the user sees tofu, and the application can't even tell.
Glyph Protocol moves glyph ownership from the font file to the application, and gives applications a way to ask the terminal what it can render before rendering it.
How it works
Messages ride APC escape sequences (ESC _ 25a1 ; ... ESC \) with four verbs:
slists the payload formats the terminal accepts, and doubles as a protocol-detection ping.qasks whether a codepoint is covered by a system font, a registration, both, or nothing.rships a glyph for a PUA codepoint, with sizing and placement controls.cremoves one registration or the whole session glossary.
Sizing and placement
Registrations describe how the outline maps onto the cell, so the same bytes render correctly at any font size. Every glyph passes through three transforms at render time: pad (compute the effective render span), size (pick scale factors), align (position the scaled outline within the span).
widthdeclares the glyph's render span as 1 (narrow) or 2 (wide) cells. It is honored purely at render time: a wide glyph paints across two cells, but the codepoint's logical width stays at one cell (itswcwidth), so cursor advance, wrapping, and selection never desync from width-unaware applications. Authors of wide glyphs emit a trailing space so the overflow lands on an empty cell.awandlhdeclare the authored extent (advance width and line height, inupmunits), so the terminal scales by glyph intent instead of by bounding box.sizepicks the scale policy:height(default, line-height drives, like regular characters),advance,contain(fits entirely inside the span),cover(fills the span), orstretch(each axis independent, useful for box-drawing).alignpositions the scaled outline in the span (start/center/endper axis), includingbaselinevertical alignment for character-like glyphs that must sit on the text baseline, with descenders extending below it naturally.padinsets the render span by fractional amounts on each edge.
Glyphs that must visually align as a set, like spinner frames or progress-bar steps, align automatically when authored with the same extent and placement parameters.
Payload formats
| Format | Contents |
|---|---|
glyf | Monochrome vector outline (the OpenType simple-glyph record), rendered in the current foreground color. Typical icons are 50-400 bytes on the wire. |
colrv0 | Layered flat color, via the OpenType COLR v0 + CPAL tables. |
colrv1 | Full color paint graph (gradients, transforms, composites) via OpenType COLR v1. |
Every terminal that renders OpenType text already links a glyf rasterizer, and terminals that render color emoji already parse COLR/CPAL. The protocol reuses tables the font stack already decodes.