IDWriteFontFace3::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_MODE1 *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_MODE1*
A pointer to a variable that receives a DWRITE_RENDERING_MODE1-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 10 [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2016 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also