Skip to content

GH_FontServer

Public Class

Maintains a collection of standard fonts and mays to measure them.

Inheritance Hierarchy

System.Object
Grasshopper.Kernel.GH_FontServer

Namespace: Grasshopper.Kernel

Assembly: Grasshopper (in Grasshopper.dll)

Syntax

public sealed class GH_FontServer

The GH_FontServer type exposes the following members.

Properties

Name

Description


Public Property
Static Member

FontFamily.GenericMonospace, 10pt, regular


Public Property
Static Member

FontFamily.GenericMonospace, 10pt, regular, adjusted to counter UI scaling.


Public Property
Static Member

FontFamily.GenericMonospace, 8pt, regular


Public Property
Static Member

FontFamily.GenericMonospace, 8pt, regular, adjusted to counter UI scaling.


Public Property
Static Member

Gets or sets the FontFamily used for monospaced fonts in Grasshopper.


Public Property
Static Member

Gets or sets the FontFamily used for scripted fonts in Grasshopper.


Public Property
Static Member

Gets or sets the FontFamily used for standard fonts in Grasshopper.


Public Property
Static Member

SystemFonts.CaptionFont, 10pt, bold


Public Property
Static Member

SystemFonts.CaptionFont, 10pt, bold, adjusted for logical pixel size.


Public Property
Static Member

FontFamily.GenericSansSerif, 10pt, italic


Public Property
Static Member

FontFamily.GenericSansSerif, 8pt, italic


Public Property
Static Member

SystemFonts.CaptionFont, 6pt, regular


Public Property
Static Member

SystemFonts.CaptionFont, 8pt, regular


Public Property
Static Member

SystemFonts.CaptionFont, 8pt, regular, adjusted for logical pixel size.


Public Property
Static Member

SystemFonts.CaptionFont, 8pt, bold


Public Property
Static Member

SystemFonts.CaptionFont, 8pt, italic


Methods

Name

Description


Public Method
Static Member

Convert a font to a string.


Public Method
Static Member

Measure the size of a string


Public Method
Static Member

Measure the size of a string


Public Method
Static Member

Measure the size of a string


Public Method
Static Member

Safe font constructor.


Public Method
Static Member

Safe font constructor.


Public Method
Static Member

Safe font constructor.


Public Method
Static Member

Safe font constructor.


Public Method
Static Member

Safe font constructor.


Public Method
Static Member

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 Method
Static Member

Convert a font description string back into a font.


Public Method
Static Member

Measure the maximum width of a collection of strings


Public Method
Static Member

Measure the width of a string in pixels


Events

Name

Description


Public Event
Static Member

Raised whenever the MonospacedFamily is changed.


Public Event
Static Member

Raised whenever the ScriptFamily is changed.


Public Event
Static Member

Raised whenever the StandardFamily is changed.