IDWriteFontFace2::GetPaletteEntries method (dwrite_2.h)

Gets color values from the font's color palette.

Syntax

HRESULT GetPaletteEntries(
        UINT32         colorPaletteIndex,
        UINT32         firstEntryIndex,
        UINT32         entryCount,
  [out] DWRITE_COLOR_F *paletteEntries
);

Parameters

colorPaletteIndex

Zero-based index of the color palette. If the font does not have a palette with the specified index, the method returns DWRITE_E_NOCOLOR.

firstEntryIndex

Zero-based index of the first palette entry to read.

entryCount

Number of palette entries to read.

[out] paletteEntries

Array that receives the color values.

Return value

This method can return one of these values.

Return value Description
E_INVALIDARG
The sum of firstEntryIndex and entryCount is greater than the actual number of palette entries that's returned by the GetPaletteEntryCount method.
DWRITE_E_NOCOLOR
The font doesn't have a palette with the specified palette index.

Requirements

Requirement Value
Minimum supported client Windows 8.1 [desktop apps only]
Minimum supported server Windows Server 2012 R2 [desktop apps only]
Target Platform Windows
Header dwrite_2.h
Library Dwrite.lib
DLL Dwrite.dll

See also

IDWriteFontFace2