GH_FontServer
Maintains a collection of standard fonts and mays to measure them.
Properties
ConsoleAdjusted
#FontFamily.GenericMonospace, 10pt, regular, adjusted to counter UI scaling.
public static Font ConsoleAdjusted { get; }
ConsoleSmallAdjusted
#FontFamily.GenericMonospace, 8pt, regular, adjusted to counter UI scaling.
public static Font ConsoleSmallAdjusted { get; }
LargeAdjusted
#SystemFonts.CaptionFont, 10pt, bold, adjusted for logical pixel size.
public static Font LargeAdjusted { get; }
StandardAdjusted
#SystemFonts.CaptionFont, 8pt, regular, adjusted for logical pixel size.
public static Font StandardAdjusted { get; }
Methods
FontToString
#Convert a font to a string.
Returns: Strig representing the font family, size, bold and italic flags.
MeasureString
#Measure the size of a string
NewFont
#Safe font constructor.
NewFont
#Safe font constructor.
public static Font NewFont()
Returns: A font, or null if
family is null. A null family means the machine could not supply one at all; returning null degrades text rather than sinking the shared constructor, which is how the LINUX branches have always behaved and what the measuring methods below already expect.NewFont
#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.
Returns: A font that might or might not be what you asked for.
StringToFont
#Convert a font description string back into a font.
Returns: Font represented by the text, or null if no font could be created.