Skip to content

Commit e3ba932

Browse files
authored
Merge pull request #1 from warpdotdev/zach/add_get_matrix
Add get_matrix to core text font
2 parents 2ae6b79 + 3278485 commit e3ba932

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

core-text/src/font.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,12 @@ impl CTFont {
395395
}
396396
}
397397

398+
pub fn get_matrix(&self) -> CGAffineTransform {
399+
unsafe {
400+
CTFontGetMatrix(self.as_concrete_TypeRef())
401+
}
402+
}
403+
398404
pub fn url(&self) -> Option<CFURL> {
399405
unsafe {
400406
let result = CTFontCopyAttribute(self.0, kCTFontURLAttribute);
@@ -556,7 +562,7 @@ extern {
556562
fn CTFontCopyFontDescriptor(font: CTFontRef) -> CTFontDescriptorRef;
557563
fn CTFontCopyAttribute(font: CTFontRef, attribute: CFStringRef) -> CFTypeRef;
558564
fn CTFontGetSize(font: CTFontRef) -> CGFloat;
559-
//fn CTFontGetMatrix
565+
fn CTFontGetMatrix(font: CTFontRef) -> CGAffineTransform;
560566
fn CTFontGetSymbolicTraits(font: CTFontRef) -> CTFontSymbolicTraits;
561567
fn CTFontCopyTraits(font: CTFontRef) -> CFDictionaryRef;
562568

0 commit comments

Comments
 (0)