CTFontManagerUnregisterFontDescriptors

Function CTFontManagerUnregisterFontDescriptors 

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

Unregisters font descriptors with the font manager. Unregistered fonts do not participate in font descriptor matching.

Parameter fontDescriptors: Array of font descriptors to unregister.

Parameter scope: Scope constant defining the availability and lifetime of the registration. 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 font descriptors are unregistered. Otherwise, it will contain an array of CFError references. Each error reference will contain a CFArray of font descriptors corresponding to kCTFontManagerErrorFontDescriptorsKey. These represent the font descriptors 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_descriptors generic must be of the correct type.