OutlineMetrics
awArray, lsbArray, boundsArray );
Short byteCount; The number of bytes
void *textPtr; The pointer to the block of text
Point denom ; Denominator of scaling ratio short *yMax; The maximum y-value for the text. Pass NULL in
this parameter if you don't want this value returned.
short *yMin; The minimum y-value for the text. Pass NULL in
this parameter if you don't want this value returned.
FixedPtr awArray; A pointer to the array of advanced width
measurements for the glyphs being considered
FixedPtr lsbArray; A pointer to an array of the left-side bearing
measurements for the glyphs being considered
RectPtr boundsArray; Pointer to array of bounding boxes for the glyphs
being considered
returns 0 = noErr
You can use the OutlineMetrics function to determine the measurements, such as heights or advance widths, of the glyphs in any line of text you choose.
On the basis of these measurements, you can decide whether to use
grafPort record are scaled.
the maximum y- value, minimum y- value, advance widths, left-side bearings,
and bounding boxes for this text only in the current font, point size, and font
these measurements when laying out text. You may need to adjust line spacing
Parameter descriptions
function to work.
textPtr The pointer to the block of text you are providing to
numer The numerators of the vertical and horizontal scaling factors. The numer parameter is of type Point, and contains two integers-the first is the numerator of the ratio for vertical scaling; the second
is the numerator of the ratio for horizontal scaling. The
Font Manager applies the font scaling factors to the font used in the current grafPort in order to calculate the measurements for
the glyphs in the block of text.
denom The denominators of the vertical and horizontal scaling factors.
The denom parameter is of type Point, and contains two integers-the first is the denominator of the ratio for vertical
scaling; the second is the denominator of the ratio for horizontal
scaling. The Font Manager applies the font scaling factors to the font used in the current grafPort in order to calculate the
measurements for the glyphs in the block of text.
yMax The maximum y-value for the text. Pass NULL in this parameter
if you don't want this value returned.
yMin The minimum y-value for the text. Pass NULL in this parameter if
you don't want this value returned.
awArray A pointer to an array of the advance width measurements for the
glyphs being considered. These measurements are in pixels, based
on the point size and font scaling factors of the font used by the
current grafPort record. The number of entries in the array is
given by the byteCount parameter.
The awArray parameter is of type FixedPtr. The FixedPtr data
type is a pointer to an array, and each entry in the array is of type
Fixed, which is 4 bytes in length. Multiply byteCount by 4 to calculate the memory you need in bytes. Allocate the memory needed
for the array and pass a pointer to the array in the awArray
parameter.
If the FractEnable global variable has been set to TRUE using the fractional character widths. If FractEnable has been set to FALSE,
the Font Manager returns integers for the advance widths, with 0 in the decimal part of the values.
Pass a NIL in this parameter if you don't want the advance width
values returned.
lsbArray A pointer to an array of the left-side bearing measurements for
the glyphs being considered. The measurements are in pixels, based
on the point size of the font used by the current grafPort record.
The number of entries in the array is given by the byteCount
parameter.
The lsbArray parameter is of type FixedPtr. The FixedPtr data
type is a pointer to an array, and each entry in the array is of type
Fixed, which is 4 bytes in length. Multiply byteCount by 4 to calculate the memory you need in bytes. Allocate the memory needed
for the array and pass a pointer to the array in the lsbArray
parameter. The left-side bearing values are never rounded.
Pass a NIL in this parameter if you don't want the left-side
bearing values returned.
boundsArray A pointer to the array of bounding boxes for the glyphs being
considered. Bounding boxes are the smallest rectangles that fit
around the pixels of the glyph. The bounding box measurements
for the actual glyph. The number of entries in the array is given by
the byteCount parameter.
The boundsArray parameter is of type RectPtr. The RectPtr data
type is a pointer to QuickDraw 's Rect data type, which is 8 bytes in length. Multiply byteCount by 8 to calculate the memory you
need in bytes. Allocate the memory needed for the array and pass a
pointer to the array in the boundsArray parameter.
Pass a NIL in this parameter if you don't want the bounding box
values returned.
Result codes