FontStyle.Regular : FontStyle « System.Drawing « C# / C Sharp by API






FontStyle.Regular

  

using System;
using System.Drawing;
using System.Windows.Forms;

public class FontFamilies : Form
{
  public FontFamilies()
  {
    Size = new Size(350,200);

    RichTextBox rtxt = new RichTextBox();
    rtxt.Multiline = true;
    rtxt.Dock = DockStyle.Fill;
    rtxt.Parent = this;

    FontFamily[] ffArray = FontFamily.Families;
    foreach( FontFamily ff in ffArray )
    {
      if (ff.IsStyleAvailable(FontStyle.Regular))
      {
        rtxt.Text += ff.Name + "\n"; 
      }
    }
  }

  static void Main() 
  {
    Application.Run(new FontFamilies());
  }
}

   
    
  








Related examples in the same category

1.FontStyle.Italic
2.FontStyle.Strikeout