Share via


FontWeight Property

Gets or sets the top-level font weight for the content in this element.

XAML
<object FontWeight="FontWeight" .../>
Scripting
value = object.FontWeight
object.FontWeight = value

Property Value

FontWeight

A value specifying the desired font weight.

This property is read/write. The default value is Normal.

Remarks

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. Refer to the enumeration table in FontWeight for usWeightClass information.

Note   The FontWeight property value may not be the font weight used during rendering due to font fallback. For example, if the font weight, ExtraBlack, is specified but Bold is the closest font weight available, the value of FontWeight is still ExtraBold.

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 following illustration shows the Normal and UltraBold font weights for the Palatino Linotype.

Font weights

Font weights

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

LineBreak is listed in the Applies To list for this property, because it does exist in the object model and you can get and set it. However, all LineBreak properties are ignored for rendering purposes.

Applies To

LineBreak, Run, TextBlock

See Also

Text and Fonts Overview
FontFamily
FontSize
FontStretch
FontStyle