Contents

CTFontManagerRequestFonts(_:_:)

Resolves font descriptors specified on input.

Declaration

func CTFontManagerRequestFonts(_ fontDescriptors: CFArray, _ completionHandler: @escaping (CFArray) -> Void)

Parameters

  • fontDescriptors:

    An array of font descriptors to make available to the process. The keys for describing the fonts may be a combination of Kctfontnameattribute, Kctfontfamilynameattribute, or Kctfontregistrationuserinfoattribute.

  • completionHandler:

    A block called after the request operation completes. This block takes a unresolvedFontDescriptors parameter that contains an array of descriptors that couldn’t be resolved or found. The array can be empty if all descriptors resolved.

Discussion

On iOS, fonts registered by font provider apps in the CTFontManagerScope.persistent scope aren’t automatically available to other apps. Other apps must call this function to make the fonts available for font descriptor matching.

On iOS, if the font descriptors can’t be found, the system presents the user with a dialog that indicates which fonts couldn’t be resolved. The system may provide the user with a way to resolve the missing fonts, if the font manager has a way to enable them.

See Also

Functions