IDWriteFontFace::GetDesignGlyphMetrics method (dwrite.h)
Obtains ideal (resolution-independent) glyph metrics in font design units.
Syntax
HRESULT GetDesignGlyphMetrics(
[in] UINT16 const *glyphIndices,
UINT32 glyphCount,
[out] DWRITE_GLYPH_METRICS *glyphMetrics,
BOOL isSideways
);
Parameters
[in] glyphIndices
Type: const UINT16*
An array of glyph indices for which to compute metrics. The array must contain at least as many elements as specified by glyphCount.
glyphCount
Type: UINT32
The number of elements in the glyphIndices array.
[out] glyphMetrics
Type: DWRITE_GLYPH_METRICS*
When this method returns, contains an array of DWRITE_GLYPH_METRICS structures. glyphMetrics must be initialized with an empty buffer that contains at least as many elements as glyphCount. The metrics returned by this function are in font design units.
isSideways
Type: BOOL
Indicates whether the font is being used in a sideways run. This can affect the glyph metrics if the font has oblique simulation because sideways oblique simulation differs from non-sideways oblique simulation
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
Design glyph metrics are used for glyph positioning.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | dwrite.h |
Library | Dwrite.lib |
DLL | Dwrite.dll |