---
title: "CTFontCollectionCopyFontAttribute(_:_:_:)"
framework: coretext
role: symbol
role_heading: Function
path: "coretext/ctfontcollectioncopyfontattribute(_:_:_:)"
---

# CTFontCollectionCopyFontAttribute(_:_:_:)

Retrieves an array of font descriptor attribute values.

## Declaration

```swift
func CTFontCollectionCopyFontAttribute(_ collection: CTFontCollection, _ attributeName: CFString, _ options: CTFontCollectionCopyOptions) -> CFArray
```

## Parameters

- `collection`: The font collection reference.
- `attributeName`: The attribute to retrieve for each descriptor in the collection.
- `options`: Options to alter the return value. With doc://com.apple.coretext/documentation/CoreText/CTFontCollectionCopyOptions/kCTFontCollectionCopyDefaultOptions, the values appear in the same order as the results from doc://com.apple.coretext/documentation/CoreText/CTFontCollectionCreateMatchingFontDescriptors(_:), and NULL values transform to doc://com.apple.documentation/documentation/CoreFoundation/kCFNull. Setting doc://com.apple.coretext/documentation/CoreText/CTFontCollectionCopyOptions/unique removes duplicate values. Setting doc://com.apple.coretext/documentation/CoreText/CTFontCollectionCopyOptions/standardSort sorts the values in standard UI order.

## Return Value

Return Value An array that contains one value for each descriptor.

## See Also

### Get Font Descriptor Attributes

- [CTFontCollectionCopyFontAttributes(_:_:_:)](coretext/ctfontcollectioncopyfontattributes(_:_:_:).md)
