@@ 44,10 44,9 @@ pub const SFT = extern struct {
};
pub const Font = opaque {
- extern fn sft_loadmem(data: [*]const anyopaque, size: usize) ?*Font;
+ extern fn sft_loadmem(data: [*]const u8, size: usize) ?*Font;
pub fn loadMem(data: []const u8) !*Font {
- const ptr = @ptrCast([*]const anyopaque, data.ptr);
- return sft_loadmem(ptr, data.len) orelse error.SchriftFontLoading;
+ return sft_loadmem(data.ptr, data.len) orelse error.SchriftFontLoading;
}
extern fn sft_loadfile(filename: [*:0]const u8) ?*Font;