addFont
Add font to be referenced later by name.
ttf_bytes are the bytes of the ttf file
If ttf_bytes_allocator is not null, it will be used to free ttf_bytes in
Window.deinit.
Only valid between Window.beginand Window.end.
Parameters
- name:[]const u8
- []const u8
- ttf_bytes:[]const u8
- []const u8
- ttf_bytes_allocator:?std.mem.Allocator
- ?std.mem.Allocator
Source
Implementation
pub fn addFont(name: []const u8, ttf_bytes: []const u8, ttf_bytes_allocator: ?std.mem.Allocator) (std.mem.Allocator.Error || FontError)!void {
try currentWindow().addFont(name, ttf_bytes, ttf_bytes_allocator);
}