FontFamily Class
Collapse the table of content
Expand the table of content

FontFamily Class

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Represents a family of related fonts.


Namespace:  System.Windows.Media
Assembly:  System.Windows (in System.Windows.dll)

public class FontFamily

The FontFamily type exposes the following members.

Public methodFontFamilyInitializes a new instance of the FontFamily class from the specified font family string.

Public propertySourceGets the font family name that is used to construct the FontFamily object.

Public methodEqualsGets a value that indicates whether the current font family object and the specified font family object are the same. (Overrides Object.Equals(Object).)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for FontFamily. (Overrides Object.GetHashCode().)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string representation of this FontFamily. (Overrides Object.ToString().)

A font family is a set of typefaces that share the same family name, such as "Times New Roman", but that differ in features. These font family feature differences typically include font style, such as italic, and font weight, such as bold. For a full list of supported fonts in Windows Phone, see Font and language configuration support for Windows Phone 8.

To ensure consistency, you typically specify the font family using a theme resource. By default, the font family for a new page in a Windows Phone application is set to the following:

FontFamily="{StaticResource PhoneFontFamilyNormal}"

For a list of the theme resource font families, see Theme resources for Windows Phone.

XAML Attribute Usage

<object FontFamily="fontFamilyName" />
<object FontFamily="{StaticResource phoneFontFamily}" />

XAML Values


A string that specifies the font family.


A Windows Phone theme resource font family, such as PhoneFontFamilySemiBold.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

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

© 2016 Microsoft