IDWriteFontCollection2::GetMatchingFonts method (dwrite_3.h)
Retrieves a list of fonts in the specified font family, ranked in order of how well they match the specified axis values.
Syntax
HRESULT GetMatchingFonts(
WCHAR const *familyName,
DWRITE_FONT_AXIS_VALUE const *fontAxisValues,
UINT32 fontAxisValueCount,
[out] IDWriteFontList2 **fontList
);
Parameters
familyName
Type: WCHAR const *
Name of the font family. The name is not case-sensitive, but must otherwise exactly match a family name in the collection.
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] fontList
Type: IDWriteFontList2**
The address of a pointer to an IDWriteFontList2 interface. On successful completion, the function sets the pointer to a newly created font list object.
Return value
Type: HRESULT
If the function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
If no fonts match, an empty list object is returned (calling IDWriteFontList::GetFontCount on it returns 0), but the function doesn't return an error.
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 |