FontFamily Class

Defines a group of type faces having a similar basic design and certain variations in styles. This class cannot be inherited.

Namespace: System.Drawing
Assembly: System.Drawing (in system.drawing.dll)

public sealed class FontFamily : MarshalByRefObject, IDisposable
public final class FontFamily extends MarshalByRefObject implements IDisposable
public final class FontFamily extends MarshalByRefObject implements IDisposable
Not applicable.

The following code example shows all the font families in the Families property of the FontFamily class. This example is designed to be used with a Windows Form. To run this example, add a ListBox named listBox1 to a form and call the PopulateListBoxWithFonts method from the form's constructor.

private void PopulateListBoxWithFonts()
    listBox1.Width = 200;
    listBox1.Location = new Point(40, 120);
    foreach ( FontFamily oneFontFamily in FontFamily.Families )

private void PopulateListBoxWithFonts()
    listBox1.set_Location(new Point(40, 120));

    //foreach (FontFamily oneFontFamily in FontFamily.Families)
    for (int iCtr = 0; iCtr < FontFamily.get_Families().length; iCtr++) {
        FontFamily oneFontFamily = FontFamily.get_Families()[iCtr];
} //PopulateListBoxWithFonts


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0