Adding new fonts

This feature allows you to add new fonts into the Fonts combo box. See the picture below to understand how it works:

New fonts

Please note, that newly added fonts are not just font names, rather they are CSS font-family strings. They can include multiple fonts and font families like serif and sans-serif.

In order to add your new fonts into the Font combo box, you should use code similar to the snippet below:

private void Form1_Load(object sender, System.EventArgs e)
{
    winFormHtmlEditor1.CmbFontName.Items.Add(new SpiceFontCombo.FontComboBoxItem(new Font("Arial", 12, FontStyle.Regular, GraphicsUnit.Point), "Arial, Helvetica, sans-serif"));
    winFormHtmlEditor1.CmbFontName.Items.Add(new SpiceFontCombo.FontComboBoxItem(new Font("Georgia", 12, FontStyle.Regular, GraphicsUnit.Point), "Georgia, serif"));
}

If you want that no System fonts will be added automatically, then you can set AddSystemFonts = false, like this:

WinFormHtmlEditor1.CmbFontName.AddSystemFonts = false;
Last updated on Nov 28, 2018