Actions
Added in 1.9.1
$width(text,font,size,[B],[C],[D])
Returns width of text in pixels for the specified font.
If you use a negative number for the font size, it will match the size of fonts in the font dialogs.
Parameters
Parameter | Description |
text | Text to measure. |
font | Font to measure. |
size | Font size to measure. |
[B] | If B is non-zero, the font is bold. (optional) |
[C] | If C is non-zero, control codes are processed. (optional) |
[D] | TODO |
Example
; Measure the width of text 'Hello World' using font 'Verdana 9'. //echo -ag $width(Hello world, Verdana, 9)
Updated by Per Amundsen over 1 year ago · 3 revisions