Replace the M2 stub rasterizer with a real font rasterizer:
- build.zig.zon: add TrueType as a lazy path dependency
- build.zig: swap stub_rasterizer_mod for truetype_rasterizer_mod; link
fontconfig + libc on Linux; TrueType dep is lazy (falls back gracefully)
- src/gui/rasterizer/truetype.zig: andrewrk/TrueType rasterizer; loadFont
uses fontconfig to locate the font file, derives cell dimensions from
vertical metrics (ascent−descent) and 'M' advance width; render blits the
A8 glyph bitmap into the caller-provided staging buffer with correct
baseline placement (ascent_px + off_y) and double-wide support (+cell_w
x-offset for kind=.right); arena allocator per render call
- src/gui/rasterizer/font_finder.zig: OS dispatcher (Linux only for now)
- src/gui/rasterizer/font_finder/linux.zig: fontconfig C API - FcFontMatch
resolves a font name pattern to an absolute file path
Requires: libfontconfig-dev (already present alongside libgl-dev etc.)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move shared types out of src/win32/ into a new src/gui/ package:
- xy.zig: generic XY(T) coordinate type
- xterm.zig: 256-color palette table (used by all GPU renderers)
- GlyphIndexCache.zig: glyph→atlas-slot mapping
- Cell.zig: Rgba8 and Cell extracted from d3d11.zig
- GlyphRasterizer.zig: comptime interface spec/checker
Update src/win32/ imports to point to ../gui/ and delete the
moved originals.
Replace the -Dgui bool option with -Drenderer enum { terminal, gui,
d3d11 }, wiring .d3d11 to the existing win32 DirectWrite path and
keeping build_options.gui = (renderer != .terminal) for tui.zig.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This is a major update of the tree-sitter depedencies (via flow-syntax). In
addtion to updating tree-sitter from the 0.24 branch to 0.26 there are also
updates to all tree-sitter parsers and a couple of new languages. The
supported tree-sitter ABI is now at version 15. (min version still 13)
New languages:
d (dlang)
llvm (LLVM IR)
comment (tags in comment blocks in many languages)
query (tree-sitter queries)
rpmbash (bash embedded in rpmspec files)
This should also unblock a few other file type requests, but they are not
included here directly and will follow later.
closes#540
Now that Widget addresses do not have to be stable we can greatly simplfy
and in the process eliminate the potential for update looping.
The closes#520