FontWeight FontWeight FontWeight FontWeight Struct

Refers to the density of a typeface, in terms of the lightness or heaviness of the strokes.

Syntax

Declaration

public struct FontWeightpublic struct FontWeightPublic Structure FontWeightpublic struct FontWeight
<object property="fontWeightsPropertyName"/>

Remarks

In standard typography API, the weight of a font is expressed by using constant names, for example "Bold". Using constant names for setting a font weight property is supported through type converter behaviors and also by the FontWeights support class. For code access, the relevant information is expressed as the Weight member of a FontWeight structure.

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.

The Weight member of a FontWeight structure is typically initiated with one of the FontWeights values. If you access a FontWeight structure in code, you can compare the value of its Weight member with values from the FontWeights static properties.

Fields summary

The font weight expressed as a numeric value. See Remarks.

Fields

  • Weight
    Weight
    Weight
    Weight

    The font weight expressed as a numeric value. See Remarks.

    public field ushort Weightpublic field ushort WeightPublic Field Weightpublic field ushort Weight

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute

Details

Assembly

Windows.UI.Text.dll