---
title: "fontWidth(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/text/fontwidth(_:)"
---

# fontWidth(_:)

Sets the font width of the text.

## Declaration

```swift
nonisolated func fontWidth(_ width: Font.Width?) -> Text
```

## Parameters

- `width`: One of the available font widths.

## Return Value

Return Value Text that uses the font width you specify, if available.

## See Also

### Choosing a font

- [font(_:)](swiftui/text/font(_:).md)
- [fontWeight(_:)](swiftui/text/fontweight(_:).md)
- [fontDesign(_:)](swiftui/text/fontdesign(_:).md)
