Parent: Object
The WLFont class represents a font in a platform-independent way. It stores the font family name, size, and bold and italic attributes used by WealthLab for chart labels and other visual elements.
The parameterless constructor creates a WLFont using the default property values:
FontName = "Arial"
FontSize = 8
IsBold = false
IsItalic = false
The second constructor creates a WLFont using the specified font family and optional size, bold, and italic settings. For example:
WLFont font = new WLFont("Arial", 10, true);
creates a 10-point bold Arial font.
Gets or sets the font family name.
The default value is "Arial".
For example:
font.FontName = "Tahoma";
Gets or sets the font size. The default value is 8.
Gets or sets whether the font should be rendered using bold text. The default value is false.
Gets or sets whether the font should be rendered using italic text. The default value is false.
Creates a WLFont by parsing a string previously generated by ToString. The string must contain exactly four comma-separated values:
FontName,FontSize,IsBold,IsItalic
For example:
WLFont font = WLFont.Parse("Tahoma,12,True,False");
If the string does not contain exactly four values, an ArgumentException is thrown.
Returns a string representation of the WLFont containing its font name, size, bold setting, and italic setting. The format is:
FontName,FontSize,IsBold,IsItalic
For example:
Arial,10,True,False
The resulting string can be converted back into a WLFont using Parse.
Contains the standard font used by WealthLab for Strategy plotting. The initial value is a default WLFont:
new WLFont()
which represents 8-point Arial with bold and italic disabled.