From 6efdf524d7deb98258f6104358c3b913a8b372f9 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 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core-text/src/font.rs b/core-text/src/font.rs index efe9e321..3e3c7b18 100644 --- a/core-text/src/font.rs +++ b/core-text/src/font.rs @@ -494,6 +494,12 @@ 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 +698,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;