line-height table
LHElement structure
#include <TextEdit.h>
typedef struct LHElement { Size Offset Description
short lhHeight; 2 0 Height of this line, in points (bit 15
masked)
short lhAscent; 2 2 Ascent of tallest character in this line
typedef LHElement LHTable[8001]; max 4-byte elements in line height table
typedef LHElement *LHPtr;
typedef LHElement **LHHandle;

Notes: The LHElement structure describes the height of a single line of edit text.
The data lead to by the lhTab field of the TEStyleRec structure is a list of
these LHElements. The list parallels the data in the lineStarts array which
is part of the TERec structure. It is not used directly in any TextEdit
function, but it is used to derive values returned by TEGetHeight.
When a font size changes the height of some text on a particular line (e.g.,
via TESetStyle), then the new maximum is calculated for that line and
stored in the line height table.
It is permitted to manipulate this table youself, overriding the normal
height calculations. When the high bit of lhHeight is set, then TextEdit will
use the low 15 bits as a "fixed height" and will not perform calculations to
modify it. For instance:
LHHandle hLH;
LHPtr pLH;
TEStyleHandle hTEStyle;
hTEStyle = GetStylHandle( hTE);
hLH = (*hTEStyle)->lhTab;
pLH = *hLH;
pLH[17].lhHeight = 22 | 0x8000; // fix line height at 22 points
This technique is handy for lines which will not be changed. If the line
grows in length or is otherwised forced to wrap, TextEdit will not honor
your setting (it will calculate the height if the "wrapped" portion).
Note that the line-height table is used only when TERec.lineHeight and
TERec.fontAscent are -1 (as set by TEStylNew).