CTFontManagerRegisterGraphicsFont(_:_:)
Registers the specified graphics font with the font manager.
Declaration
func CTFontManagerRegisterGraphicsFont(_ font: CGFont, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>?) -> BoolParameters
- font:
The graphics font to be registered.
- error:
Returns by indirection an error object in the case of failed registration.
Return Value
true if registration of the font was successful, otherwise false.
Discussion
Registered fonts are discoverable through font descriptor matching. Any attempt to register a font that is either already registered or contains the same Postscript of an already registered font will fail. This behavior is useful for fonts that may be embedded in documents or constructed in memory. A graphics font is obtained by calling init(_:). Fonts that are backed by files should be registered using CTFontManagerRegisterFontsForURL(_:_:_:).
See Also
Related Documentation
Functions
CTFontDescriptorMatchFontDescriptorsWithProgressHandler(_:_:_:)CTFontManagerCompareFontFamilyNames(_:_:_:)CTFontManagerCopyAvailableFontFamilyNames()CTFontManagerCopyAvailableFontURLs()CTFontManagerCopyAvailablePostScriptNames()CTFontManagerCreateFontDescriptorFromData(_:)CTFontManagerCreateFontDescriptorsFromURL(_:)CTFontManagerCreateFontRequestRunLoopSource(_:_:)CTFontManagerEnableFontDescriptors(_:_:)CTFontManagerGetAutoActivationSetting(_:)CTFontManagerGetScopeForURL(_:)CTFontManagerIsSupportedFont(_:)CTFontManagerRegisterFontsForURL(_:_:_:)CTFontManagerRegisterFontsForURLs(_:_:_:)CTFontManagerSetAutoActivationSetting(_:_:)