Breyta

Deila með


FontWeights Class

Definition

Provides a set of static predefined FontWeight values.

public ref class FontWeights abstract sealed
public static class FontWeights
type FontWeights = class
Public Class FontWeights
Inheritance
FontWeights

Examples

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

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

Remarks

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
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 usWeightClass section of the OpenType specification.

Properties

Black

Specifies a "Black" font weight.

Bold

Specifies a "Bold" font weight.

DemiBold

Specifies a "Demi-bold" font weight.

ExtraBlack

Specifies an "Extra-black" font weight.

ExtraBold

Specifies an "Extra-bold" font weight.

ExtraLight

Specifies an "Extra-light" font weight.

Heavy

Specifies a "Heavy" font weight.

Light

Specifies a "Light" font weight.

Medium

Specifies a "Medium" font weight.

Normal

Specifies a "Normal" font weight.

Regular

Specifies a "Regular" font weight.

SemiBold

Specifies a "Semi-bold" font weight.

Thin

Specifies a "Thin" font weight.

UltraBlack

Specifies an "Ultra-black" font weight.

UltraBold

Specifies an "Ultra-bold" font weight.

UltraLight

Specifies an "Ultra-light" font weight.

Applies to

See also