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

# menuBarFont(ofSize:)

Returns the font used for menu bar items, in the specified size.

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

## Parameters

`fontSize`

The size in points to which the font is scaled.

## Return Value

A font object of the specified size.

## Discussion

If `fontSize` is 0 or negative, returns the menu bar font with the default size.

## See Also

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

Creates a font object for the specified font name and font 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)