Click or drag to resize

GH_FontServerStringWidth Method (String, Font)

Measure the width of a string in pixels

Namespace:  Grasshopper.Kernel
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
public static int StringWidth(
	string text,
	Font font
)

Parameters

text
Type: SystemString
The string to measure
font
Type: System.DrawingFont
The font to measure with

Return Value

Type: Int32
See Also