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

NSFont 

Inherits From:	NSObject

Declared In:	appkit/NSFont.h

Creating and Freeing a Font Object

+ (NSFont *)boldSystemFontOfSize:(float)fontSize	
	Returns the font object representing the bold system font
		of size fontSize and matrix NSFontIdentityMatrix.
+ (NSFont *)fontWithName:(NSString *)fontName matrix:(const float *)fontMatrix
	Returns a font object for font fontName and matrix fontMatrix.  
+ (NSFont *)fontWithName:(NSString *)fontName size:(float)fontSize
	Returns a font object for font fontName of size fontSize. 
+ (NSFont *)systemFontOfSize:(float)fontSize	Returns the font object representing the system font of size fontSize and matrix NSFontIdentityMatrix.
+ (NSFont *)userFixedPitchFontOfSize:(float)fontSize
	Returns the font object representing the application's fixed-pitch font of size fontSize and matrix NSFontIdentityMatrix.
+ (NSFont *)userFontOfSize:(float)fontSize	Returns the font object representing the application's standard font of size fontSize and matrix NSFontIdentityMatrix.

Setting the Font

+ (void)setUserFixedPitchFont:(NSFont *)aFont	Sets the fixed-pitch font used by default in the application to aFont.
+ (void)setUserFont:(NSFont *)aFont	Sets the standard font used by default in the application to aFont.
+ (void)useFont:(NSString *)fontName	Registers that fontName is used in the document.
- (void)set	Makes this font the graphic state's current font.

Querying the Font

- (NSDictionary *)afmDictionary	Returns the font's dictionary if the font has an AFM file.
- (NSString *)afmFileContents	Returns the font dictionary's raw contents if the font has an AFM file.
- (NSRect)boundingRectForFont	Returns the bounding rectangle for the font.
- (NSString *)displayName	Returns the full name of the font as displayed in the font panel.
- (NSString *)familyName	Returns the name of the font's family.
- (NSString *)fontName	Returns the name of the font.
- (BOOL)isBaseFont	Indicates whether the font is the base font.
- (const float *)matrix	Returns a pointer to an array representing the font's matrix.
- (float)pointSize	Returns the size of the font in points. 
- (NSFont *)printerFont	Returns the printer font for the font.
- (NSFont *)screenFont	Returns the screen font for the font.
- (float)widthOfString:(NSString *)string	Returns the width of string in the font. 
- (float *)widths	Returns a pointer to an array representing the widths of the glyphs in the font.

Manipulating Glyphs

- (NSSize)advancementForGlyph:(NSGlyph)aGlyph
	Returns the horizontal and vertical advancement for aGlyph.
- (NSRect)boundingRectForGlyph:(NSGlyph)aGlyph
	Returns a bounding rectangle for aGlyph, scaled to the font's actual size and matrix.
- (BOOL)glyphIsEncoded:(NSGlyph)aGlyph	Indicates whether aGlyph is encoded.
- (NSPoint)positionOfGlyph:(NSGlyph)curGlyph	Returns curGlyph's position when it follows prevGlyph
precededByGlyph:(NSGlyph)prevGlyph		where nominal indicates whether position should be
isNominal:(BOOL *)nominal	 	nominal, i.e., not modified by kerning information.