From ee11fae9d0d2c16a3a4b4ecf5cf328ffe950bb03 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 21 Oct 2018 19:02:47 -0700 Subject: [PATCH] [color] Rename "gid" to "glyph" We don't expose "gid" in API. --- src/hb-ot-color.cc | 12 ++++++------ src/hb-ot-color.h | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/hb-ot-color.cc b/src/hb-ot-color.cc index 42ced528..7588bef8 100644 --- a/src/hb-ot-color.cc +++ b/src/hb-ot-color.cc @@ -218,10 +218,10 @@ hb_ot_color_get_palette_colors (hb_face_t *face, /** * hb_ot_color_get_color_layers: * @face: a font face. - * @gid: + * @glyph: * @start_offset: * @count: (inout) (optional): - * @gids: (array length=count) (out) (optional): + * @glyphs: (array length=count) (out) (optional): * @color_indices: (array length=count) (out) (optional): * * Returns: @@ -230,16 +230,16 @@ hb_ot_color_get_palette_colors (hb_face_t *face, */ unsigned int hb_ot_color_get_color_layers (hb_face_t *face, - hb_codepoint_t gid, + hb_codepoint_t glyph, unsigned int start_offset, unsigned int *count /* IN/OUT. May be NULL. */, - hb_codepoint_t *gids /* OUT. May be NULL. */, + hb_codepoint_t *glyphs /* OUT. May be NULL. */, unsigned int *color_indices /* OUT. May be NULL. */) { const OT::COLR& colr = _get_colr (face); unsigned int num_results = 0; unsigned int start_layer_index, num_layers = 0; - if (colr.get_base_glyph_record (gid, &start_layer_index, &num_layers)) + if (colr.get_base_glyph_record (glyph, &start_layer_index, &num_layers)) { if (count) { @@ -247,7 +247,7 @@ hb_ot_color_get_color_layers (hb_face_t *face, for (unsigned int i = 0; i < layer_count; i++) { if (colr.get_layer_record (start_layer_index + start_offset + i, - &gids[num_results], &color_indices[num_results])) + &glyphs[num_results], &color_indices[num_results])) ++num_results; } } diff --git a/src/hb-ot-color.h b/src/hb-ot-color.h index a5f245d6..7d42eb58 100644 --- a/src/hb-ot-color.h +++ b/src/hb-ot-color.h @@ -57,15 +57,15 @@ HB_EXTERN unsigned int hb_ot_color_get_palette_colors (hb_face_t *face, unsigned int palette, /* default=0 */ unsigned int start_offset, - unsigned int *color_count /* IN/OUT. May be NULL. */, + unsigned int *color_count, /* IN/OUT. May be NULL. */ hb_color_t *colors /* OUT. May be NULL. */); HB_EXTERN unsigned int hb_ot_color_get_color_layers (hb_face_t *face, - hb_codepoint_t gid, + hb_codepoint_t glyph, unsigned int start_offset, - unsigned int *count /* IN/OUT. May be NULL. */, - hb_codepoint_t *gids /* OUT. May be NULL. */, + unsigned int *count, /* IN/OUT. May be NULL. */ + hb_codepoint_t *glyphs, /* OUT. May be NULL. */ unsigned int *color_indices /* OUT. May be NULL. */); /** -- GitLab