Up

NSFont

Authors

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

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

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:

The default sizes are:

Font sizes list with (none) default to NSFontSize.

NSFont : NSObject

Declared in:
AppKit/NSFont.h
Conforms to:
NSCoding
NSCopying
Availability: Not in OpenStep/MacOS-X

Description forthcoming.


Instance Variables

Method summary

boldSystemFontOfSize: 

+ (NSFont*) boldSystemFontOfSize: (float)fontSize;
Availability: Not in OpenStep/MacOS-X

Return the default bold font for use in menus and heading in standard gui components. If fontSize is <= 0, the default size is used.
This is deprecated in MacOSX


controlContentFontOfSize: 

+ (NSFont*) controlContentFontOfSize: (float)fontSize;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.


fontWithName: matrix: 

+ (NSFont*) fontWithName: (NSString*)aFontName matrix: (const float*)fontMatrix;
Availability: Not in OpenStep/MacOS-X

Returns an autoreleased 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;
Availability: Not in OpenStep/MacOS-X

Returns an autoreleased 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;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.


labelFontSize 

+ (float) labelFontSize;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.


menuBarFontOfSize: 

+ (NSFont*) menuBarFontOfSize: (float)fontSize;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.


menuFontOfSize: 

+ (NSFont*) menuFontOfSize: (float)fontSize;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.


messageFontOfSize: 

+ (NSFont*) messageFontOfSize: (float)fontSize;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.


paletteFontOfSize: 

+ (NSFont*) paletteFontOfSize: (float)fontSize;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.


preferredFontNames 

+ (NSArray*) preferredFontNames;
Availability: Not in OpenStep/MacOS-X

Return an array of the names of preferred fonts.


setPreferredFontNames: 

+ (void) setPreferredFontNames: (NSArray*)fontNames;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.


setUserFixedPitchFont: 

+ (void) setUserFixedPitchFont: (NSFont*)aFont;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.


setUserFont: 

+ (void) setUserFont: (NSFont*)aFont;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.


smallSystemFontSize 

+ (float) smallSystemFontSize;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.


systemFontOfSize: 

+ (NSFont*) systemFontOfSize: (float)fontSize;
Availability: Not in OpenStep/MacOS-X

Return the default font for use in menus and heading in standard gui components. If fontSize is




Instance Variables for NSFont Class

_fontRef

@protected void* _fontRef;

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.


cachedFlippedFont

@protected NSFont* cachedFlippedFont;

Description forthcoming.


cachedScreenFont

@protected NSFont* cachedScreenFont;

Description forthcoming.


fontInfo

@protected id fontInfo;

Description forthcoming.


fontName

@protected NSString* fontName;

Description forthcoming.


matrix

@protected float matrix;

Description forthcoming.


matrixExplicitlySet

@protected BOOL matrixExplicitlySet;

Description forthcoming.


role

@protected int role;

Description forthcoming.


screenFont

@protected BOOL screenFont;

Description forthcoming.






Up