Up

NSFont

Authors

Ovidiu Predescu( ovidiu@net-community.com )
The font class

Copyright: (C) 1996 Free Software Foundation, Inc.


Contents -

  1. NSFont
  2. Software documentation for the NSFont(GNUstep) category

NSFont

The NSFont class allows control of the fonts used for displaying text anywhere on the screen. The primary methods for getting a particular font are -fontWithName:matrix: and -fontWithName:size: which take the name and size of a particular font and return the NSFont object associated with that font. In addition there are several convenience mathods which make it easier to get certain types of fonts.

In particular, there are several methods to get the standard fonts used by the Application to display text for a partiuclar purpose. See the class methods listed below for more information. These default fonts can be set using the user defaults system. The default font names available are:

NSFont : NSObject

Declared in:
AppKit/NSFont.h
Conforms to:
NSCoding
NSCopying
Standards:

Method summary

boldSystemFontOfSize:

+ (NSFont*) boldSystemFontOfSize: (float)fontSize;

Description forthcoming.


controlContentFontOfSize:

+ (NSFont*) controlContentFontOfSize: (float)fontSize;

Description forthcoming.


fontWithName:matrix:

+ (NSFont*) fontWithName: (NSString*)aFontName matrix: (const float*)fontMatrix;

Creates a new font with name aFontName and matrix fontMatrix. The fontMatrix is a standard size element matrix as used in PostScript to describe the scaling of the font, typically it just includes the font size as [fontSize 0 0 fontSize 0 0]. You can use the constant NSFontIdentityMatrix in place of [1 0 0 1 0 0]. If NSFontIdentityMatrix, then the font will automatically flip itself when set in a flipped view


fontWithName:size:

+ (NSFont*) fontWithName: (NSString*)aFontName size: (float)fontSize;

Creates a new font with name aFontName and size fontSize. Fonts created using this method will automatically flip themselves when set in a flipped view


labelFontOfSize:

+ (NSFont*) labelFontOfSize: (float)fontSize;

Description forthcoming.


labelFontSize

+ (float) labelFontSize;

Description forthcoming.


menuFontOfSize:

+ (NSFont*) menuFontOfSize: (float)fontSize;

Description forthcoming.


messageFontOfSize:

+ (NSFont*) messageFontOfSize: (float)fontSize;

Description forthcoming.


paletteFontOfSize:

+ (NSFont*) paletteFontOfSize: (float)fontSize;

Description forthcoming.


preferredFontNames

+ (NSArray*) preferredFontNames;

Description forthcoming.


setPreferredFontNames:

+ (void) setPreferredFontNames: (NSArray*)fontNames;

Description forthcoming.


setUserFixedPitchFont:

+ (void) setUserFixedPitchFont: (NSFont*)aFont;

Description forthcoming.


setUserFont:

+ (void) setUserFont: (NSFont*)aFont;

Description forthcoming.


smallSystemFontSize

+ (float) smallSystemFontSize;

Description forthcoming.


systemFontOfSize:

+ (NSFont*) systemFontOfSize: (float)fontSize;

Description forthcoming.


systemFontSize

+ (float) systemFontSize;

Description forthcoming.


titleBarFontOfSize:

+ (NSFont*) titleBarFontOfSize: (float)fontSize;

Description forthcoming.


toolTipsFontOfSize:

+ (NSFont*) toolTipsFontOfSize: (float)fontSize;

Description forthcoming.


useFont:

+ (void) useFont: (NSString*)aFontName;

Description forthcoming.


userFixedPitchFontOfSize:

+ (NSFont*) userFixedPitchFontOfSize: (float)fontSize;

Description forthcoming.


userFontOfSize:

+ (NSFont*) userFontOfSize: (float)fontSize;

Description forthcoming.


advancementForGlyph:

- (NSSize) advancementForGlyph: (NSGlyph)aGlyph;

Description forthcoming.


afmDictionary

- (NSDictionary*) afmDictionary;

Description forthcoming.


afmFileContents

- (NSString*) afmFileContents;

Description forthcoming.


ascender

- (float) ascender;

Description forthcoming.


boundingRectForFont

- (NSRect) boundingRectForFont;

Description forthcoming.


boundingRectForGlyph:

- (NSRect) boundingRectForGlyph: (NSGlyph)aGlyph;

Description forthcoming.


capHeight

- (float) capHeight;

Description forthcoming.


defaultLineHeightForFont

- (float) defaultLineHeightForFont;

Description forthcoming.


descender

- (float) descender;

Description forthcoming.


displayName

- (NSString*) displayName;

Description forthcoming.


encodingScheme

- (NSString*) encodingScheme;

Description forthcoming.


familyName

- (NSString*) familyName;

Description forthcoming.


fontName

- (NSString*) fontName;

Description forthcoming.


glyphIsEncoded:

- (BOOL) glyphIsEncoded: (NSGlyph)aGlyph;

Description forthcoming.


glyphPacking

- (NSMultibyteGlyphPacking) glyphPacking;

Description forthcoming.


glyphWithName:

- (NSGlyph) glyphWithName: (NSString*)glyphName;

Description forthcoming.


isBaseFont

- (BOOL) isBaseFont;

Description forthcoming.


isFixedPitch

- (BOOL) isFixedPitch;

Description forthcoming.


italicAngle

- (float) italicAngle;

Description forthcoming.


matrix

- (const float*) matrix;

Description forthcoming.


maximumAdvancement

- (NSSize) maximumAdvancement;

Description forthcoming.


minimumAdvancement

- (NSSize) minimumAdvancement;

Description forthcoming.


mostCompatibleStringEncoding

- (NSStringEncoding) mostCompatibleStringEncoding;

Description forthcoming.


pointSize

- (float) pointSize;

Description forthcoming.


positionOfGlyph:forCharacter:struckOverRect:

- (NSPoint) positionOfGlyph: (NSGlyph)aGlyph forCharacter: (unichar)aChar struckOverRect: (NSRect)aRect;

Description forthcoming.


positionOfGlyph:precededByGlyph:isNominal:

- (NSPoint) positionOfGlyph: (NSGlyph)curGlyph precededByGlyph: (NSGlyph)prevGlyph isNominal: (BOOL*)nominal;

Description forthcoming.


positionOfGlyph:struckOverGlyph:metricsExist:

- (NSPoint) positionOfGlyph: (NSGlyph)aGlyph struckOverGlyph: (NSGlyph)baseGlyph metricsExist: (BOOL*)flag;

Description forthcoming.


positionOfGlyph:struckOverRect:metricsExist:

- (NSPoint) positionOfGlyph: (NSGlyph)aGlyph struckOverRect: (NSRect)aRect metricsExist: (BOOL*)flag;

Description forthcoming.


positionOfGlyph:withRelation:toBaseGlyph:totalAdvancement:metricsExist:

- (NSPoint) positionOfGlyph: (NSGlyph)aGlyph withRelation: (NSGlyphRelation)relation toBaseGlyph: (NSGlyph)baseGlyph totalAdvancement: (NSSize*)offset metricsExist: (BOOL*)flag;

Description forthcoming.


positionsForCompositeSequence:numberOfGlyphs:pointArray:

- (int) positionsForCompositeSequence: (NSGlyph*)glyphs numberOfGlyphs: (int)numGlyphs pointArray: (NSPoint*)points;

Description forthcoming.


printerFont

- (NSFont*) printerFont;

Description forthcoming.


screenFont

- (NSFont*) screenFont;

Description forthcoming.


set

- (void) set;

Sets the receiver as the font used for text drawing operations. If the current view is a flipped view, the reciever automatically flips itself to display correctly in the flipped view, as long as the font was created without explicitly setting the font matrix


underlinePosition

- (float) underlinePosition;

Description forthcoming.


underlineThickness

- (float) underlineThickness;

Description forthcoming.


widthOfString:

- (float) widthOfString: (NSString*)string;

Description forthcoming.


xHeight

- (float) xHeight;

Description forthcoming.


Software documentation for the NSFont(GNUstep) category

NSFont(GNUstep)

Declared in:
AppKit/NSFont.h
Standards:

Description forthcoming.

Method summary

fontInfo

- (GSFontInfo*) fontInfo;

Description forthcoming.



Up