IDWriteFactory5::UnpackFontFile method

The UnpackFontFile method unpacks font data from a container file (WOFF or WOFF2) and returns the unpacked font data in the form of a font file stream.

Syntax


HRESULT UnpackFontFile(
        DWRITE_CONTAINER_TYPE containerType,
  [in]  void                  fileData,
        UINT32                fileDataSize,
  [out] IDWriteFontFileStream **unpackedFontStream
);

Parameters

containerType

Type: DWRITE_CONTAINER_TYPE

Container type returned by AnalyzeContainerType.

fileData [in]

Type: void

Pointer to the compressed data.

fileDataSize

Type: UINT32

Size of the compressed data, in bytes.

unpackedFontStream [out]

Type: IDWriteFontFileStream**

Receives a pointer to a newly created font file stream containing the uncompressed data.

Return value

Type: HRESULT

Standard HRESULT error code. The return value is E_INVALIDARG if the container type is DWRITE_CONTAINER_TYPE_UNKNOWN.

Requirements

Header

Dwrite_3.h

Library

Dwrite.lib

See also

IDWriteFactory5

 

 

Show: