<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Text/Layout/Run",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4TextV6LayoutV3RunV"
  },
  "title" : "Text.Layout.Run"
}
-->

# Text.Layout.Run

A run of placed glyphs in a text layout.

```
struct Run
```

## Topics

### Instance Properties

[`var characterIndices: [Text.Layout.CharacterIndex]`](/documentation/SwiftUI/Text/Layout/Run/characterIndices)

The array of character indices corresponding to the
glyphs in `self`.

[`var layoutDirection: LayoutDirection`](/documentation/SwiftUI/Text/Layout/Run/layoutDirection)

The layout direction of the text run.

[`var typographicBounds: Text.Layout.TypographicBounds`](/documentation/SwiftUI/Text/Layout/Run/typographicBounds)

The typographic bounds of the run of glyphs.

### Subscripts

[`subscript<T>(T.Type) -> T?`](/documentation/SwiftUI/Text/Layout/Run/subscript(_:))

The custom attribute of type `T` associated with the
run of glyphs, or nil. If no run contains the custom
attribute we also check its attachment’s runs.

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`BidirectionalCollection`](/documentation/Swift/BidirectionalCollection)

[`Sequence`](/documentation/Swift/Sequence)

[`RandomAccessCollection`](/documentation/Swift/RandomAccessCollection)

[`Collection`](/documentation/Swift/Collection)

---

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)