Skip to content

Commit

Permalink
core-text: Implement CTFontGetMatrix.
Browse files Browse the repository at this point in the history
  • Loading branch information
vorporeal committed Apr 29, 2024
1 parent dec5ede commit f623b62
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core-text/src/font.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,10 @@ impl CTFont {
}
}

pub fn get_matrix(&self) -> CGAffineTransform {
unsafe { CTFontGetMatrix(self.as_concrete_TypeRef()) }
}

pub fn url(&self) -> Option<CFURL> {
unsafe {
let result = CTFontCopyAttribute(self.0, kCTFontURLAttribute);
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit f623b62

Please sign in to comment.