SetTerDefaultFont
Set the default font and pointsize
bool SetTerDefaultFont( typeface, PointSize, style, color, repaint)
bool SetTerDefaultFontHtml( typeface, PointSize, style, HtmlColor, repaint)
string typeface; | typeface of the default font |
int PointSize; | Point size for the default font. You can also specify the font size in twips by specifying a negative value (1 point equal 20 twips) |
int style; | style of the default font. Refer to the SetTerCharStyle function for a list of style constants. Use 0 for default. |
Color color; | default text color. Use 0 for default. |
string HtmlColor; | Color specified in the html string format, such as "red", "#FFFFFF" |
bool repaint; | true to refresh the window after this operation |
Description: This function is used by an application to change the initial or default font for the editor. Any text that used the previous default font now gets printed with the new font, point size, style and color.
Return Value: This function returns true if successful.
Example:
// use Arial typeface and 12 pointsize for default.
SetTerDefaultFont("Arial",12, Color.Red, true);
// use Arial typeface and 12 pointsize
SetTerDefaultFont("Arial",-240,Color.Red, true);