DWRITE_TEXT_METRICS structure

Contains the metrics associated with text after layout. All coordinates are in device independent pixels (DIPs).

Syntax


struct DWRITE_TEXT_METRICS {
  FLOAT  left;
  FLOAT  top;
  FLOAT  width;
  FLOAT  widthIncludingTrailingWhitespace;
  FLOAT  height;
  FLOAT  layoutWidth;
  FLOAT  layoutHeight;
  UINT32 maxBidiReorderingDepth;
  UINT32 lineCount;
};

Members

left

Type: FLOAT

A value that indicates the left-most point of formatted text relative to the layout box, while excluding any glyph overhang.

top

Type: FLOAT

A value that indicates the top-most point of formatted text relative to the layout box, while excluding any glyph overhang.

width

Type: FLOAT

A value that indicates the width of the formatted text, while ignoring trailing whitespace at the end of each line.

widthIncludingTrailingWhitespace

Type: FLOAT

The width of the formatted text, taking into account the trailing whitespace at the end of each line.

height

Type: FLOAT

The height of the formatted text. The height of an empty string is set to the same value as that of the default font.

layoutWidth

Type: FLOAT

The initial width given to the layout. It can be either larger or smaller than the text content width, depending on whether the text was wrapped.

layoutHeight

Type: FLOAT

Initial height given to the layout. Depending on the length of the text, it may be larger or smaller than the text content height.

maxBidiReorderingDepth

Type: UINT32

The maximum reordering count of any line of text, used to calculate the most number of hit-testing boxes needed. If the layout has no bidirectional text, or no text at all, the minimum level is 1.

lineCount

Type: UINT32

Total number of lines.

Requirements

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps]

Header

Dwrite.h

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.