Usage

Syntax: gettextwidth(float zoom, string font, string style, string text);
Returns integer.

Explanation

Returns the horizontal size of a text with the specified properties.
Typically used in conjunction with showtext.

Example

function onCreated()
{
  //The width of bolded text "foobar" with font Arial and zoom factor 1.5.
  echo(gettextwidth(1.5, "Arial", "b", "foobar"));
}

... Will echo 103.

Categories

CategoryFunctionClientside
Comments [Hide comments/form]
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki