IDWriteFactory3::CreateFontFaceReference(IDWriteFontFile*,UINT32,DWRITE_FONT_SIMULATIONS,IDWriteFontFaceReference**) method (dwrite_3.h)

Creates a reference to a font given an IDWriteFontFile.

Syntax

HRESULT CreateFontFaceReference(
        IDWriteFontFile          *fontFile,
        UINT32                   faceIndex,
        DWRITE_FONT_SIMULATIONS  fontSimulations,
  [out] IDWriteFontFaceReference **fontFaceReference
);

Parameters

fontFile

An IDWriteFontFile representing the font face.

faceIndex

Type: UINT32

The zero based index of a font face in cases when the font files contain a collection of font faces.
If the font files contain a single face, this value should be zero.

fontSimulations

Type: DWRITE_FONT_SIMULATIONS

Font face simulation flags for algorithmic emboldening and italicization.

[out] fontFaceReference

Type: IDWriteFontFaceReference**

Contains newly created font face reference object, or nullptr in case of failure.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Requirement Value
Minimum supported client Windows 10 [desktop apps only]
Minimum supported server Windows Server 2016 [desktop apps only]
Target Platform Windows
Header dwrite_3.h
Library Dwrite.lib
DLL Dwrite.dll

See also

IDWriteFactory3