SystemFonts::GetFontByName Method (String^)

 

Returns a font object that corresponds to the specified system font name.

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

public:
static Font^ GetFontByName(
	String^ systemFontName
)

Parameters

systemFontName
Type: System::String^

The name of the system font you need a font object for.

Return Value

Type: System.Drawing::Font^

A Font if the specified name matches a value in SystemFonts; otherwise, null.

The GetFontByName method returns null if the specified name does not match a font in the SystemFonts enumeration.

.NET Framework
Available since 2.0
Return to top
Show: