---
title: "CTFontGetPlatformFont(_:_:)"
framework: coretext
role: symbol
role_heading: Function
path: "coretext/ctfontgetplatformfont(_:_:)"
---

# CTFontGetPlatformFont(_:_:)

Returns an ATS font reference and attributes.

## Declaration

```swift
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

Return Value An ATSFontRef object for the given font reference.

## See Also

### Converting Fonts

- [CTFontCopyGraphicsFont(_:_:)](coretext/ctfontcopygraphicsfont(_:_:).md)
- [CTFontCreateWithGraphicsFont(_:_:_:_:)](coretext/ctfontcreatewithgraphicsfont(_:_:_:_:).md)
- [CTFontCreateWithPlatformFont(_:_:_:_:)](coretext/ctfontcreatewithplatformfont(_:_:_:_:).md)
- [CTFontCreateWithQuickdrawInstance(_:_:_:_:)](coretext/ctfontcreatewithquickdrawinstance(_:_:_:_:).md)
