IDWriteFontSet1::GetFilteredFonts(DWRITE_FONT_PROPERTYconst*,UINT32,BOOL,IDWriteFontSet1**) method (dwrite_3.h)

Retrieves a subset of fonts filtered by the given properties.

Syntax

HRESULT GetFilteredFonts(
        DWRITE_FONT_PROPERTY const *properties,
        UINT32                     propertyCount,
        BOOL                       selectAnyProperty,
  [out] IDWriteFontSet1            **filteredFontSet
);

Parameters

properties

Type: DWRITE_FONT_PROPERTY const *

List of properties to filter by.

propertyCount

Type: UINT32

The number of properties to filter.

selectAnyProperty

Type: BOOL

true if GetFilteredFontIndices should select any property; false if it should select the intersection of them all.

[out] filteredFontSet

Type: IDWriteFontSet1**

The address of a pointer to an IDWriteFontSet1 interface. On successful completion, the function sets the pointer to an object representing the subset of fonts that match the properties, 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.

Remarks

If no fonts match the filter, then the returned subset object will be empty (calling IDWriteFontSet::GetFontCount on it returns 0), but the function does not return an error. The subset is always equal to or less than the original set.

Requirements

Requirement Value
Minimum supported client Windows 10 Build 20348
Minimum supported server Windows 10 Build 20348
Target Platform Windows
Header dwrite_3.h
Library Dwrite.lib