---
title: "systemFont(ofSize:)"
framework: appkit
role: symbol
role_heading: Type Method
path: "appkit/nsfont/systemfont(ofsize:)"
---

# systemFont(ofSize:)

Returns the standard system font with the specified size.

## Declaration

```swift
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

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

## Discussion

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

### Related Documentation

- [init(name:size:)](appkit/nsfont/init(name:size:).md)
- [userFixedPitchFont(ofSize:)](appkit/nsfont/userfixedpitchfont(ofsize:).md)
- [userFont(ofSize:)](appkit/nsfont/userfont(ofsize:).md)

### Creating System Fonts

- [preferredFont(forTextStyle:options:)](appkit/nsfont/preferredfont(fortextstyle:options:).md)
- [systemFont(ofSize:weight:)](appkit/nsfont/systemfont(ofsize:weight:).md)
- [boldSystemFont(ofSize:)](appkit/nsfont/boldsystemfont(ofsize:).md)
- [monospacedSystemFont(ofSize:weight:)](appkit/nsfont/monospacedsystemfont(ofsize:weight:).md)
- [monospacedDigitSystemFont(ofSize:weight:)](appkit/nsfont/monospaceddigitsystemfont(ofsize:weight:).md)
- [systemFontSize](appkit/nsfont/systemfontsize.md)
- [smallSystemFontSize](appkit/nsfont/smallsystemfontsize.md)
- [NSFont.Weight](appkit/nsfont/weight.md)
- [NSFont.TextStyle](appkit/nsfont/textstyle.md)
- [NSFont.TextStyleOptionKey](appkit/nsfont/textstyleoptionkey.md)
