From 2c7d4db7af16e228bb30eddf7334a524b74ae26c Mon Sep 17 00:00:00 2001 From: David Corbett Date: Fri, 29 Dec 2017 20:19:05 +0800 Subject: [PATCH] Deprecate obsolete functions `hb_ot_tags` replaces `hb_ot_tags_from_script` and `hb_ot_tag_from_language`. `hb_ot_layout_table_select_script` replaces `hb_ot_layout_table_choose_script`. `hb_ot_layout_script_select_language` replaces `hb_ot_layout_script_find_language`. --- docs/harfbuzz-sections.txt | 8 ++++---- src/hb-deprecated.h | 23 +++++++++++++++++++++++ src/hb-ot-layout.h | 15 --------------- src/hb-ot-tag.h | 8 -------- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/docs/harfbuzz-sections.txt b/docs/harfbuzz-sections.txt index eb0caff2b..1f526e301 100644 --- a/docs/harfbuzz-sections.txt +++ b/docs/harfbuzz-sections.txt @@ -155,6 +155,10 @@ HB_BUFFER_SERIALIZE_FLAGS_DEFAULT HB_SCRIPT_CANADIAN_ABORIGINAL hb_font_funcs_set_glyph_func hb_font_get_glyph_func_t +hb_ot_layout_table_choose_script +hb_ot_layout_table_find_script +hb_ot_tag_from_language +hb_ot_tags_from_script hb_set_invert hb_unicode_eastasian_width_func_t hb_unicode_eastasian_width @@ -498,9 +502,7 @@ hb_ot_layout_lookup_would_substitute hb_ot_layout_script_find_language hb_ot_layout_script_get_language_tags hb_ot_layout_script_select_language -hb_ot_layout_table_choose_script hb_ot_layout_table_find_feature_variations -hb_ot_layout_table_find_script hb_ot_layout_table_get_feature_tags hb_ot_layout_table_get_script_tags hb_ot_layout_table_get_lookup_count @@ -556,11 +558,9 @@ HB_OT_MAX_TAGS_PER_LANGUAGE HB_OT_MAX_TAGS_PER_SCRIPT HB_OT_TAG_DEFAULT_LANGUAGE HB_OT_TAG_DEFAULT_SCRIPT -hb_ot_tag_from_language hb_ot_tag_to_language hb_ot_tag_to_script hb_ot_tags -hb_ot_tags_from_script
diff --git a/src/hb-deprecated.h b/src/hb-deprecated.h index 2deb249ae..46590731b 100644 --- a/src/hb-deprecated.h +++ b/src/hb-deprecated.h @@ -211,6 +211,29 @@ hb_font_get_glyph_kerning_for_direction (hb_font_t *font, hb_direction_t direction, hb_position_t *x, hb_position_t *y); +/* Like hb_ot_layout_table_find_script, but takes zero-terminated array of scripts to test */ +HB_EXTERN HB_DEPRECATED hb_bool_t +hb_ot_layout_table_choose_script (hb_face_t *face, + hb_tag_t table_tag, + const hb_tag_t *script_tags, + unsigned int *script_index, + hb_tag_t *chosen_script); + +HB_EXTERN HB_DEPRECATED hb_bool_t +hb_ot_layout_script_find_language (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + hb_tag_t language_tag, + unsigned int *language_index); + +HB_EXTERN HB_DEPRECATED void +hb_ot_tags_from_script (hb_script_t script, + hb_tag_t *script_tag_1, + hb_tag_t *script_tag_2); + +HB_EXTERN HB_DEPRECATED hb_tag_t +hb_ot_tag_from_language (hb_language_t language); + #endif diff --git a/src/hb-ot-layout.h b/src/hb-ot-layout.h index 89bf0c09c..ab149cf26 100644 --- a/src/hb-ot-layout.h +++ b/src/hb-ot-layout.h @@ -111,14 +111,6 @@ hb_ot_layout_table_find_script (hb_face_t *face, hb_tag_t script_tag, unsigned int *script_index); -/* Like find_script, but takes zero-terminated array of scripts to test */ -HB_EXTERN hb_bool_t -hb_ot_layout_table_choose_script (hb_face_t *face, - hb_tag_t table_tag, - const hb_tag_t *script_tags, - unsigned int *script_index, - hb_tag_t *chosen_script); - HB_EXTERN hb_bool_t hb_ot_layout_table_select_script (hb_face_t *face, hb_tag_t table_tag, @@ -142,13 +134,6 @@ hb_ot_layout_script_get_language_tags (hb_face_t *face, unsigned int *language_count /* IN/OUT */, hb_tag_t *language_tags /* OUT */); -HB_EXTERN hb_bool_t -hb_ot_layout_script_find_language (hb_face_t *face, - hb_tag_t table_tag, - unsigned int script_index, - hb_tag_t language_tag, - unsigned int *language_index); - HB_EXTERN hb_bool_t hb_ot_layout_script_select_language (hb_face_t *face, hb_tag_t table_tag, diff --git a/src/hb-ot-tag.h b/src/hb-ot-tag.h index 98d7b4f4f..44f66c3f3 100644 --- a/src/hb-ot-tag.h +++ b/src/hb-ot-tag.h @@ -50,17 +50,9 @@ hb_ot_tags (hb_script_t script, unsigned int *language_count /* IN/OUT */, hb_tag_t *language_tags /* OUT */); -HB_EXTERN void -hb_ot_tags_from_script (hb_script_t script, - hb_tag_t *script_tag_1, - hb_tag_t *script_tag_2); - HB_EXTERN hb_script_t hb_ot_tag_to_script (hb_tag_t tag); -HB_EXTERN hb_tag_t -hb_ot_tag_from_language (hb_language_t language); - HB_EXTERN hb_language_t hb_ot_tag_to_language (hb_tag_t tag);