NSFont is the center of activity for the font conversion system. It records the currently selected font, updates the Font panel and Font menu to reflect the selected font, initiates font changes, and converts fonts in response to requests from text-bearing objects. In a more prosaic role,
NSFont can be queried for the fonts available to the application and for the particular attributes of a font, such as whether it’s condensed or extended.
- macOS 10.0+
You normally set up a font manager and the Font menu using Interface Builder. However, you can also do so programmatically by getting the shared font manager instance and having it create the standard Font menu at runtime:
You can then add the Font menu to your application’s main menu. After the Font menu is installed, your application automatically gains the functionality of both the Font menu and the Font panel.
Font collections are managed by