MBS Xojo Developer Conference and Training
Join us from 3rd to 6th May 2017 in Berlin, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

NSFontManagerMBS class

class, Cocoa, MBS Cocoa Plugin (NSPanel), class NSFontManagerMBS,
Plugin version: 9.8, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.

Function: NSFontManager is the center of activity for the font conversion system.
// pick some font
dim n1 as NSFontMBS = nsfontmbs.fontWithName("Book Antiqua bold", 12)
dim fm as new NSFontManagerMBS

// remove all font traits
dim n2 as NSFontMBS = fm.convertFontToNotHaveTrait(n1, fm.traitsOfFont(n1))

// show name of base font
MsgBox n2.fontName
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, NSFontManager 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.

As of Mac OS X version 10.3, font collections are managed by NSFontManager.

This class has no sub classes.

Some examples which use this class:

The items on this page are in the following plugins: MBS Cocoa Plugin.

NSFontDescriptorMBS   -   NSFontMBS

MBS Xojo Plugins