SetColorGlyphPalette

Text, Fonts, Colour

Description

Select the CPAL colour palette index used when drawing authored colour 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 colour authoring in DrawColorText and to built-in rasterised 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