Rename hb_ot_meta_get_entries() to +hb_ot_meta_get_entry_tags()
This commit is contained in:
parent
aade9b70aa
commit
e56d4ff43b
|
@ -613,7 +613,7 @@ hb_ot_math_get_glyph_assembly
|
||||||
<SECTION>
|
<SECTION>
|
||||||
<FILE>hb-ot-meta</FILE>
|
<FILE>hb-ot-meta</FILE>
|
||||||
hb_ot_meta_t
|
hb_ot_meta_t
|
||||||
hb_ot_meta_get_entries
|
hb_ot_meta_get_entry_tags
|
||||||
hb_ot_meta_reference_entry
|
hb_ot_meta_reference_entry
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
* Since: REPLACEME
|
* Since: REPLACEME
|
||||||
**/
|
**/
|
||||||
unsigned int
|
unsigned int
|
||||||
hb_ot_meta_get_entries (hb_face_t *face,
|
hb_ot_meta_get_entry_tags (hb_face_t *face,
|
||||||
unsigned int start_offset,
|
unsigned int start_offset,
|
||||||
unsigned int *entries_count, /* IN/OUT. May be NULL. */
|
unsigned int *entries_count, /* IN/OUT. May be NULL. */
|
||||||
hb_ot_meta_tag_t *entries /* OUT. May be NULL. */)
|
hb_ot_meta_tag_t *entries /* OUT. May be NULL. */)
|
||||||
|
|
|
@ -58,7 +58,7 @@ typedef enum {
|
||||||
} hb_ot_meta_tag_t;
|
} hb_ot_meta_tag_t;
|
||||||
|
|
||||||
HB_EXTERN unsigned int
|
HB_EXTERN unsigned int
|
||||||
hb_ot_meta_get_entries (hb_face_t *face,
|
hb_ot_meta_get_entry_tags (hb_face_t *face,
|
||||||
unsigned int start_offset,
|
unsigned int start_offset,
|
||||||
unsigned int *entries_count, /* IN/OUT. May be NULL. */
|
unsigned int *entries_count, /* IN/OUT. May be NULL. */
|
||||||
hb_ot_meta_tag_t *entries /* OUT. May be NULL. */);
|
hb_ot_meta_tag_t *entries /* OUT. May be NULL. */);
|
||||||
|
|
|
@ -48,11 +48,11 @@ main (int argc, char **argv)
|
||||||
unsigned int count = 0;
|
unsigned int count = 0;
|
||||||
|
|
||||||
#ifndef HB_NO_META
|
#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 *)
|
hb_ot_meta_tag_t *tags = (hb_ot_meta_tag_t *)
|
||||||
malloc (sizeof (hb_ot_meta_tag_t) * count);
|
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)
|
for (unsigned i = 0; i < count; ++i)
|
||||||
{
|
{
|
||||||
hb_blob_t *entry = hb_ot_meta_reference_entry (face, tags[i]);
|
hb_blob_t *entry = hb_ot_meta_reference_entry (face, tags[i]);
|
||||||
|
|
|
@ -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_min_connector_overlap (font, HB_DIRECTION_RTL);
|
||||||
hb_ot_math_get_glyph_assembly (font, cp, HB_DIRECTION_BTT, 0, NULL, NULL, NULL);
|
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_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);
|
hb_ot_metrics_get_position (font, HB_OT_METRICS_TAG_HORIZONTAL_ASCENDER, NULL);
|
||||||
|
|
|
@ -35,18 +35,18 @@ test_ot_meta_get_entries (void)
|
||||||
hb_ot_meta_tag_t entries[2];
|
hb_ot_meta_tag_t entries[2];
|
||||||
|
|
||||||
unsigned int entries_count = 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_count, ==, 2);
|
||||||
g_assert_cmpint (entries[0], ==, HB_TAG ('a','p','p','l'));
|
g_assert_cmpint (entries[0], ==, HB_TAG ('a','p','p','l'));
|
||||||
g_assert_cmpint (entries[1], ==, HB_TAG ('b','i','l','d'));
|
g_assert_cmpint (entries[1], ==, HB_TAG ('b','i','l','d'));
|
||||||
|
|
||||||
entries_count = 1;
|
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_count, ==, 1);
|
||||||
g_assert_cmpint (entries[0], ==, HB_TAG ('d','l','n','g'));
|
g_assert_cmpint (entries[0], ==, HB_TAG ('d','l','n','g'));
|
||||||
|
|
||||||
entries_count = 2;
|
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_count, ==, 1);
|
||||||
g_assert_cmpint (entries[0], ==, HB_TAG ('s','l','n','g'));
|
g_assert_cmpint (entries[0], ==, HB_TAG ('s','l','n','g'));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue