<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVPlayerItem/textStyleRules",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVPlayerItem(py)textStyleRules"
  },
  "title" : "textStyleRules"
}
-->

# textStyleRules

An array of text style rules that specify the formatting and presentation of Web Video Text Tracks (WebVTT) subtitles.

```
nonisolated var textStyleRules: [AVTextStyleRule]? { get set }
```

## Discussion

Text style rules apply only to WebVTT subtitles. They don’t apply to other subtitle formats and legible text.

---

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)