---
title: "preferredFontDescriptor(withTextStyle:)"
framework: uikit
role: symbol
role_heading: Type Method
path: "uikit/uifontdescriptor/preferredfontdescriptor(withtextstyle:)"
---

# preferredFontDescriptor(withTextStyle:)

Returns a font descriptor that contains the specified text style and the user’s selected content size category.

## Declaration

```swift
class func preferredFontDescriptor(withTextStyle style: UIFont.TextStyle) -> UIFontDescriptor
```

## Parameters

- `style`: The text style for which to return a font descriptor.

## Return Value

Return Value The new font descriptor.

## See Also

### Creating a font descriptor

- [preferredFontDescriptor(withTextStyle:compatibleWith:)](uikit/uifontdescriptor/preferredfontdescriptor(withtextstyle:compatiblewith:).md)
- [init(name:matrix:)](uikit/uifontdescriptor/init(name:matrix:).md)
- [init(name:size:)](uikit/uifontdescriptor/init(name:size:).md)
- [addingAttributes(_:)](uikit/uifontdescriptor/addingattributes(_:).md)
- [withDesign(_:)](uikit/uifontdescriptor/withdesign(_:).md)
- [withFamily(_:)](uikit/uifontdescriptor/withfamily(_:).md)
- [withFace(_:)](uikit/uifontdescriptor/withface(_:).md)
- [withMatrix(_:)](uikit/uifontdescriptor/withmatrix(_:).md)
- [withSize(_:)](uikit/uifontdescriptor/withsize(_:).md)
- [withSymbolicTraits(_:)](uikit/uifontdescriptor/withsymbolictraits(_:).md)
