CTFontManagerRegisterGraphicsFont

Function CTFontManagerRegisterGraphicsFont 

Source
pub unsafe extern "C-unwind" fn CTFontManagerRegisterGraphicsFont(
    font: &CGFont,
    error: *mut *mut CFError,
) -> bool
๐Ÿ‘ŽDeprecated: Use CTFontManagerCreateFontDescriptorsFromData or CTFontManagerRegisterFontsForURL
Available on crate features CTFontManager and objc2-core-graphics only.
Expand description

Registers the specified graphics font with the font manager. Registered fonts participate in font descriptor matching.

Attempts to register a font that is either already registered or contains the same PostScript name of an already registered font will fail. This functionality is intended for fonts that may be embedded in documents or present/constructed in memory. A graphics font is obtained by calling CGFontCreateWithDataProvider. Fonts that are backed by files should be registered using CTFontManagerRegisterFontsForURL.

Parameter font: Graphics font to be registered.

Parameter error: Pointer to receive CFError in the case of failed registration.

Returns: Returns true if registration of the fonts was successful.

ยงSafety

error must be a valid pointer or null.