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. In Objective-C, you’re 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(_:).