From 994a2196745637fd0805132711b1ed9354b75426 Mon Sep 17 00:00:00 2001 From: salmonik Date: Fri, 31 Jul 2026 17:28:31 +0200 Subject: vt: decode UTF-8, render box-drawing/arrow glyphs procedurally MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- rsdos/src/main.rs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'rsdos') 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 rsnix::serial_println!("gop: not found (0x{:x})", gop_result); } rsnix::vt::init(); - rsnix::serial_println!("vt: terminal ready ({}x{})", { - let (rows, cols) = rsnix::vt::size(); - rows - }, { - let (rows, cols) = rsnix::vt::size(); - cols - }); + rsnix::serial_println!( + "vt: terminal ready ({}x{})", + { + let (rows, cols) = rsnix::vt::size(); + rows + }, + { + let (rows, cols) = rsnix::vt::size(); + cols + } + ); // ExitBootServices — we now own the machine if unsafe { (bs.exit_boot_services)(image_handle, map_key) } != EFI_SUCCESS { -- cgit v1.2.3