---
title: "sizeThatFits(proposal:text:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/textrenderer/sizethatfits(proposal:text:)"
---

# sizeThatFits(proposal:text:)

Returns the size of the text in proposal. The provided text proxy value may be used to query the sizing behavior of the underlying text layout.

## Declaration

```swift
func sizeThatFits(proposal: ProposedViewSize, text: TextProxy) -> CGSize
```

## Discussion

Discussion The default implementation of this function returns text.size(proposal).
