Skip to content

Commit

Permalink
core-graphics: 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 fc56a85
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core-text/src/font.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,12 @@ 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 +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;

Expand Down

0 comments on commit fc56a85

Please sign in to comment.