Click or drag to resize

GH_FontServer Class

Maintains a collection of standard fonts and mays to measure them.
Inheritance Hierarchy
SystemObject
  Grasshopper.KernelGH_FontServer

Namespace:  Grasshopper.Kernel
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
public sealed class GH_FontServer

The GH_FontServer type exposes the following members.

Properties
  NameDescription
Public propertyStatic memberConsole
FontFamily.GenericMonospace, 10pt, regular
Public propertyStatic memberConsoleAdjusted
FontFamily.GenericMonospace, 10pt, regular, adjusted to counter UI scaling.
Public propertyStatic memberConsoleSmall
FontFamily.GenericMonospace, 8pt, regular
Public propertyStatic memberConsoleSmallAdjusted
FontFamily.GenericMonospace, 8pt, regular, adjusted to counter UI scaling.
Public propertyStatic memberFamilyConsole
Gets or sets the FontFamily used for monospaced fonts in Grasshopper.
Public propertyStatic memberFamilyScript
Gets or sets the FontFamily used for scripted fonts in Grasshopper.
Public propertyStatic memberFamilyStandard
Gets or sets the FontFamily used for standard fonts in Grasshopper.
Public propertyStatic memberLarge
SystemFonts.CaptionFont, 10pt, bold
Public propertyStatic memberLargeAdjusted
SystemFonts.CaptionFont, 10pt, bold, adjusted for logical pixel size.
Public propertyStatic memberScript
FontFamily.GenericSansSerif, 10pt, italic
Public propertyStatic memberScriptSmall
FontFamily.GenericSansSerif, 8pt, italic
Public propertyStatic memberSmall
SystemFonts.CaptionFont, 6pt, regular
Public propertyStatic memberStandard
SystemFonts.CaptionFont, 8pt, regular
Public propertyStatic memberStandardAdjusted
SystemFonts.CaptionFont, 8pt, regular, adjusted for logical pixel size.
Public propertyStatic memberStandardBold
SystemFonts.CaptionFont, 8pt, bold
Public propertyStatic memberStandardItalic
SystemFonts.CaptionFont, 8pt, italic
Top
Methods
  NameDescription
Public methodStatic memberFontToString
Convert a font to a string.
Public methodStatic memberMeasureString(String, Font)
Measure the size of a string
Public methodStatic memberMeasureString(String, Font, SizeF)
Measure the size of a string
Public methodStatic memberMeasureString(String, Font, Single)
Measure the size of a string
Public methodStatic memberNewFont(Font, FontStyle)
Safe font constructor.
Public methodStatic memberNewFont(Font, Single)
Safe font constructor.
Public methodStatic memberNewFont(FontFamily, Single)
Safe font constructor.
Public methodStatic memberNewFont(Font, Single, FontStyle)
Safe font constructor.
Public methodStatic memberNewFont(FontFamily, Single, FontStyle)
Safe font constructor.
Public methodStatic memberNewFont(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.
Public methodStatic memberStringToFont
Convert a font description string back into a font.
Public methodStatic memberStringWidth(IEnumerableString, Font)
Measure the maximum width of a collection of strings
Public methodStatic memberStringWidth(String, Font)
Measure the width of a string in pixels
Top
Events
  NameDescription
Public eventStatic memberConsoleFamilyChanged
Raised whenever the MonospacedFamily is changed.
Public eventStatic memberScriptFamilyChanged
Raised whenever the ScriptFamily is changed.
Public eventStatic memberStandardFamilyChanged
Raised whenever the StandardFamily is changed.
Top
See Also