Commit graph

4 commits

Author SHA1 Message Date
Jonathan Marler
3e953981fe win32 gui: add Fonts type to get list of available fonts
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()) });
    }
```
2025-01-17 16:19:19 +01:00
Jonathan Marler
7558a63819 win32 gui: decouple screen renderer from text renderer
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.
2025-01-15 21:16:51 -07:00
Jonathan Marler
27f256a7c5 switch to a monochrome texture for the font rendering 2025-01-13 22:15:11 -07:00
Jonathan Marler
5b83619f7a win32 gui: replace D2D renderer with D3d11 shader 2025-01-13 05:06:57 -07:00