DWRITE_FONT_WEIGHT enumeration (dwrite.h)

Represents the density of a typeface, in terms of the lightness or heaviness of the strokes. The enumerated 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.

Syntax

typedef enum DWRITE_FONT_WEIGHT {
  DWRITE_FONT_WEIGHT_THIN = 100,
  DWRITE_FONT_WEIGHT_EXTRA_LIGHT = 200,
  DWRITE_FONT_WEIGHT_ULTRA_LIGHT = 200,
  DWRITE_FONT_WEIGHT_LIGHT = 300,
  DWRITE_FONT_WEIGHT_SEMI_LIGHT = 350,
  DWRITE_FONT_WEIGHT_NORMAL = 400,
  DWRITE_FONT_WEIGHT_REGULAR = 400,
  DWRITE_FONT_WEIGHT_MEDIUM = 500,
  DWRITE_FONT_WEIGHT_DEMI_BOLD = 600,
  DWRITE_FONT_WEIGHT_SEMI_BOLD = 600,
  DWRITE_FONT_WEIGHT_BOLD = 700,
  DWRITE_FONT_WEIGHT_EXTRA_BOLD = 800,
  DWRITE_FONT_WEIGHT_ULTRA_BOLD = 800,
  DWRITE_FONT_WEIGHT_BLACK = 900,
  DWRITE_FONT_WEIGHT_HEAVY = 900,
  DWRITE_FONT_WEIGHT_EXTRA_BLACK = 950,
  DWRITE_FONT_WEIGHT_ULTRA_BLACK = 950
} ;

Constants

 
DWRITE_FONT_WEIGHT_THIN
Value: 100
Predefined font weight : Thin (100).
DWRITE_FONT_WEIGHT_EXTRA_LIGHT
Value: 200
Predefined font weight : Extra-light (200).
DWRITE_FONT_WEIGHT_ULTRA_LIGHT
Value: 200
Predefined font weight : Ultra-light (200).
DWRITE_FONT_WEIGHT_LIGHT
Value: 300
Predefined font weight : Light (300).
DWRITE_FONT_WEIGHT_SEMI_LIGHT
Value: 350
Predefined font weight : Semi-Light (350).
DWRITE_FONT_WEIGHT_NORMAL
Value: 400
Predefined font weight : Normal (400).
DWRITE_FONT_WEIGHT_REGULAR
Value: 400
Predefined font weight : Regular (400).
DWRITE_FONT_WEIGHT_MEDIUM
Value: 500
Predefined font weight : Medium (500).
DWRITE_FONT_WEIGHT_DEMI_BOLD
Value: 600
Predefined font weight : Demi-bold (600).
DWRITE_FONT_WEIGHT_SEMI_BOLD
Value: 600
Predefined font weight : Semi-bold (600).
DWRITE_FONT_WEIGHT_BOLD
Value: 700
Predefined font weight : Bold (700).
DWRITE_FONT_WEIGHT_EXTRA_BOLD
Value: 800
Predefined font weight : Extra-bold (800).
DWRITE_FONT_WEIGHT_ULTRA_BOLD
Value: 800
Predefined font weight : Ultra-bold (800).
DWRITE_FONT_WEIGHT_BLACK
Value: 900
Predefined font weight : Black (900).
DWRITE_FONT_WEIGHT_HEAVY
Value: 900
Predefined font weight : Heavy (900).
DWRITE_FONT_WEIGHT_EXTRA_BLACK
Value: 950
Predefined font weight : Extra-black (950).
DWRITE_FONT_WEIGHT_ULTRA_BLACK
Value: 950
Predefined font weight : Ultra-black (950).

Remarks

Weight differences are generally differentiated by an increased stroke or thickness that is associated with a given character in a typeface, as compared to a "normal" character from that same typeface. The following illustration shows an example of Normal and UltraBold weights for the Palatino Linotype typeface.

Illustration of the letter "W" in Normal and UltraBold weights
Note  Not all weights are available for all typefaces. When a weight is not available for a typeface, the closest matching weight is returned.
 
Font weight values less than 1 or greater than 999 are considered invalid, and they are rejected by font API functions.

Requirements

Requirement Value
Minimum supported client Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | UWP apps]
Header dwrite.h