---
title: "monospacedSystemFont(ofSize:weight:)"
framework: uikit
role: symbol
role_heading: Type Method
path: "uikit/uifont/monospacedsystemfont(ofsize:weight:)"
---

# monospacedSystemFont(ofSize:weight:)

Returns the fixed-width font for standard interface text in the specified size.

## Declaration

```swift
class func monospacedSystemFont(ofSize fontSize: CGFloat, weight: UIFont.Weight) -> UIFont
```

## Parameters

- `fontSize`: The size (in points) for the font. This value must be greater than 0.0.
- `weight`: The weight of the font, specified as a font weight constant. For a list of possible values, see doc://com.apple.uikit/documentation/UIKit/UIFont/Weight. Avoid passing an arbitrary floating-point number for weight, because a font might not include a variant for every weight.

## Return Value

Return Value A font object of the specified size.

## Discussion

Discussion This method provides the same font as the monospaced system font descriptor. For design guidance, see Typography in the Human Interface Guidelines. note: To display text in the standard system font, but with fixed-width digits, use monospacedDigitSystemFont(ofSize:weight:) instead.

## See Also

### Creating System Fonts

- [systemFont(ofSize:)](uikit/uifont/systemfont(ofsize:).md)
- [systemFont(ofSize:weight:)](uikit/uifont/systemfont(ofsize:weight:).md)
- [UIFont.Weight](uikit/uifont/weight.md)
- [systemFont(ofSize:weight:width:)](uikit/uifont/systemfont(ofsize:weight:width:).md)
- [UIFont.Width](uikit/uifont/width.md)
- [boldSystemFont(ofSize:)](uikit/uifont/boldsystemfont(ofsize:).md)
- [italicSystemFont(ofSize:)](uikit/uifont/italicsystemfont(ofsize:).md)
- [monospacedDigitSystemFont(ofSize:weight:)](uikit/uifont/monospaceddigitsystemfont(ofsize:weight:).md)
