From 2c2a2b97dbe24ae2e09018f435559c97a460bdcb Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Mon, 29 Jul 2019 22:01:13 +0430 Subject: [PATCH] [meta] Rename hb_ot_meta_t to hb_ot_meta_tag_t --- src/hb-ot-meta-table.hh | 10 +++++----- src/hb-ot-meta.cc | 10 +++++----- src/hb-ot-meta.h | 14 +++++++------- src/test-ot-meta.cc | 4 ++-- test/api/test-ot-meta.c | 6 +++--- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/hb-ot-meta-table.hh b/src/hb-ot-meta-table.hh index 708cdf4ff..f0842e4ef 100644 --- a/src/hb-ot-meta-table.hh +++ b/src/hb-ot-meta-table.hh @@ -32,7 +32,7 @@ * https://docs.microsoft.com/en-us/typography/opentype/spec/meta * https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6meta.html */ -#define HB_OT_TAG_meta HB_TAG('m','e','t','a') +#define HB_OT_TAG_meta HB_TAG ('m','e','t','a') namespace OT { @@ -78,15 +78,15 @@ struct meta hb_blob_t *reference_entry (hb_tag_t tag) const { return table->dataMaps.lsearch (tag).reference_entry (table.get_blob ()); } - unsigned int get_entries (unsigned int start_offset, - unsigned int *count, - hb_ot_meta_t *entries) const + unsigned int get_entries (unsigned int start_offset, + unsigned int *count, + hb_ot_meta_tag_t *entries) const { if (count) { hb_array_t arr = table->dataMaps.sub_array (start_offset, count); for (unsigned int i = 0; i < arr.length; i++) - entries[i] = (hb_ot_meta_t) arr[i].get_tag (); + entries[i] = (hb_ot_meta_tag_t) arr[i].get_tag (); } return table->dataMaps.len; } diff --git a/src/hb-ot-meta.cc b/src/hb-ot-meta.cc index 78eca6829..a5ce14876 100644 --- a/src/hb-ot-meta.cc +++ b/src/hb-ot-meta.cc @@ -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_t *entries /* OUT. May be NULL. */) +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. */) { return face->table.meta->get_entries (start_offset, entries_count, entries); } @@ -69,7 +69,7 @@ hb_ot_meta_get_entries (hb_face_t *face, * Since: REPLACEME **/ hb_blob_t * -hb_ot_meta_reference_entry (hb_face_t *face, hb_ot_meta_t meta_tag) +hb_ot_meta_reference_entry (hb_face_t *face, hb_ot_meta_tag_t meta_tag) { return face->table.meta->reference_entry (meta_tag); } diff --git a/src/hb-ot-meta.h b/src/hb-ot-meta.h index e80273a7b..5267728ea 100644 --- a/src/hb-ot-meta.h +++ b/src/hb-ot-meta.h @@ -34,7 +34,7 @@ HB_BEGIN_DECLS /** - * hb_ot_meta_t: + * hb_ot_meta_tag_t: * * From https://docs.microsoft.com/en-us/typography/opentype/spec/meta * @@ -49,16 +49,16 @@ typedef enum { HB_OT_META_SUPPORTED_LANGUAGES= HB_TAG ('s','l','n','g'), _HB_OT_META_MAX_VALUE = HB_TAG_MAX_SIGNED /*< skip >*/ -} hb_ot_meta_t; +} 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_t *entries /* OUT. May be NULL. */); +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_EXTERN hb_blob_t * -hb_ot_meta_reference_entry (hb_face_t *face, hb_ot_meta_t meta_tag); +hb_ot_meta_reference_entry (hb_face_t *face, hb_ot_meta_tag_t meta_tag); HB_END_DECLS diff --git a/src/test-ot-meta.cc b/src/test-ot-meta.cc index 33b1ee94e..512df5a78 100644 --- a/src/test-ot-meta.cc +++ b/src/test-ot-meta.cc @@ -50,8 +50,8 @@ main (int argc, char **argv) #ifndef HB_NO_META count = hb_ot_meta_get_entries (face, 0, nullptr, nullptr); - hb_ot_meta_t *tags = (hb_ot_meta_t *) - malloc (sizeof (hb_ot_meta_t) * count); + 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); for (unsigned i = 0; i < count; ++i) { diff --git a/test/api/test-ot-meta.c b/test/api/test-ot-meta.c index a08e67dc5..b8be5a30d 100644 --- a/test/api/test-ot-meta.c +++ b/test/api/test-ot-meta.c @@ -32,7 +32,7 @@ static void test_ot_meta_get_entries (void) { hb_face_t *face = hb_test_open_font_file ("fonts/meta.ttf"); - hb_ot_meta_t entries[2]; + 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); @@ -61,10 +61,10 @@ test_ot_meta_reference_entry (void) g_assert_cmpint (hb_blob_get_length (dlng), ==, 8); g_assert_cmpmem (hb_blob_get_data (dlng, NULL), 8, "ar,de,fa", 8); hb_blob_destroy (dlng); - hb_blob_t *fslf = hb_ot_meta_reference_entry (face, (hb_ot_meta_t) HB_TAG ('f','s','l','f')); + hb_blob_t *fslf = hb_ot_meta_reference_entry (face, (hb_ot_meta_tag_t) HB_TAG ('f','s','l','f')); g_assert_cmpint (hb_blob_get_length (fslf), ==, 12); hb_blob_destroy (fslf); - hb_blob_t *nacl = hb_ot_meta_reference_entry (face, (hb_ot_meta_t) HB_TAG ('n','a','c','l')); + hb_blob_t *nacl = hb_ot_meta_reference_entry (face, (hb_ot_meta_tag_t) HB_TAG ('n','a','c','l')); g_assert_cmpint (hb_blob_get_length (nacl), ==, 0); hb_blob_destroy (nacl); hb_blob_t *slng = hb_ot_meta_reference_entry (face, HB_OT_META_SUPPORTED_LANGUAGES);