Xceed Words for .NET v4.0 Documentation
GetTextHeight Method


Xceed.Drawing.NET Assembly > Xceed.Drawing Namespace > Font Class : GetTextHeight Method
The text that will be evaluated.
The Name of the Font that will be used to calculate the text's height.
The Size of the Font that will be used to calculate the text's height.
The text block's width.
Calculates the text's height, based on the Font's NameSize, as well as the text block's width.  
Syntax
'Declaration
 
Public Shared Function GetTextHeight( _
   ByVal text As String, _
   ByVal fontName As String, _
   ByVal fontSize As Single, _
   ByVal columnWidthInPixels As Integer _
) As Single
'Usage
 
Dim text As String
Dim fontName As String
Dim fontSize As Single
Dim columnWidthInPixels As Integer
Dim value As Single
 
value = Font.GetTextHeight(text, fontName, fontSize, columnWidthInPixels)
public static float GetTextHeight( 
   string text,
   string fontName,
   float fontSize,
   int columnWidthInPixels
)

Parameters

text
The text that will be evaluated.
fontName
The Name of the Font that will be used to calculate the text's height.
fontSize
The Size of the Font that will be used to calculate the text's height.
columnWidthInPixels
The text block's width.
Remarks
Note that the Text will wrap when reaching the value of the columnWidthInPixels parameter.
Requirements

Target Platforms: Windows 11, Windows 10, Windows 7, Windows, 11, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Font Class
Font Members