Click or drag to resize

GH_FontServerNewFont Method (FontFamily, Single, FontStyle)

Safe font constructor.

Namespace:  Grasshopper.Kernel
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
public static Font NewFont(
	FontFamily family,
	float size,
	FontStyle style
)

Parameters

family
Type: System.DrawingFontFamily
Font family.
size
Type: SystemSingle
Size (in points).
style
Type: System.DrawingFontStyle
Style (if available).

Return Value

Type: Font
A font, or null if family is null. A null family means the machine could not supply one at all; returning null degrades text rather than sinking the shared constructor, which is how the LINUX branches have always behaved and what the measuring methods below already expect.
See Also