<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuartzCore",
  "identifier" : "/documentation/QuartzCore/CATextLayer/font",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Animation"
    ],
    "preciseIdentifier" : "c:objc(cs)CATextLayer(py)font"
  },
  "title" : "font"
}
-->

# font

The font used to render the receiver’s text.

```
var font: CFTypeRef? { get set }
```

## Discussion

May be either a <doc://com.apple.documentation/documentation/CoreText/CTFont>, a <doc://com.apple.documentation/documentation/CoreGraphics/CGFont>, an instance of `NSFont` (macOS only), or a string naming the font. In iOS, you cannot assign a <doc://com.apple.documentation/documentation/UIKit/UIFont> object to this property. Defaults to Helvetica.

The `font` property is only used when the [`string`](/documentation/QuartzCore/CATextLayer/string) property is not an `NSAttributedString`.

> Note:
> If the font property is a `CTFontRef`, a `CGFontRef`, or an instance of `NSFont`, the font size of the property is ignored.

---

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)