IDWriteFontFace1::GetGdiCompatibleMetrics method (dwrite_1.h)

Obtains design units and common metrics for the font face. These metrics are applicable to all the glyphs within a fontface and are used by applications for layout calculations.

Syntax

HRESULT GetGdiCompatibleMetrics(
                 FLOAT                emSize,
                 FLOAT                pixelsPerDip,
  [in, optional] DWRITE_MATRIX const  *transform,
  [out]          DWRITE_FONT_METRICS1 *fontMetrics
);

Parameters

emSize

Type: FLOAT

The logical size of the font in DIP units.

pixelsPerDip

Type: FLOAT

The number of physical pixels per DIP.

[in, optional] transform

Type: const DWRITE_MATRIX*

An optional transform applied to the glyphs and their positions. This transform is applied after the scaling specified by the font size and pixelsPerDip.

[out] fontMetrics

Type: DWRITE_FONT_METRICS1*

A pointer to a DWRITE_FONT_METRICS1 structure to fill in. The metrics returned by this function are in font design units.

Return value

Type: HRESULT

Standard HRESULT error code.

Requirements

Requirement Value
Minimum supported client Windows 8 and Platform Update for Windows 7 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header dwrite_1.h
Library Dwrite_1.lib
DLL Dwrite_1.dll

See also

IDWriteFontFace

IDWriteFontFace1