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

# monospacedSystemFont(ofSize:weight:)

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

```
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 [`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.

## Discussion

This method provides the same font as the [`monospaced`](/documentation/UIKit/UIFontDescriptor/SystemDesign/monospaced) system font descriptor. For design guidance, see [Typography](https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/typography/) in the Human Interface Guidelines.

> Note:
> To display text in the standard system font, but with fixed-width digits, use ``doc://com.apple.uikit/documentation/UIKit/UIFont/monospacedDigitSystemFont(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)