Rename hb_ot_meta_get_entries() to +hb_ot_meta_get_entry_tags()

This commit is contained in:
Behdad Esfahbod 2019-08-13 21:02:47 -07:00
parent aade9b70aa
commit e56d4ff43b
6 changed files with 15 additions and 15 deletions

View File

@ -613,7 +613,7 @@ hb_ot_math_get_glyph_assembly
<SECTION>
<FILE>hb-ot-meta</FILE>
hb_ot_meta_t
hb_ot_meta_get_entries
hb_ot_meta_get_entry_tags
hb_ot_meta_reference_entry
</SECTION>

View File

@ -49,10 +49,10 @@
* Since: REPLACEME
**/
unsigned int
hb_ot_meta_get_entries (hb_face_t *face,
unsigned int start_offset,
unsigned int *entries_count, /* IN/OUT. May be NULL. */
hb_ot_meta_tag_t *entries /* OUT. May be NULL. */)
hb_ot_meta_get_entry_tags (hb_face_t *face,
unsigned int start_offset,
unsigned int *entries_count, /* IN/OUT. May be NULL. */
hb_ot_meta_tag_t *entries /* OUT. May be NULL. */)
{
return face->table.meta->get_entries (start_offset, entries_count, entries);
}

View File

@ -58,10 +58,10 @@ typedef enum {
} hb_ot_meta_tag_t;
HB_EXTERN unsigned int
hb_ot_meta_get_entries (hb_face_t *face,
unsigned int start_offset,
unsigned int *entries_count, /* IN/OUT. May be NULL. */
hb_ot_meta_tag_t *entries /* OUT. May be NULL. */);
hb_ot_meta_get_entry_tags (hb_face_t *face,
unsigned int start_offset,
unsigned int *entries_count, /* IN/OUT. May be NULL. */
hb_ot_meta_tag_t *entries /* OUT. May be NULL. */);
HB_EXTERN hb_blob_t *
hb_ot_meta_reference_entry (hb_face_t *face, hb_ot_meta_tag_t meta_tag);

View File

@ -48,11 +48,11 @@ main (int argc, char **argv)
unsigned int count = 0;
#ifndef HB_NO_META
count = hb_ot_meta_get_entries (face, 0, nullptr, nullptr);
count = hb_ot_meta_get_entry_tags (face, 0, nullptr, nullptr);
hb_ot_meta_tag_t *tags = (hb_ot_meta_tag_t *)
malloc (sizeof (hb_ot_meta_tag_t) * count);
hb_ot_meta_get_entries (face, 0, &count, tags);
hb_ot_meta_get_entry_tags (face, 0, &count, tags);
for (unsigned i = 0; i < count; ++i)
{
hb_blob_t *entry = hb_ot_meta_reference_entry (face, tags[i]);

View File

@ -90,7 +90,7 @@ test_face (hb_face_t *face,
hb_ot_math_get_min_connector_overlap (font, HB_DIRECTION_RTL);
hb_ot_math_get_glyph_assembly (font, cp, HB_DIRECTION_BTT, 0, NULL, NULL, NULL);
hb_ot_meta_get_entries (face, 0, NULL, NULL);
hb_ot_meta_get_entry_tags (face, 0, NULL, NULL);
hb_blob_destroy (hb_ot_meta_reference_entry (face, HB_OT_META_TAG_DESIGN_LANGUAGES));
hb_ot_metrics_get_position (font, HB_OT_METRICS_TAG_HORIZONTAL_ASCENDER, NULL);

View File

@ -35,18 +35,18 @@ test_ot_meta_get_entries (void)
hb_ot_meta_tag_t entries[2];
unsigned int entries_count = 2;
g_assert_cmpint (hb_ot_meta_get_entries (face, 0, &entries_count, entries), ==, 5);
g_assert_cmpint (hb_ot_meta_get_entry_tags (face, 0, &entries_count, entries), ==, 5);
g_assert_cmpint (entries_count, ==, 2);
g_assert_cmpint (entries[0], ==, HB_TAG ('a','p','p','l'));
g_assert_cmpint (entries[1], ==, HB_TAG ('b','i','l','d'));
entries_count = 1;
g_assert_cmpint (hb_ot_meta_get_entries (face, 2, &entries_count, entries), ==, 5);
g_assert_cmpint (hb_ot_meta_get_entry_tags (face, 2, &entries_count, entries), ==, 5);
g_assert_cmpint (entries_count, ==, 1);
g_assert_cmpint (entries[0], ==, HB_TAG ('d','l','n','g'));
entries_count = 2;
g_assert_cmpint (hb_ot_meta_get_entries (face, 4, &entries_count, entries), ==, 5);
g_assert_cmpint (hb_ot_meta_get_entry_tags (face, 4, &entries_count, entries), ==, 5);
g_assert_cmpint (entries_count, ==, 1);
g_assert_cmpint (entries[0], ==, HB_TAG ('s','l','n','g'));