'Declaration
Public Overloads Function GetTextHeight( _ ByVal FontResName As String, _ ByVal TextSize As Single, _ ByVal UseFontBox As Boolean _ ) As Single
public float GetTextHeight( string FontResName, float TextSize, bool UseFontBox )
public function GetTextHeight( FontResName: String; TextSize: Single; UseFontBox: Boolean ): Single;
public function GetTextHeight( FontResName : String, TextSize : float, UseFontBox : boolean ) : float;
public: float GetTextHeight( string* FontResName, float TextSize, bool UseFontBox )
public: float GetTextHeight( String^ FontResName, float TextSize, bool UseFontBox )
Parameters
- FontResName
- The resource name of the font you prefer.
You can easily obtain this name using the GdPicturePDF.AddStandardFont method or any of the AddTrueTypeFont...() methods. For further assistance, please see the section Fonts of the GdPicturePDF class in the Reference Guide.
- TextSize
- The size of the text (the font size actually), in points.
- UseFontBox
- Set this parameter to true if you want to determine the font height by using the font boundary box. It is an imaginary box that encloses all glyphs from the font, usually as tightly as possible. It is represented by four parameters.
Set this parameter to false if you want to determine the font height by using the font's ascent and descent properties. The ascent property is the distance from the baseline to the highest grid coordinate used to place an outline point, the descent property to the lowest grid coordinate.
Return Value
The GdPicturePDF.GetStat method can be subsequently used to determine if this method has been successful.