Difference between revisions of "$width"
From Scriptwiki
m |
|||
(One intermediate revision by one other user not shown) | |||
Line 13: | Line 13: | ||
== See Also == | == See Also == | ||
+ | * [[$wrap]] | ||
* [[font|/font]] | * [[font|/font]] | ||
[[Category:Picture Windows]] | [[Category:Picture Windows]] | ||
+ | [[Category:Identifiers]] |
Latest revision as of 09:41, 3 February 2011
Returns width of text in pixels for the specified font.
$width(text,font,size,B,C)
If B is non-zero, the font is bold, if C is non-zero, control codes are processed. Both B and C are optional.
Note: If you use a negative number for the font size, it will match the size of fonts in the font dialog.
Example
$width(Lorem ispum,Arial,12)
Returns 74.