Path: blob/master/src/java.desktop/share/native/libharfbuzz/hb-deprecated.h
66644 views
/*1* Copyright © 2013 Google, Inc.2*3* This is part of HarfBuzz, a text shaping library.4*5* Permission is hereby granted, without written agreement and without6* license or royalty fees, to use, copy, modify, and distribute this7* software and its documentation for any purpose, provided that the8* above copyright notice and the following two paragraphs appear in9* all copies of this software.10*11* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR12* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES13* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN14* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH15* DAMAGE.16*17* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,18* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND19* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS20* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO21* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.22*23* Google Author(s): Behdad Esfahbod24*/2526#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)27#error "Include <hb.h> instead."28#endif2930#ifndef HB_DEPRECATED_H31#define HB_DEPRECATED_H3233#include "hb-common.h"34#include "hb-unicode.h"35#include "hb-font.h"36#include "hb-set.h"373839/**40* SECTION:hb-deprecated41* @title: hb-deprecated42* @short_description: Deprecated API43* @include: hb.h44*45* These API have been deprecated in favor of newer API, or because they46* were deemed unnecessary.47**/484950HB_BEGIN_DECLS5152#ifndef HB_DISABLE_DEPRECATED535455/**56* HB_SCRIPT_CANADIAN_ABORIGINAL:57*58* Use #HB_SCRIPT_CANADIAN_SYLLABICS instead:59*60* Deprecated: 0.9.2061*/62#define HB_SCRIPT_CANADIAN_ABORIGINAL HB_SCRIPT_CANADIAN_SYLLABICS6364/**65* HB_BUFFER_FLAGS_DEFAULT:66*67* Use #HB_BUFFER_FLAG_DEFAULT instead.68*69* Deprecated: 0.9.2070*/71#define HB_BUFFER_FLAGS_DEFAULT HB_BUFFER_FLAG_DEFAULT72/**73* HB_BUFFER_SERIALIZE_FLAGS_DEFAULT:74*75* Use #HB_BUFFER_SERIALIZE_FLAG_DEFAULT instead.76*77* Deprecated: 0.9.2078*/79#define HB_BUFFER_SERIALIZE_FLAGS_DEFAULT HB_BUFFER_SERIALIZE_FLAG_DEFAULT8081/**82* hb_font_get_glyph_func_t:83* @font: #hb_font_t to work upon84* @font_data: @font user data pointer85* @unicode: The Unicode code point to query86* @variation_selector: The variation-selector code point to query87* @glyph: (out): The glyph ID retrieved88* @user_data: User data pointer passed by the caller89*90* A virtual method for the #hb_font_funcs_t of an #hb_font_t object.91*92* This method should retrieve the glyph ID for a specified Unicode code point93* font, with an optional variation selector.94*95* Return value: %true if data found, %false otherwise96* Deprecated: 1.2.397*98**/99typedef hb_bool_t (*hb_font_get_glyph_func_t) (hb_font_t *font, void *font_data,100hb_codepoint_t unicode, hb_codepoint_t variation_selector,101hb_codepoint_t *glyph,102void *user_data);103104HB_EXTERN HB_DEPRECATED_FOR(hb_font_funcs_set_nominal_glyph_func and hb_font_funcs_set_variation_glyph_func) void105hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs,106hb_font_get_glyph_func_t func,107void *user_data, hb_destroy_func_t destroy);108109/**110* hb_unicode_eastasian_width_func_t:111* @ufuncs: A Unicode-functions structure112* @unicode: The code point to query113* @user_data: User data pointer passed by the caller114*115* A virtual method for the #hb_unicode_funcs_t structure.116*117* Deprecated: 2.0.0118*/119typedef unsigned int (*hb_unicode_eastasian_width_func_t) (hb_unicode_funcs_t *ufuncs,120hb_codepoint_t unicode,121void *user_data);122123/**124* hb_unicode_funcs_set_eastasian_width_func:125* @ufuncs: a Unicode-function structure126* @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign127* @user_data: Data to pass to @func128* @destroy: (nullable): The function to call when @user_data is not needed anymore129*130* Sets the implementation function for #hb_unicode_eastasian_width_func_t.131*132* Since: 0.9.2133* Deprecated: 2.0.0134**/135HB_EXTERN HB_DEPRECATED void136hb_unicode_funcs_set_eastasian_width_func (hb_unicode_funcs_t *ufuncs,137hb_unicode_eastasian_width_func_t func,138void *user_data, hb_destroy_func_t destroy);139140/**141* hb_unicode_eastasian_width:142* @ufuncs: a Unicode-function structure143* @unicode: The code point to query144*145* Don't use. Not used by HarfBuzz.146*147* Since: 0.9.2148* Deprecated: 2.0.0149**/150HB_EXTERN HB_DEPRECATED unsigned int151hb_unicode_eastasian_width (hb_unicode_funcs_t *ufuncs,152hb_codepoint_t unicode);153154155/**156* hb_unicode_decompose_compatibility_func_t:157* @ufuncs: a Unicode function structure158* @u: codepoint to decompose159* @decomposed: address of codepoint array (of length #HB_UNICODE_MAX_DECOMPOSITION_LEN) to write decomposition into160* @user_data: user data pointer as passed to hb_unicode_funcs_set_decompose_compatibility_func()161*162* Fully decompose @u to its Unicode compatibility decomposition. The codepoints of the decomposition will be written to @decomposed.163* The complete length of the decomposition will be returned.164*165* If @u has no compatibility decomposition, zero should be returned.166*167* The Unicode standard guarantees that a buffer of length #HB_UNICODE_MAX_DECOMPOSITION_LEN codepoints will always be sufficient for any168* compatibility decomposition plus an terminating value of 0. Consequently, @decompose must be allocated by the caller to be at least this length. Implementations169* of this function type must ensure that they do not write past the provided array.170*171* Return value: number of codepoints in the full compatibility decomposition of @u, or 0 if no decomposition available.172*173* Deprecated: 2.0.0174*/175typedef unsigned int (*hb_unicode_decompose_compatibility_func_t) (hb_unicode_funcs_t *ufuncs,176hb_codepoint_t u,177hb_codepoint_t *decomposed,178void *user_data);179180/**181* HB_UNICODE_MAX_DECOMPOSITION_LEN:182*183* See Unicode 6.1 for details on the maximum decomposition length.184*185* Deprecated: 2.0.0186*/187#define HB_UNICODE_MAX_DECOMPOSITION_LEN (18+1) /* codepoints */188189/**190* hb_unicode_funcs_set_decompose_compatibility_func:191* @ufuncs: A Unicode-functions structure192* @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign193* @user_data: Data to pass to @func194* @destroy: (nullable): The function to call when @user_data is not needed anymore195*196* Sets the implementation function for #hb_unicode_decompose_compatibility_func_t.197*198*199*200* Since: 0.9.2201* Deprecated: 2.0.0202**/203HB_EXTERN HB_DEPRECATED void204hb_unicode_funcs_set_decompose_compatibility_func (hb_unicode_funcs_t *ufuncs,205hb_unicode_decompose_compatibility_func_t func,206void *user_data, hb_destroy_func_t destroy);207208HB_EXTERN HB_DEPRECATED unsigned int209hb_unicode_decompose_compatibility (hb_unicode_funcs_t *ufuncs,210hb_codepoint_t u,211hb_codepoint_t *decomposed);212213214/**215* hb_font_get_glyph_v_kerning_func_t:216*217* A virtual method for the #hb_font_funcs_t of an #hb_font_t object.218*219* This method should retrieve the kerning-adjustment value for a glyph-pair in220* the specified font, for vertical text segments.221*222**/223typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_v_kerning_func_t;224225/**226* hb_font_funcs_set_glyph_v_kerning_func:227* @ffuncs: A font-function structure228* @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign229* @user_data: Data to pass to @func230* @destroy: (nullable): The function to call when @user_data is not needed anymore231*232* Sets the implementation function for #hb_font_get_glyph_v_kerning_func_t.233*234* Since: 0.9.2235* Deprecated: 2.0.0236**/237HB_EXTERN void238hb_font_funcs_set_glyph_v_kerning_func (hb_font_funcs_t *ffuncs,239hb_font_get_glyph_v_kerning_func_t func,240void *user_data, hb_destroy_func_t destroy);241242HB_EXTERN hb_position_t243hb_font_get_glyph_v_kerning (hb_font_t *font,244hb_codepoint_t top_glyph, hb_codepoint_t bottom_glyph);245246#endif247248HB_END_DECLS249250#endif /* HB_DEPRECATED_H */251252253