---
title: "scaledFont(for:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uifontmetrics/scaledfont(for:)"
---

# scaledFont(for:)

Returns a version of the specified font that adopts the current font metrics.

## Declaration

```swift
func scaledFont(for font: UIFont) -> UIFont
```

## Parameters

- `font`: The base font to use when applying the style information. Set the size of your font to the standard Dynamic Type size that you use for the corresponding content. Do not specify a font that has already been scaled; doing so results in an exception.

## Mentioned in

Scaling fonts automatically

## Return Value

Return Value A version of the specified font with the appropriate style information applied to it, and scaled to the current Dynamic Type setting.

## See Also

### Creating Scaled Fonts

- [Scaling fonts automatically](uikit/scaling-fonts-automatically.md)
- [scaledFont(for:compatibleWith:)](uikit/uifontmetrics/scaledfont(for:compatiblewith:).md)
- [scaledFont(for:maximumPointSize:)](uikit/uifontmetrics/scaledfont(for:maximumpointsize:).md)
- [scaledFont(for:maximumPointSize:compatibleWith:)](uikit/uifontmetrics/scaledfont(for:maximumpointsize:compatiblewith:).md)
