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

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

Default

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

Get

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

Label

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

Message

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

Palette

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

StatusBar

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

TitleBar

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

ToolTip

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

User

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