summaryrefslogtreecommitdiffstats
path: root/rsdos
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 /rsdos
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 '')
-rw-r--r--rsdos/src/main.rs18
1 files changed, 11 insertions, 7 deletions
diff --git a/rsdos/src/main.rs b/rsdos/src/main.rs
index dc59e8e..c36660e 100644
--- a/rsdos/src/main.rs
+++ b/rsdos/src/main.rs
@@ -83,13 +83,17 @@ pub extern "efiapi" fn efi_main(image_handle: Handle, system_table: *mut SystemT
83 rsnix::serial_println!("gop: not found (0x{:x})", gop_result); 83 rsnix::serial_println!("gop: not found (0x{:x})", gop_result);
84 } 84 }
85 rsnix::vt::init(); 85 rsnix::vt::init();
86 rsnix::serial_println!("vt: terminal ready ({}x{})", { 86 rsnix::serial_println!(
87 let (rows, cols) = rsnix::vt::size(); 87 "vt: terminal ready ({}x{})",
88 rows 88 {
89 }, { 89 let (rows, cols) = rsnix::vt::size();
90 let (rows, cols) = rsnix::vt::size(); 90 rows
91 cols 91 },
92 }); 92 {
93 let (rows, cols) = rsnix::vt::size();
94 cols
95 }
96 );
93 97
94 // ExitBootServices — we now own the machine 98 // ExitBootServices — we now own the machine
95 if unsafe { (bs.exit_boot_services)(image_handle, map_key) } != EFI_SUCCESS { 99 if unsafe { (bs.exit_boot_services)(image_handle, map_key) } != EFI_SUCCESS {