Who Should Read This Document
Organization of This Document
See Also
Text Attributes describes the text-related attributes maintained by the Cocoa text system. Text attributes provide the distinguishing characteristics of rich text and other formatting information for paragraphs and documents.
You should read this document to understand the different types of text attributes in the text system, especially if you deal directly with attributed strings and need to understand how the text system manages their attributes.
To understand the information in this document, you should have prior general knowledge of the text system’s capabilities and architecture, as well as basic Cocoa programming conventions.
This document includes the following articles:
“About Text Attributes” introduces and defines the five types of text-related attributes used in Cocoa. It also provides cross-references to more detailed documentation.
“Setting Text Attributes” explains how you can programmatically set the attributes of text displayed in a text view object using the methods of NSTextView and its superclass NSText.
“Accessing Attributes” describes the attributes stored with an attributed string and explains how to manipulate them.
“Changing an Attributed String” describes the methods available to alter the characters and attributes of an NSMutableAttributedString. This article also discusses attribute fixing.
“Plain and Rich Text Objects” discusses text attributes of the rich text format (RTF) standard recognized by text objects.
“RTF Files and Attributed Strings” explains how to read and write character and document attributes to RTF files.
For more information, refer to the following documents:
Text System Overview provides more information about how the text system stores and manipulates text.
Attributed Strings Programming Guide presents more detailed information about text strings and attributes.
© 1997, 2004 Apple Computer, Inc. All Rights Reserved. (Last updated: 2004-02-16)