From 4b5e793f48f6e721c39ab6ddcf755604df73b643 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sun, 9 Aug 2026 20:31:09 -0300 Subject: Better text rendering --- docs/config.md | 7 +++++++ docs/design.typ | 8 ++++---- docs/macos.md | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index b3eee911..cba7e5fc 100644 --- a/docs/config.md +++ b/docs/config.md @@ -18,6 +18,13 @@ Theme acme Font DejaVuSansMono-Regular ``` +On the SDL GUI, a selected face falls back to embedded Adwaita Mono, then to +installed `NotoSansMono-Regular`, `DejaVuSansMono`, +`SymbolsNerdFont-Regular`, `NotoSansSymbols2-Regular`, +`NotoSansSymbols-Regular`, and `DejaVuSans`, in that order. Missing entries are +skipped. Faces are discovered and opened once at startup, and each resolved +glyph is retained in the GPU atlas cache. + Blank, unknown, malformed, or unsuccessful lines are ignored silently, and a bad line does not prevent later lines from running. Top-level text that is not a builtin is not sent to a shell. (`Exec ...` remains an ordinary builtin and diff --git a/docs/design.typ b/docs/design.typ index 75c89812..38fa6fdb 100644 --- a/docs/design.typ +++ b/docs/design.typ @@ -174,9 +174,9 @@ test. `zig build` produces three statically linked artifacts: `pardes` (vaxis), `pardes-gui` (SDL3), `pardes.wasm` + a vanilla DOM shell (wasm32-freestanding). -Same native dependency set as the prototype — ghostty, vaxis, uucode (shared config), zstbi, SDL -(castholm, lazy), zig-tree-sitter + grammars — all via `zig fetch`, wired in -`build.zig`. Codegen during build, consumed by comptime: tree-sitter +Native dependencies are ghostty, vaxis, uucode (shared config), zstbi, SDL +(castholm, lazy), FreeType, and zig-tree-sitter + grammars — all pinned through +`zig fetch` and wired in `build.zig`. Codegen during build, consumed by comptime: `highlights.scm` → options module; tutor text → embedded pane content. Debug builds are incremental for the seconds-loop; release builds are the product. @@ -282,7 +282,7 @@ tap-LOOK/drag-scroll, but finger-down on a tagline or a one-cell-tolerant pane separator latches to a left-mouse gesture for its lifetime, keeping layout drags out of the scroll heuristic. Touch input translation and scroll/tap state live entirely in the JavaScript shell. -The native SDL shell uses an stb_truetype atlas over the SDL GPU API (SPIR-V). +The native SDL shell uses a FreeType light-hinted grayscale atlas over the SDL GPU API (SPIR-V). The browser exposes each cell as selectable, inspectable text and applies the surface styles with CSS. The browser `.snap` harness drives real Chromium touch input and reads both text and per-cell styles from the DOM renderer's packed diff --git a/docs/macos.md b/docs/macos.md index 35fba5f3..e430f677 100644 --- a/docs/macos.md +++ b/docs/macos.md @@ -28,7 +28,7 @@ Pardes goes the other way because its frame is *already* a cell grid. draw one: attributed runs, the system font stack, and Apple's own subpixel and color-emoji handling, for free. The alternative is a hand-rolled glyph atlas, and the SDL backend is the measurement of what that costs — roughly three -thousand of `src/gui/gui.zig`'s 4,300 lines are a 2048² stb_truetype R8 atlas, +thousand of `src/gui/gui.zig`'s 4,300 lines are a 2048² FreeType-hinted R8 atlas, GPU pipelines, transfer buffers and shaders. Writing a second one, blind, buys nothing the grid needs. -- cgit v1.3