getTextHeight()

ICE Data Services -

getTextHeight()
Previous  Top  Next

getTextHeight( text [, fontName] [, fontSize] )

Returns the height of text in pixels.

Parameters

text
the string to evaluate
fontName
optional. the name of the font to use
fontSize
optional. the font size to use

Usage
function main() {
   var myVar;

   ...
   ...

   //return the height, in pixels of the letter Y in
   //the Arial font with a size of 24
   myVar = getTextHeight( "Y", "Arial", 24 );
}

getTextWidth()