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

# monospacedDigitSystemFont(ofSize:weight:)

Returns the standard system font with all digits of consistent width.

## Declaration

```swift
class func monospacedDigitSystemFont(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 and weight, with variable-width text and fixed-width digits.

## Discussion

Discussion The system font uses proportional spacing. When displaying numerical data, you can use this method to retrieve a monospace font for displaying that data. With a monospaced font, each digit occupies the same amount of space, which makes it easier to read numbers that are stacked vertically. note: This method returns the same font as systemFont(ofSize:weight:), but with modified digits. If you want all characters to be fixed-width, use monospacedSystemFont(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)
- [monospacedSystemFont(ofSize:weight:)](uikit/uifont/monospacedsystemfont(ofsize:weight:).md)
