---
title: "MACaptionAppearanceCopyFontDescriptorForStyle(_:_:_:)"
framework: mediaaccessibility
role: symbol
role_heading: Function
path: "mediaaccessibility/macaptionappearancecopyfontdescriptorforstyle(_:_:_:)"
---

# MACaptionAppearanceCopyFontDescriptorForStyle(_:_:_:)

Returns the preferred font for the specified style of type.

## Declaration

```swift
func MACaptionAppearanceCopyFontDescriptorForStyle(_ domain: MACaptionAppearanceDomain, _ behavior: UnsafeMutablePointer<MACaptionAppearanceBehavior>?, _ fontStyle: MACaptionAppearanceFontStyle) -> Unmanaged<CTFontDescriptor>
```

## Parameters

- `domain`: The domain to retrieve the preference value from. See doc://com.apple.mediaaccessibility/documentation/MediaAccessibility/MACaptionAppearanceDomain. Pass doc://com.apple.mediaaccessibility/documentation/MediaAccessibility/MACaptionAppearanceDomain/user unless the system defaults are needed for comparison.
- `behavior`: A pointer to memory. On return, this memory holds the caption appearance behavior for this preference setting. For possible values see doc://com.apple.mediaaccessibility/documentation/MediaAccessibility/MACaptionAppearanceBehavior. Pass NULL when you do not need the behavior setting.
- `fontStyle`: A font style, such as cursive or small caps, see doc://com.apple.mediaaccessibility/documentation/MediaAccessibility/MACaptionAppearanceFontStyle.

## Return Value

Return Value The name of the preferred font for the specified style.

## See Also

### Text settings

- [MACaptionAppearanceCopyForegroundColor(_:_:)](mediaaccessibility/macaptionappearancecopyforegroundcolor(_:_:).md)
- [MACaptionAppearanceGetForegroundOpacity(_:_:)](mediaaccessibility/macaptionappearancegetforegroundopacity(_:_:).md)
- [MACaptionAppearanceGetRelativeCharacterSize(_:_:)](mediaaccessibility/macaptionappearancegetrelativecharactersize(_:_:).md)
- [MACaptionAppearanceGetTextEdgeStyle(_:_:)](mediaaccessibility/macaptionappearancegettextedgestyle(_:_:).md)
