summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2018-10-11 21:22:49 -0400
committerBehdad Esfahbod <behdad@behdad.org>2018-10-12 16:06:39 -0400
commit1a6b5ac6c300ed2ccdcd8eadde433120f6e07f2a (patch)
tree2a3cac9b196772cd33296344d4bda559c6aadee8
parentc9413d7bb575093411b39ac21974795b6ad91454 (diff)
Add HB_DEPRECATED_FOR and mark relevant symbols
-rw-r--r--src/hb-common.h8
-rw-r--r--src/hb-deprecated.h10
-rw-r--r--src/hb-graphite2.h2
3 files changed, 14 insertions, 6 deletions
diff --git a/src/hb-common.h b/src/hb-common.h
index 4f91a176..c601b1f6 100644
--- a/src/hb-common.h
+++ b/src/hb-common.h
@@ -71,6 +71,14 @@ typedef unsigned __int64 uint64_t;
#define HB_DEPRECATED
#endif
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
+#define HB_DEPRECATED_FOR(f) __attribute__((__deprecated__("Use '" #f "' instead")))
+#elif defined(_MSC_FULL_VER) && (_MSC_FULL_VER > 140050320)
+#define HB_DEPRECATED_FOR(f) __declspec(deprecated("is deprecated. Use '" #f "' instead"))
+#else
+#define HB_DEPRECATED_FOR(f) HB_DEPRECATED
+#endif
+
HB_BEGIN_DECLS
diff --git a/src/hb-deprecated.h b/src/hb-deprecated.h
index 46590731..52ee49e2 100644
--- a/src/hb-deprecated.h
+++ b/src/hb-deprecated.h
@@ -50,7 +50,7 @@ typedef hb_bool_t (*hb_font_get_glyph_func_t) (hb_font_t *font, void *font_data,
hb_codepoint_t *glyph,
void *user_data);
-HB_EXTERN HB_DEPRECATED void
+HB_EXTERN HB_DEPRECATED_FOR(hb_font_funcs_set_nominal_glyph_func or hb_font_funcs_set_variation_glyph_func) void
hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs,
hb_font_get_glyph_func_t func,
void *user_data, hb_destroy_func_t destroy);
@@ -212,26 +212,26 @@ hb_font_get_glyph_kerning_for_direction (hb_font_t *font,
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_EXTERN HB_DEPRECATED_FOR (hb_ot_layout_table_select_script) 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_EXTERN HB_DEPRECATED_FOR (hb_ot_layout_script_select_language) 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_EXTERN HB_DEPRECATED_FOR (hb_ot_tags_from_script_and_language) 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_EXTERN HB_DEPRECATED_FOR (hb_ot_tags_from_script_and_language) hb_tag_t
hb_ot_tag_from_language (hb_language_t language);
diff --git a/src/hb-graphite2.h b/src/hb-graphite2.h
index acf1dfa8..1720191b 100644
--- a/src/hb-graphite2.h
+++ b/src/hb-graphite2.h
@@ -41,7 +41,7 @@ hb_graphite2_face_get_gr_face (hb_face_t *face);
#ifndef HB_DISABLE_DEPRECATED
-HB_EXTERN HB_DEPRECATED gr_font *
+HB_EXTERN HB_DEPRECATED_FOR (hb_graphite2_face_get_gr_face) gr_font *
hb_graphite2_font_get_gr_font (hb_font_t *font);
#endif