<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreText",
  "identifier" : "/documentation/CoreText/CTFontManagerRegisterFontsWithAssetNames(_:_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Text"
    ],
    "preciseIdentifier" : "c:@F@CTFontManagerRegisterFontsWithAssetNames"
  },
  "title" : "CTFontManagerRegisterFontsWithAssetNames(_:_:_:_:_:)"
}
-->

# CTFontManagerRegisterFontsWithAssetNames(_:_:_:_:_:)

Registers named font assets in the specified bundle with the font manager.

```
func CTFontManagerRegisterFontsWithAssetNames(_ fontAssetNames: CFArray, _ bundle: CFBundle?, _ scope: CTFontManagerScope, _ enabled: Bool, _ registrationHandler: ((CFArray, Bool) -> Bool)?)
```

## Parameters

`fontAssetNames`

An array of font name assets in the asset catalog.

`bundle`

A bundle that contains the asset catalog. Passing `NULL` resolves to the main bundle.

`scope`

A scope constant that defines the availability and lifetime of the registration. On iOS, the only supported scope is [`CTFontManagerScope.persistent`](/documentation/CoreText/CTFontManagerScope/persistent), which means the fonts aren’t automatically available to other processes. Other processes can call [`CTFontManagerRequestFonts(_:_:)`](/documentation/CoreText/CTFontManagerRequestFonts(_:_:)) to get access to the fonts. See [`CTFontManagerScope`](/documentation/CoreText/CTFontManagerScope) for more details.

`enabled`

A Boolean value that indicates whether the font assets should be enabled for font descriptor matching and discoverable through [`CTFontManagerRequestFonts(_:_:)`](/documentation/CoreText/CTFontManagerRequestFonts(_:_:)).

`registrationHandler`

A block called as errors arise or upon completion.

    The block’s     `errors`     parameter contains an array of     <doc://com.apple.documentation/documentation/CoreFoundation/CFError>     references; an empty array indicates no errors. Each error reference contains a     <doc://com.apple.documentation/documentation/CoreFoundation/CFArray>     of font asset names corresponding to [`kCTFontManagerErrorFontAssetNameKey`](/documentation/CoreText/kCTFontManagerErrorFontAssetNameKey)    . These represent the font asset names causing the error and failing to register successfully.

    This block may be called multiple times during the registration process. The     `done`     parameter becomes     <doc://com.apple.documentation/documentation/Swift/true>     when the registration process completes. Return     <doc://com.apple.documentation/documentation/Swift/false>     from the block to stop the registration operation, like after receiving an error.

## Discussion

Registered fonts are discoverable through font descriptor matching in the calling process.

Calling this function extracts the font assets from the asset catalog and registers them. You must make this call after the completion handler of either <doc://com.apple.documentation/documentation/Foundation/NSBundleResourceRequest/beginAccessingResources(completionHandler:)>: or <doc://com.apple.documentation/documentation/Foundation/NSBundleResourceRequest/conditionallyBeginAccessingResources(completionHandler:)> is called successfully.

Name the assets using PostScript names for individual faces, or family names for variable or collection fonts. You can use the same names to unregister the fonts with [`CTFontManagerUnregisterFontDescriptors(_:_:_:)`](/documentation/CoreText/CTFontManagerUnregisterFontDescriptors(_:_:_:)).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)