Initializer

init(_:)

Creates a font object from data supplied from a data provider.

Declaration

init?(_ provider: CGDataProvider)

Parameters

provider

A data provider.

Return Value

The font object or NULL if the font can't be created. You are responsible for releasing this object using CGFontRelease.

Discussion

Before drawing text in a Core Graphics context, you must set the font in the current graphics state by calling the function setFontSize(_:).

See Also

Creating Font Objects

init?(CFString)

Creates a font object corresponding to the font specified by a PostScript or full name.

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