Export (0) Print
Expand All

FontWeights Class

Provides a set of static predefined FontWeight values.

Namespace: System.Windows
Assembly: PresentationCore (in presentationcore.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public static class FontWeights
public final class FontWeights
public final class FontWeights
You cannot use this managed class in XAML.

A font weight describes the relative weight of a font, in terms of the lightness or heaviness of the strokes. Weight differences are generally differentiated by an increased stroke or thickness that is associated with a given character in a font, as compared to a "normal" character from that same font.

An example of Normal and UltraBold weights for the "Palatino Linotype" typeface


Text displayed with different font weights

The FontWeights values correspond to the usWeightClass definition in the OpenType specification. The usWeightClass represents an integer value between 1 and 999. Lower values indicate lighter weights; higher values indicate heavier weights.

Font weight

usWeightClass

Thin

100

ExtraLight

UltraLight

200

Light

300

Normal

Regular

400

Medium

500

DemiBold

SemiBold

600

Bold

700

ExtraBold

UltraBold

800

Black

Heavy

900

ExtraBlack

UltraBlack

950

For more information about the OpenType usWeightClass value, see the "Font File Tables" section of the OpenType specification.

In the following code example, the FontWeight is set to "UltraBold".

<TextBlock FontWeight="UltraBold" FontFamily="Gil Sans MT">Hello, world</TextBlock>

System.Object
  System.Windows.FontWeights

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

Community Additions

ADD
Show:
© 2014 Microsoft