<!--
{
  "availability" : [
    "macOS: 10.5.0 - 11.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "CoreText",
  "identifier" : "/documentation/CoreText/CTFontGetPlatformFont(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Text"
    ],
    "preciseIdentifier" : "c:@F@CTFontGetPlatformFont"
  },
  "title" : "CTFontGetPlatformFont(_:_:)"
}
-->

# CTFontGetPlatformFont(_:_:)

Returns an ATS font reference and attributes.

```
func CTFontGetPlatformFont(_ font: CTFont, _ attributes: UnsafeMutablePointer<Unmanaged<CTFontDescriptor>?>?) -> ATSFontRef
```

## Parameters

`font`

The font reference.

`attributes`

On output, points to a font descriptor containing additional attributes from the font. Can be `NULL`. Must be released by the caller.

## Return Value

An [`ATSFontRef`](/documentation/CoreText/ATSFontRef) object for the given font reference.

## Discussion

---

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)