<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSFont/matrix",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSFont(py)matrix"
  },
  "title" : "matrix"
}
-->

# matrix

The transformation matrix associated with the font.

```
var matrix: UnsafePointer<CGFloat> { get }
```

## Discussion

This property contains a standard six-element transformation matrix as used in the PostScript language, specifically with the `makefont` operator. In most cases, with a font of `fontSize`, this matrix is [`fontSize` 0 0 `fontSize` 0 0].

## See Also

[`+  fontWithDescriptor:size:`](/documentation/AppKit/NSFont/init(descriptor:size:))

Returns a font object for the specified font descriptor and font size.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)