From 8afd3ccb106196c230741417d8364722df7f6e32 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 18 Jan 2023 20:43:10 -0700 Subject: [PATCH] [paint] Add HB_PAINT_PALETTE_INDEX_CUSTOM --- src/hb-font.cc | 3 ++- src/hb-paint.h | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/hb-font.cc b/src/hb-font.cc index f8eb60a19..3f169ee54 100644 --- a/src/hb-font.cc +++ b/src/hb-font.cc @@ -1440,7 +1440,8 @@ hb_font_draw_glyph (hb_font_t *font, * * If the font has color palettes (see hb_ot_color_has_palettes()), * then @palette_index selects the palette to use. If the font doesn't - * have palettes, passing 0 is fine. + * have palettes, passing 0 is fine. Use %HB_PAINT_PALETTE_INDEX_CUSTOM + * for custom palette. * * Since: REPLACEME */ diff --git a/src/hb-paint.h b/src/hb-paint.h index 5779d3c77..3f21c89e1 100644 --- a/src/hb-paint.h +++ b/src/hb-paint.h @@ -33,6 +33,18 @@ HB_BEGIN_DECLS + +/** + * HB_PAINT_PALETTE_INDEX_CUSTOM + * + * A palette index signifying that custom colors are in use. + * Such colors are fetched from the client using the + * custom-palette-color callback of the paint functions. + * + * Since: REPLACEME + **/ +#define HB_PAINT_PALETTE_INDEX_CUSTOM 0xFFFFFFFF + /** * hb_paint_funcs_t: *