FontWeights Class
Provides a set of static predefined FontWeight values.
Assembly: PresentationCore (in PresentationCore.dll)
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.
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 |
|---|---|
100 | |
200 | |
300 | |
400 | |
500 | |
600 | |
700 | |
800 | |
900 | |
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>
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.