---
title: "CTFontManagerRegisterFontURLs(_:_:_:_:)"
framework: coretext
role: symbol
role_heading: Function
path: "coretext/ctfontmanagerregisterfonturls(_:_:_:_:)"
---

# CTFontManagerRegisterFontURLs(_:_:_:_:)

Registers fonts from the specified font URLs with the font manager.

## Declaration

```swift
func CTFontManagerRegisterFontURLs(_ fontURLs: CFArray, _ scope: CTFontManagerScope, _ enabled: Bool, _ registrationHandler: ((CFArray, Bool) -> Bool)?)
```

## Parameters

- `fontURLs`: A file URL for the fonts or collections (in TTC or OTC format) to register. After registering fonts from a file, don’t move or rename the file.
- `scope`: A scope constant that defines the availability and lifetime of the registration. If you specify doc://com.apple.coretext/documentation/CoreText/CTFontManagerScope/persistent when you register fonts on iOS, those fonts aren’t automatically available to other processes. Other processes can call doc://com.apple.coretext/documentation/CoreText/CTFontManagerRequestFonts(_:_:) to get access to those fonts. See doc://com.apple.coretext/documentation/CoreText/CTFontManagerScope for more details.
- `enabled`: A Boolean value that indicates whether the font derived from the URL should be enabled for font descriptor matching and discoverable through doc://com.apple.coretext/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 descriptors corresponding to doc://com.apple.coretext/documentation/CoreText/kCTFontManagerErrorFontURLsKey. These URLs represent the font files 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

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

## See Also

### Functions

- [CTFontDescriptorMatchFontDescriptorsWithProgressHandler(_:_:_:)](coretext/ctfontdescriptormatchfontdescriptorswithprogresshandler(_:_:_:).md)
- [CTFontManagerCompareFontFamilyNames(_:_:_:)](coretext/ctfontmanagercomparefontfamilynames(_:_:_:).md)
- [CTFontManagerCopyAvailableFontFamilyNames()](coretext/ctfontmanagercopyavailablefontfamilynames().md)
- [CTFontManagerCopyAvailableFontURLs()](coretext/ctfontmanagercopyavailablefonturls().md)
- [CTFontManagerCopyAvailablePostScriptNames()](coretext/ctfontmanagercopyavailablepostscriptnames().md)
- [CTFontManagerCreateFontDescriptorFromData(_:)](coretext/ctfontmanagercreatefontdescriptorfromdata(_:).md)
- [CTFontManagerCreateFontDescriptorsFromURL(_:)](coretext/ctfontmanagercreatefontdescriptorsfromurl(_:).md)
- [CTFontManagerCreateFontRequestRunLoopSource(_:_:)](coretext/ctfontmanagercreatefontrequestrunloopsource(_:_:).md)
- [CTFontManagerEnableFontDescriptors(_:_:)](coretext/ctfontmanagerenablefontdescriptors(_:_:).md)
- [CTFontManagerGetAutoActivationSetting(_:)](coretext/ctfontmanagergetautoactivationsetting(_:).md)
- [CTFontManagerGetScopeForURL(_:)](coretext/ctfontmanagergetscopeforurl(_:).md)
- [CTFontManagerIsSupportedFont(_:)](coretext/ctfontmanagerissupportedfont(_:).md)
- [CTFontManagerRegisterFontsForURL(_:_:_:)](coretext/ctfontmanagerregisterfontsforurl(_:_:_:).md)
- [CTFontManagerRegisterFontsForURLs(_:_:_:)](coretext/ctfontmanagerregisterfontsforurls(_:_:_:).md)
- [CTFontManagerRegisterGraphicsFont(_:_:)](coretext/ctfontmanagerregistergraphicsfont(_:_:).md)
