# NSFont

ovidiu@net-community.com

The font class

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:

NSBoldFont Helvetica-Bold (System bold font)
NSControlContentFont System font
NSFont Helvetica (System Font)
NSLabelFont System font
NSMenuFont System font
NSMessageFont System font
NSPaletteFont System bold font
NSTitleBarFont System bold font
NSToolTipsFont System font
NSUserFixedPitchFont Courier
NSUserFont System font

The default sizes are:

NSBoldFontSize (none)
NSControlContentFontSize (none)
NSFontSize 12 (System Font Size)
NSLabelFontSize (none)
NSMenuFontSize (none)
NSMessageFontSize (none)
NSPaletteFontSize (none)
NSSmallFontSize 9
NSTitleBarFontSize (none)
NSToolTipsFontSize (none)
NSUserFixedPitchFontSize (none)
NSUserFontSize (none)

Font sizes list with (none) default to NSFontSize.

AppKit/NSFont.h
NSCoding
NSCopying
Description forthcoming.
boldSystemFontOfSize:
fontSize
Return the default bold font for use in menus and heading in standard gui components.
This is deprecated in MacOSX
controlContentFontOfSize:
fontSize
Description forthcoming.
fontWithName:
aFontName
matrix:
fontMatrix
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:
aFontName
size:
fontSize
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:
fontSize
Description forthcoming.
labelFontSize
Description forthcoming.
menuFontOfSize:
fontSize
Description forthcoming.
messageFontOfSize:
fontSize
Description forthcoming.
paletteFontOfSize:
fontSize
Description forthcoming.
preferredFontNames
Return an array of the names of preferred fonts.
setPreferredFontNames:
fontNames
Description forthcoming.
setUserFixedPitchFont:
aFont
Description forthcoming.
setUserFont:
aFont
Description forthcoming.
smallSystemFontSize
Description forthcoming.
systemFontOfSize:
fontSize
Return the default font for use in menus and heading in standard gui components.
This is deprecated in MacOSX
systemFontSize
Description forthcoming.
titleBarFontOfSize:
fontSize
Description forthcoming.
toolTipsFontOfSize:
fontSize
Description forthcoming.
useFont:
aFontName
Description forthcoming.
userFixedPitchFontOfSize:
fontSize
Return the default fixed pitch font for use in locations other than standard gui components.
userFontOfSize:
fontSize
Return the default font for use in locations other than standard gui components.
advancementForGlyph:
aGlyph
Description forthcoming.
afmDictionary
Description forthcoming.
afmFileContents
Description forthcoming.
ascender
Description forthcoming.
boundingRectForFont
Description forthcoming.
boundingRectForGlyph:
aGlyph
Description forthcoming.
capHeight
Description forthcoming.
defaultLineHeightForFont
Description forthcoming.
descender
Description forthcoming.
displayName
Description forthcoming.
encodingScheme
Description forthcoming.
familyName
Description forthcoming.
fontName
Description forthcoming.
glyphIsEncoded:
aGlyph
Description forthcoming.
glyphPacking
Description forthcoming.
glyphWithName:
glyphName
Description forthcoming.
isBaseFont
Description forthcoming.
isFixedPitch
Description forthcoming.
italicAngle
Description forthcoming.
matrix
Description forthcoming.
maximumAdvancement
Description forthcoming.
minimumAdvancement
Description forthcoming.
mostCompatibleStringEncoding
Description forthcoming.
pointSize
Description forthcoming.
positionOfGlyph:
aGlyph
forCharacter:
aChar
struckOverRect:
aRect
Description forthcoming.
positionOfGlyph:
curGlyph
precededByGlyph:
prevGlyph
isNominal:
nominal
Description forthcoming.
positionOfGlyph:
aGlyph
struckOverGlyph:
baseGlyph
metricsExist:
flag
Description forthcoming.
positionOfGlyph:
aGlyph
struckOverRect:
aRect
metricsExist:
flag
Description forthcoming.
positionOfGlyph:
aGlyph
withRelation:
relation
toBaseGlyph:
baseGlyph
totalAdvancement:
offset
metricsExist:
flag
Description forthcoming.
positionsForCompositeSequence:
glyphs
numberOfGlyphs:
numGlyphs
pointArray:
points
Description forthcoming.
printerFont
Description forthcoming.
screenFont
Description forthcoming.
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
Description forthcoming.
underlineThickness
Description forthcoming.
widthOfString:
string
Description forthcoming.
xHeight
Description forthcoming.
Software documentation for the NSFont(GNUstep) category
AppKit/NSFont.h
Description forthcoming.
fontInfo
Description forthcoming.
fontRef
Description forthcoming.