hiTextWidth
hiTextWidth(S_fontType t_text) =>x_width/nil
Description
Determines the width, in pixels, of a string of characters that has a specified font. Returns nil if the font type is not valid.
Arguments
|
Type of the font you want to use.
|
|
Values Returned
Examples
Returns the width, 119 of the text string.
hiTextWidth( 'text "This is a string." )
=> 119
Returns the width, 84 of the text string.
hiTextWidth( "label" "This is a string." )
=> 84
Returns nil as the font type is not valid.
hiTextWidth( "notafont" "This is a string." )
=> *WARNING* hiiGetTextWidth: Invalid font type "notafont", must be "text" or "label".
Related Topics
Return to top