Add HB_DEPRECATED_FOR and mark relevant symbols
diff --git a/src/hb-common.h b/src/hb-common.h
index 4f91a17..c601b1f 100644
--- a/src/hb-common.h
+++ b/src/hb-common.h
@@ -71,6 +71,14 @@
#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 4659073..52ee49e 100644
--- a/src/hb-deprecated.h
+++ b/src/hb-deprecated.h
@@ -50,7 +50,7 @@
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_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 acf1dfa..1720191 100644
--- a/src/hb-graphite2.h
+++ b/src/hb-graphite2.h
@@ -41,7 +41,7 @@
#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