IDWriteFontResource::CreateFontFace method (dwrite_3.h)
Creates a font face instance with specific axis values.
Syntax
HRESULT CreateFontFace(
DWRITE_FONT_SIMULATIONS fontSimulations,
DWRITE_FONT_AXIS_VALUE const *fontAxisValues,
UINT32 fontAxisValueCount,
[out] IDWriteFontFace5 **fontFace
);
Parameters
fontSimulations
Type: DWRITE_FONT_SIMULATIONS
Font face simulation flags for algorithmic emboldening and italicization.
fontAxisValues
Type: DWRITE_FONT_AXIS_VALUE const *
A pointer to an array containing a list of font axis values. The array should be the size (the number of elements) indicated by the fontAxisValueCount argument.
fontAxisValueCount
Type: UINT32
The number of font axis values contained in the fontAxisValues array.
[out] fontFace
Type: IDWriteFontFace5**
The address of a pointer to an IDWriteFontFace5 interface. On successful completion, the function sets the pointer to a newly created font face object, otherwise it sets the pointer to nullptr
.
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 font is not local. |
Remarks
The axis values that you provide are permitted to be a subset or superset of all the ones actually supported by the font. Any unspecified axes use their default values: values beyond the ranges are clamped, and any non-varying axes have no effect.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 10 Build 16299 |
Minimum supported server | Windows 10 Build 16299 |
Target Platform | Windows |
Header | dwrite_3.h |
Library | Dwrite.lib |