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

# systemFont(ofSize:weight:)

Returns the standard system font with the specified size and weight.

```
class func systemFont(ofSize fontSize: CGFloat, weight: NSFont.Weight) -> 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.

`weight`

The desired weight of font lines, specified as one of the constants in [`NSFont.Weight`](/documentation/AppKit/NSFont/Weight).

## Return Value

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

## Discussion

Use the returned font for standard interface items, including button labels, menu items, and so on that require a specific font style information.

---

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)