CTFontManagerUnregisterFontURLs

Function CTFontManagerUnregisterFontURLs 

Source
pub unsafe extern "C-unwind" fn CTFontManagerUnregisterFontURLs(
    font_ur_ls: &CFArray,
    scope: CTFontManagerScope,
    registration_handler: Option<&DynBlock<dyn Fn(NonNull<CFArray>, bool) -> bool>>,
)
Available on crate features CTFontManager and block2 only.
Expand description

Unregisters fonts from the specified font URLs with the font manager. Unregistered fonts do not participate in font descriptor matching. iOS note: only fonts registered with CTFontManagerRegisterFontsForURL or CTFontManagerRegisterFontsForURLs can be unregistered with this API.

Parameter fontURLs: Array of font URLs.

Parameter scope: Scope constant defining the availability and lifetime of the registration. Should match the scope the fonts are registered in. See scope constants for more details.

Parameter registrationHandler: Block called as errors are discovered or upon completion. The errors parameter will be an empty array if all files are unregistered. Otherwise, it will contain an array of CFError references. Each error reference will contain a CFArray of font URLs corresponding to kCTFontManagerErrorFontURLsKey. These URLs represent the font files that caused the error, and were not successfully unregistered. Note, the handler may be called multiple times during the unregistration process. The done parameter will be set to true when the unregistration process has completed. The handler should return false if the operation is to be stopped. This may be desirable after receiving an error.

ยงSafety

font_ur_ls generic must be of the correct type.