StandardFonts
Provides access to the default fonts used in Grasshopper.
Properties
PixelsPerPoint
#Gets the number of logical pixels per typographic point on this platform. Font sizes are in points, which are 96/72 pixels on Windows and a single pixel on macOS. Divide a desired pixel size by this ratio to get a font size that renders identically everywhere.
Methods
Mono
#The default mono-spaced font to use. This is the recommended font for code blocks or tabular data which requires whitespace for alignment. Do not dispose this font as it may be shared amongst many instances.
Sans
#The default sans-serif font to use. This is the recommended font for UI use and short to medium blocks of text. Do not dispose this font as it may be shared amongst many instances.
Script
#The default script or cursive font to use. This is the recommended font for UI elements which are supposed to look detached from the underlying controls.
Serif
#The default serif font to use. Do not dispose this font as it may be shared amongst many instances.
SetMonoCascade
#Use a different monospaced cascade for the rest of this session, bypassing the Settings.TypefaceMono setting. Names which are not installed are skipped, and when none is, Grasshopper's default for the family is used.
public static void SetMonoCascade()
families
Font family names to use (in order of most preferred to least preferred) for the monospaced fonts in Grasshopper.
SetSansSerifCascade
#Use a different sans-serif cascade for the rest of this session, bypassing the Settings.TypefaceSans setting. Names which are not installed are skipped, and when none is, Grasshopper's default for the family is used.
public static void SetSansSerifCascade()
families
Font family names to use (in order of most preferred to least preferred) for the sans-serif fonts in Grasshopper.
SetScriptCascade
#Use a different script cascade for the rest of this session, bypassing the Settings.TypefaceScript setting. Names which are not installed are skipped, and when none is, Grasshopper's default for the family is used.
public static void SetScriptCascade()
families
Font family names to use (in order of most preferred to least preferred) for the script fonts in Grasshopper.
SetSerifCascade
#Use a different serif cascade for the rest of this session, bypassing the Settings.TypefaceSerif setting. Names which are not installed are skipped, and when none is, Grasshopper's default for the family is used.
public static void SetSerifCascade()
families
Font family names to use (in order of most preferred to least preferred) for the serif fonts in Grasshopper.