Deprecate v_kerning callback again
Part of https://github.com/harfbuzz/harfbuzz/issues/1682
diff --git a/docs/harfbuzz-sections.txt b/docs/harfbuzz-sections.txt
index 2f34b6a..4be248d 100644
--- a/docs/harfbuzz-sections.txt
+++ b/docs/harfbuzz-sections.txt
@@ -195,6 +195,9 @@
hb_unicode_decompose_compatibility_func_t
hb_unicode_decompose_compatibility
hb_unicode_funcs_set_decompose_compatibility_func
+hb_font_funcs_set_glyph_v_kerning_func
+hb_font_get_glyph_v_kerning
+hb_font_get_glyph_v_kerning_func_t
</SECTION>
<SECTION>
@@ -268,7 +271,6 @@
hb_font_funcs_set_glyph_name_func
hb_font_funcs_set_glyph_v_advance_func
hb_font_funcs_set_glyph_v_advances_func
-hb_font_funcs_set_glyph_v_kerning_func
hb_font_funcs_set_glyph_v_origin_func
hb_font_funcs_set_nominal_glyph_func
hb_font_funcs_set_nominal_glyphs_func
@@ -308,8 +310,6 @@
hb_font_get_glyph_v_advance_func_t
hb_font_get_glyph_v_advances
hb_font_get_glyph_v_advances_func_t
-hb_font_get_glyph_v_kerning
-hb_font_get_glyph_v_kerning_func_t
hb_font_get_glyph_v_origin
hb_font_get_glyph_v_origin_func_t
hb_font_get_nominal_glyph
diff --git a/src/hb-deprecated.h b/src/hb-deprecated.h
index 47de70a..43f89a4 100644
--- a/src/hb-deprecated.h
+++ b/src/hb-deprecated.h
@@ -165,6 +165,29 @@
hb_codepoint_t *decomposed);
+typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_v_kerning_func_t;
+
+/**
+ * hb_font_funcs_set_glyph_v_kerning_func:
+ * @ffuncs: font functions.
+ * @func: (closure user_data) (destroy destroy) (scope notified):
+ * @user_data:
+ * @destroy:
+ *
+ *
+ *
+ * Since: 0.9.2
+ * Deprecated: 2.0.0
+ **/
+HB_EXTERN void
+hb_font_funcs_set_glyph_v_kerning_func (hb_font_funcs_t *ffuncs,
+ hb_font_get_glyph_v_kerning_func_t func,
+ void *user_data, hb_destroy_func_t destroy);
+
+HB_EXTERN hb_position_t
+hb_font_get_glyph_v_kerning (hb_font_t *font,
+ hb_codepoint_t top_glyph, hb_codepoint_t bottom_glyph);
+
#endif
HB_END_DECLS
diff --git a/src/hb-font.cc b/src/hb-font.cc
index d7b2a7a..7eee284 100644
--- a/src/hb-font.cc
+++ b/src/hb-font.cc
@@ -336,7 +336,6 @@
return ret;
}
-#ifndef HB_DISABLE_DEPRECATED
static hb_position_t
hb_font_get_glyph_h_kerning_nil (hb_font_t *font HB_UNUSED,
void *font_data HB_UNUSED,
@@ -356,6 +355,7 @@
return font->parent_scale_x_distance (font->parent->get_glyph_h_kerning (left_glyph, right_glyph));
}
+#ifndef HB_DISABLE_DEPRECATED
static hb_position_t
hb_font_get_glyph_v_kerning_nil (hb_font_t *font HB_UNUSED,
void *font_data HB_UNUSED,
@@ -927,7 +927,6 @@
return font->get_glyph_v_origin (glyph, x, y);
}
-#ifndef HB_DISABLE_DEPRECATED
/**
* hb_font_get_glyph_h_kerning:
* @font: a font.
@@ -947,6 +946,7 @@
return font->get_glyph_h_kerning (left_glyph, right_glyph);
}
+#ifndef HB_DISABLE_DEPRECATED
/**
* hb_font_get_glyph_v_kerning:
* @font: a font.
@@ -958,6 +958,7 @@
* Return value:
*
* Since: 0.9.2
+ * Deprecated: 2.0.0
**/
hb_position_t
hb_font_get_glyph_v_kerning (hb_font_t *font,
@@ -1175,7 +1176,6 @@
return font->subtract_glyph_origin_for_direction (glyph, direction, x, y);
}
-#ifndef HB_DISABLE_DEPRECATED
/**
* hb_font_get_glyph_kerning_for_direction:
* @font: a font.
@@ -1197,7 +1197,6 @@
{
return font->get_glyph_kerning_for_direction (first_glyph, second_glyph, direction, x, y);
}
-#endif
/**
* hb_font_get_glyph_extents_for_origin:
diff --git a/src/hb-font.h b/src/hb-font.h
index 40dfc41..5bd8cbb 100644
--- a/src/hb-font.h
+++ b/src/hb-font.h
@@ -161,7 +161,6 @@
hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
void *user_data);
typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_h_kerning_func_t;
-typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_v_kerning_func_t;
typedef hb_bool_t (*hb_font_get_glyph_extents_func_t) (hb_font_t *font, void *font_data,
@@ -379,22 +378,6 @@
void *user_data, hb_destroy_func_t destroy);
/**
- * hb_font_funcs_set_glyph_v_kerning_func:
- * @ffuncs: font functions.
- * @func: (closure user_data) (destroy destroy) (scope notified):
- * @user_data:
- * @destroy:
- *
- *
- *
- * Since: 0.9.2
- **/
-HB_EXTERN void
-hb_font_funcs_set_glyph_v_kerning_func (hb_font_funcs_t *ffuncs,
- hb_font_get_glyph_v_kerning_func_t func,
- void *user_data, hb_destroy_func_t destroy);
-
-/**
* hb_font_funcs_set_glyph_extents_func:
* @ffuncs: font functions.
* @func: (closure user_data) (destroy destroy) (scope notified):
@@ -510,9 +493,6 @@
HB_EXTERN hb_position_t
hb_font_get_glyph_h_kerning (hb_font_t *font,
hb_codepoint_t left_glyph, hb_codepoint_t right_glyph);
-HB_EXTERN hb_position_t
-hb_font_get_glyph_v_kerning (hb_font_t *font,
- hb_codepoint_t top_glyph, hb_codepoint_t bottom_glyph);
HB_EXTERN hb_bool_t
hb_font_get_glyph_extents (hb_font_t *font,
diff --git a/src/hb-font.hh b/src/hb-font.hh
index 95551bf..3b917d1 100644
--- a/src/hb-font.hh
+++ b/src/hb-font.hh
@@ -51,7 +51,7 @@
HB_FONT_FUNC_IMPLEMENT (glyph_v_advances) \
HB_FONT_FUNC_IMPLEMENT (glyph_h_origin) \
HB_FONT_FUNC_IMPLEMENT (glyph_v_origin) \
- HB_IF_NOT_DEPRECATED (HB_FONT_FUNC_IMPLEMENT (glyph_h_kerning)) \
+ HB_FONT_FUNC_IMPLEMENT (glyph_h_kerning) \
HB_IF_NOT_DEPRECATED (HB_FONT_FUNC_IMPLEMENT (glyph_v_kerning)) \
HB_FONT_FUNC_IMPLEMENT (glyph_extents) \
HB_FONT_FUNC_IMPLEMENT (glyph_contour_point) \