Type Default Value Read Only Static Description
FontStyle None Yes No Gets the style of this font.
Notes

None.

Example

Here we draw some text on a bitmap using a specific text style (bold, italic).

[C#]

using (Bitmap bm = new Bitmap(600, 600)) {
  using (Graphics graphics = Graphics.FromImage(bm)) {
    Font font = new Font("Times", 72, FontStyle.Bold | FontStyle.Italic);
    Rectangle rect = bm.Bounds;
    rect.Inflate(-40, -40);
    graphics.DrawString("Here is some text in bold italic...", font, Brushes.Black, rect, StringFormat.GenericDefault);
  }
  bm.Save(Server.MapPath("IG8_Font_FontStyle.png"));
}



IG8_Font_FontStyle.png