coretext: calculate units per em/point

This commit is contained in:
Mitchell Hashimoto
2023-03-04 11:29:40 -08:00
parent a3401d9690
commit 2a1cbb4f21
2 changed files with 12 additions and 0 deletions

View File

@@ -130,6 +130,14 @@ pub const Font = opaque {
pub fn getUnderlineThickness(self: *Font) f64 {
return c.CTFontGetUnderlineThickness(@ptrCast(self));
}
pub fn getUnitsPerEm(self: *Font) u32 {
return c.CTFontGetUnitsPerEm(@ptrCast(c.CTFontRef, self));
}
pub fn getSize(self: *Font) f64 {
return c.CTFontGetSize(@ptrCast(c.CTFontRef, self));
}
};
pub const FontOrientation = enum(c_uint) {