---
title: "CTFontCopyGraphicsFont(_:_:)"
framework: coretext
role: symbol
role_heading: Function
path: "coretext/ctfontcopygraphicsfont(_:_:)"
---

# CTFontCopyGraphicsFont(_:_:)

Returns a Core Graphics font reference and attributes.

## Declaration

```swift
func CTFontCopyGraphicsFont(_ font: CTFont, _ attributes: UnsafeMutablePointer<Unmanaged<CTFontDescriptor>?>?) -> CGFont
```

## 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 A CGFont object for the given font reference.

## See Also

### Converting Fonts

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