Fonts
Methods to get information about current fonts installed the running system
Properties
AvailableFontFamilies
#Gets an enumeration of available font families in the current system
Returns: An enumeration of font family objects that this system supports
Methods
Cached
#public static Font Cached(FontFamily family, float size, FontStyle style = FontStyle.None, FontDecoration decoration = FontDecoration.None)
Gets a cached font
Parameters:
| family (FontFamily) | Family of the font |
| size (float) | Size in points of the font |
| style (FontStyle = FontStyle.None) | Style of the font |
| decoration (FontDecoration = FontDecoration.None) | Decorations to apply to the font |
Cached
#public static Font Cached(string familyName, float size, FontStyle style = FontStyle.None, FontDecoration decoration = FontDecoration.None)
Gets a cached font
Parameters:
| familyName (string) | Family name of the font |
| size (float) | Size in points of the font |
| style (FontStyle = FontStyle.None) | Style of the font |
| decoration (FontDecoration = FontDecoration.None) | Decorations to apply to the font |
ClearCache
#public static void ClearCache()
Clears the font cache
Remarks: This is useful if you are using the Cached(FontFamily, float, FontStyle, FontDecoration) method to cache fonts and want to clear it to conserve memory or resources.
Cursive
#public static Font Cursive(float size, FontStyle style = FontStyle.None, FontDecoration decoration = FontDecoration.None)
Gets a font with the FontFamilies.Cursive family and the specified size and style
Parameters:
| size (float) | Size of the font |
| style (FontStyle = FontStyle.None) | Style of the font |
| decoration (FontDecoration = FontDecoration.None) | Decorations to apply to the font |
Fantasy
#public static Font Fantasy(float size, FontStyle style = FontStyle.None, FontDecoration decoration = FontDecoration.None)
Gets a font with the FontFamilies.Fantasy family and the specified size and style
Parameters:
| size (float) | Size of the font |
| style (FontStyle = FontStyle.None) | Style of the font |
| decoration (FontDecoration = FontDecoration.None) | Decorations to apply to the font |
Monospace
#public static Font Monospace(float size, FontStyle style = FontStyle.None, FontDecoration decoration = FontDecoration.None)
Gets a font with the FontFamilies.Monospace family and the specified size and style
Parameters:
| size (float) | Size of the font |
| style (FontStyle = FontStyle.None) | Style of the font |
| decoration (FontDecoration = FontDecoration.None) | Decorations to apply to the font |
Sans
#public static Font Sans(float size, FontStyle style = FontStyle.None, FontDecoration decoration = FontDecoration.None)
Gets a font with the FontFamilies.Sans family and the specified size and style
Parameters:
| size (float) | Size of the font |
| style (FontStyle = FontStyle.None) | Style of the font |
| decoration (FontDecoration = FontDecoration.None) | Decorations to apply to the font |
Serif
#public static Font Serif(float size, FontStyle style = FontStyle.None, FontDecoration decoration = FontDecoration.None)
Gets a font with the FontFamilies.Serif family and the specified size and style
Parameters:
| size (float) | Size of the font |
| style (FontStyle = FontStyle.None) | Style of the font |
| decoration (FontDecoration = FontDecoration.None) | Decorations to apply to the font |