Function

HarfBuzz-0.0HarfBuzzot_color_palette_get_colorsSince 2.1.0

  • 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 hb_ot_color_palette_get_colors() a second time.

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

    Parameters

    • face: face_t

      HarfBuzz.face_t to work upon

    • palette_index: number

      the index of the color palette to query

    • start_offset: number

      offset of the first color to retrieve

    Returns [number, number[]]

    the total number of colors in the palette

    2.1.0