---
title: "CTFontCopyTraits(_:)"
framework: coretext
role: symbol
role_heading: Function
path: "coretext/ctfontcopytraits(_:)"
---

# CTFontCopyTraits(_:)

Returns the traits dictionary of the given font.

## Declaration

```swift
func CTFontCopyTraits(_ font: CTFont) -> CFDictionary
```

## Parameters

- `font`: The font reference.

## Return Value

Return Value A retained reference to the font traits dictionary. Individual traits can be accessed with the trait key constants.

## Discussion

Discussion See the Constants section of CTFontDescriptor for a definition of the font traits.

## See Also

### Getting Font Data

- [CTFontCopyFontDescriptor(_:)](coretext/ctfontcopyfontdescriptor(_:).md)
- [CTFontCopyAttribute(_:_:)](coretext/ctfontcopyattribute(_:_:).md)
- [CTFontGetSize(_:)](coretext/ctfontgetsize(_:).md)
- [CTFontGetMatrix(_:)](coretext/ctfontgetmatrix(_:).md)
- [CTFontGetSymbolicTraits(_:)](coretext/ctfontgetsymbolictraits(_:).md)
- [CTFontCopyDefaultCascadeListForLanguages(_:_:)](coretext/ctfontcopydefaultcascadelistforlanguages(_:_:).md)
