---
title: "CTFontManagerCreateFontDescriptorFromData(_:)"
framework: coretext
role: symbol
role_heading: Function
path: "coretext/ctfontmanagercreatefontdescriptorfromdata(_:)"
---

# CTFontManagerCreateFontDescriptorFromData(_:)

Creates a font descriptor representing the font in the supplied data.

## Declaration

```swift
func CTFontManagerCreateFontDescriptorFromData(_ data: CFData) -> CTFontDescriptor?
```

## Parameters

- `data`: The font data.

## Return Value

Return Value A font descriptor created from the data or NULL if it is not a valid font.

## Discussion

Discussion If the data contains a font collection (TTC or OTC), only the first font in the collection will be returned. Use CTFontManagerCreateFontDescriptorsFromData(_:) in that case. note: The font descriptor returned by this function is not available through font descriptor matching. As a result, you can’t directly look for the font by name with functions like CTFontCreateWithName(_:_:_:). If you wish to make the font available for name matching, use CTFontManagerRegisterFontURLs(_:_:_:_:) instead.

## See Also

### Related Documentation

- [CTFontManagerCreateFontDescriptorsFromData(_:)](coretext/ctfontmanagercreatefontdescriptorsfromdata(_:).md)
- [CTFontManagerRegisterFontURLs(_:_:_:_:)](coretext/ctfontmanagerregisterfonturls(_:_:_:_:).md)

### Functions

- [CTFontDescriptorMatchFontDescriptorsWithProgressHandler(_:_:_:)](coretext/ctfontdescriptormatchfontdescriptorswithprogresshandler(_:_:_:).md)
- [CTFontManagerCompareFontFamilyNames(_:_:_:)](coretext/ctfontmanagercomparefontfamilynames(_:_:_:).md)
- [CTFontManagerCopyAvailableFontFamilyNames()](coretext/ctfontmanagercopyavailablefontfamilynames().md)
- [CTFontManagerCopyAvailableFontURLs()](coretext/ctfontmanagercopyavailablefonturls().md)
- [CTFontManagerCopyAvailablePostScriptNames()](coretext/ctfontmanagercopyavailablepostscriptnames().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)
- [CTFontManagerSetAutoActivationSetting(_:_:)](coretext/ctfontmanagersetautoactivationsetting(_:_:).md)
