Function

CTFontManagerCreateFontDescriptorFromData(_:)

Creates a font descriptor representing the font in the supplied data.

Declaration

func CTFontManagerCreateFontDescriptorFromData(_ data: CFData) -> CTFontDescriptor?

Parameters

data

The font data.

Return Value

A font descriptor created from the data or NULL if it is not a valid font.

Discussion

If the data contains a font collection (TTC or OTC), only the first font in the collection will be returned. Use CTFontManagerCreateFontDescriptorsFromData(_:) in that case.