fontWeight property

Gets the numeric weight of the font of the object.

Syntax

Integer value = object.get_fontWeight(Variant* nWeight);

Property values

Type: VARIANT

100 (100)

Font is at least as light as the 200 weight.

200 (200)

Font is at least as bold as the 100 weight and at least as light as the 300 weight.

300 (300)

Font is at least as bold as the 200 weight and at least as light as the 400 weight.

400 (400)

Default. Font is normal.

500 (500)

Font is at least as bold as the 400 weight and at least as light as the 600 weight.

600 (600)

Font is at least as bold as the 500 weight and at least as light as the 700 weight.

700 (700)

Font is bold.

800 (800)

Font is at least as bold as the 700 weight and at least as light as the 900 weight.

900 (900)

Font is at least as bold as the 800 weight.

String format

100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900

CSS information

Applies To All elements
Media visual
Inherited no
Initial Value

Remarks

The IHTMLCurrentStyle::fontWeight property of the currentStyle object is read-only. To set the value, use the IHTMLRuleStyle::fontWeight property of the style object. Unlike the style object, the IHTMLCurrentStyle::fontWeight property of the currentStyle object only returns numeric values.

Unlike IHTMLRuleStyle::fontWeight, IHTMLCurrentStyle::fontWeight is read-only and returns only numeric values.

The values for IHTMLCurrentStyle::fontWeight are mapped to specific font variations, depending on the fonts that are installed on the user's computer. In many cases, the user cannot see the difference between different IHTMLCurrentStyle::fontWeight settings because the system chooses the closest match.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll

See also

Reference

IHTMLRuleStyle::fontWeight

IHTMLRuleStyle::font