Line segmentation into text runs

This commit is contained in:
Mitchell Hashimoto
2022-08-29 16:39:48 -07:00
parent f73783a521
commit 0505018186
5 changed files with 193 additions and 4 deletions

View File

@@ -31,6 +31,11 @@ pub const Buffer = struct {
c.hb_buffer_reset(self.handle);
}
/// Returns the number of items in the buffer.
pub fn getLength(self: Buffer) u32 {
return c.hb_buffer_get_length(self.handle);
}
/// Sets the type of buffer contents. Buffers are either empty, contain
/// characters (before shaping), or contain glyphs (the result of shaping).
pub fn setContentType(self: Buffer, ct: ContentType) void {