---
title: "setPanelFont(_:isMultiple:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsfontpanel/setpanelfont(_:ismultiple:)"
---

# setPanelFont(_:isMultiple:)

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

## Declaration

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

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