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.
Parameters:
| size (float? = null) | Size in points, or null for the size the OS uses. |
| decoration (FontDecoration = FontDecoration.None) | Decorations to add. |
Default
#The OS default font.
Parameters:
| 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.
Parameters:
| 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
#The OS font for labels.
Parameters:
| size (float? = null) | Size in points, or null for the size the OS uses. |
| decoration (FontDecoration = FontDecoration.None) | Decorations to add. |
Message
#The OS font for message boxes.
Parameters:
| size (float? = null) | Size in points, or null for the size the OS uses. |
| decoration (FontDecoration = FontDecoration.None) | Decorations to add. |
Palette
#The OS font for palette window title bars.
Parameters:
| size (float? = null) | Size in points, or null for the size the OS uses. |
| decoration (FontDecoration = FontDecoration.None) | Decorations to add. |
StatusBar
#The OS font for status bars.
Parameters:
| size (float? = null) | Size in points, or null for the size the OS uses. |
| decoration (FontDecoration = FontDecoration.None) | Decorations to add. |
TitleBar
#The OS font for window title bars.
Parameters:
| size (float? = null) | Size in points, or null for the size the OS uses. |
| decoration (FontDecoration = FontDecoration.None) | Decorations to add. |