Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

FontWeight structure

Applies to Windows and Windows Phone

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

Syntax


var fontWeight = {
    weight : /* Your value */
}


<object property="fontWeightsPropertyName"/>

XAML Values

fontWeightsPropertyName

A FontWeights static property name, such as Light, Normal, or Bold.

Attributes

[Version(0x06020000)]

Members

The FontWeight structure has these fields.

FieldData typeDescription
Weight | weight

Number [JavaScript] | System.UInt16 [.NET] | uint16 [C++]

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

 

Remarks

In standard typography APIs, 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.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Text
Windows::UI::Text [C++]

Metadata

Windows.winmd

 

 

Show:
© 2014 Microsoft