font: shape API, calls shape and outputs some debug

This commit is contained in:
Mitchell Hashimoto
2022-08-29 20:15:29 -07:00
parent 5a232e0c3e
commit 39376feae0
2 changed files with 61 additions and 2 deletions

View File

@@ -192,7 +192,10 @@ pub const Buffer = struct {
/// long as buffer contents are not modified.
pub fn getGlyphInfos(self: Buffer) []GlyphInfo {
var length: u32 = 0;
const ptr = c.hb_buffer_get_glyph_infos(self.handle, &length);
const ptr = @ptrCast(
[*c]GlyphInfo,
c.hb_buffer_get_glyph_infos(self.handle, &length),
);
return ptr[0..length];
}