Text layout and display
When you create editable text components, the Text Editing framework formats and displays the encapsulated text according to the display area and the associated styling information. The Text Editing framework uses two mechanisms for text formatting and display:
- The text formatter, part of the Text Editing framework, is the high-level formatting mechanism. The formatter lays out text by fitting it into text panels. Based on the size of the panel and the current paragraph and character styles, the text formatter calculates how to break the text into lines.
- The Line Layout system, not formally part of the Text Editing framework, formats and displays lines of text. The text formatter uses the Line Layout system to lay out and display individual lines within a text panel. The Line Layout class TTextLineLayout is responsible for measuring, hit-testing, and displaying single lines of text.
The Text Editing framework also uses font substitution processing to ensure that every character a user types into an editable text element has a corresponding displayable glyph. The section "Font substitution" on page 75 describes this mechanism.
The Text Editing framework was designed to provide standard formatting behavior appropriate for a range of editable text elements. If you want to provide different formatting behavior, the Text Editing framework includes abstract formatting protocol that you can use as the basis for your own text formatter. The text formatter interfaces and the Line Layout system are described in more detail in Chapter 6, "Advanced text layout features."
NOTE
For the current release, the text formatter supports only formatting text elements based on a single, fixed-width area. In a future release, the formatter will allow you to specify the width of the area and to create sequences of panels of different sizes within a single text component.
[Contents]
[Previous]
[Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.
Generated with WebMaker