Edit

Share via


SystemFonts Class

Definition

Specifies the fonts used to display text in Windows display elements.

C#
public static class SystemFonts
C#
public sealed class SystemFonts
Inheritance
SystemFonts

Remarks

Each property of the SystemFonts class returns a Font used to display text in a particular Windows display element, such as the title bar of a window. These fonts reflect the current settings in Control Panel.

Note

In .NET 6 and later versions, the System.Drawing.Common package, which includes this type, is only supported on Windows operating systems. Use of this type in cross-platform apps causes compile-time warnings and run-time exceptions. For more information, see System.Drawing.Common only supported on Windows.

Properties

CaptionFont

Gets a Font that is used to display text in the title bars of windows.

DefaultFont

Gets the default font that applications can use for dialog boxes and forms.

DialogFont

Gets a font that applications can use for dialog boxes and forms.

IconTitleFont

Gets a Font that is used for icon titles.

MenuFont

Gets a Font that is used for menus.

MessageBoxFont

Gets a Font that is used for message boxes.

SmallCaptionFont

Gets a Font that is used to display text in the title bars of small windows, such as tool windows.

StatusFont

Gets a Font that is used to display text in the status bar.

Methods

GetFontByName(String)

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

Applies to

Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10