---
title: "setFontPanelFactory(_:)"
framework: appkit
role: symbol
role_heading: Type Method
path: "appkit/nsfontmanager/setfontpanelfactory(_:)"
---

# setFontPanelFactory(_:)

Sets the class that creates the shared Font panel object.

## Declaration

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

## Parameters

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

## Discussion

Discussion Call this method before accessing the Font panel in any way, such as in your app delegate’s applicationWillFinishLaunching(_:) method.

## See Also

### Changing the Default Font Conversion Classes

- [setFontManagerFactory(_:)](appkit/nsfontmanager/setfontmanagerfactory(_:).md)
