IDWriteFontCollection::FindFamilyName method (dwrite.h)

Finds the font family with the specified family name.

Syntax

HRESULT FindFamilyName(
  [in]  WCHAR const *familyName,
  [out] UINT32      *index,
  [out] BOOL        *exists
);

Parameters

[in] familyName

Type: const WCHAR*

An array of characters, which is null-terminated, containing the name of the font family. The name is not case-sensitive but must otherwise exactly match a family name in the collection.

[out] index

Type: UINT32*

When this method returns, contains the zero-based index of the matching font family if the family name was found; otherwise, UINT_MAX.

[out] exists

Type: BOOL*

When this method returns, TRUE if the family name exists; otherwise, FALSE.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

   
Minimum supported client Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header dwrite.h
Library Dwrite.lib
DLL Dwrite.dll

See also

IDWriteFontCollection