IDWriteFontFile::Analyze method (dwrite.h)

Analyzes a file and returns whether it represents a font, and whether the font type is supported by the font system.

Syntax

HRESULT Analyze(
  [out]           BOOL                  *isSupportedFontType,
  [out]           DWRITE_FONT_FILE_TYPE *fontFileType,
  [out, optional] DWRITE_FONT_FACE_TYPE *fontFaceType,
  [out]           UINT32                *numberOfFaces
);

Parameters

[out] isSupportedFontType

Type: BOOL*

TRUE if the font type is supported by the font system; otherwise, FALSE.

[out] fontFileType

Type: DWRITE_FONT_FILE_TYPE*

When this method returns, contains a value that indicates the type of the font file. Note that even if isSupportedFontType is FALSE, the fontFileType value may be different from DWRITE_FONT_FILE_TYPE_UNKNOWN.

[out, optional] fontFaceType

Type: DWRITE_FONT_FACE_TYPE*

When this method returns, contains a value that indicates the type of the font face. If fontFileType is not equal to DWRITE_FONT_FILE_TYPE_UNKNOWN, then that can be constructed from the font file.

[out] numberOfFaces

Type: UINT32*

When this method returns, contains the number of font faces contained in the font file.

Return value

Type: HRESULT

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

Remarks

Important  Certain font file types are recognized, but not supported by the font system. For example, the font system will recognize a file as a Type 1 font file but will not be able to construct a font face object from it. In such situations, Analyze will set isSupportedFontType output parameter to FALSE.
 

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

IDWriteFontFile