---
title: "CTFontGetMatrix(_:)"
framework: coretext
role: symbol
role_heading: Function
path: "coretext/ctfontgetmatrix(_:)"
---

# CTFontGetMatrix(_:)

Returns the transformation matrix of the given font.

## Declaration

```swift
func CTFontGetMatrix(_ font: CTFont) -> CGAffineTransform
```

## Parameters

- `font`: The font reference.

## Return Value

Return Value The transformation matrix for the given font reference. This is the matrix that was provided when the font was created.

## See Also

### Getting Font Data

- [CTFontCopyFontDescriptor(_:)](coretext/ctfontcopyfontdescriptor(_:).md)
- [CTFontCopyAttribute(_:_:)](coretext/ctfontcopyattribute(_:_:).md)
- [CTFontGetSize(_:)](coretext/ctfontgetsize(_:).md)
- [CTFontGetSymbolicTraits(_:)](coretext/ctfontgetsymbolictraits(_:).md)
- [CTFontCopyTraits(_:)](coretext/ctfontcopytraits(_:).md)
- [CTFontCopyDefaultCascadeListForLanguages(_:_:)](coretext/ctfontcopydefaultcascadelistforlanguages(_:_:).md)
