SetColorGlyphPalette

Text, Fonts, Color

Description

Select the CPAL color palette index used when drawing authored color glyphs and rendering COLR glyphs

Syntax

Delphi

Function TPDFlib.SetColorGlyphPalette(PaletteIndex: Integer): Integer;

Parameters

PaletteIndexNon-negative zero-based CPAL palette index

Return values

Returns 1 when PaletteIndex is 0 or greater, or 0 when PaletteIndex is negative.

Remarks

Applies both to vector/gradient color authoring in DrawColorText and to built-in rasterized rendering of CPAL/COLR fonts.

If a font defines fewer palettes than PaletteIndex + 1, rendering and authoring fall back cleanly to palette 0.

See also

GetColorGlyphPalette, GetFontColorPaletteCount, DrawColorText