[font] Rename palette to palette_index

This commit is contained in:
Behdad Esfahbod 2023-01-18 20:39:36 -07:00
parent bd73314616
commit 9a2f2b593e
2 changed files with 7 additions and 7 deletions

View File

@ -1429,7 +1429,7 @@ hb_font_draw_glyph (hb_font_t *font,
* @glyph: The glyph ID
* @pfuncs: #hb_paint_funcs_t to paint with
* @paint_data: User data to pass to paint callbacks
* @palette: The index of the font's color palette to use
* @palette_index: The index of the font's color palette to use
* @foreground: The foreground color, unpremultipled
*
* Paints the glyph.
@ -1439,7 +1439,7 @@ hb_font_draw_glyph (hb_font_t *font,
* to them.
*
* If the font has color palettes (see hb_ot_color_has_palettes()),
* then @palette selects the palette to use. If the font doesn't
* then @palette_index selects the palette to use. If the font doesn't
* have palettes, passing 0 is fine.
*
* Since: REPLACEME
@ -1448,10 +1448,10 @@ void
hb_font_paint_glyph (hb_font_t *font,
hb_codepoint_t glyph,
hb_paint_funcs_t *pfuncs, void *paint_data,
unsigned int palette,
unsigned int palette_index,
hb_color_t foreground)
{
font->paint_glyph (glyph, pfuncs, paint_data, palette, foreground);
font->paint_glyph (glyph, pfuncs, paint_data, palette_index, foreground);
}
/* A bit higher-level, and with fallback */

View File

@ -531,7 +531,7 @@ typedef void (*hb_font_draw_glyph_func_t) (hb_font_t *font, void *font_data,
* @glyph: The glyph ID to query
* @paint_funcs: The paint functions to use
* @paint_data: The data accompanying the paint functions
* @palette: The color palette to use
* @palette_index: The color palette to use
* @foreground: The foreground color
* @user_data: User data pointer passed by the caller
*
@ -542,7 +542,7 @@ typedef void (*hb_font_draw_glyph_func_t) (hb_font_t *font, void *font_data,
typedef void (*hb_font_paint_glyph_func_t) (hb_font_t *font, void *font_data,
hb_codepoint_t glyph,
hb_paint_funcs_t *paint_funcs, void *paint_data,
unsigned int palette,
unsigned int palette_index,
hb_color_t foreground,
void *user_data);
@ -950,7 +950,7 @@ HB_EXTERN void
hb_font_paint_glyph (hb_font_t *font,
hb_codepoint_t glyph,
hb_paint_funcs_t *pfuncs, void *paint_data,
unsigned int palette,
unsigned int palette_index,
hb_color_t foreground);
/* high-level funcs, with fallback */