DirectWrite API Reference - Windows Graphics

DWRITE_FONT_WEIGHT Enumeration

The DWRITE_FONT_WEIGHT enumeration specifies the weight (boldness) of a font.

Syntax

enum DWRITE_FONT_WEIGHT : UINT8 {
  DWRITE_FONT_WEIGHT_THIN = 100,
  DWRITE_FONT_WEIGHT_EXTRA_LIGHT = 200,
  DWRITE_FONT_WEIGHT_LIGHT = 300,
  DWRITE_FONT_WEIGHT_NORMAL = 400,
  DWRITE_FONT_WEIGHT_MEDIUM = 500,
  DWRITE_FONT_WEIGHT_SEMI_BOLD = 600,
  DWRITE_FONT_WEIGHT_BOLD = 700,
  DWRITE_FONT_WEIGHT_EXTRA_BOLD = 800,
  DWRITE_FONT_WEIGHT_BLACK = 900,
  DWRITE_FONT_WEIGHT_DEFAULT = DWRITE_FONT_WEIGHT_NORMAL
};

Members

Member Description
DWRITE_FONT_WEIGHT_THIN The font weight is thin.
DWRITE_FONT_WEIGHT_EXTRA_LIGHT The font weight is extra-light.
DWRITE_FONT_WEIGHT_LIGHT The font weight is light.
DWRITE_FONT_WEIGHT_NORMAL The font weight is normal (regular).
DWRITE_FONT_WEIGHT_MEDIUM The font weight is medium.
DWRITE_FONT_WEIGHT_SEMI_BOLD The font weight is semi-bold.
DWRITE_FONT_WEIGHT_BOLD The font weight is bold.
DWRITE_FONT_WEIGHT_EXTRA_BOLD The font weight is extra-bold.
DWRITE_FONT_WEIGHT_BLACK The font weight is black.
DWRITE_FONT_WEIGHT_DEFAULT The default font weight, which is normal (400).

Remarks

Font weights are represented by numeric values from 100 (thin) to 900 (black), with 400 being the normal weight. These values are standardized and can be mapped to OpenType font 'OS/2' table 'usWeightClass' field.

Requirements

Header: dwrite.h
Library: dwrite.lib
DLL: dwrite.dll

See Also