From 611b54fefc8a02f67cd59041c1795a083ac0bb4c Mon Sep 17 00:00:00 2001 From: eunhhu Date: Wed, 30 Sep 2026 13:19:01 +0100 Subject: Show what would act on a screen as a picture on every surface, and keep a value's bidi within it Speech wrote a value's C1 controls (U+009B is a CSI to some terminals), DEL, line separators and bidi overrides as they were; the CLI and the TUI wrote line separators (a pipe's reader may break its line there) and the controls that turn text around (a terminal then reverses the rest of its line, other values' cells too); the web page showed controls as they were and let a label's override reverse its badge. Now every surface shows controls, DEL, C1 and line and paragraph separators as pictures (vega_visible); a terminal's cells show embeddings, overrides and isolates as U+FFFD too (vega_cell); speech says a space for the one and nothing for the other; the page shows the pictures and isolates each value, while /screen's JSON keeps values as they are. screen_meaning checks the CLI, the TUI, speech and the JSON against that rule, and that nothing a value holds reaches any output as a control; the browser check sees the page show it. --- surfaces/vega.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'surfaces/vega.h') diff --git a/surfaces/vega.h b/surfaces/vega.h index 0ab87dd..c172d31 100644 --- a/surfaces/vega.h +++ b/surfaces/vega.h @@ -91,8 +91,16 @@ unsigned long vega_evaluations(void); unsigned vega_width(uint32_t codepoint); /* The code point at text[at] (valid UTF-8) and the bytes it takes. */ size_t vega_decode(const char *text, size_t length, size_t at, uint32_t *codepoint); -/* A control character shown as its control picture (U+2400 block), else itself. */ +/* What a value's code point is shown as, on every surface: a control + * character as its control picture (the U+2400 block, DEL too), a C1 control + * as U+FFFD, a line or paragraph separator as U+2424 (a value never breaks + * its line), else itself. */ uint32_t vega_visible(uint32_t codepoint); +/* In a terminal's cell (the TUI, the CLI) also the controls that would turn + * the rest of the terminal's line around (embeddings, overrides, isolates), + * as U+FFFD: pixels lay a value's text out themselves, within its place. */ +uint32_t vega_cell(uint32_t codepoint); +/* The cells text takes, as vega_cell shows it. */ unsigned vega_text_width(const char *text, size_t length); /* CLI: everything, as plain lines for pipes; color only when asked. */ -- cgit v1.2.3