Contents

setFontManagerFactory(_:)

Sets the class that creates the shared font manager object.

Declaration

class func setFontManagerFactory(_ factoryId: AnyClass?)

Parameters

  • factoryId:

    The new font manager factory class, which must be a subclass of Nsfontmanager.

Discussion

When you call the shared method of NSFontManager, it creates an instance of aClass, if no instance already exists. The class in aClass must implement init as its designated initializer. The default font manager factory is NSFontManager.

Call this method before AppKit loads your application’s main nib file, such as in your app’s main function before calling NSApplicationMain, or in the init method of your NSApplication subclass. Call this method early, since AppKit calls your app delegate’s applicationWillFinishLaunching(_:) method after it has loaded the main nib file.

See Also

Changing the Default Font Conversion Classes