<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSFont/systemFont(ofSize:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSFont(cm)systemFontOfSize:"
  },
  "title" : "systemFont(ofSize:)"
}
-->

# systemFont(ofSize:)

Returns the standard system font with the specified size.

```
class func systemFont(ofSize fontSize: CGFloat) -> NSFont
```

## Parameters

`fontSize`

The desired font size specified in points. If you specify `0.0` or a negative number for this parameter, the method returns the system font at the default size.

## Return Value

A font object containing the system font at the specified size.

## Discussion

Use the returned font for standard interface items, including button labels, menu items, and so on that use the default font appearance.

## See Also

[`init(name:size:)`](/documentation/AppKit/NSFont/init(name:size:))

Creates a font object for the specified font name and font size.

[`userFixedPitchFont(ofSize:)`](/documentation/AppKit/NSFont/userFixedPitchFont(ofSize:))

Returns the font used by default for documents and other text under the user’s control (that is, text whose font the user can normally change), when that font should be fixed-pitch, in the specified size.

[`userFont(ofSize:)`](/documentation/AppKit/NSFont/userFont(ofSize:))

Returns the font used by default for documents and other text under the user’s control (that is, text whose font the user can normally change), in the specified size.



---

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)