(Preliminary Documentation) Copyright ã1994 by NeXT Computer, Inc.  All Rights Reserved.

NSFontManager

Inherits From:	NSObject

Declared In:	appkit/NSFontManager.h

Managing the FontManager

+ (void)setFontManagerFactory:(Class)classId	Sets the class used to create the NSFontManager.
+ (void)setFontPanelFactory:(Class)classId	Sets the class used to create the FontPanel.
+ (NSFontManager *)sharedFontManager	Returns a shared FontManager.

Converting Fonts

- (NSFont *)convertFont:(NSFont *)fontObject	Returns a Font object whose traits are the same as those of
toFace:(NSString *)typeface		 fontObject except as specified by typeface. 	
- (NSFont *)convertFont:(NSFont *)fontObject	Returns a Font object whose traits are the same as those of
toFamily:(NSString *)family		 fontObject except as specified by family. 	
- (NSFont *)convertFont:(NSFont *)fontObject	Returns a Font object whose traits are the same as those of
toHaveTrait:(NSFontTraitMask)trait		 fontObject except as altered by the addition of the traits specified by trait.
- (NSFont *)convertFont:(NSFont *)fontObject	Returns a Font object whose traits are the same as those of
toNotHaveTrait:(NSFontTraitMask)trait		 fontObject except as altered by the removal of the traits specified by trait.
- (NSFont *)convertFont:(NSFont *)fontObject	Returns a Font object whose traits are the same as those of
toSize:(float)size		 fontObject except as specified by size. 	
- (NSFont *)convertWeight:(BOOL)upFlag	Attempts to increase (if upFlag is YES) or decrease (if
ofFont:(NSFont *)fontObject		 upFlag is NO) the weight of the font specified by fontObject. 
- (NSFont *)fontWithFamily:(NSString *)family	Tries to find a font that matches the specified
traits:(NSFontTraitMask)traits	 	characteristics.
weight:(int)weight	 
size:(float)size	

Setting and Getting Parameters

- (SEL)action	Gets the action sent by the FontManager.
- (NSArray *)availableFonts	Provides an array listing all available fonts.
- (NSMenu *)fontMenu:(BOOL)create	Returns the Font menu, creating one if it doesn't exist and create is YES.
- (NSFontPanel *)fontPanel:(BOOL)create	Returns the Font panel, creating one if it doesn't exist and create is YES.
- (BOOL)isEnabled	Returns whether the Font panel and menu are enabled.
- (BOOL)isMultiple	Returns whether the selection contains multiple fonts.
- (NSFont *)selectedFont	Returns the first font in the current selection 
- (void)setAction:(SEL)aSelector	Sets the action to that specified by aSelector to be sent by the FontManager when the user selects a new font.
- (void)setEnabled:(BOOL)flag	Enables or disables the Font panel and menu depending on flag.
- (void)setFontMenu:(NSMenu *)newMenu	Sets the font menu to newMenu.
- (void)setSelectedFont:(NSFont *)fontObject	Notifies FontManager of the selection's current font from
isMultiple:(BOOL)flag		fontObject with flag indicating whether the selection has multiple fonts.
- (NSFontTraitMask)traitsOfFont:(NSFont *)fontObject
	Returns the font traits of fontObject.
- (int)weightOfFont:(NSFont *)fontObject	Returns the font weight of fontObject.

Target and Action Methods

- (BOOL)sendAction	Dispatches the action message up the responder chain.

Assigning a Delegate

- (id)delegate	Returns the FontManager's delegate.
- (void)setDelegate:(id)anObject	Sets the FontManager's delegate to anObject.

Method Implemented by the  Delegate

- (BOOL)fontManager:(id)sender willIncludeFont:(NSString *)fontName
	Responds to a message informing the FontManager's delegate that the FontPanel is about to include fontName in the list displayed to the user; if this method returns NO, the font isn't added; otherwise, it is.