![]() |
|
|||
File indexing completed on 2025-09-18 09:18:12
0001 /* 0002 * Copyright © 2013 Google, Inc. 0003 * 0004 * This is part of HarfBuzz, a text shaping library. 0005 * 0006 * Permission is hereby granted, without written agreement and without 0007 * license or royalty fees, to use, copy, modify, and distribute this 0008 * software and its documentation for any purpose, provided that the 0009 * above copyright notice and the following two paragraphs appear in 0010 * all copies of this software. 0011 * 0012 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 0013 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 0014 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 0015 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 0016 * DAMAGE. 0017 * 0018 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 0019 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 0020 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 0021 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 0022 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 0023 * 0024 * Google Author(s): Behdad Esfahbod 0025 */ 0026 0027 #if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) 0028 #error "Include <hb.h> instead." 0029 #endif 0030 0031 #ifndef HB_DEPRECATED_H 0032 #define HB_DEPRECATED_H 0033 0034 #include "hb-common.h" 0035 #include "hb-unicode.h" 0036 #include "hb-font.h" 0037 #include "hb-set.h" 0038 0039 0040 /** 0041 * SECTION:hb-deprecated 0042 * @title: hb-deprecated 0043 * @short_description: Deprecated API 0044 * @include: hb.h 0045 * 0046 * These API have been deprecated in favor of newer API, or because they 0047 * were deemed unnecessary. 0048 **/ 0049 0050 0051 HB_BEGIN_DECLS 0052 0053 #ifndef HB_DISABLE_DEPRECATED 0054 0055 0056 /** 0057 * HB_SCRIPT_CANADIAN_ABORIGINAL: 0058 * 0059 * Use #HB_SCRIPT_CANADIAN_SYLLABICS instead. 0060 * 0061 * Deprecated: 0.9.20 0062 */ 0063 #define HB_SCRIPT_CANADIAN_ABORIGINAL HB_SCRIPT_CANADIAN_SYLLABICS 0064 0065 /** 0066 * HB_BUFFER_FLAGS_DEFAULT: 0067 * 0068 * Use #HB_BUFFER_FLAG_DEFAULT instead. 0069 * 0070 * Deprecated: 0.9.20 0071 */ 0072 #define HB_BUFFER_FLAGS_DEFAULT HB_BUFFER_FLAG_DEFAULT 0073 /** 0074 * HB_BUFFER_SERIALIZE_FLAGS_DEFAULT: 0075 * 0076 * Use #HB_BUFFER_SERIALIZE_FLAG_DEFAULT instead. 0077 * 0078 * Deprecated: 0.9.20 0079 */ 0080 #define HB_BUFFER_SERIALIZE_FLAGS_DEFAULT HB_BUFFER_SERIALIZE_FLAG_DEFAULT 0081 0082 /** 0083 * hb_font_get_glyph_func_t: 0084 * @font: #hb_font_t to work upon 0085 * @font_data: @font user data pointer 0086 * @unicode: The Unicode code point to query 0087 * @variation_selector: The variation-selector code point to query 0088 * @glyph: (out): The glyph ID retrieved 0089 * @user_data: User data pointer passed by the caller 0090 * 0091 * A virtual method for the #hb_font_funcs_t of an #hb_font_t object. 0092 * 0093 * This method should retrieve the glyph ID for a specified Unicode code point 0094 * font, with an optional variation selector. 0095 * 0096 * Return value: `true` if data found, `false` otherwise 0097 * Deprecated: 1.2.3 0098 * 0099 **/ 0100 typedef hb_bool_t (*hb_font_get_glyph_func_t) (hb_font_t *font, void *font_data, 0101 hb_codepoint_t unicode, hb_codepoint_t variation_selector, 0102 hb_codepoint_t *glyph, 0103 void *user_data); 0104 0105 HB_DEPRECATED_FOR (hb_font_funcs_set_nominal_glyph_func and hb_font_funcs_set_variation_glyph_func) 0106 HB_EXTERN void 0107 hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs, 0108 hb_font_get_glyph_func_t func, 0109 void *user_data, hb_destroy_func_t destroy); 0110 0111 /* https://github.com/harfbuzz/harfbuzz/pull/4207 */ 0112 /** 0113 * HB_UNICODE_COMBINING_CLASS_CCC133: 0114 * 0115 * [Tibetan] 0116 * 0117 * Deprecated: 7.2.0 0118 **/ 0119 #define HB_UNICODE_COMBINING_CLASS_CCC133 133 0120 0121 /** 0122 * hb_unicode_eastasian_width_func_t: 0123 * @ufuncs: A Unicode-functions structure 0124 * @unicode: The code point to query 0125 * @user_data: User data pointer passed by the caller 0126 * 0127 * A virtual method for the #hb_unicode_funcs_t structure. 0128 * 0129 * Deprecated: 2.0.0 0130 */ 0131 typedef unsigned int (*hb_unicode_eastasian_width_func_t) (hb_unicode_funcs_t *ufuncs, 0132 hb_codepoint_t unicode, 0133 void *user_data); 0134 0135 /** 0136 * hb_unicode_funcs_set_eastasian_width_func: 0137 * @ufuncs: a Unicode-function structure 0138 * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign 0139 * @user_data: Data to pass to @func 0140 * @destroy: (nullable): The function to call when @user_data is not needed anymore 0141 * 0142 * Sets the implementation function for #hb_unicode_eastasian_width_func_t. 0143 * 0144 * Since: 0.9.2 0145 * Deprecated: 2.0.0 0146 **/ 0147 HB_EXTERN HB_DEPRECATED void 0148 hb_unicode_funcs_set_eastasian_width_func (hb_unicode_funcs_t *ufuncs, 0149 hb_unicode_eastasian_width_func_t func, 0150 void *user_data, hb_destroy_func_t destroy); 0151 0152 /** 0153 * hb_unicode_eastasian_width: 0154 * @ufuncs: a Unicode-function structure 0155 * @unicode: The code point to query 0156 * 0157 * Don't use. Not used by HarfBuzz. 0158 * 0159 * Since: 0.9.2 0160 * Deprecated: 2.0.0 0161 **/ 0162 HB_EXTERN HB_DEPRECATED unsigned int 0163 hb_unicode_eastasian_width (hb_unicode_funcs_t *ufuncs, 0164 hb_codepoint_t unicode); 0165 0166 0167 /** 0168 * hb_unicode_decompose_compatibility_func_t: 0169 * @ufuncs: a Unicode function structure 0170 * @u: codepoint to decompose 0171 * @decomposed: address of codepoint array (of length #HB_UNICODE_MAX_DECOMPOSITION_LEN) to write decomposition into 0172 * @user_data: user data pointer as passed to hb_unicode_funcs_set_decompose_compatibility_func() 0173 * 0174 * Fully decompose @u to its Unicode compatibility decomposition. The codepoints of the decomposition will be written to @decomposed. 0175 * The complete length of the decomposition will be returned. 0176 * 0177 * If @u has no compatibility decomposition, zero should be returned. 0178 * 0179 * The Unicode standard guarantees that a buffer of length #HB_UNICODE_MAX_DECOMPOSITION_LEN codepoints will always be sufficient for any 0180 * compatibility decomposition plus an terminating value of 0. Consequently, @decompose must be allocated by the caller to be at least this length. Implementations 0181 * of this function type must ensure that they do not write past the provided array. 0182 * 0183 * Return value: number of codepoints in the full compatibility decomposition of @u, or 0 if no decomposition available. 0184 * 0185 * Deprecated: 2.0.0 0186 */ 0187 typedef unsigned int (*hb_unicode_decompose_compatibility_func_t) (hb_unicode_funcs_t *ufuncs, 0188 hb_codepoint_t u, 0189 hb_codepoint_t *decomposed, 0190 void *user_data); 0191 0192 /** 0193 * HB_UNICODE_MAX_DECOMPOSITION_LEN: 0194 * 0195 * See Unicode 6.1 for details on the maximum decomposition length. 0196 * 0197 * Deprecated: 2.0.0 0198 */ 0199 #define HB_UNICODE_MAX_DECOMPOSITION_LEN (18+1) /* codepoints */ 0200 0201 /** 0202 * hb_unicode_funcs_set_decompose_compatibility_func: 0203 * @ufuncs: A Unicode-functions structure 0204 * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign 0205 * @user_data: Data to pass to @func 0206 * @destroy: (nullable): The function to call when @user_data is not needed anymore 0207 * 0208 * Sets the implementation function for #hb_unicode_decompose_compatibility_func_t. 0209 * 0210 * 0211 * 0212 * Since: 0.9.2 0213 * Deprecated: 2.0.0 0214 **/ 0215 HB_EXTERN HB_DEPRECATED void 0216 hb_unicode_funcs_set_decompose_compatibility_func (hb_unicode_funcs_t *ufuncs, 0217 hb_unicode_decompose_compatibility_func_t func, 0218 void *user_data, hb_destroy_func_t destroy); 0219 0220 HB_EXTERN HB_DEPRECATED unsigned int 0221 hb_unicode_decompose_compatibility (hb_unicode_funcs_t *ufuncs, 0222 hb_codepoint_t u, 0223 hb_codepoint_t *decomposed); 0224 0225 0226 /** 0227 * hb_font_get_glyph_v_kerning_func_t: 0228 * 0229 * A virtual method for the #hb_font_funcs_t of an #hb_font_t object. 0230 * 0231 * This method should retrieve the kerning-adjustment value for a glyph-pair in 0232 * the specified font, for vertical text segments. 0233 * 0234 **/ 0235 typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_v_kerning_func_t; 0236 0237 /** 0238 * hb_font_funcs_set_glyph_v_kerning_func: 0239 * @ffuncs: A font-function structure 0240 * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign 0241 * @user_data: Data to pass to @func 0242 * @destroy: (nullable): The function to call when @user_data is not needed anymore 0243 * 0244 * Sets the implementation function for #hb_font_get_glyph_v_kerning_func_t. 0245 * 0246 * Since: 0.9.2 0247 * Deprecated: 2.0.0 0248 **/ 0249 HB_EXTERN void 0250 hb_font_funcs_set_glyph_v_kerning_func (hb_font_funcs_t *ffuncs, 0251 hb_font_get_glyph_v_kerning_func_t func, 0252 void *user_data, hb_destroy_func_t destroy); 0253 0254 HB_EXTERN hb_position_t 0255 hb_font_get_glyph_v_kerning (hb_font_t *font, 0256 hb_codepoint_t top_glyph, hb_codepoint_t bottom_glyph); 0257 0258 0259 /** 0260 * hb_font_get_glyph_shape_func_t: 0261 * @font: #hb_font_t to work upon 0262 * @font_data: @font user data pointer 0263 * @glyph: The glyph ID to query 0264 * @draw_funcs: The draw functions to send the shape data to 0265 * @draw_data: The data accompanying the draw functions 0266 * @user_data: User data pointer passed by the caller 0267 * 0268 * A virtual method for the #hb_font_funcs_t of an #hb_font_t object. 0269 * 0270 * Since: 4.0.0 0271 * Deprecated: 7.0.0: Use #hb_font_draw_glyph_func_t instead 0272 **/ 0273 typedef void (*hb_font_get_glyph_shape_func_t) (hb_font_t *font, void *font_data, 0274 hb_codepoint_t glyph, 0275 hb_draw_funcs_t *draw_funcs, void *draw_data, 0276 void *user_data); 0277 0278 /** 0279 * hb_font_draw_glyph_func_t: 0280 * @font: #hb_font_t to work upon 0281 * @font_data: @font user data pointer 0282 * @glyph: The glyph ID to query 0283 * @draw_funcs: The draw functions to send the shape data to 0284 * @draw_data: The data accompanying the draw functions 0285 * @user_data: User data pointer passed by the caller 0286 * 0287 * A virtual method for the #hb_font_funcs_t of an #hb_font_t object. 0288 * 0289 * Since: 7.0.0 0290 * XDeprecated: REPLACEME: Use hb_font_draw_glyph_func_or_fail_t instead. 0291 **/ 0292 typedef void (*hb_font_draw_glyph_func_t) (hb_font_t *font, void *font_data, 0293 hb_codepoint_t glyph, 0294 hb_draw_funcs_t *draw_funcs, void *draw_data, 0295 void *user_data); 0296 0297 /** 0298 * hb_font_paint_glyph_func_t: 0299 * @font: #hb_font_t to work upon 0300 * @font_data: @font user data pointer 0301 * @glyph: The glyph ID to query 0302 * @paint_funcs: The paint functions to use 0303 * @paint_data: The data accompanying the paint functions 0304 * @palette_index: The color palette to use 0305 * @foreground: The foreground color 0306 * @user_data: User data pointer passed by the caller 0307 * 0308 * A virtual method for the #hb_font_funcs_t of an #hb_font_t object. 0309 * 0310 * Since: 7.0.0 0311 * XDeprecated: REPLACEME: Use hb_font_paint_glyph_or_fail_func_t instead. 0312 */ 0313 typedef hb_bool_t (*hb_font_paint_glyph_func_t) (hb_font_t *font, void *font_data, 0314 hb_codepoint_t glyph, 0315 hb_paint_funcs_t *paint_funcs, void *paint_data, 0316 unsigned int palette_index, 0317 hb_color_t foreground, 0318 void *user_data); 0319 0320 /** 0321 * hb_font_funcs_set_glyph_shape_func: 0322 * @ffuncs: A font-function structure 0323 * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign 0324 * @user_data: Data to pass to @func 0325 * @destroy: (nullable): The function to call when @user_data is not needed anymore 0326 * 0327 * Sets the implementation function for #hb_font_get_glyph_shape_func_t, 0328 * which is the same as #hb_font_draw_glyph_func_t. 0329 * 0330 * Since: 4.0.0 0331 * Deprecated: 7.0.0: Use hb_font_funcs_set_draw_glyph_func() instead 0332 **/ 0333 HB_DEPRECATED_FOR (hb_font_funcs_set_draw_glyph_or_fail_func) 0334 HB_EXTERN void 0335 hb_font_funcs_set_glyph_shape_func (hb_font_funcs_t *ffuncs, 0336 hb_font_get_glyph_shape_func_t func, 0337 void *user_data, hb_destroy_func_t destroy); 0338 0339 /** 0340 * hb_font_funcs_set_draw_glyph_func: 0341 * @ffuncs: A font-function structure 0342 * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign 0343 * @user_data: Data to pass to @func 0344 * @destroy: (nullable): The function to call when @user_data is not needed anymore 0345 * 0346 * Sets the implementation function for #hb_font_draw_glyph_func_t. 0347 * 0348 * Since: 7.0.0 0349 * XDeprecated: REPLACEME: Use hb_font_funcs_set_draw_glyph_or_fail_func instead. 0350 **/ 0351 HB_DEPRECATED_FOR (hb_font_funcs_set_draw_glyph_or_fail_func) 0352 HB_EXTERN void 0353 hb_font_funcs_set_draw_glyph_func (hb_font_funcs_t *ffuncs, 0354 hb_font_draw_glyph_func_t func, 0355 void *user_data, hb_destroy_func_t destroy); 0356 0357 /** 0358 * hb_font_funcs_set_paint_glyph_func: 0359 * @ffuncs: A font-function structure 0360 * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign 0361 * @user_data: Data to pass to @func 0362 * @destroy: (nullable): The function to call when @user_data is no longer needed 0363 * 0364 * Sets the implementation function for #hb_font_paint_glyph_func_t. 0365 * 0366 * Since: 7.0.0 0367 * XDeprecated: REPLACEME: Use hb_font_funcs_set_paint_glyph_or_fail_func() instead. 0368 */ 0369 HB_DEPRECATED_FOR (hb_font_funcs_set_paint_glyph_or_fail_func) 0370 HB_EXTERN void 0371 hb_font_funcs_set_paint_glyph_func (hb_font_funcs_t *ffuncs, 0372 hb_font_paint_glyph_func_t func, 0373 void *user_data, hb_destroy_func_t destroy); 0374 0375 HB_DEPRECATED_FOR (hb_font_draw_glyph_or_fail) 0376 HB_EXTERN void 0377 hb_font_get_glyph_shape (hb_font_t *font, 0378 hb_codepoint_t glyph, 0379 hb_draw_funcs_t *dfuncs, void *draw_data); 0380 0381 0382 /** 0383 * HB_AAT_LAYOUT_FEATURE_TYPE_CURISVE_CONNECTION: 0384 * 0385 * Use #HB_AAT_LAYOUT_FEATURE_TYPE_CURSIVE_CONNECTION instead. 0386 * 0387 * Deprecated: 8.3.0 0388 */ 0389 #define HB_AAT_LAYOUT_FEATURE_TYPE_CURISVE_CONNECTION HB_AAT_LAYOUT_FEATURE_TYPE_CURSIVE_CONNECTION 0390 0391 #endif 0392 0393 0394 HB_END_DECLS 0395 0396 #endif /* HB_DEPRECATED_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |