coretext: improve strikethrough position calculation

This commit is contained in:
Qwerasd
2024-09-23 19:01:15 -06:00
parent ecb3c543b3
commit 3ec36e4d23
2 changed files with 20 additions and 8 deletions

View File

@@ -188,6 +188,14 @@ pub const Font = opaque {
return c.CTFontGetUnderlineThickness(@ptrCast(self));
}
pub fn getCapHeight(self: *Font) f64 {
return c.CTFontGetCapHeight(@ptrCast(self));
}
pub fn getXHeight(self: *Font) f64 {
return c.CTFontGetXHeight(@ptrCast(self));
}
pub fn getUnitsPerEm(self: *Font) u32 {
return c.CTFontGetUnitsPerEm(@ptrCast(self));
}