Function

CTFontCopyTraits(_:)

Returns the traits dictionary of the given font.

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.

See Also

Getting Font Data

func CTFontCopyFontDescriptor(CTFont) -> CTFontDescriptor

Returns the normalized font descriptor for the given font reference.

func CTFontCopyAttribute(CTFont, CFString) -> CFTypeRef?

Returns the value associated with an arbitrary attribute of the given font.

func CTFontGetSize(CTFont) -> CGFloat

Returns the point size of the given font.

func CTFontGetMatrix(CTFont) -> CGAffineTransform

Returns the transformation matrix of the given font.

func CTFontGetSymbolicTraits(CTFont) -> CTFontSymbolicTraits

Returns the symbolic traits of the given font.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software