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()) }); } ```
This commit is contained in:
parent
c8aa40895e
commit
3e953981fe
3 changed files with 83 additions and 0 deletions
|
@ -8,6 +8,7 @@ const dwrite = @import("dwrite.zig");
|
|||
const XY = @import("xy.zig").XY;
|
||||
|
||||
pub const Font = dwrite.Font;
|
||||
pub const Fonts = dwrite.Fonts;
|
||||
|
||||
pub const needs_direct2d = true;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue