GRAPHIC CELL SIZE statement  

Purpose

Retrieve the character cell size including external leading.

Syntax

GRAPHIC CELL SIZE TO WidthVar!, HeightVar!

Function Form:

WidthVar!  = GRAPHIC(Cell.Size.X)

HeightVar! = GRAPHIC(Cell.Size.Y)

Remarks

GRAPHIC CELL SIZE retrieves the size of one character cell, for the current font, on the attached graphic target.  The returned character size is specified in PAGE UNITS, and allows you to calculate the number of text lines which will fit in a particular space.  The height value is the size of the displayed character, including external leading (if any) for this particular font.

If the font is a fixed-width font, like Courier New or Lucida Console,the sizes returned are as exact as possible, given the fractional rounding approximations necessary for some scaled units.  If the font is proportional, like Arial or Times New Roman, the width will be the average size for the entire font.

External leading is the vertical distance from the bottom of one character to the top of the character below it.  This value is specified by the font in use.  It may vary from zero to a larger value, depending upon the font and point size.  To retrieve the exact height of characters without external leading, use GRAPHIC CHR SIZE.

See also

GRAPHIC CELL, GRAPHIC CHR SIZE, GRAPHIC SET FONT, GRAPHIC TEXT SIZE