Returns the traits dictionary of the given font.
SDKs
- iOS 3.2+
- macOS 10.5+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Core Text
Declaration
func CTFontCopyTraits(_ font: CTFont) -> CFDictionary
Parameters
font
The font reference.
Return Value
A retained reference to the font traits dictionary. Individual traits can be accessed with the trait key constants.
Discussion
See the Constants section of CTFontDescriptor for a definition of the font traits.