Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Text /
Chapter 3 - QuickDraw Text


About QuickDraw Text

Text on the Macintosh is graphical. This section provides an overview of how to draw text using the text-handling components of QuickDraw. These routines let you direct how the text is to be rendered and drawn, while insulating your application from the low-level implementation details.

Whether for onscreen display or to be printed, you always draw text in the context of a graphics port. To draw the text, QuickDraw displays the bitmap of each glyph on the display device. Although QuickDraw displays the text, you define how the text is to be rendered by setting the text-drawing parameters in the graphics port record. Text rendering is the process of portraying the text according to its character attributes, such as the font, font size, and style. You use the character attribute information associated with the text to set up the drawing environment each time you draw a segment of text that begins a new style run. A style run is a sequence of text that is all in the same script system, font, size, and style.

QuickDraw routines let you accept keyboard input or gain access to existing text stored in memory. In general, the tasks that you need to perform to draw text on the Macintosh are easier if your store the text as a simple sequence of character codes separate from all the character attribute information that describes how QuickDraw is to render the stored text. (For an example of how to define data structures to store the character attribute information, you can look at the TextEdit data structures used for this purpose; see the chapter "TextEdit" in this book.)


Subtopics
Graphics Ports and Text Drawing
QuickDraw Text, Script Systems, and Other Managers
Text Formatting and Justification
Scaling
Carets and Highlighting

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996