a2GetLineHeight()

This function returns the line height of an Advanced 2D font.

  Syntax
Return Integer = a2GetLineHeight(fontID)
  Parameters
fontID
Integer
The ID number assigned to an Advanced 2D font when it is created.
  Returns

Returns the line height in pixels of the specified font.

  Description

This function returns the line height of an Advanced 2D font. Knowing the line height allows arranging multiple lines of text correctly. Note that the value is interpreted using the sizeMode and style values of the font.

  Example Code
myFont1 = a2CreateFont("ariel", 30, a2Size_Cell(), a2Style_Normal())
myFont2 = a2CreateFont("ariel", 30, a2Size_Char(), a2Style_Normal())
myFont3 = a2CreateFont("ariel", 30, a2Size_Point(), a2Style_Normal())

print "Line Height of font size 30 with a2Size_Cell() is ";a2GetLineHeight(myFont1);" pixels."
print "Line Height of font size 30 with a2Size_Char() is ";a2GetLineHeight(myFont2);" pixels."
print "Line Height of font size 30 with a2Size_Point() is ";a2GetLineHeight(myFont3);" pixels."

WAIT KEY
  See also

a2CreateFont
a2GetTextWidth
Advanced 2D Index
Main Menu