diff --git a/src/hb-ot-color.cc b/src/hb-ot-color.cc index 1cfb9874c..55a8c6e72 100644 --- a/src/hb-ot-color.cc +++ b/src/hb-ot-color.cc @@ -116,20 +116,6 @@ hb_ot_color_get_palette_name_id (hb_face_t *face, unsigned int palette) return _get_cpal (face).get_palette_name_id (palette); } -/** - * hb_ot_color_get_palette_entry_count: - * @face: a font face. - * - * Returns: Number of entries on each palette - * - * Since: REPLACEME - */ -unsigned int -hb_ot_color_get_palette_entry_count (hb_face_t *face) -{ - return _get_cpal (face).get_palette_entries_count (); -} - /** * hb_ot_color_get_palette_entry_name_id: * @face: a font face. @@ -176,8 +162,8 @@ unsigned int hb_ot_color_get_palette_colors (hb_face_t *face, unsigned int palette, /* default=0 */ unsigned int start_offset, - unsigned int *count /* IN/OUT */, - hb_color_t *colors /* OUT */) + unsigned int *count /* IN/OUT. May be NULL. */, + hb_color_t *colors /* OUT. May be NULL. */) { const OT::CPAL& cpal = _get_cpal(face); if (unlikely (palette >= cpal.get_palette_count ())) diff --git a/src/hb-ot-color.h b/src/hb-ot-color.h index 25b621754..eb006031a 100644 --- a/src/hb-ot-color.h +++ b/src/hb-ot-color.h @@ -50,9 +50,6 @@ hb_ot_color_get_palette_count (hb_face_t *face); HB_EXTERN hb_name_id_t hb_ot_color_get_palette_name_id (hb_face_t *face, unsigned int palette); -HB_EXTERN unsigned int -hb_ot_color_get_palette_entry_count (hb_face_t *face); - HB_EXTERN hb_name_id_t hb_ot_color_get_palette_entry_name_id (hb_face_t *face, unsigned int palette_entry); diff --git a/test/api/test-ot-color.c b/test/api/test-ot-color.c index 3b19016d2..4e358203d 100644 --- a/test/api/test-ot-color.c +++ b/test/api/test-ot-color.c @@ -295,14 +295,10 @@ test_hb_ot_color_get_palette_colors_v1 (void) static void -test_hb_ot_color_get_palette_entry (void) +test_hb_ot_color_get_palette_entry_name_id (void) { hb_face_t *empty = hb_face_get_empty (); - g_assert_cmpuint (hb_ot_color_get_palette_entry_count (empty), ==, 0); - g_assert_cmpuint (hb_ot_color_get_palette_entry_count (cpal_v0), ==, 2); - g_assert_cmpuint (hb_ot_color_get_palette_entry_count (cpal_v1), ==, 2); - g_assert_cmpuint (hb_ot_color_get_palette_entry_name_id (empty, 0), ==, HB_NAME_ID_INVALID); g_assert_cmpuint (hb_ot_color_get_palette_entry_name_id (empty, 1), ==, HB_NAME_ID_INVALID); g_assert_cmpuint (hb_ot_color_get_palette_entry_name_id (empty, 2), ==, HB_NAME_ID_INVALID); @@ -380,7 +376,7 @@ main (int argc, char **argv) hb_test_add (test_hb_ot_color_get_palette_colors_empty); hb_test_add (test_hb_ot_color_get_palette_colors_v0); hb_test_add (test_hb_ot_color_get_palette_colors_v1); - hb_test_add (test_hb_ot_color_get_palette_entry); + hb_test_add (test_hb_ot_color_get_palette_entry_name_id); hb_test_add (test_hb_ot_color_get_color_layers); hb_test_add (test_hb_ot_color_has_data); status = hb_test_run();