GetAllInstalledFonts

Get all installed fonts in your computer using C#

Get all installed fonts in your computer using C#

Today we will look into, how could we get all installed font’s list from your local computer using C#.

To get list of font we would require reference of “System.Drawing” and add using System.Drawing with System.Drawing.Text.

 

Below is the code snippet to get all installed fonts in your computer using C#.

using System;
using System.Drawing.Text;
using System.Drawing;

namespace GetAllInstalledFonts
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Get all installed Fonts in your computer.");
            using (InstalledFontCollection col = new InstalledFontCollection())
            {
                foreach (FontFamily ff in col.Families)
                {
                    Console.WriteLine(ff.Name);
                }
            }
            Console.ReadKey();
        }
    }
}

OUTPUT:

GetAllInstalledFonts

 

 

Leave a Reply