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

# CTFontManagerCreateFontDescriptorFromData(_:)

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

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

## Parameters

`data`

The font data.

## Return Value

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

## Discussion

If the data contains a font collection (TTC or OTC), only the first font in the collection will be returned. Use [`CTFontManagerCreateFontDescriptorsFromData(_:)`](/documentation/CoreText/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 ``doc://com.apple.coretext/documentation/CoreText/CTFontCreateWithName(_:_:_:)``. If you wish to make the font available for name matching, use ``doc://com.apple.coretext/documentation/CoreText/CTFontManagerRegisterFontURLs(_:_:_:_:)`` instead.

## See Also

[`CTFontManagerCreateFontDescriptorsFromData`](/documentation/CoreText/CTFontManagerCreateFontDescriptorsFromData(_:))

Creates an array of font descriptors for the fonts in the supplied data.

[`CTFontManagerRegisterFontURLs`](/documentation/CoreText/CTFontManagerRegisterFontURLs(_:_:_:_:))

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



---

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)