font: coretext calculate cell metrics

This commit is contained in:
Mitchell Hashimoto
2022-10-09 10:57:19 -07:00
parent 150b0a4d51
commit 1b7bc052d4
5 changed files with 177 additions and 11 deletions

View File

@@ -20,6 +20,10 @@ pub const Rect = extern struct {
pub fn cval(self: Rect) c.struct_CGRect {
return @bitCast(c.struct_CGRect, self);
}
pub fn isNull(self: Rect) bool {
return c.CGRectIsNull(self.cval());
}
};
pub const Size = extern struct {