Click or drag to resize

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)
public static Font NewFont(
	string family,
	float size,
	FontStyle style


Type: SystemString
Font Family Name. If a font is found with the exact name, it will be loaded.
Type: SystemSingle
Size of font.
Type: System.DrawingFontStyle
Font style, if the requested family does not support the requested style, the style flags will be ignored.

Return Value

Type: Font
A font that might or might not be what you asked for.
See Also