OsFonts

public static class OsFonts
The fonts the operating system uses for its own interface, for Grasshopper to draw with.
Remarks: This mirrors SystemFonts, but every call constructs a font of its own rather than handing out one from the platform-wide cache SystemFonts keeps. Grasshopper needs its own instance so that it can ask to be measured independently of the resolution, see TextRendering.ResolutionIndependentStyle - styling a cached font would change how the rest of Rhino measures and renders text as well. Use SystemFonts directly for a font that will be handed to an Eto control, which the OS renders and which wants the metrics the rest of the Rhino UI is measured with.

Methods

Bold

#
public static Font Bold(float? size = null, FontDecoration decoration = FontDecoration.None)
The OS default font in bold.
size (float? = null)Size in points, or null for the size the OS uses.
decoration (FontDecoration = FontDecoration.None)Decorations to add.

Default

#
public static Font Default(float? size = null, FontDecoration decoration = FontDecoration.None)
The OS default font.
size (float? = null)Size in points, or null for the size the OS uses.
decoration (FontDecoration = FontDecoration.None)Decorations to add.

Get

#
public static Font Get(SystemFont which, float? size = null, FontDecoration decoration = FontDecoration.None)
Get one of the OS interface fonts as a font of our own.
which (SystemFont)Which of the OS fonts to get.
size (float? = null)Size in points, or null for the size the OS uses.
decoration (FontDecoration = FontDecoration.None)Decorations to add.

Label

#
public static Font Label(float? size = null, FontDecoration decoration = FontDecoration.None)
The OS font for labels.
size (float? = null)Size in points, or null for the size the OS uses.
decoration (FontDecoration = FontDecoration.None)Decorations to add.

Message

#
public static Font Message(float? size = null, FontDecoration decoration = FontDecoration.None)
The OS font for message boxes.
size (float? = null)Size in points, or null for the size the OS uses.
decoration (FontDecoration = FontDecoration.None)Decorations to add.

Palette

#
public static Font Palette(float? size = null, FontDecoration decoration = FontDecoration.None)
The OS font for palette window title bars.
size (float? = null)Size in points, or null for the size the OS uses.
decoration (FontDecoration = FontDecoration.None)Decorations to add.

StatusBar

#
public static Font StatusBar(float? size = null, FontDecoration decoration = FontDecoration.None)
The OS font for status bars.
size (float? = null)Size in points, or null for the size the OS uses.
decoration (FontDecoration = FontDecoration.None)Decorations to add.

TitleBar

#
public static Font TitleBar(float? size = null, FontDecoration decoration = FontDecoration.None)
The OS font for window title bars.
size (float? = null)Size in points, or null for the size the OS uses.
decoration (FontDecoration = FontDecoration.None)Decorations to add.

ToolTip

#
public static Font ToolTip(float? size = null, FontDecoration decoration = FontDecoration.None)
The OS font for tool tips.
size (float? = null)Size in points, or null for the size the OS uses.
decoration (FontDecoration = FontDecoration.None)Decorations to add.

User

#
public static Font User(float? size = null, FontDecoration decoration = FontDecoration.None)
The font the user has chosen for documents.
size (float? = null)Size in points, or null for the size the OS uses.
decoration (FontDecoration = FontDecoration.None)Decorations to add.