IDWriteFontResource::GetDefaultFontAxisValues method (dwrite_3.h)

Retrieves the default values for all axes supported by the font resource.

Syntax

HRESULT GetDefaultFontAxisValues(
  [out] DWRITE_FONT_AXIS_VALUE *fontAxisValues,
        UINT32                 fontAxisValueCount
);

Parameters

[out] fontAxisValues

Type: DWRITE_FONT_AXIS_VALUE*

A pointer to an array of DWRITE_FONT_AXIS_VALUE structures into which GetDefaultFontAxisValues writes the list of font axis values. You're responsible for managing the size and the lifetime of this array. Call GetFontAxisCount to determine the size of array to allocate.

fontAxisValueCount

Type: UINT32

The maximum number of font axis values to write into the memory block pointed to by fontAxisValues.

Return value

Type: HRESULT

If the function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Return value Description
E_INVALIDARG fontAxisValueCount doesn't match the value returned by GetFontAxisCount.

Remarks

Different font resources may have different defaults. For OpenType 1.8 fonts, these values come from the STAT and fvar tables. For older fonts without a STAT table, weight-width-slant-italic are read from the OS/2 table.

Requirements

Requirement Value
Minimum supported client Windows 10 Build 20348
Minimum supported server Windows 10 Build 20348
Target Platform Windows
Header dwrite_3.h
Library Dwrite.lib