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

# setFontPanelFactory(_:)

Sets the class that creates the shared Font panel object.

```
class func setFontPanelFactory(_ factoryId: AnyClass?)
```

## Parameters

`factoryId`

The new font panel factory class, which should be a subclass of `NSFontPanel`.

## Discussion

Call this method before accessing the Font panel in any way, such as in your app delegate’s [`applicationWillFinishLaunching(_:)`](/documentation/AppKit/NSApplicationDelegate/applicationWillFinishLaunching(_:)) 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)