Important: The information in this document is obsolete and should not be used for new development.
Inherits from | |
Implements | |
Package | com.apple.cocoa.application |
Availability | Available in Mac OS X v10.3 and later. |
Companion guide |
NSFontDescriptor objects provide a mechanism to describe a font with a dictionary of attributes. This font descriptor can be used later to create or modify an NSFont object.
All attributes in the attributes dictionary are optional.
Creates an empty NSFontDescriptor.
public NSFontDescriptor
()
Creates an NSFontDescriptor with a dictionary of attributes.
public NSFontDescriptor
(NSDictionary attributes)
If attributes is null
, the font descriptor’s dictionary will be empty.
Returns the receiver’s dictionary of attributes.
public NSDictionary fontAttributes
()
The following font attributes are defined by NSFontDescriptor:
Attribute Identifier |
Value Class |
Default Value |
---|---|---|
String |
None (optional) |
|
String |
None (optional) |
|
String |
None (optional) |
|
String, as a float |
None (optional) |
|
String |
None (optional) |
|
|
NSData |
None (optional) |
© 1997, 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-02-01)