DWRITE_LINE_SPACING structure (dwrite_3.h)

Sets the vertical spacing between lines of text.

Syntax

struct DWRITE_LINE_SPACING {
  DWRITE_LINE_SPACING_METHOD method;
  FLOAT                      height;
  FLOAT                      baseline;
  FLOAT                      leadingBefore;
  DWRITE_FONT_LINE_GAP_USAGE fontLineGapUsage;
};

Members

method

Type: DWRITE_LINE_SPACING_METHOD

Method used to determine line spacing.

height

Type: FLOAT

Spacing between lines. The interpretation of this parameter depends upon the line spacing method, as follows:

  • Line spacing: ignored
  • uniform line spacing: explicit distance in DIPs between lines
  • proportional line spacing: a scaling factor to be applied to the computed line height; for each line, the height of the line is computed as for default line spacing, and the scaling factor is applied to that value.

baseline

Type: FLOAT

Distance from top of line to baseline. The interpretation of this parameter depends upon the line spacing method, as follows:

  • default line spacing: ignored
  • uniform line spacing: explicit distance in DIPs from the top of the line to the baseline
  • proportional line spacing: a scaling factor applied to the computed baseline; for each line, the baseline distance is computed as for default line spacing, and the scaling factor is applied to that value.

leadingBefore

Type: FLOAT

Proportion of the entire leading distributed before the line. The allowed value is between 0 and 1.0. The remaining leading is distributed after the line. It is ignored for the default and uniform line spacing methods. The leading that is available to distribute before or after the line depends on the values of the height and baseline parameters.

fontLineGapUsage

Type: DWRITE_FONT_LINE_GAP_USAGE

Specify whether DWRITE_FONT_METRICS::lineGap value should be part of the line metrics.

Requirements

Requirement Value
Minimum supported client Windows 8 and Platform Update for Windows 7 [desktop apps only]
Minimum supported server Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps only]
Header dwrite_3.h