Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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 |