IronSoftware
  • Products
    for .NET Java
    Create, read, and edit PDFs
    for .NET
    Image to text in 127 languages
    for .NET
    Read and write QR & Barcodes
    for .NET
    No Office Interop required
    for .NET
    Extract structured data from websites
    5 for the Price of 2 All 5 .NET product licenses from $1498 Save 60% with Iron Suite Iron Suites - Donate $50
  • Open Source
    for .NET
    System.Drawing.Common Replacement
  • About Us
  • Contact Us

205 N. Michigan Ave. Chicago, IL 60611, USA +1 (312) 500-3060

Join Iron Slack

  • Home
  • Get Started
  • Features
  • Code Examples
  • Free NuGet Download
IronDrawing for C# .NET IronDrawing for C# .NET
  • Home
  • Docs
    • Search
    • Get Started
    • Features
    • Code Examples
    • Search
  • Free NuGet Download Total downloads: 71,462
IronDrawing
Code Examples
  1. IronDrawing
  2. Code Examples
  3. Create and Cast Font
IronDrawing
Free for development from NuGet

Install with NuGet nuget.org/packages/IronSoftware.System.Drawing

PM > Install-Package IronSoftware.System.Drawing

Explore the Docs

  • Get Started
  • Features
  • Code Examples
Bitmap to Stream Bitmap to String Cast to AnyBitmap Clone AnyBitmap Create Multipage TIFF and GIF Export AnyBitmap Generate AnyBitmap Get Frame From AnyBitmap Get Number of Frames In AnyBitmap Read Bytes from AnyBitmap
Convert Color to 32-Bit ARGB Value Create Color Get Color Depth
Convert Measurement Units Create and Cast CropRectangle
Create Font

Create Font

using IronSoftware.Drawing;

// Create a new Font object
Font font = new Font("Times New Roman", FontStyle.Italic | FontStyle.Bold, 30);

// Casting between System.Drawing.Font and IronSoftware.Drawing.Font
System.Drawing.Font drawingFont = new System.Drawing.Font("Courier New", 30);
Font ironFont = drawingFont;

var fontf = ironFont.FamilyName;
var style = ironFont.Style;
var sizef = ironFont.Size;
var isItalic = ironFont.Italic;
var isBold = ironFont.Bold;
Imports IronSoftware.Drawing

' Create a new Font object
Private font As New Font("Times New Roman", FontStyle.Italic Or FontStyle.Bold, 30)

' Casting between System.Drawing.Font and IronSoftware.Drawing.Font
Private drawingFont As New System.Drawing.Font("Courier New", 30)
Private ironFont As Font = drawingFont

Private fontf = ironFont.FamilyName
Private style = ironFont.Style
Private sizef = ironFont.Size
Private isItalic = ironFont.Italic
Private isBold = ironFont.Bold
Install-Package IronSoftware.System.Drawing

Create Font

When you need your PDF to look like HTML, fast.

Tesseract 5 OCR in the languages you need, We support 127+.

When you need to read, write, and style, QR & Barcodes, fast.

The Excel API you need, without the Office Interop hassle.

The power you need to scrape & output clean, structured data.

The complete .NET Suite for your office.

  • IRONSUITE
  • |
  • IRONPDF
  • IRONOCR
  • IRONBARCODE
  • IRONXL
  • IRONWEBSCRAPER
IronSoftware
205 N. Michigan Ave. Chicago, IL 60611 USA +1 (312) 500-3060
  • About Us
  • News
  • Careers
  • Contact Us
  • Join Iron Slack

Supporting Teamseas

Copyright © Iron Software LLC 2013-2023

Thank you!

Your license key has been delivered to the email provided. Contact us

24-Hour Upgrade Offer:

Save 50% on a
Professional Upgrade

Go Professional to cover 10 developers
and unlimited projects.

hours

:

minutes

:

seconds

Upgrade to Professional

Upgrade

Professional

$600 USD

$299 USD


  • 10 developers
  • 10 locations
  • 10 projects
TODAY ONLY
Iron Suite

5 .NET Products for the Price of 2

IronPDF IronOCR IronXL IronBarcode IronWebscraper

Total Suite Value:

$7,192 USD

Upgrade price

TODAY
ONLY

$499 USD

After 24 Hrs

$1,098 USD