TextAttribs

(Engine-Level Function)

Description: Returns graphic-related information about a text, given a font.
Returns: Numeric
Usage: Script or steady state.
Function Groups: Graphics
Related to: GUIText | Output | ZText
Format:  TextAttribs(Text, Font, Option)
Parameters:  
Text
Required. Any text expression.
Font
Required. Any font expression.
Option
Required. Any numeric expression for the desired parameter:

Option

Parameter

0

Width of text in pixels

1

Height of text in pixels

Example:

width = TextAttribs("Testing" { Text to display },
                    Font("ARIAL", 0, 16, 0, 5, 0, 0) { Font },
                    0 { Width in user coordinates });

The value of width will be 61, which is the width of the given text string in the given font.

Pixels are assumed to have a dpi size of 96.