PDFView4NET WinForms Edition
GetCharWidth Method (PDFFont)




O2S.Components.PDFView4NET.Graphics.Fonts Namespace > PDFFont Class : GetCharWidth Method
the char to get its width
Gets the width of the given character when drawn with this font object.
Syntax
'Declaration
 
Public Overrides Function GetCharWidth( _
   ByVal charCode As Char _
) As Double
'Usage
 
Dim instance As PDFFont
Dim charCode As Char
Dim value As Double
 
value = instance.GetCharWidth(charCode)
public override double GetCharWidth( 
   char charCode
)
public: double GetCharWidth( 
   char charCode
) override 
public:
double GetCharWidth( 
   char charCode
) override 

Parameters

charCode
the char to get its width

Return Value

This method returns a double value that represents the width, in unscaled glyph units, of the given character.
Remarks
To scale this value to font's current size, divide it by 1000 and multiply it by font size. For example, if font size is 20pt, then the width, in points, of a character for this font is 20 * GetCharWidth( charCode ) / 1000.
Requirements

Target Platforms: Windows 7, 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

PDFFont Class
PDFFont Members