IDWriteFontFace1::GetGdiCompatibleGlyphAdvances method (dwrite_1.h)
Returns the pixel-aligned advances for a sequences of glyphs.
HRESULT GetGdiCompatibleGlyphAdvances( FLOAT emSize, FLOAT pixelsPerDip, [in, optional] DWRITE_MATRIX const *transform, BOOL useGdiNatural, BOOL isSideways, UINT32 glyphCount, [in] UINT16 const *glyphIndices, [out] INT32 *glyphAdvances );
Logical size of the font in DIP units. A DIP ("device-independent pixel") equals 1/96 inch.
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.
[in, optional] transform
Type: const DWRITE_MATRIX*
Optional transform applied to the glyphs and their positions. This transform is applied after the scaling specified by the font size and pixelsPerDip.
When FALSE, the metrics are the same as GDI aliased text (DWRITE_MEASURING_MODE_GDI_CLASSIC). When TRUE, the metrics are the same as those measured by GDI using a font using CLEARTYPE_NATURAL_QUALITY (DWRITE_MEASURING_MODE_GDI_NATURAL).
Retrieve the glyph's vertical advances rather than horizontal advances.
Total glyphs to retrieve adjustments for.
Type: const UINT16*
An array of glyph id's to retrieve advances.
Type: const INT32*
The returned advances in font design units for each glyph.
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
This is equivalent to calling GetGdiCompatibleGlyphMetrics and using only the advance width and height.
Like GetGdiCompatibleGlyphMetrics, these are in design units, meaning they must be scaled down by DWRITE_FONT_METRICS::designUnitsPerEm.
|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]|