feat(gui): add freetype rasterizer backend
This commit is contained in:
parent
1901696b7b
commit
d3aa7e17f5
8 changed files with 751 additions and 456 deletions
|
|
@ -13,6 +13,7 @@ const builtin_shader = @import("builtin.glsl.zig");
|
|||
|
||||
pub const Font = Rasterizer.Font;
|
||||
pub const GlyphKind = Rasterizer.GlyphKind;
|
||||
pub const RasterizerBackend = Rasterizer.Backend;
|
||||
pub const Cell = gui_cell.Cell;
|
||||
pub const Color = gui_cell.Rgba8;
|
||||
const Rgba8 = gui_cell.Rgba8;
|
||||
|
|
@ -99,6 +100,14 @@ pub fn loadFont(name: []const u8, size_px: u16) !Font {
|
|||
return global.rasterizer.loadFont(name, size_px);
|
||||
}
|
||||
|
||||
pub fn setRasterizerBackend(backend: RasterizerBackend) void {
|
||||
global.rasterizer.setBackend(backend);
|
||||
}
|
||||
|
||||
pub fn setFontWeight(font: *Font, w: u8) void {
|
||||
Rasterizer.setFontWeight(font, w);
|
||||
}
|
||||
|
||||
pub fn setBackground(color: Rgba8) void {
|
||||
global.background = color;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue