---
title: "CTFontCollectionCreateMatchingFontDescriptorsWithOptions(_:_:)"
framework: coretext
role: symbol
role_heading: Function
path: "coretext/ctfontcollectioncreatematchingfontdescriptorswithoptions(_:_:)"
---

# CTFontCollectionCreateMatchingFontDescriptorsWithOptions(_:_:)

Creates an array of font descriptors that match the specified collection.

## Declaration

```swift
func CTFontCollectionCreateMatchingFontDescriptorsWithOptions(_ collection: CTFontCollection, _ options: CFDictionary?) -> CFArray?
```

## Parameters

- `collection`: The font collection reference.
- `options`: The options dictionary. Passing in NULL returns the same results as calling doc://com.apple.coretext/documentation/CoreText/CTFontCollectionCreateMatchingFontDescriptors(_:), which uses the options specified during the collection’s creation.

## Return Value

Return Value An array of CTFontDescriptor objects that match the collection definition, or NULL if there are none.

## See Also

### Getting Font Descriptors

- [CTFontCollectionCreateMatchingFontDescriptors(_:)](coretext/ctfontcollectioncreatematchingfontdescriptors(_:).md)
- [CTFontCollectionCreateMatchingFontDescriptorsSortedWithCallback(_:_:_:)](coretext/ctfontcollectioncreatematchingfontdescriptorssortedwithcallback(_:_:_:).md)
- [CTFontCollectionCreateMatchingFontDescriptorsForFamily(_:_:_:)](coretext/ctfontcollectioncreatematchingfontdescriptorsforfamily(_:_:_:).md)
- [CTFontCollectionSortDescriptorsCallback](coretext/ctfontcollectionsortdescriptorscallback.md)
