GH_FontServerNewFont Method (String, Single, FontStyle) |
High level function for Font creation. We've ran into loads of trouble in the past with missing Fonts.
Never create a font directly via GDI+, always use this method.
Namespace:
Grasshopper.Kernel
Assembly:
Grasshopper (in Grasshopper.dll)
Syntax public static Font NewFont(
string family,
float size,
FontStyle style
)
Public Shared Function NewFont (
family As String,
size As Single,
style As FontStyle
) As Font
Parameters
- family
- Type: SystemString
Font Family Name. If a font is found with the exact name, it will be loaded. - size
- Type: SystemSingle
Size of font. - style
- Type: System.DrawingFontStyle
Font style, if the requested family does not support the requested style, the style flags will be ignored.
Return Value
Type:
FontA font that might or might not be what you asked for.
See Also