pub unsafe extern "C-unwind" fn CTFontManagerRegisterFontURLs(
font_ur_ls: &CFArray,
scope: CTFontManagerScope,
enabled: bool,
registration_handler: Option<&DynBlock<dyn Fn(NonNull<CFArray>, bool) -> bool>>,
)CTFontManager and block2 only.Expand description
Registers fonts from the specified font URLs with the font manager. Registered fonts are discoverable through font descriptor matching in the calling process
In iOS, fonts registered with the persistent scope are not automatically available to other processes. Other process may call CTFontManagerRequestFonts to get access to these fonts.
Parameter fontURLs: A file URL for the fonts or collections (TTC or OTC) to be registered. Once fonts have been registered from a file, it shouldn’t be moved or renamed.
Parameter scope: Scope constant defining the availability and lifetime of the registration. See scope constants for more details.
Parameter enabled: Boolean value indicating whether the font derived from the URL should be enabled for font descriptor matching and/or discoverable via CTFontManagerRequestFonts.
Parameter registrationHandler: Block called as errors are discovered or upon completion. The errors parameter contains an array of CFError references. An empty array indicates no errors. 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 registered. Note, the handler may be called multiple times during the registration process. The done parameter will be set to true when the registration 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.