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

# titleBarFont(ofSize:)

Returns the font used for window title bars, in the specified size.

```
class func titleBarFont(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 title bar font at the default size. This method is equivalent to [`boldSystemFont(ofSize:)`](/documentation/AppKit/NSFont/boldSystemFont(ofSize:)).

---

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)