---
title: "CTFontCopyName(_:_:)"
framework: coretext
role: symbol
role_heading: Function
path: "coretext/ctfontcopyname(_:_:)"
---

# CTFontCopyName(_:_:)

Returns a reference to the requested name of the given font.

## Declaration

```swift
func CTFontCopyName(_ font: CTFont, _ nameKey: CFString) -> CFString?
```

## Parameters

- `font`: The font reference.
- `nameKey`: The name specifier. See doc://com.apple.coretext/documentation/CoreText/name-specifier-constants for possible values.

## Return Value

Return Value The requested name for the font, or NULL if the font does not have an entry for the requested name. The Unicode version of the name is preferred, otherwise the first available version is returned.

## See Also

### Getting Font Names

- [CTFontCopyPostScriptName(_:)](coretext/ctfontcopypostscriptname(_:).md)
- [CTFontCopyFamilyName(_:)](coretext/ctfontcopyfamilyname(_:).md)
- [CTFontCopyFullName(_:)](coretext/ctfontcopyfullname(_:).md)
- [CTFontCopyDisplayName(_:)](coretext/ctfontcopydisplayname(_:).md)
- [CTFontCopyLocalizedName(_:_:_:)](coretext/ctfontcopylocalizedname(_:_:_:).md)
