This documentation is archived and is not being maintained.

Font.Font(String, Single, FontStyle) Constructor

Initializes a new Font using a specified size and style.

Namespace: System.Drawing
Assembly: System.Drawing (in system.drawing.dll)

public Font (
	string familyName,
	float emSize,
	FontStyle style
public Font (
	String familyName, 
	float emSize, 
	FontStyle style
public function Font (
	familyName : String, 
	emSize : float, 
	style : FontStyle
Not applicable.



A string representation of the FontFamily for the new Font.


The em-size, in points, of the new font.


The FontStyle of the new font.

Exception typeCondition


emSize is less than or equal to 0, evaluates to infinity, or is not a valid number.

The resulting font has its Unit property set to Point. Windows Forms applications support TrueType fonts and have limited support for OpenType fonts. If the familyName parameter specifies a font that is not installed on the machine running the application or is not supported, Microsoft Sans Serif will be substituted.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0