<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIFont/TextStyle",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@T@UIFontTextStyle"
  },
  "title" : "UIFont.TextStyle"
}
-->

# UIFont.TextStyle

Constants that describe the preferred styles for fonts.

```
struct TextStyle
```

## Overview

Pass these constants to the [`preferredFont(forTextStyle:)`](/documentation/UIKit/UIFont/preferredFont(forTextStyle:)) method of [`UIFont`](/documentation/UIKit/UIFont) or the [`preferredFontDescriptor(withTextStyle:)`](/documentation/UIKit/UIFontDescriptor/preferredFontDescriptor(withTextStyle:)) method of [`UIFontDescriptor`](/documentation/UIKit/UIFontDescriptor) to retrieve the corresponding font information.

## Topics

### Constants

[`body`](/documentation/UIKit/UIFont/TextStyle/body)

The font for body text.

[`callout`](/documentation/UIKit/UIFont/TextStyle/callout)

The font for callouts.

[`caption1`](/documentation/UIKit/UIFont/TextStyle/caption1)

The font for standard captions.

[`caption2`](/documentation/UIKit/UIFont/TextStyle/caption2)

The font for alternate captions.

[`footnote`](/documentation/UIKit/UIFont/TextStyle/footnote)

The font for footnotes.

[`headline`](/documentation/UIKit/UIFont/TextStyle/headline)

The font for headings.

[`subheadline`](/documentation/UIKit/UIFont/TextStyle/subheadline)

The font for subheadings.

[`largeTitle`](/documentation/UIKit/UIFont/TextStyle/largeTitle)

The font style for large titles.

[`extraLargeTitle`](/documentation/UIKit/UIFont/TextStyle/extraLargeTitle)

The font style for extra large titles.

[`extraLargeTitle2`](/documentation/UIKit/UIFont/TextStyle/extraLargeTitle2)

The font style for extra extra large titles.

[`title1`](/documentation/UIKit/UIFont/TextStyle/title1)

The font for first-level hierarchical headings.

[`title2`](/documentation/UIKit/UIFont/TextStyle/title2)

The font for second-level hierarchical headings.

[`title3`](/documentation/UIKit/UIFont/TextStyle/title3)

The font for third-level hierarchical headings.

### Metrics

[`metrics`](/documentation/UIKit/UIFont/TextStyle/metrics)

The corresponding font metrics object for the text style.

### Initializers

[`init(rawValue:)`](/documentation/UIKit/UIFont/TextStyle/init(rawValue:))

Creates a text style with the specified raw value.



---

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)