IDWriteFontFace::GetFiles method (dwrite.h)

Obtains the font files representing a font face.

Syntax

HRESULT GetFiles(
  [in, out]       UINT32          *numberOfFiles,
  [out, optional] IDWriteFontFile **fontFiles
);

Parameters

[in, out] numberOfFiles

Type: UINT32*

If fontFiles is NULL, receives the number of files representing the font face. Otherwise, the number of font files being requested should be passed. See the Remarks section below for more information.

[out, optional] fontFiles

Type: IDWriteFontFile**

When this method returns, contains a pointer to a user-provided array that stores pointers to font files representing the font face. This parameter can be NULL if the user wants only the number of files representing the font face. This API increments reference count of the font file pointers returned according to COM conventions, and the client should release them when finished.

Return value

Type: HRESULT

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

Remarks

The IDWriteFontFace::GetFiles method should be called twice. The first time you call GetFilesfontFiles should be NULL. When the method returns, numberOfFiles receives the number of font files that represent the font face.

Then, call the method a second time, passing the numberOfFiles value that was output the first call, and a non-null buffer of the correct size to store the IDWriteFontFile pointers.

Requirements

Requirement Value
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

IDWriteFontFace