Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IDWriteFontFace2::GetRecommendedRenderingMode method

Determines the recommended text rendering and grid-fit mode to be used based on the font, size, world transform, and measuring mode.

Syntax


HRESULT GetRecommendedRenderingMode(
  [in]                 FLOAT                    fontEmSize,
  [in]                 FLOAT                    dpiX,
  [in]                 FLOAT                    dpiY,
  [in, optional] const DWRITE_MATRIX            *transform,
  [in]                 BOOL                     isSideways,
  [in]                 DWRITE_OUTLINE_THRESHOLD outlineThreshold,
  [in]                 DWRITE_MEASURING_MODE    measuringMode,
  [in, optional]       IDWriteRenderingParams   *renderingParams,
  [out]                DWRITE_RENDERING_MODE    *renderingMode,
  [out]                DWRITE_GRID_FIT_MODE     *gridFitMode
);

Parameters

fontEmSize [in]

Type: FLOAT

Logical font size in DIPs.

dpiX [in]

Type: FLOAT

Number of pixels per logical inch in the horizontal direction.

dpiY [in]

Type: FLOAT

Number of pixels per logical inch in the vertical direction.

transform [in, optional]

Type: const DWRITE_MATRIX*

A DWRITE_MATRIX structure that describes the world transform.

isSideways [in]

Type: BOOL

Specifies whether the font is sideways. TRUE if the font is sideways; otherwise, FALSE.

outlineThreshold [in]

Type: DWRITE_OUTLINE_THRESHOLD

A DWRITE_OUTLINE_THRESHOLD-typed value that specifies the quality of the graphics system's outline rendering, affects the size threshold above which outline rendering is used.

measuringMode [in]

Type: DWRITE_MEASURING_MODE

A DWRITE_MEASURING_MODE-typed value that specifies the method used to measure during text layout. For proper glyph spacing, this method returns a rendering mode that is compatible with the specified measuring mode.

renderingParams [in, optional]

Type: IDWriteRenderingParams*

A pointer to a IDWriteRenderingParams interface for the rendering parameters object. This parameter is necessary in case the rendering parameters object overrides the rendering mode.

renderingMode [out]

Type: DWRITE_RENDERING_MODE*

A pointer to a variable that receives a DWRITE_RENDERING_MODE-typed value for the recommended rendering mode.

gridFitMode [out]

Type: DWRITE_GRID_FIT_MODE*

A pointer to a variable that receives a DWRITE_GRID_FIT_MODE-typed value for the recommended grid-fit mode.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Minimum supported client

Windows 8.1 [desktop apps only]

Minimum supported server

Windows Server 2012 R2 [desktop apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Header

Dwrite_2.h

Library

Dwrite.lib

DLL

Dwrite.dll

See also

IDWriteFontFace2

 

 

Show:
© 2017 Microsoft