otColorPaletteGetColors

Fetches a list of the colors in a color palette.

After calling this function, colors will be filled with the palette colors. If colors is NULL, the function will just return the number of total colors without storing any actual colors; this can be used for allocating a buffer of suitable size before calling harfbuzz.global.otColorPaletteGetColors a second time.

The RGBA values in the palette are unpremultiplied. See the OpenType spec CPAL section for details.

uint
otColorPaletteGetColors

Parameters

face harfbuzz.face.Face

#hb_face_t to work upon

paletteIndex uint

the index of the color palette to query

startOffset uint

offset of the first color to retrieve

colors harfbuzz.types.Color[]

The array of #hb_color_t records found

Return Value

Type: uint

the total number of colors in the palette