| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/AppKit.framework |
| Availability | Available in Mac OS X v10.0 and later. |
| Companion guide | |
| Declared in | NSFont.h |
| Related sample code |
NSFont objects represent fonts to an application, providing access to characteristics of the font and assistance in laying out glyphs relative to one another. Font objects are also used to establish the current font when drawing in an NSView, using the set method.
You don’t create NSFont objects using the alloc and init methods. Instead, you use either fontWithDescriptor:size: or fontWithName:size: to look up an available font and alter its size or matrix to your needs. These methods check for an existing font object with the specified characteristics, returning it if there is one. Otherwise, they look up the font data requested and create the appropriate object. NSFont also defines a number of methods for getting standard system fonts, such as systemFontOfSize:, userFontOfSize:, and messageFontOfSize:. To request the default size for these standard fonts, pass a negative number or 0 as the font size.
+ fontWithName:size:
+ fontWithDescriptor:size:
+ fontWithDescriptor:textTransform:
+ fontWithName:matrix:
+ boldSystemFontOfSize:
+ controlContentFontOfSize:
+ labelFontOfSize:
+ menuFontOfSize:
+ menuBarFontOfSize:
+ messageFontOfSize:
+ paletteFontOfSize:
+ systemFontOfSize:
+ titleBarFontOfSize:
+ toolTipsFontOfSize:
– coveredCharacterSet
– fontDescriptor
– isFixedPitch
– mostCompatibleStringEncoding
– renderingMode
+ labelFontSize
+ smallSystemFontSize
+ systemFontSize
+ systemFontSizeForControlSize:
– advancementForGlyph:
– ascender
– boundingRectForFont
– boundingRectForGlyph:
– capHeight
– descender
– getAdvancements:forGlyphs:count:
– getAdvancements:forPackedGlyphs:length:
– getBoundingRects:forGlyphs:count:
– italicAngle
– leading
– matrix
– maximumAdvancement
– numberOfGlyphs
– pointSize
– textTransform
– underlinePosition
– underlineThickness
– xHeight
+ preferredFontNames Deprecated in Mac OS X v10.4
+ setPreferredFontNames: Deprecated in Mac OS X v10.4
+ useFont: Deprecated in Mac OS X v10.4
– afmDictionary Deprecated in Mac OS X v10.4
– defaultLineHeightForFont Deprecated in Mac OS X v10.4
– encodingScheme Deprecated in Mac OS X v10.4
– glyphIsEncoded: Deprecated in Mac OS X v10.4
– glyphPacking Deprecated in Mac OS X v10.4
– isBaseFont Deprecated in Mac OS X v10.4
– positionOfGlyph:forCharacter:struckOverRect: Deprecated in Mac OS X v10.4
– positionOfGlyph:precededByGlyph:isNominal: Deprecated in Mac OS X v10.4
– positionOfGlyph:struckOverGlyph:metricsExist: Deprecated in Mac OS X v10.4
– positionOfGlyph:struckOverRect:metricsExist: Deprecated in Mac OS X v10.4
– positionOfGlyph:withRelation:toBaseGlyph:totalAdvancement:metricsExist: Deprecated in Mac OS X v10.4
– positionsForCompositeSequence:numberOfGlyphs:pointArray: Deprecated in Mac OS X v10.4
– widthOfString: Deprecated in Mac OS X v10.4
Returns the Aqua system font used for standard interface items that are rendered in boldface type in the specified size.
+ (NSFont *)boldSystemFontOfSize:(CGFloat)fontSize
The size in points to which the font is scaled.
A font object of the specified size.
If fontSize is 0 or negative, returns the boldface system font at the default size.
NSFont.hReturns the font used for the content of controls in the specified size.
+ (NSFont *)controlContentFontOfSize:(CGFloat)fontSize
The size in points to which the font is scaled.
A font object of the specified size.
For example, in a table, the user’s input uses the control content font, and the table’s header uses another font. If fontSize is 0 or negative, returns the control content font at the default size.
NSFont.h
Returns a font object for the specified font descriptor and font size.
+ (NSFont *)fontWithDescriptor:(NSFontDescriptor *)fontDescriptor size:(CGFloat)fontSize
A font descriptor object.
The size in points to which the font is scaled.
A font object for the specified descriptor and size.
In most cases, you can simply use fontWithName:size: to create standard scaled fonts.
NSFont.h
Returns a font object for the specified font descriptor and text transform.
+ (NSFont *)fontWithDescriptor:(NSFontDescriptor *)fontDescriptor textTransform:(NSAffineTransform *)textTransform
The font descriptor object describing the font to return.
An affine transformation applied to the font.
A font object for the specified name and transform.
In most cases, you can simply use fontWithName:size: to create standard scaled fonts. If textTransform is non-nil, it has precedence over NSFontMatrixAttribute in fontDescriptor.
NSFont.h
Returns a font object for the specified font name and matrix.
+ (NSFont *)fontWithName:(NSString *)fontName matrix:(const CGFloat *)fontMatrix
The fully specified family-face name of the font.
A transformation matrix applied to the font.
A font object for the specified name and transformation matrix.
The fontName is a fully specified family-face name, such as Helvetica-BoldOblique or Times-Roman (not a name as shown in the Font Panel). The fontMatrix is a standard 6-element transformation matrix as used in the PostScript language, specifically with the makefont operator. In most cases, you can simply use fontWithName:size: to create standard scaled fonts.
You can use the defined value NSFontIdentityMatrix for [1 0 0 1 0 0]. Fonts created with a matrix other than NSFontIdentityMatrix don’t automatically flip themselves in flipped views.
– isFlipped (NSView)NSFont.h
Creates a font object for the specified font name and font size.
+ (NSFont *)fontWithName:(NSString *)fontName size:(CGFloat)fontSize
The fully specified family-face name of the font.
The size in points to which the font is scaled.
A font object for the specified name and size.
The fontName is a fully specified family-face name, such as Helvetica-BoldOblique or Times-Roman. The fontSize is equivalent to using a font matrix of [fontSize 0 0 fontSize 0 0] with fontWithDescriptor:size:. If you use a fontSize of 0.0, this method uses the default User Font size.
Fonts created with this method automatically flip themselves in flipped views. This method is the preferred means for creating fonts.
NSFont.h
Returns the Aqua font used for standard interface labels in the specified size.
+ (NSFont *)labelFontOfSize:(CGFloat)fontSize
The size in points to which the font is scaled.
A font object of the specified size.
If fontSize is 0 or negative, returns the label font with the default size.
NSFont.h
Returns the size of the standard label font.
+ (CGFloat)labelFontSize
The label font size in points.
NSFont.h
Returns the font used for menu bar items, in the specified size.
+ (NSFont *)menuBarFontOfSize:(CGFloat)fontSize
The size in points to which the font is scaled.
A font object of the specified size.
If fontSize is 0 or negative, returns the menu bar font with the default size.
NSFont.h
Returns the font used for menu items, in the specified size.
+ (NSFont *)menuFontOfSize:(CGFloat)fontSize
The size in points to which the font is scaled.
A font object of the specified size.
If fontSize is 0 or negative, returns the menu items font with the default size.
NSFont.h
Returns the font used for standard interface items, such as button labels, menu items, and so on, in the specified size.
+ (NSFont *)messageFontOfSize:(CGFloat)fontSize
The size in points to which the font is scaled.
A font object of the specified size.
If fontSize is 0 or negative, returns this font at the default size. This method is equivalent to systemFontOfSize:.
NSFont.h
Returns the font used for palette window title bars, in the specified size.
+ (NSFont *)paletteFontOfSize:(CGFloat)fontSize
The size in points to which the font is scaled.
A font object of the specified size.
If fontSize is 0 or negative, returns the palette title font at the default size.
NSFont.hSets the font used by default for documents and other text under the user’s control, when that font should be fixed-pitch, to the specified font.
+ (void)setUserFixedPitchFont:(NSFont *)aFont
Specifying aFont as nil causes the default to be removed from the application domain.
NSFont.h
Sets the font used by default for documents and other text under the user’s control to the specified font.
+ (void)setUserFont:(NSFont *)aFont
Specifying aFont as nil causes the default to be removed from the application domain.
NSFont.h
Returns the size of the standard small system font.
+ (CGFloat)smallSystemFontSize
The small system font size in points.
NSFont.h
Returns the Aqua system font used for standard interface items, such as button labels, menu items, and so on, in the specified size.
+ (NSFont *)systemFontOfSize:(CGFloat)fontSize
The size in points to which the font is scaled.
A font object of the specified size.
If fontSize is 0 or negative, returns the system font at the default size.
NSFont.h
Returns the size of the standard system font.
+ (CGFloat)systemFontSize
The standard system font size in points.
NSFont.h
Returns the font size used for the specified control size.
+ (CGFloat)systemFontSizeForControlSize:(NSControlSize)controlSize
The control size constant.
The font size in points for the specified control size.
If controlSize does not correspond to a valid NSControlSize, returns the size of the standard system font.
NSFont.h
Returns the font used for window title bars, in the specified size.
+ (NSFont *)titleBarFontOfSize:(CGFloat)fontSize
The size in points to which the font is scaled.
A font object of the specified size.
If fontSize is 0 or negative, returns the title bar font at the default size. This method is equivalent to boldSystemFontOfSize:.
NSFont.h
Returns the font used for tool tips labels, in the specified size.
+ (NSFont *)toolTipsFontOfSize:(CGFloat)fontSize
The size in points to which the font is scaled.
A font object of the specified size.
If fontSize is 0 or negative, returns the tool tips font at the default size.
NSFont.h
Returns the font used by default for documents and other text under the user’s control (that is, text whose font the user can normally change), when that font should be fixed-pitch, in the specified size.
+ (NSFont *)userFixedPitchFontOfSize:(CGFloat)fontSize
The size in points to which the font is scaled.
A font object of the specified size.
If fontSize is 0 or negative, returns the fixed-pitch font at the default size.
The system does not guarantee that all the glyphs in a fixed-pitch font are the same width. For example, certain Japanese fonts are dual-pitch, and other fonts may have nonspacing marks that can affect the display of other glyphs.
NSFont.h
Returns the font used by default for documents and other text under the user’s control (that is, text whose font the user can normally change), in the specified size.
+ (NSFont *)userFontOfSize:(CGFloat)fontSize
The size in points to which the font is scaled.
A font object of the specified size.
If fontSize is 0 or negative, returns the user font at the default size.
NSFont.hReturns the nominal spacing for the given glyph—the distance the current point moves after showing the glyph—accounting for the receiver’s size.
- (NSSize)advancementForGlyph:(NSGlyph)aGlyph
The glyph whose advancement is returned.
The advancement spacing in points.
This spacing is given according to the glyph’s movement direction, which is either strictly horizontal or strictly vertical.
NSFont.hReturns the top y-coordinate, offset from the baseline, of the receiver’s longest ascender.
- (CGFloat)ascender
The distance of the longest ascender’s top y-coordinate from the baseline in points.
NSFont.hReturns the receiver’s bounding rectangle, scaled to the font’s size.
- (NSRect)boundingRectForFont
The bounding rectangle is the union of the bounding rectangles of every glyph in the font.
NSFont.hReturns the bounding rectangle for the specified glyph, scaled to the receiver’s size.
- (NSRect)boundingRectForGlyph:(NSGlyph)aGlyph
Japanese fonts encoded with the scheme “EUC12-NJE-CFEncoding” do not have individual metrics or bounding boxes available for the glyphs above 127. For those glyphs, this method returns the bounding rectangle for the font instead.
– boundingRectForFont– getBoundingRects:forGlyphs:count:– getAdvancements:forGlyphs:count:– getAdvancements:forPackedGlyphs:length:NSFont.hReturns the receiver’s cap height.
- (CGFloat)capHeight
NSFont.hReturns an NSCharacterSet object containing all of the nominal characters renderable by the receiver, which is all of the entries mapped in the receiver’s ‘cmap’ table.
- (NSCharacterSet *)coveredCharacterSet
An NSCharacterSet object containing all of the nominal characters renderable by the receiver.
The number of glyphs supported by a given font is often larger than the number of characters contained in the character set returned by this method.
NSFont.hReturns the bottom y coordinate, offset from the baseline, of the receiver’s longest descender.
- (CGFloat)descender
Thus, if the longest descender extends 2 points below the baseline, descender will return –2.
NSFont.h
Returns the name, including family and face, used to represent the font in the user interface, typically localized for the user’s language.
- (NSString *)displayName
NSFont.h
Returns the receiver’s family name—for example, “Times” or “Helvetica.”
- (NSString *)familyName
This name is the one that NSFontManager uses and may differ slightly from the AFM name.
The value returned by this method is intended for an application’s internal usage and not for display. Use displayName instead.
NSFont.hReturns the receiver’s font descriptor.
- (NSFontDescriptor *)fontDescriptor
A font descriptor object that describes the receiver.
The font descriptor contains a mutable dictionary of optional attributes for creating an NSFont object. See documentation on NSFontDescriptor for more information.
NSFont.hReturns the receiver’s full font name, as used in PostScript language code—for example, “Times-Roman” or “Helvetica-Oblique.”
- (NSString *)fontName
The value returned by this method is intended for an application’s internal usage and not for display. Use displayName instead.
NSFont.hReturns an array of the advancements for the specified glyphs rendered by the receiver.
- (void)getAdvancements:(NSSizeArray)advancements forGlyphs:(const NSGlyph *)glyphs count:(NSUInteger)glyphCount
Returns in advancements an array of the advancements for the glyphs specified by glyphs and rendered by the receiver. The glyphCount must specify the count of glyphs passed in glyphs.
– boundingRectForFont– boundingRectForGlyph:– getAdvancements:forPackedGlyphs:length:– getBoundingRects:forGlyphs:count:NSFont.hReturns an array of the advancements for the specified packed glyphs and rendered by the receiver.
- (void)getAdvancements:(NSSizeArray)advancements forPackedGlyphs:(const void *)packedGlyphs length:(NSUInteger)length- (void)getAdvancements
Returns in advancements an array of the advancements for the packed glyphs specified by packedGlyphs and rendered by the receiver. The glyphCount must specify the count of glyphs passed in packedGlyphs.
– boundingRectForFont– boundingRectForGlyph:– getBoundingRects:forGlyphs:count:– getAdvancements:forGlyphs:count:NSFont.hReturns an array of the bounding rectangles for the specified glyphs rendered by the receiver.
- (void)getBoundingRects:(NSRectArray)bounds forGlyphs:(const NSGlyph *)glyphs count:(NSUInteger)glyphCount
Returns in bounds an array of the bounding rectangles for the glyphs specified by glyphs and rendered by the receiver. The glyphCount must specify the count of glyphs passed in glyphs.
– boundingRectForFont– boundingRectForGlyph:– getAdvancements:forGlyphs:count:– getAdvancements:forPackedGlyphs:length:NSFont.h
Returns the named encoded glyph, or –1 if the receiver contains no such glyph.
- (NSGlyph)glyphWithName:(NSString *)glyphName
The name of the glyph.
The named encoded glyph.
Returns –1 if the glyph named glyphName isn’t encoded.
Glyph names in fonts do not always accurately identify the glyph. If possible, look up the appropriate glyph on your own.
NSFont.h
Returns a Boolean value indicating whether all glyphs in the receiver have the same advancement.
- (BOOL)isFixedPitch
YES if all glyphs in the receiver have the same advancement; NO if any advancements differ.
Some Japanese fonts encoded with the scheme “EUC12-NJE-CFEncoding” return that they have the same advancement, but actually encode glyphs with one of two advancements, for historical compatibility. You may need to handle such fonts specially for some applications.
NSFont.h
Returns the receiver’s italic angle, the amount that the font is slanted in degrees counterclockwise from the vertical, as read from its AFM file. Because the slant is measured counterclockwise, English italic fonts typically return a negative value.
- (CGFloat)italicAngle
NSFont.hReturns the receiver’s leading.
- (CGFloat)leading
NSFont.hReturns the receiver’s font matrix, a standard six-element transformation matrix as used in the PostScript language, specifically with the makefont operator.
- (const CGFloat *)matrix
In most cases, with a font of fontSize, this matrix is [fontSize 0 0 fontSize 0 0].
NSFont.h
Returns the greatest advancement of any of the receiver’s glyphs.
- (NSSize)maximumAdvancement
This advancement is always either strictly horizontal or strictly vertical.
NSFont.hReturns the string encoding that works best with the receiver, where there are the fewest possible unmatched characters in the string encoding and glyphs in the font.
- (NSStringEncoding)mostCompatibleStringEncoding
The string encoding that works best with the receiver.
You can use NSString‘s dataUsingEncoding: or dataUsingEncoding:allowLossyConversion: method to convert the string to this encoding.
If this method returns NSASCIIStringEncoding, it could not determine the correct encoding and assumed that the font can render only ASCII characters.
This method works heuristically using well-known font encodings, so for nonstandard encodings it may not in fact return the optimal string encoding.
NSFont.hReturns the number of glyphs in the receiver.
- (NSUInteger)numberOfGlyphs
Glyphs are numbered starting at 0.
NSFont.hReturns the receiver’s point size, or the effective vertical point size for a font with a nonstandard matrix.
- (CGFloat)pointSize
NSFont.h
Returns the scalable PostScript font corresponding to itself.
- (NSFont *)printerFont
When sent to a font object representing a scalable PostScript font, returns self. When sent to a font object representing a bitmapped screen font, returns its corresponding scalable PostScript font.
NSFont.hReturns the rendering mode of the receiver.
- (NSFontRenderingMode)renderingMode
The rendering mode of the receiver.
For valid rendering modes, see “Constants.”
NSFont.h
Returns the bitmapped screen font corresponding to itself.
- (NSFont *)screenFont
When sent to a font object representing a scalable PostScript font, returns a bitmapped screen font matching the receiver in typeface and matrix (or size), or nil if such a font can’t be found. When sent to a font object representing a bitmapped screen font, returns nil.
Screen fonts are for direct use with the window server only. Never use them with Application Kit objects, such as in setFont: methods. Internally, the Application Kit automatically uses the corresponding screen font for a font object as long as the view is not rotated or scaled.
NSFont.hReturns a bitmapped screen font, when sent to a font object representing a scalable PostScript font, with the specified rendering mode, matching the receiver in typeface and matrix (or size), or nil if such a font can’t be found.
- (NSFont *)screenFontWithRenderingMode:(NSFontRenderingMode)renderingMode
For valid rendering modes, see NSFontRenderingMode.
Screen fonts are for direct use with the window server only. Never use them with Application Kit objects, such as in setFont: methods. Internally, the Application Kit automatically uses the corresponding screen font for a font object as long as the view is not rotated or scaled.
NSFont.hEstablishes the receiver as the current font for PostScript show and other text-drawing operators.
- (void)set
During a print operation, also records the font as used in the PostScript code emitted.
NSFont.hEstablishes the receiver as the current font for the specified graphics context.
- (void)setInContext:(NSGraphicsContext *)graphicsContext
The graphics context for which the font is set.
NSFont.hReturns the current transformation matrix for the receiver.
- (NSAffineTransform *)textTransform
NSFont.h
Returns the baseline offset that should be used when drawing underlines with the receiver, as determined by the font’s AFM file.
- (CGFloat)underlinePosition
This value is usually negative, which must be considered when drawing in a flipped coordinate system.
NSFont.h
Returns the thickness that should be used when drawing underlines with the receiver, as determined by the font’s AFM file.
- (CGFloat)underlineThickness
NSFont.hReturns the x-height of the receiver.
- (CGFloat)xHeight
NSFont.hThese constants specify the font rendering mode.
typedef enum {
NSFontDefaultRenderingMode = 0,
NSFontAntialiasedRenderingMode = 1,
NSFontIntegerAdvancementsRenderingMode = 2,
NSFontAntialiasedIntegerAdvancementsRenderingMode = 3
} NSFontRenderingMode;
NSFontDefaultRenderingModeDetermines the actual mode based on the user preference settings.
Available in Mac OS X v10.4 and later.
Declared in NSFont.h.
NSFontAntialiasedRenderingModeSpecifies antialiased, floating-point advancements rendering mode (synonymous with printerFont).
Available in Mac OS X v10.4 and later.
Declared in NSFont.h.
NSFontIntegerAdvancementsRenderingModeSpecifies integer advancements rendering mode.
Available in Mac OS X v10.4 and later.
Declared in NSFont.h.
NSFontAntialiasedIntegerAdvancementsRenderingModeSpecifies antialiased, integer advancements rendering mode.
Available in Mac OS X v10.4 and later.
Declared in NSFont.h.
NSFont.hThe identity matrix.
const float *NSFontIdentityMatrix;
NSFontIdentityMatrixA transformation matrix useful as a parameter to fontWithDescriptor:size:.
Available in Mac OS X v10.0 and later.
Declared in NSFont.h.
NSFont.hA constant for glyph packing.
typedef enum {
NSNativeShortGlyphPacking = 5
} NSMultibyteGlyphPacking;
NSNativeShortGlyphPackingThe native format for Mac OS X.
Available in Mac OS X v10.0 and later.
Declared in NSFont.h.
Cocoa stores all text data as Unicode. The text system converts Unicode into glyph IDs and places them in 1-, 2-, or 4-byte storage depending on the context. To render text, you must convert the storage into a format the text engine understands. The following constants describe the glyph packing schemes the text rendering engine can use. They are used to extract glyphs from a font for making a multibyte (or single-byte) array of glyphs for passing to an interpreter, such as the window server, which expects a big-endian multibyte stream (that is, “packed glyphs”) instead of a pure NSGlyph stream. They’re used by glyphPacking. With Quartz, the engine always expects the format to be in 2-byte short array, so NSNativeShortGlyphPacking is the only format currently in use.
NSFont.hThese constants define reserved glyph codes.
enum {
NSControlGlyph = 0x00FFFFFF,
NSNullGlyph = 0x0
};
NSControlGlyphNSGlyphGenerator generates NSControlGlyph for all characters in the Unicode General Category C* and U200B (ZERO WIDTH SPACE).
Available in Mac OS X v10.0 and later.
Declared in NSFont.h.
NSNullGlyphA null glyph.
Available in Mac OS X v10.0 and later.
Declared in NSFont.h.
NSFont.hThese constants are used as keys retrieve information from an AFM dictionary. (Deprecated. The AFM dictionary is no longer used in Mac OS X. Use the font metrics accessor methods listed with the individual constants instead.)
NSString *NSAFMFamilyName; NSString *NSAFMFontName; NSString *NSAFMFormatVersion; NSString *NSAFMFullName; NSString *NSAFMNotice; NSString *NSAFMVersion; NSString *NSAFMWeight; NSString *NSAFMEncodingScheme; NSString *NSAFMCharacterSet; NSString *NSAFMCapHeight; NSString *NSAFMXHeight; NSString *NSAFMAscender; NSString *NSAFMDescender; NSString *NSAFMUnderlinePosition; NSString *NSAFMUnderlineThickness; NSString *NSAFMItalicAngle; NSString *NSAFMMappingScheme;
NSAFMFamilyNameFont family name key. (Deprecated. Use familyName instead.)
Available in Mac OS X v10.0 and later.
Deprecated in Mac OS X v10.4.
Not available to 64-bit applications.
Declared in NSFont.h.
NSAFMFontNameFont name key. (Deprecated. Use displayName instead.)
Available in Mac OS X v10.0 and later.
Deprecated in Mac OS X v10.4.
Not available to 64-bit applications.
Declared in NSFont.h.
NSAFMFormatVersionFormat version name key. (Deprecated. This information is not relevant to Mac OS X.)
Available in Mac OS X v10.0 and later.
Deprecated in Mac OS X v10.4.
Not available to 64-bit applications.
Declared in NSFont.h.
NSAFMFullNameFull font name key. (Deprecated. Use fontName instead.)
Available in Mac OS X v10.0 and later.
Deprecated in Mac OS X v10.4.
Not available to 64-bit applications.
Declared in NSFont.h.
NSAFMNoticeFont notice key. (Deprecated. Use Apple Type Services instead.)
Available in Mac OS X v10.0 and later.
Deprecated in Mac OS X v10.4.
Not available to 64-bit applications.
Declared in NSFont.h.
NSAFMVersionFont version key. (Deprecated. Use Apple Type Services instead.)
Available in Mac OS X v10.0 and later.
Deprecated in Mac OS X v10.4.
Not available to 64-bit applications.
Declared in NSFont.h.
NSAFMWeightFont weight key. (Deprecated. Use the NSFontManager method weightOfFont: instead.)
Available in Mac OS X v10.0 and later.
Deprecated in Mac OS X v10.4.
Not available to 64-bit applications.
Declared in NSFont.h.
NSAFMEncodingSchemeFont encoding scheme key. (Deprecated. Use mostCompatibleStringEncoding instead.)
Available in Mac OS X v10.0 and later.
Deprecated in Mac OS X v10.4.
Not available to 64-bit applications.
Declared in NSFont.h.
NSAFMCharacterSetFont character set key. (Deprecated. Use coveredCharacterSet instead.)
Available in Mac OS X v10.0 and later.
Deprecated in Mac OS X v10.4.
Not available to 64-bit applications.
Declared in NSFont.h.
NSAFMCapHeightFont cap-height key. (Deprecated. Use capHeight instead.)
Available in Mac OS X v10.0 and later.
Deprecated in Mac OS X v10.4.
Not available to 64-bit applications.
Declared in NSFont.h.
NSAFMXHeightFont x-height key. (Deprecated. Use xHeight instead.)
Available in Mac OS X v10.0 and later.
Deprecated in Mac OS X v10.4.
Not available to 64-bit applications.
Declared in NSFont.h.
NSAFMAscenderFont ascender height key. (Deprecated. Use ascender instead.)
Available in Mac OS X v10.0 and later.
Deprecated in Mac OS X v10.4.
Not available to 64-bit applications.
Declared in NSFont.h.
NSAFMDescenderFont descender depth key. (Deprecated. Use descender instead.)
Available in Mac OS X v10.0 and later.
Deprecated in Mac OS X v10.4.
Not available to 64-bit applications.
Declared in NSFont.h.
NSAFMUnderlinePositionFont underline rule position key. (Deprecated. Use underlinePosition instead.)
Available in Mac OS X v10.0 and later.
Deprecated in Mac OS X v10.4.
Not available to 64-bit applications.
Declared in NSFont.h.
NSAFMUnderlineThicknessFont underline rule thickness key. (Deprecated. Use underlineThickness instead.)
Available in Mac OS X v10.0 and later.
Deprecated in Mac OS X v10.4.
Not available to 64-bit applications.
Declared in NSFont.h.
NSAFMItalicAngleFont italic angle key. (Deprecated. Use italicAngle instead.)
Available in Mac OS X v10.0 and later.
Deprecated in Mac OS X v10.4.
Not available to 64-bit applications.
Declared in NSFont.h.
NSAFMMappingSchemeFont mapping scheme key. (Deprecated. This information is irrelevant to Mac OS X.)
Available in Mac OS X v10.0 and later.
Deprecated in Mac OS X v10.4.
Not available to 64-bit applications.
Declared in NSFont.h.
NSFont.hThis type is used to specify glyphs in such methods as glyphWithName:.
typedef unsigned int NSGlyph;
NSFont.hThese constants are used for calculating the layout of stacked glyphs. (Deprecated. Context-sensitive interglyph spacing is now performed at the typesetting stage)
typedef enum _NSGlyphRelation { NSGlyphBelow = 1, NSGlyphAbove = 2 } NSGlyphRelation;
NSGlyphBelowThe glyph is located below the base glyph. (Deprecated. Context-sensitive interglyph spacing is now performed at the typesetting stage.)
Available in Mac OS X v10.0 and later.
Declared in NSFont.h.
NSGlyphAboveThe glyph is located above the base glyph. (Deprecated. Context-sensitive interglyph spacing is now performed at the typesetting stage.)
Available in Mac OS X v10.0 and later.
Declared in NSFont.h.
NSFont.hGlyph packing constants are used to extract glyphs from a font for making a multibyte (or single-byte) array of glyphs for passing to an interpreter, such as the window server. With Quartz, the engine always expects the format to be in 2-byte short array, so NSNativeShortGlyphPacking is the only format currently in use. (Deprecated. Use NSNativeShortGlyphPacking instead.)
enum {
NSOneByteGlyphPacking,
NSJapaneseEUCGlyphPacking,
NSAsciiWithDoubleByteEUCGlyphPacking,
NSTwoByteGlyphPacking,
NSFourByteGlyphPacking,
}
NSOneByteGlyphPackingOne-byte storage format. (Deprecated. Use NSNativeShortGlyphPacking instead.)
Available in Mac OS X v10.0 and later.
Declared in NSFont.h.
NSJapaneseEUCGlyphPackingExtended Unix Code for Japanese format. (Deprecated. Use NSNativeShortGlyphPacking instead.)
Available in Mac OS X v10.0 and later.
Declared in NSFont.h.
NSAsciiWithDoubleByteEUCGlyphPackingTwo-byte Extended Unix Code format. (Deprecated. Use NSNativeShortGlyphPacking instead.)
Available in Mac OS X v10.0 and later.
Declared in NSFont.h.
NSTwoByteGlyphPackingTwo-byte storage format. (Deprecated. Use NSNativeShortGlyphPacking instead.)
Available in Mac OS X v10.0 and later.
Declared in NSFont.h.
NSFourByteGlyphPackingFour-byte storage format. (Deprecated. Use NSNativeShortGlyphPacking instead.)
Available in Mac OS X v10.0 and later.
Declared in NSFont.h.
NSFont.h
Posted after the threshold for anti-aliasing changes.
NSFont.h
Posted after the the currently-set font changes.
NSFont.h
© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-06-08)