Standard Attributes

The identifiers listed in Table 1 are global NSString constants containing the attribute names. The value class is the class of the value corresponding to that attribute.

Table 1  Table of standard attributes

Attribute Identifier

Value Class

Default Value

NSAttachmentAttributeName

NSTextAttachment

none (no attachment)

NSBackgroundColorAttributeName

NSColor

none (no background)

NSBaselineOffsetAttributeName

NSNumber, as a float

0.0

NSFontAttributeName

NSFont

Helvetica 12-point

NSForegroundColorAttributeName

NSColor

black

NSKernAttributeName

NSNumber, as a float

0.0

NSLigatureAttributeName

NSNumber, as an int

1 (standard ligatures)

NSLinkAttributeName

id

none (no link)

NSParagraphStyleAttributeName

NSParagraphStyle

(as returned by NSParagraphStyle’s defaultParagraphStyle method)

NSSuperscriptAttributeName

NSNumber, as an int

0

NSUnderlineStyleAttributeName

NSNumber, as an int

none (no underline)

The natures of several attributes are not obvious from name alone: