IDWriteFontSet1::CreateFontResource method (dwrite_3.h)

Creates the font resource of a single item.

Syntax

HRESULT CreateFontResource(
        UINT32              listIndex,
  [out] IDWriteFontResource **fontResource
);

Parameters

listIndex

Type: UINT32

Zero-based index of the font item in the set.

[out] fontResource

Type: IDWriteFontResource**

The address of a pointer to an IDWriteFontResource interface. On successful completion, the function sets the pointer to a newly created font resource object.

Return value

Type: HRESULT

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

Return value Description
DWRITE_E_REMOTEFONT The file is not local.

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