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

# fontPanel(_:)

Returns the application’s shared Font panel object, creating it if necessary.

```
func fontPanel(_ create: Bool) -> NSFontPanel?
```

## Parameters

`create`

If <doc://com.apple.documentation/documentation/Swift/true>, the Font panel object is created if necessary; if <doc://com.apple.documentation/documentation/Swift/false>, it is not.

## Return Value

The application’s shared Font panel object.

## See Also

[`sharedFontPanel`](/documentation/AppKit/NSFontPanel/shared)

Returns the single `NSFontPanel` instance for the application, creating it if necessary.

[`+  setFontPanelFactory:`](/documentation/AppKit/NSFontManager/setFontPanelFactory(_:))

Sets the class that creates the shared Font panel object.

[`sharedFontPanelExists`](/documentation/AppKit/NSFontPanel/sharedFontPanelExists)

A Boolean value that indicates whether the shared Font panel has been created.



---

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)