|
|
|
|
|
- Calculating the height of a text written with fonts of different sizes
- Calculating the height of a text containing CR characters
iTextHeight (Function) In french: iHauteurTexte Calculates the height of the font for the text to print (in millimeters).
x is int = iTextHeight(iFont(2) + CU.CUSTNAME) iPrintWord("The height of customer name is equal to: ") iPrint(x) iEndPrinting()
Syntax
<Result> = iTextHeight([<Font identifier> + ] <Text to print>)
<Result>: Real - Height of specified text (in millimeters) if the print is performed,
- -1 if the print was canceled before running the function.
<Font identifier>: Optional character string Identifier of the font used, returned by iFont. If this parameter is not specified, the last font used will be selected. <Text to print>: Character string Character string whose height is requested.
Caution: a height is returned even if the text to print corresponds to an empty string. Remarks Calculating the height of a text written with fonts of different sizes You must call iTextHeight for each text that uses a different font. Calculating the height of a text containing CR characters iTextHeight ignores the CR characters found in the text. You must count the number of CR characters in order to add as many times the text height to get the total height.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|