summaryrefslogtreecommitdiff
path: root/src/fonts.zig
Commit message (Collapse)AuthorAge
* macos: a window client draws its own motions and follows the session: its ↵Gabriel Schneider9 days
| | | | | | | loop wakes a frame at a time while its glide, caret or trail moves (frontendMoving, also its FrameStats' animating) and at each blink edge, a touchpad's fraction is its picture with whole rows posted as inputs (stepScroll's body is scrollRows, the local pump's and the client's), and the session's Font is resolved here by the face's name (fonts.remote, syncReplicaFont), where before the client kept its own font and scrolled a whole row a turn Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* tests: at the end of their files: every top-level test block of the 46 files ↵Gabriel Schneider10 days
| | | | | | | that had one mid-file (the locality analysis's 45 and test/hxdiff.zig; gui.zig, macos.zig, look, host_io, 9p_io, terminal, tui, mouse, fs, replica, layout among them, 11,429 test lines), with the functions only tests call, moved after the file's code in their order, a mechanical move (.scratch/suites/tests_to_end.py), zig fmt'd; the unit suites pass as before (tui 1486/1487, gui 1536/1537, core 956/956 on both), macos.zig only parse-checked here Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* idioms #6, std.Io where the host has one, and libc's reasons where it stays: ↵Gabriel Schneider12 days
| | | | | | | fonts reads a face's tables through std.Io.File (monospaced takes the walk's io), and each host's libc alias says what it is still for (ptys, sockets passing fds, signal handlers and forked children, O_NONBLOCK opens, inotify, the registry's symlinks, a cancelable task's unlink) Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* idioms #1, std.fs's deprecated aliases in the hosts: std.fs.path and ↵Gabriel Schneider12 days
| | | | | | | std.fs.max_path_bytes are std.Io.Dir.path and std.Io.Dir.max_path_bytes in 0.17, so the hosts name them there Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* fonts.zig's comments keep their whys and lose their history (max_fonts at ↵Gabriel Schneider14 days
| | | | | | | 512, the Zig 0.16 move, the flake a shared scratch path once caused), and the module doc names its readers: Output.zig's picker, exec.zig's Font, the windows' fallback faces Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* rename: the terminal frontend is the tui (-Dplatform=tui, src/tui/tui.zig, ↵Gabriel Schneider14 days
| | | | | | | --tui with --tty kept as its old spelling, the process tests' backend .tui and --backend=tui, docs/typ/builtins-tui.json, the Settings report's platform), and the builtin Tty is Term (its registry entry, SPC n t, every default tag, the docs, tests and snap scripts), Tty still run as Term through exec.acme_words, Tty+fish too on a tag and a ctl; tty as a pane's raw mode and as the OS's terminal unchanged Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* zig fmt for Zig 0.17Gabriel Schneider2026-10-22
|
* Every catch unreachable, orelse unreachable and syscall assert outside tests ↵Gabriel Schneider2026-10-01
| | | | | | | | is a real refusal or says why it cannot fire A sweep for round 23's crash: a run's answer (pty/run) was bufPrint'd into 48 bytes with catch unreachable, so a foreground program's long name (macOS gives up to 32 bytes) panicked; it now cuts at the room, keeping its newline, in 96 bytes. The rest were numbers into buffers sized for them, a braille codepoint, pthread calls on the queue's own mutex, and pdf_view's resolved outline entries: each now carries a one-line comment saying why it cannot fire. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* big slow change: prebuilt shaders (SPIR-V/Metal), core gui reflow, docs, web ↵Gabriel Schneider2026-08-18
| | | | + snapshot refresh
* shaders: -Dprebuilt-shaders, so a gui build needs no Vulkan SDKGabriel Schneider2026-08-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | glslc is the one build input that wants a tool a stock machine does not have, and it is also the input that changes least often: eight GLSL files that have outlived several rewrites of everything around them. Asking every machine that wants to run the SDL shell for shaderc is the wrong trade. The SPIR-V is now COMMITTED, under shaders/prebuilt/, and -Dprebuilt-shaders embeds that copy instead of shelling out. The default stays the honest one -- compile the shaders that are actually in the tree -- because the flag trades a dependency for a freshness problem: with it on, the .glsl sources are not build inputs at all, so editing one changes nothing. `zig build shaders` is the other half, and it is deliberately independent of -Dplatform: it recompiles every shader and writes the result back into the tracked directory, so whoever changes a shader refreshes the cache on a machine that has the compiler and commits the diff. `jj diff shaders/prebuilt` after it is the freshness check -- empty means the cache was already current. The shader list is also spelled once now (gui_shaders): the eight embeds, the eight glslc runs and the refresh step all read it, so adding a shader is a name there plus the @embedFile in gui.zig, not three edits in two places. Verified: -Dplatform=gui -Dprebuilt-shaders builds with glslc absent from PATH, and image-harness passes on that binary -- real SDL GPU pipelines built from the committed SPIR-V, 512 source pixels read back. The default gui build still runs the eight glslc steps; tty runs none. The committed bytes are identical to a fresh glslc run, and `zig build shaders` is idempotent.
* fonts: the picker showed 512 faces on a machine with a thousandGabriel Schneider2026-08-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | max_fonts was 512 and this desktop has 1071 monospace faces installed. The walk stopped at the cap, and because the sort runs AFTER the cut, the picker did not look truncated -- it ran A to z with four hundred faces missing out of the middle of it, which is a far worse way to be wrong than a short list. The cap is now 4096 and the array comes from the arena rather than the stack: 4096 * {name, path} is 128 KiB, which is a fine thing to hand an arena that resets at the end of the keystroke and not a thing to put on a call stack. It was only ever a MEMORY bound anyway -- the work is bounded by max_steps, since a face has to be walked past before it can be found -- and the comment now says so instead of implying the number was about how long a list can be read. Costs nothing measurable: the walk is what takes the time, not the four sfnt reads per file. 512 faces warm was 31ms, 1071 is 36ms. (The 11s I first measured was a cold page cache reading every font file on the disk once.) Two guards, because the reason this went unnoticed is more interesting than the off-by-a-cap: - src/fonts.zig is imported behind `platform == .gui or .macos`, so on the tty build nothing analyses it and zig collected no tests from it. It HAD tests; they never ran. It now has its own libc-linked module in unit-test, which is the hazard build.zig already writes down next to shell_bin.zig. - a canary test asserting installed.len < max_fonts. Reaching the cap means the list handed to the picker is a lie, and it should fail loudly rather than quietly serve half a machine. Verified it fails at 512 and passes at 4096. Verified in a real SDL window: SPC t f then a dump, 1092 rows in +Fonts. unit-test 186/186 (5 of them newly reachable).
* macos: the AppKit shell, its icon, and the offscreen e2e harnessGabriel Schneider2026-08-11