Grasshopper API
GH_FontServerStringWidth Method (String, Font) |
Measure the width of a string in pixels
Namespace: Grasshopper.Kernel
Assembly: Grasshopper (in Grasshopper.dll)

public static int StringWidth( string text, Font font )
Public Shared Function StringWidth ( text As String, font As Font ) As Integer
Parameters
- text
- Type: SystemString
The string to measure - font
- Type: System.DrawingFont
The font to measure with
Return Value
Type: Int32