<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIFont/monospacedDigitSystemFont(ofSize:weight:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIFont(cm)monospacedDigitSystemFontOfSize:weight:"
  },
  "title" : "monospacedDigitSystemFont(ofSize:weight:)"
}
-->

# monospacedDigitSystemFont(ofSize:weight:)

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

```
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 [`UIFont.Weight`](/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

A font object of the specified size and weight, with variable-width text and fixed-width digits.

## 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 ``doc://com.apple.uikit/documentation/UIKit/UIFont/systemFont(ofSize:weight:)``, but with modified digits. If you want all characters to be fixed-width, use ``doc://com.apple.uikit/documentation/UIKit/UIFont/monospacedSystemFont(ofSize:weight:)`` instead.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)