ATT-21 double-width and double-height rows (ESC # 3, 4, 5, 6) #4
Loading…
Reference in a new issue
No description provided.
Delete branch "ATT-21-line-size"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Work package: https://openproject.home.romaine.life/wp/ATT-21 (part of https://openproject.home.romaine.life/wp/ATT-19)
Double-width and double-height rows, which at-claude's DONE rows use (at-tmux sends
ESC # 3/ESC # 4for them; Rio ignored every line size, so they drew single height).What changes
rio-vt:LineSize(single, double width, double-height top/bottom) on eachRow. It travels with the row into scrollback and through snapshots; a reset or recycled row (a cleared screen, a scrolled-in line) is single again. The parser dispatchesESC # 3,4,5,6to a newHandler::set_line_size, which sets the cursor's row and damages it. Tests:esc_hash_sets_the_cursor_rows_line_size,a_cleared_screen_is_single_again.rio-gridline_size.rs: a double row is built by the existing row builders over the half of its columns that shows, at twice the font and cell size for double height, then laid onto the real grid: each background covers two cells; each glyph moves to its double cell; a double-height glyph is cut to its own row's half by narrowing its atlas rectangle, so the top row draws the top half and the bottom row the bottom half, whatever is next to either; a double-width glyph keeps its height, centred in its double cell. Every backend (wgpu, Metal, Vulkan, CPU) draws aCellTextthe same way (atlas rect at grid position plus bearings, one atlas pixel per screen pixel), so none of the shaders change. Tests: 7, on the placement and cutting arithmetic.riotermrow rebuild uses it. A double row gets no IME composition and no cursor-run break.Limits: double width is spacing, not stretching: glyphs keep their single width in a double cell. libsugarloaf's C API rows don't apply line sizes (at-terminal doesn't use it).
Checked on upstairspc (Windows):
cargo fmt --check, clippy-D warningsand the workspace tests pass. nelsonpc builds nothing. CI covers Linux.Only a real desktop shows: how a DONE pair looks drawn (glyph halves meeting at the row boundary).