Xojo Conferences

Platforms to show: All Mac Windows Linux Cross-Platform

NSFontManagerMBS class

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class Cocoa MBS MacCocoa Plugin 9.8 Yes No No Yes, macOS only No
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.

Feedback, Comments & Corrections

This class has no sub classes.

Some examples which use this class:

Blog Entries

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

NSFontDescriptorMBS   -   NSFontMBS

The biggest plugin in space...

MBS Xojo PDF Plugins