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 2 - TextEdit / TextEdit Reference
Data Structures


The Line Height Table

The line height table holds vertical spacing information for the text of an edit record. This table parallels the lineStarts array in the edit record itself. Its length equals the edit record's nLines field plus 1 for a dummy entry at the end, just as the lineStarts array ends with a dummy entry that has the same value as the length of the text. The table's contents are recalculated whenever the line starting values are themselves recalculated with the TECalText routine or whenever an editing action causes recalibration.

The line height table is used only if the lineHeight and fontAscent fields in the edit record are negative; positive values in those fields specify fixed vertical spacing, overriding the information in the table. The line height table is of type LHTable, which is an array of elements of LHElement.

TYPE LHElement = 
   RECORD
      lhHeight:      Integer;    {maximum height in line}
      lhAscent:      Integer;    {maximum ascent in line}
   END;

LHPtr = ^LHTable;
LHHandle = ^LHPtr;

LHTable = ARRAY [0..8000] OF LHElement;
Field Description
lhHeight
The line height in points. This is the maximum value for any individual character attribute in the line.
lhAscent
The font ascent in points; this is the maximum value for any individual character attribute in a line.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996