---
title: CTFontCollectionSortDescriptorsCallback
framework: coretext
role: symbol
role_heading: Type Alias
path: coretext/ctfontcollectionsortdescriptorscallback
---

# CTFontCollectionSortDescriptorsCallback

The collection sorting callback type.

## Declaration

```swift
typealias CTFontCollectionSortDescriptorsCallback = (CTFontDescriptor, CTFontDescriptor, UnsafeMutableRawPointer) -> CFComparisonResult
```

## Parameters

- `first`: The first descriptor.
- `second`: The second descriptor.
- `refCon`: A pointer to contextual data from the client.

## Return Value

Return Value The matching font descriptors of a collection in sorted order.

## See Also

### Getting Font Descriptors

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