fontWeight property
Gets the numeric weight of the font of the object.
Syntax
Integer value = object.get_fontWeight(Variant* nWeight);
Property values
Type: VARIANT
-
Font is at least as light as the 200 weight.
-
Font is at least as bold as the 100 weight and at least as light as the 300 weight.
-
Font is at least as bold as the 200 weight and at least as light as the 400 weight.
-
Default. Font is normal.
-
Font is at least as bold as the 400 weight and at least as light as the 600 weight.
-
Font is at least as bold as the 500 weight and at least as light as the 700 weight.
-
Font is bold.
-
Font is at least as bold as the 700 weight and at least as light as the 900 weight.
-
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 |
|
|
IDL |
|
|
DLL |
|
See also