Skip to main content
.NET Framework Class Library
Fonts Class

Provides enumeration support for FontFamily and Typeface objects.

Inheritance Hierarchy
SystemObject
  System.Windows.MediaFonts

Namespace:   System.Windows.Media
Assembly:  PresentationCore (in PresentationCore.dll)
Syntax
Public NotInheritable Class Fonts
public static class Fonts
public ref class Fonts abstract sealed
[<[%$TOPIC/ms634939_en-us_VS_110_4_0_3_0_0%]>]
[<[%$TOPIC/ms634939_en-us_VS_110_4_0_3_0_1%]>]
type Fonts =  class end

The Fonts type exposes the following members.

Properties
  NameDescription
Public property Static member SystemFontFamiliesGets the collection of FontFamily objects from the default system font location.
Public property Static member SystemTypefacesGets the collection of Typeface objects from the default system font location.
Top
Methods
  NameDescription
Public method Static member GetFontFamilies(String)Returns the collection of FontFamily objects from a string value that represents the location of the fonts.
Public method Static member GetFontFamilies(Uri)Returns a collection of FontFamily objects from a uniform resource identifier (URI) value that represents the location of the fonts.
Public method Static member GetFontFamilies(Uri, String)Returns a collection of FontFamily objects using a base uniform resource identifier (URI) value to resolve the font location.
Public method Static member GetTypefaces(String)Returns the collection of Typeface objects from a string value that represents the font directory location.
Public method Static member GetTypefaces(Uri)Returns a collection of Typeface objects from a uniform resource identifier (URI) value that represents the font location.
Public method Static member GetTypefaces(Uri, String)Returns a collection of Typeface objects using a base uniform resource identifier (URI) value to resolve the font location.
Top
Remarks

A font family is a set of fonts that have the same typeface, such as Arial, but that differ in features. These feature differences include Style, such as italic, and Weight, such as bold.

Example of typefaces that are "Times New Roman" font family members

Fonts
Version Information

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Platforms

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

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