1 | /* |
2 | * Copyright © 2013 Google, Inc. |
3 | * |
4 | * This is part of HarfBuzz, a text shaping library. |
5 | * |
6 | * Permission is hereby granted, without written agreement and without |
7 | * license or royalty fees, to use, copy, modify, and distribute this |
8 | * software and its documentation for any purpose, provided that the |
9 | * above copyright notice and the following two paragraphs appear in |
10 | * all copies of this software. |
11 | * |
12 | * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR |
13 | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES |
14 | * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN |
15 | * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH |
16 | * DAMAGE. |
17 | * |
18 | * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, |
19 | * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND |
20 | * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS |
21 | * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO |
22 | * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
23 | * |
24 | * Google Author(s): Behdad Esfahbod |
25 | */ |
26 | |
27 | #ifndef HB_H_IN |
28 | #error "Include <hb.h> instead." |
29 | #endif |
30 | |
31 | #ifndef HB_DEPRECATED_H |
32 | #define HB_DEPRECATED_H |
33 | |
34 | #include "hb-common.h" |
35 | #include "hb-unicode.h" |
36 | #include "hb-font.h" |
37 | #include "hb-set.h" |
38 | |
39 | |
40 | /** |
41 | * SECTION:hb-deprecated |
42 | * @title: hb-deprecated |
43 | * @short_description: Deprecated API |
44 | * @include: hb.h |
45 | * |
46 | * These API have been deprecated in favor of newer API, or because they |
47 | * were deemed unnecessary. |
48 | **/ |
49 | |
50 | |
51 | HB_BEGIN_DECLS |
52 | |
53 | #ifndef HB_DISABLE_DEPRECATED |
54 | |
55 | |
56 | #define HB_SCRIPT_CANADIAN_ABORIGINAL HB_SCRIPT_CANADIAN_SYLLABICS |
57 | |
58 | #define HB_BUFFER_FLAGS_DEFAULT HB_BUFFER_FLAG_DEFAULT |
59 | #define HB_BUFFER_SERIALIZE_FLAGS_DEFAULT HB_BUFFER_SERIALIZE_FLAG_DEFAULT |
60 | |
61 | typedef hb_bool_t (*hb_font_get_glyph_func_t) (hb_font_t *font, void *font_data, |
62 | hb_codepoint_t unicode, hb_codepoint_t variation_selector, |
63 | hb_codepoint_t *glyph, |
64 | void *user_data); |
65 | |
66 | HB_EXTERN HB_DEPRECATED_FOR(hb_font_funcs_set_nominal_glyph_func and hb_font_funcs_set_variation_glyph_func) void |
67 | hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs, |
68 | hb_font_get_glyph_func_t func, |
69 | void *user_data, hb_destroy_func_t destroy); |
70 | |
71 | HB_EXTERN HB_DEPRECATED void |
72 | hb_set_invert (hb_set_t *set); |
73 | |
74 | /** |
75 | * hb_unicode_eastasian_width_func_t: |
76 | * |
77 | * Deprecated: 2.0.0 |
78 | */ |
79 | typedef unsigned int (*hb_unicode_eastasian_width_func_t) (hb_unicode_funcs_t *ufuncs, |
80 | hb_codepoint_t unicode, |
81 | void *user_data); |
82 | |
83 | /** |
84 | * hb_unicode_funcs_set_eastasian_width_func: |
85 | * @ufuncs: a Unicode function structure |
86 | * @func: (closure user_data) (destroy destroy) (scope notified): |
87 | * @user_data: |
88 | * @destroy: |
89 | * |
90 | * |
91 | * |
92 | * Since: 0.9.2 |
93 | * Deprecated: 2.0.0 |
94 | **/ |
95 | HB_EXTERN HB_DEPRECATED void |
96 | hb_unicode_funcs_set_eastasian_width_func (hb_unicode_funcs_t *ufuncs, |
97 | hb_unicode_eastasian_width_func_t func, |
98 | void *user_data, hb_destroy_func_t destroy); |
99 | |
100 | /** |
101 | * hb_unicode_eastasian_width: |
102 | * |
103 | * Since: 0.9.2 |
104 | * Deprecated: 2.0.0 |
105 | **/ |
106 | HB_EXTERN HB_DEPRECATED unsigned int |
107 | hb_unicode_eastasian_width (hb_unicode_funcs_t *ufuncs, |
108 | hb_codepoint_t unicode); |
109 | |
110 | |
111 | /** |
112 | * hb_unicode_decompose_compatibility_func_t: |
113 | * @ufuncs: a Unicode function structure |
114 | * @u: codepoint to decompose |
115 | * @decomposed: address of codepoint array (of length %HB_UNICODE_MAX_DECOMPOSITION_LEN) to write decomposition into |
116 | * @user_data: user data pointer as passed to hb_unicode_funcs_set_decompose_compatibility_func() |
117 | * |
118 | * Fully decompose @u to its Unicode compatibility decomposition. The codepoints of the decomposition will be written to @decomposed. |
119 | * The complete length of the decomposition will be returned. |
120 | * |
121 | * If @u has no compatibility decomposition, zero should be returned. |
122 | * |
123 | * The Unicode standard guarantees that a buffer of length %HB_UNICODE_MAX_DECOMPOSITION_LEN codepoints will always be sufficient for any |
124 | * compatibility decomposition plus an terminating value of 0. Consequently, @decompose must be allocated by the caller to be at least this length. Implementations |
125 | * of this function type must ensure that they do not write past the provided array. |
126 | * |
127 | * Return value: number of codepoints in the full compatibility decomposition of @u, or 0 if no decomposition available. |
128 | * |
129 | * Deprecated: 2.0.0 |
130 | */ |
131 | typedef unsigned int (*hb_unicode_decompose_compatibility_func_t) (hb_unicode_funcs_t *ufuncs, |
132 | hb_codepoint_t u, |
133 | hb_codepoint_t *decomposed, |
134 | void *user_data); |
135 | |
136 | /** |
137 | * HB_UNICODE_MAX_DECOMPOSITION_LEN: |
138 | * |
139 | * See Unicode 6.1 for details on the maximum decomposition length. |
140 | * |
141 | * Deprecated: 2.0.0 |
142 | */ |
143 | #define HB_UNICODE_MAX_DECOMPOSITION_LEN (18+1) /* codepoints */ |
144 | |
145 | /** |
146 | * hb_unicode_funcs_set_decompose_compatibility_func: |
147 | * @ufuncs: a Unicode function structure |
148 | * @func: (closure user_data) (destroy destroy) (scope notified): |
149 | * @user_data: |
150 | * @destroy: |
151 | * |
152 | * |
153 | * |
154 | * Since: 0.9.2 |
155 | * Deprecated: 2.0.0 |
156 | **/ |
157 | HB_EXTERN HB_DEPRECATED void |
158 | hb_unicode_funcs_set_decompose_compatibility_func (hb_unicode_funcs_t *ufuncs, |
159 | hb_unicode_decompose_compatibility_func_t func, |
160 | void *user_data, hb_destroy_func_t destroy); |
161 | |
162 | HB_EXTERN HB_DEPRECATED unsigned int |
163 | hb_unicode_decompose_compatibility (hb_unicode_funcs_t *ufuncs, |
164 | hb_codepoint_t u, |
165 | hb_codepoint_t *decomposed); |
166 | |
167 | |
168 | typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_v_kerning_func_t; |
169 | |
170 | /** |
171 | * hb_font_funcs_set_glyph_v_kerning_func: |
172 | * @ffuncs: font functions. |
173 | * @func: (closure user_data) (destroy destroy) (scope notified): |
174 | * @user_data: |
175 | * @destroy: |
176 | * |
177 | * |
178 | * |
179 | * Since: 0.9.2 |
180 | * Deprecated: 2.0.0 |
181 | **/ |
182 | HB_EXTERN void |
183 | hb_font_funcs_set_glyph_v_kerning_func (hb_font_funcs_t *ffuncs, |
184 | hb_font_get_glyph_v_kerning_func_t func, |
185 | void *user_data, hb_destroy_func_t destroy); |
186 | |
187 | HB_EXTERN hb_position_t |
188 | hb_font_get_glyph_v_kerning (hb_font_t *font, |
189 | hb_codepoint_t top_glyph, hb_codepoint_t bottom_glyph); |
190 | |
191 | #endif |
192 | |
193 | HB_END_DECLS |
194 | |
195 | #endif /* HB_DEPRECATED_H */ |
196 | |