TypefaceManager
public class TypefaceManager
The TypefaceManager class provides management activities related to typefaces.
-
Undocumented
Declaration
Swift
public static let `default`: TypefaceManager -
Registers a typeface agains a specified tag. The
typefaceor thetagmustn’t be already registered.Declaration
Swift
public func register(_ typeface: Typeface, forTag tag: TypefaceTag?)Parameters
typefaceThe typeface that will be registered.
tagAn optional tag to identify the typeface.
-
Unregisters a typeface if it was previously registered.
Declaration
Swift
public func unregister(_ typeface: Typeface)Parameters
typefaceThe typeface to unregister.
-
Returns the typeface registered against the specified tag.
Declaration
Swift
public func typeface(forTag tag: TypefaceTag) -> Typeface?Parameters
tagThe tag that identifies the typeface.
Return Value
The registered typeface, or
nilif no typeface is registered against the specified tag. -
Returns the tag of a registered typeface.
Declaration
Swift
public func tag(of typeface: Typeface) -> TypefaceTag?Parameters
typefaceThe typeface whose tag is returned.
Return Value
The tag of the typeface, or
nilif it is not registered, or no tag was specified while registration. -
Looks for a registered typeface having the specified full name.
Declaration
Swift
public func typeface(byName fullName: String) -> Typeface?Parameters
fullNameThe full name of the typeface.
Return Value
The typeface having the specified full name, or
nilif no such typeface is registered. -
The array of available typefaces sorted by their names in ascending order.
Declaration
Swift
public var availableTypefaces: [Typeface] { get }
View on GitHub
Install in Dash
TypefaceManager Class Reference