SystemFonts

public static class SystemFonts
Methods to get information about current fonts installed the running system

Methods

Bold

#
public static Font Bold(float? size = null, FontDecoration decoration = FontDecoration.None)
Gets the system bold font with optional specified size and decoration.
size (float? = null)Size for the font, or null for the default system font size.
decoration (FontDecoration = FontDecoration.None)Decorations to add to the font.

Cached

#
public static Font Cached(SystemFont systemFont, float? size = null, FontDecoration decoration = FontDecoration.None)
Gets a cached font
systemFont (SystemFont)System font to get
size (float? = null)Size in points of the font
decoration (FontDecoration = FontDecoration.None)Decorations to apply to the font

ClearCache

#
public static void ClearCache()
Clears the font cache
Remarks: This is useful if you are using the Cached(SystemFont, float?, FontDecoration) method to cache fonts and want to clear it to conserve memory or resources.

Default

#
public static Font Default(float? size = null, FontDecoration decoration = FontDecoration.None)
Gets the system default font with optional specified size and decoration.
size (float? = null)Size for the font, or null for the default system font size.
decoration (FontDecoration = FontDecoration.None)Decorations to add to the font.

Label

#
public static Font Label(float? size = null, FontDecoration decoration = FontDecoration.None)
Gets the system label font with optional specified size and decoration.
size (float? = null)Size for the font, or null for the default system font size.
decoration (FontDecoration = FontDecoration.None)Decorations to add to the font.

Message

#
public static Font Message(float? size = null, FontDecoration decoration = FontDecoration.None)
Gets the system message box font with optional specified size and decoration.
size (float? = null)Size for the font, or null for the default system font size.
decoration (FontDecoration = FontDecoration.None)Decorations to add to the font.

Palette

#
public static Font Palette(float? size = null, FontDecoration decoration = FontDecoration.None)
Gets the system palette font with optional specified size and decoration.
size (float? = null)Size for the font, or null for the default system font size.
decoration (FontDecoration = FontDecoration.None)Decorations to add to the font.

StatusBar

#
public static Font StatusBar(float? size = null, FontDecoration decoration = FontDecoration.None)
Gets the system status bar font with optional specified size and decoration.
size (float? = null)Size for the font, or null for the default system font size.
decoration (FontDecoration = FontDecoration.None)Decorations to add to the font.

TitleBar

#
public static Font TitleBar(float? size = null, FontDecoration decoration = FontDecoration.None)
Gets the system title bar font with optional specified size and decoration.
size (float? = null)Size for the font, or null for the default system font size.
decoration (FontDecoration = FontDecoration.None)Decorations to add to the font.

ToolTip

#
public static Font ToolTip(float? size = null, FontDecoration decoration = FontDecoration.None)
Gets the system tooltip font with optional specified size and decoration.
size (float? = null)Size for the font, or null for the default system font size.
decoration (FontDecoration = FontDecoration.None)Decorations to add to the font.

User

#
public static Font User(float? size = null, FontDecoration decoration = FontDecoration.None)
Gets the user font with optional specified size and decoration.
Remarks: On macOS, the system font isn't normally a font that the user would select or use, other than for user interface elements. This should be used instead as the starting font for the user to select.
size (float? = null)Size for the font, or null for the default system font size.
decoration (FontDecoration = FontDecoration.None)Decorations to add to the font.