<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/GraphicsContext/ResolvedText",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI15GraphicsContextV12ResolvedTextV"
  },
  "title" : "GraphicsContext.ResolvedText"
}
-->

# GraphicsContext.ResolvedText

A text view resolved to a particular environment.

```
struct ResolvedText
```

## Overview

You resolve a [`Text`](/documentation/SwiftUI/Text) view in preparation for drawing it into a context,
either manually by calling [`resolve(_:)`](/documentation/SwiftUI/GraphicsContext/resolve(_:)-4dx65) or automatically
when calling [`draw(_:in:)`](/documentation/SwiftUI/GraphicsContext/draw(_:in:)-5opqf) or [`draw(_:at:anchor:)`](/documentation/SwiftUI/GraphicsContext/draw(_:at:anchor:)-5dgmd).
The resolved text view takes into account environment values like the
display resolution and current color scheme.

## Topics

### Getting the text properties

[`func firstBaseline(in: CGSize) -> CGFloat`](/documentation/SwiftUI/GraphicsContext/ResolvedText/firstBaseline(in:))

Gets the distance from the first line’s ascender to its baseline.

[`func lastBaseline(in: CGSize) -> CGFloat`](/documentation/SwiftUI/GraphicsContext/ResolvedText/lastBaseline(in:))

Gets the distance from the first line’s ascender to the last
line’s baseline.

[`func measure(in: CGSize) -> CGSize`](/documentation/SwiftUI/GraphicsContext/ResolvedText/measure(in:))

Measures the size of the resolved text for a given
area into which the text should be placed.

[`var shading: GraphicsContext.Shading`](/documentation/SwiftUI/GraphicsContext/ResolvedText/shading)

The shading to fill uncolored text regions with.



---

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)