IDWriteFactory3::CreateFontFaceReference(WCHARconst*,FILETIMEconst*,UINT32,DWRITE_FONT_SIMULATIONS,IDWriteFontFaceReference**) method (dwrite_3.h)
Creates a reference to a font given a full path.
Syntax
HRESULT CreateFontFaceReference(
WCHAR const *filePath,
FILETIME const *lastWriteTime,
UINT32 faceIndex,
DWRITE_FONT_SIMULATIONS fontSimulations,
IDWriteFontFaceReference **fontFaceReference
);
Parameters
filePath
Type: [in] WCHAR
Absolute file path. Subsequent operations on the constructed object may fail if the user provided filePath doesn't correspond to a valid file on the disk.
lastWriteTime
Type: [in, optional] FILETIME
Last modified time of the input file path. If the parameter is omitted,
the function will access the font file to obtain its last write time, so the clients are encouraged to specify this value
to avoid extra disk access. Subsequent operations on the constructed object may fail
if the user provided lastWriteTime doesn't match the file on the disk.
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.
fontFaceReference
Type: [out] 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
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for