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>
Adds a Fonts type the render interface. Here's an example of how
you could use this in `gui.zig`:
```zig
const fonts = render.Fonts.init();
defer fonts.deinit();
const count = fonts.count();
std.log.info("{} fonts", .{count});
for (0..count) |font_index| {
const name = fonts.getName(font_index);
std.log.info("font {} '{}'", .{ font_index, std.unicode.fmtUtf16Le(name.slice()) });
}
```
I tried adding Andrew's TrueType renderer as an option, however, I
realized it doesn't work with zig 0.13.0, so it'll have to wait.
Until then here's the changes needed to decouple the screen/text rendering
which would make it easier to add more text renderers and just cleans
things up a bit more in general.
Changes d3d11 to accept an array of cells to render that have already been
rendered to a texture and converted to texture coordinates. This minimizes
the time we have to map the shader cell buffer which blocks the GPU from
using it.