Getting Windows installed fonts using .NET

You are currently viewing Getting Windows installed fonts using .NET

.NET Framework 2.0 namespaces System.Drawing and System.Drawing.Text contains many useful classes related to Drawing manipulation. These classes deals with fonts, fonts families, colors, images and bitmaps and can be used to add drawing related features in your .NET applications. One of the common task developers needs to perform in day to day .NET applications is to get the list of installed fonts in Windows operating system.

Following tutorial demonstrates how you can achieve this by using .NET built in classes.

Dim fontsCollection As New InstalledFontCollection()
Dim fontFamilies As FontFamily() = fontsCollection.Families
Dim count As Integer = fontFamilies.Length

Me.Text = "Number of fonts:" + count

For Each font As FontFamily In fontFamilies
InstalledFontCollection fontsCollection = new InstalledFontCollection();
FontFamily[] fontFamilies = fontsCollection.Families;
int count = fontFamilies.Length;

this.Text = "Number of fonts:" + count;

foreach (FontFamily font in fontFamilies)
READ ALSO:  Introducing Windows Communication Foundation (WCF)

This Post Has 3 Comments


    I want to join this amazing group

  2. Imran Ali

    nice article but this code is for showing installed font in DDL also give example of setting font to controls.

  3. raj

    its very nice information ….thank you

Leave a Reply