Freigeben über


IDWriteFontFace::GetRecommendedRenderingMode Method

Determines the recommended rendering mode for the font, using the specified size and rendering parameters.

Syntax

virtual HRESULT GetRecommendedRenderingMode(
  FLOAT  emSize,
  FLOAT  pixelsPerDip,
  DWRITE_MEASURING_MODE  measuringMode,
  IDWriteRenderingParams * renderingParams,
  [out]  DWRITE_RENDERING_MODE * renderingMode
) = 0;

Parameter

  • emSize
    The logical size of the font in DIP units. A DIP ("device-independent pixel") equals 1/96 inch.

  • pixelsPerDip
    The number of physical pixels per DIP. For example, if the DPI of the rendering surface is 96, this value is 1.0f. If the DPI is 120, this value is 120.0f/96.

  • measuringMode
    The measuring method that will be used for glyphs in the font. Renderer implementations may choose different rendering modes for different measuring methods, for example:

    • DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL for DWRITE_MEASURING_MODE_NATURAL
    • DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC for DWRITE_MEASURING_MODE_GDI_CLASSIC
    • DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL for DWRITE_MEASURING_MODE_GDI_NATURAL
  • renderingParams
    A pointer to an object that contains rendering settings such as gamma level, enhanced contrast, and ClearType level. This parameter is necessary in case the rendering parameters object overrides the rendering mode.

  • renderingMode [out]
    When this method returns, contains a value that indicates the recommended rendering mode to use.

Rückgabewert

Ist Methode erfolgreich, wird "S_OK" zurückgegeben. Andernfalls wird ein HRESULT-Fehlercode zurückgegeben.

Anforderungen

Mindestens unterstützter Client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista

Mindestens unterstützter Server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008

Header

Dwrite.h

Bibliothek

Dwrite.lib

DLL

Dwrite.dll

Siehe auch

IDWriteFontFace