summaryrefslogtreecommitdiffstats
path: root/CONTEXT.md
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-07-31 17:28:31 +0200
committersalmonik <salmonik@tuta.io>2026-07-31 17:28:31 +0200
commit994a2196745637fd0805132711b1ed9354b75426 (patch)
treec666940f060aa8db028c75fd3aef799fabbd69b4 /CONTEXT.md
parenttty + vt terminal split, rsdosedit editor (1:1 UNIX console) (diff)
downloadrs-dos-994a2196745637fd0805132711b1ed9354b75426.tar.gz
rs-dos-994a2196745637fd0805132711b1ed9354b75426.zip
vt: decode UTF-8, render box-drawing/arrow glyphs procedurally
The editor's gutter '│' (U+2502) appeared as '???' — write_bytes fed each UTF-8 byte to the state machine, which mapped every byte >= 0x80 to '?', and the Latin-1 font has no box-drawing glyphs anyway. - vt.write_bytes now decodes UTF-8 sequences; printable non-ASCII dispatches to the glyph path instead of the byte parser. - gop: unicode_glyph_bits() procedurally rasterises box-drawing (U+2500-257F light/heavy/double), arrows (U+2190-2193) and the em dash (U+2014) — pure geometry, no font data needed; blit_glyph falls back to it for ch >= 256. Verified via framebuffer dumps: editor gutter │ renders as a vertical line, help screen ═ separators and ←→↑↓ all render as lines (no '?'). Shell banner em dash renders too.
Diffstat (limited to 'CONTEXT.md')
-rw-r--r--CONTEXT.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/CONTEXT.md b/CONTEXT.md
index b557192..20c60f7 100644
--- a/CONTEXT.md
+++ b/CONTEXT.md
@@ -104,7 +104,9 @@ Single Rust crate (`x86_64-unknown-uefi` target). Module breakdown:
104- `gop.rs` — framebuffer rasteriser (glyph blits, pixel shifts); the text 104- `gop.rs` — framebuffer rasteriser (glyph blits, pixel shifts); the text
105 surface itself lives in `vt` 105 surface itself lives in `vt`
106- `vt.rs` — terminal emulator: cell grid, cursor, ANSI CSI parser (H/J/K, 106- `vt.rs` — terminal emulator: cell grid, cursor, ANSI CSI parser (H/J/K,
107 cursor moves, SGR 16-colour, `?25l/h`), dirty-cell blitting 107 cursor moves, SGR 16-colour, `?25l/h`), dirty-cell blitting, UTF-8
108 decoding (box-drawing `│`/`═`, arrows `←↑→↓`, em dash `—` render
109 procedurally instead of `?`)
108- `tty.rs` — line discipline: canonical `read_line` (echo, line buffer, 110- `tty.rs` — line discipline: canonical `read_line` (echo, line buffer,
109 ^C/^D) and raw `read_byte` (terminal byte protocol: arrows → `ESC [ A–D`, 111 ^C/^D) and raw `read_byte` (terminal byte protocol: arrows → `ESC [ A–D`,
110 ^X → `0x18`, …) 112 ^X → `0x18`, …)