<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIFontDescriptor/preferredFontDescriptor(withTextStyle:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIFontDescriptor(cm)preferredFontDescriptorWithTextStyle:"
  },
  "title" : "preferredFontDescriptor(withTextStyle:)"
}
-->

# preferredFontDescriptor(withTextStyle:)

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

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

## Parameters

`style`

The text style for which to return a font descriptor.

## Return Value

The new font descriptor.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)