From 26d7305da7a7e2cf765b068f565836442872ffe7 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 8 Oct 2018 22:31:35 -0400 Subject: [PATCH] Deprecate decompose_compatibility stuff --- docs/harfbuzz-sections.txt | 7 +++-- src/hb-deprecated.h | 63 ++++++++++++++++++++++++++++++++++++++ src/hb-unicode.h | 47 ---------------------------- 3 files changed, 67 insertions(+), 50 deletions(-) diff --git a/docs/harfbuzz-sections.txt b/docs/harfbuzz-sections.txt index 884f3d074..452e89002 100644 --- a/docs/harfbuzz-sections.txt +++ b/docs/harfbuzz-sections.txt @@ -159,6 +159,10 @@ hb_set_invert hb_unicode_eastasian_width_func_t hb_unicode_eastasian_width hb_unicode_funcs_set_eastasian_width_func +HB_UNICODE_MAX_DECOMPOSITION_LEN +hb_unicode_decompose_compatibility_func_t +hb_unicode_decompose_compatibility +hb_unicode_funcs_set_decompose_compatibility_func
@@ -616,14 +620,12 @@ hb_shape_plan_t
hb-unicode HB_UNICODE_MAX -HB_UNICODE_MAX_DECOMPOSITION_LEN hb_unicode_combining_class hb_unicode_combining_class_func_t hb_unicode_combining_class_t hb_unicode_compose hb_unicode_compose_func_t hb_unicode_decompose -hb_unicode_decompose_compatibility hb_unicode_decompose_func_t hb_unicode_funcs_create hb_unicode_funcs_destroy @@ -636,7 +638,6 @@ hb_unicode_funcs_make_immutable hb_unicode_funcs_reference hb_unicode_funcs_set_combining_class_func hb_unicode_funcs_set_compose_func -hb_unicode_funcs_set_decompose_compatibility_func hb_unicode_funcs_set_decompose_func hb_unicode_funcs_set_general_category_func hb_unicode_funcs_set_mirroring_func diff --git a/src/hb-deprecated.h b/src/hb-deprecated.h index 519a57e63..826cd9786 100644 --- a/src/hb-deprecated.h +++ b/src/hb-deprecated.h @@ -95,6 +95,69 @@ hb_unicode_eastasian_width (hb_unicode_funcs_t *ufuncs, hb_codepoint_t unicode); +/** + * hb_unicode_decompose_compatibility_func_t: + * @ufuncs: a Unicode function structure + * @u: codepoint to decompose + * @decomposed: address of codepoint array (of length %HB_UNICODE_MAX_DECOMPOSITION_LEN) to write decomposition into + * @user_data: user data pointer as passed to hb_unicode_funcs_set_decompose_compatibility_func() + * + * Fully decompose @u to its Unicode compatibility decomposition. The codepoints of the decomposition will be written to @decomposed. + * The complete length of the decomposition will be returned. + * + * If @u has no compatibility decomposition, zero should be returned. + * + * The Unicode standard guarantees that a buffer of length %HB_UNICODE_MAX_DECOMPOSITION_LEN codepoints will always be sufficient for any + * compatibility decomposition plus an terminating value of 0. Consequently, @decompose must be allocated by the caller to be at least this length. Implementations + * of this function type must ensure that they do not write past the provided array. + * + * Return value: number of codepoints in the full compatibility decomposition of @u, or 0 if no decomposition available. + * + * Deprecated: REPLACEME + */ +typedef unsigned int (*hb_unicode_decompose_compatibility_func_t) (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t u, + hb_codepoint_t *decomposed, + void *user_data); + +/** + * HB_UNICODE_MAX_DECOMPOSITION_LEN: + * + * See Unicode 6.1 for details on the maximum decomposition length. + * + * Deprecated: REPLACEME + */ +#define HB_UNICODE_MAX_DECOMPOSITION_LEN (18+1) /* codepoints */ + +/** + * hb_unicode_funcs_set_decompose_compatibility_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + * Deprecated: REPLACEME + **/ +HB_EXTERN void +hb_unicode_funcs_set_decompose_compatibility_func (hb_unicode_funcs_t *ufuncs, + hb_unicode_decompose_compatibility_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_unicode_decompose_compatibility: + * + * + * Deprecated: REPLACEME + **/ +HB_EXTERN unsigned int +hb_unicode_decompose_compatibility (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t u, + hb_codepoint_t *decomposed); + + #endif HB_END_DECLS diff --git a/src/hb-unicode.h b/src/hb-unicode.h index 604c207a4..62b58803a 100644 --- a/src/hb-unicode.h +++ b/src/hb-unicode.h @@ -251,32 +251,6 @@ typedef hb_bool_t (*hb_unicode_decompose_func_t) (hb_unicode_funcs_t *ufuncs, hb_codepoint_t *b, void *user_data); -/** - * hb_unicode_decompose_compatibility_func_t: - * @ufuncs: a Unicode function structure - * @u: codepoint to decompose - * @decomposed: address of codepoint array (of length %HB_UNICODE_MAX_DECOMPOSITION_LEN) to write decomposition into - * @user_data: user data pointer as passed to hb_unicode_funcs_set_decompose_compatibility_func() - * - * Fully decompose @u to its Unicode compatibility decomposition. The codepoints of the decomposition will be written to @decomposed. - * The complete length of the decomposition will be returned. - * - * If @u has no compatibility decomposition, zero should be returned. - * - * The Unicode standard guarantees that a buffer of length %HB_UNICODE_MAX_DECOMPOSITION_LEN codepoints will always be sufficient for any - * compatibility decomposition plus an terminating value of 0. Consequently, @decompose must be allocated by the caller to be at least this length. Implementations - * of this function type must ensure that they do not write past the provided array. - * - * Return value: number of codepoints in the full compatibility decomposition of @u, or 0 if no decomposition available. - */ -typedef unsigned int (*hb_unicode_decompose_compatibility_func_t) (hb_unicode_funcs_t *ufuncs, - hb_codepoint_t u, - hb_codepoint_t *decomposed, - void *user_data); - -/* See Unicode 6.1 for details on the maximum decomposition length. */ -#define HB_UNICODE_MAX_DECOMPOSITION_LEN (18+1) /* codepoints */ - /* setters */ /** @@ -375,22 +349,6 @@ hb_unicode_funcs_set_decompose_func (hb_unicode_funcs_t *ufuncs, hb_unicode_decompose_func_t func, void *user_data, hb_destroy_func_t destroy); -/** - * hb_unicode_funcs_set_decompose_compatibility_func: - * @ufuncs: a Unicode function structure - * @func: (closure user_data) (destroy destroy) (scope notified): - * @user_data: - * @destroy: - * - * - * - * Since: 0.9.2 - **/ -HB_EXTERN void -hb_unicode_funcs_set_decompose_compatibility_func (hb_unicode_funcs_t *ufuncs, - hb_unicode_decompose_compatibility_func_t func, - void *user_data, hb_destroy_func_t destroy); - /* accessors */ /** @@ -441,11 +399,6 @@ hb_unicode_decompose (hb_unicode_funcs_t *ufuncs, hb_codepoint_t *a, hb_codepoint_t *b); -HB_EXTERN unsigned int -hb_unicode_decompose_compatibility (hb_unicode_funcs_t *ufuncs, - hb_codepoint_t u, - hb_codepoint_t *decomposed); - HB_END_DECLS #endif /* HB_UNICODE_H */