<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSFontPanel/setPanelFont(_:isMultiple:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSFontPanel(im)setPanelFont:isMultiple:"
  },
  "title" : "setPanelFont(_:isMultiple:)"
}
-->

# setPanelFont(_:isMultiple:)

Sets the selected font in the receiver to the specified font.

```
func setPanelFont(_ fontObj: NSFont, isMultiple flag: Bool)
```

## Parameters

`fontObj`

The font to be selected.

`flag`

If <doc://com.apple.documentation/documentation/Swift/false>, selects the specified font; otherwise selects no font and displays a message in the preview area indicating that multiple fonts are selected.

## Discussion

You normally don’t use this method directly; instead, you send [`setSelectedFont(_:isMultiple:)`](/documentation/AppKit/NSFontManager/setSelectedFont(_:isMultiple:)) to the shared `NSFontManager`, which in turn invokes this method.

---

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)