DrawText
DrawText Draw text from any arbitrary buffer
#include <Quickdraw.h> Quickdraw
void DrawText(textBuf, byteOff, byteCnt );
Ptr textBuf ; address of start of buffer containing text
short byteOff ; position in buffer of first character to draw
short byteCnt ; number of characters to draw
DrawText draws characters from an unformatted buffer. Use this if the text
is not a pascal-style string. No line-formatting is performed.
textBuf is the address of a buffer containing ASCII characters. The buffer
may be up to 64K bytes long.
byteOff is the offset from the start of textBuf of the first character to draw.
byteCnt specifies the number of characters you wish to draw.
Returns: none

Notes: DrawText works like DrawString, except that text can come from any
type of buffer. You may use this to draw strings longer than 255 bytes and
there is no preprocessing step to convert the text into a length-prefixed
Pascal-style string.
This function does no special line-formatting. Linefeeds, carriage returns,
tab characters, etc., are treated like other characters and will probably be
displayed as the font's "missing" symbol. Drawing is clipped to the existing
clipping regions and text does NOT wrap at the end of a line.
Warning: This function temporarily stores byteCnt characters on the
stack, even if the resulting output will be clipped. Use TextWidth to
learn how much of the string will fit on the screen.
You may prefer to use this function for displaying C-style strings:
char myMsg[] = "This is a null-terminated C string";
DrawText( myMsg, 0, strlen( myMsg ) );
This is also useful for displaying data from a 'TEXT' resource. You may
need to lock the resource on the heap before dereferencing the handle and
unlock it after using it. Example:
#define MYMSG_RSCID 128 /* or whatever the ID is */
Handle myTextH;
myTextH = GetResource( 'TEXT', MYMSG_RSCID );
HLock( myTextH ); [TOKEN:12074] so data won't move */
DrawText( *myTextH, 0, GetHandleSize (myTextH) );
HUnlock( myTextH );