From f623b62d9cbedf9035722b14f60c3fe48f06318e Mon Sep 17 00:00:00 2001 From: David Stern Date: Mon, 29 Apr 2024 15:22:11 -0400 Subject: [PATCH] core-text: Implement CTFontGetMatrix. --- core-text/src/font.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core-text/src/font.rs b/core-text/src/font.rs index efe9e321..512873fc 100644 --- a/core-text/src/font.rs +++ b/core-text/src/font.rs @@ -494,6 +494,10 @@ impl CTFont { } } + pub fn get_matrix(&self) -> CGAffineTransform { + unsafe { CTFontGetMatrix(self.as_concrete_TypeRef()) } + } + pub fn url(&self) -> Option { unsafe { let result = CTFontCopyAttribute(self.0, kCTFontURLAttribute); @@ -692,7 +696,7 @@ extern "C" { fn CTFontCopyFontDescriptor(font: CTFontRef) -> CTFontDescriptorRef; fn CTFontCopyAttribute(font: CTFontRef, attribute: CFStringRef) -> CFTypeRef; fn CTFontGetSize(font: CTFontRef) -> CGFloat; - //fn CTFontGetMatrix + fn CTFontGetMatrix(font: CTFontRef) -> CGAffineTransform; fn CTFontGetSymbolicTraits(font: CTFontRef) -> CTFontSymbolicTraits; fn CTFontCopyTraits(font: CTFontRef) -> CFDictionaryRef;