}
/**
- * 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.
* @palette_entry:
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 ()))
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);
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);
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();