Path: blob/master/src/java.desktop/share/native/libharfbuzz/hb-deprecated.h
41149 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);108109HB_EXTERN HB_DEPRECATED void110hb_set_invert (hb_set_t *set);111112/**113* hb_unicode_eastasian_width_func_t:114* @ufuncs: A Unicode-functions structure115* @unicode: The code point to query116* @user_data: User data pointer passed by the caller117*118* A virtual method for the #hb_unicode_funcs_t structure.119*120* Deprecated: 2.0.0121*/122typedef unsigned int (*hb_unicode_eastasian_width_func_t) (hb_unicode_funcs_t *ufuncs,123hb_codepoint_t unicode,124void *user_data);125126/**127* hb_unicode_funcs_set_eastasian_width_func:128* @ufuncs: a Unicode-function structure129* @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign130* @user_data: Data to pass to @func131* @destroy: (nullable): The function to call when @user_data is not needed anymore132*133* Sets the implementation function for #hb_unicode_eastasian_width_func_t.134*135* Since: 0.9.2136* Deprecated: 2.0.0137**/138HB_EXTERN HB_DEPRECATED void139hb_unicode_funcs_set_eastasian_width_func (hb_unicode_funcs_t *ufuncs,140hb_unicode_eastasian_width_func_t func,141void *user_data, hb_destroy_func_t destroy);142143/**144* hb_unicode_eastasian_width:145* @ufuncs: a Unicode-function structure146* @unicode: The code point to query147*148* Don't use. Not used by HarfBuzz.149*150* Since: 0.9.2151* Deprecated: 2.0.0152**/153HB_EXTERN HB_DEPRECATED unsigned int154hb_unicode_eastasian_width (hb_unicode_funcs_t *ufuncs,155hb_codepoint_t unicode);156157158/**159* hb_unicode_decompose_compatibility_func_t:160* @ufuncs: a Unicode function structure161* @u: codepoint to decompose162* @decomposed: address of codepoint array (of length #HB_UNICODE_MAX_DECOMPOSITION_LEN) to write decomposition into163* @user_data: user data pointer as passed to hb_unicode_funcs_set_decompose_compatibility_func()164*165* Fully decompose @u to its Unicode compatibility decomposition. The codepoints of the decomposition will be written to @decomposed.166* The complete length of the decomposition will be returned.167*168* If @u has no compatibility decomposition, zero should be returned.169*170* The Unicode standard guarantees that a buffer of length #HB_UNICODE_MAX_DECOMPOSITION_LEN codepoints will always be sufficient for any171* compatibility decomposition plus an terminating value of 0. Consequently, @decompose must be allocated by the caller to be at least this length. Implementations172* of this function type must ensure that they do not write past the provided array.173*174* Return value: number of codepoints in the full compatibility decomposition of @u, or 0 if no decomposition available.175*176* Deprecated: 2.0.0177*/178typedef unsigned int (*hb_unicode_decompose_compatibility_func_t) (hb_unicode_funcs_t *ufuncs,179hb_codepoint_t u,180hb_codepoint_t *decomposed,181void *user_data);182183/**184* HB_UNICODE_MAX_DECOMPOSITION_LEN:185*186* See Unicode 6.1 for details on the maximum decomposition length.187*188* Deprecated: 2.0.0189*/190#define HB_UNICODE_MAX_DECOMPOSITION_LEN (18+1) /* codepoints */191192/**193* hb_unicode_funcs_set_decompose_compatibility_func:194* @ufuncs: A Unicode-functions structure195* @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign196* @user_data: Data to pass to @func197* @destroy: (nullable): The function to call when @user_data is not needed anymore198*199* Sets the implementation function for #hb_unicode_decompose_compatibility_func_t.200*201*202*203* Since: 0.9.2204* Deprecated: 2.0.0205**/206HB_EXTERN HB_DEPRECATED void207hb_unicode_funcs_set_decompose_compatibility_func (hb_unicode_funcs_t *ufuncs,208hb_unicode_decompose_compatibility_func_t func,209void *user_data, hb_destroy_func_t destroy);210211HB_EXTERN HB_DEPRECATED unsigned int212hb_unicode_decompose_compatibility (hb_unicode_funcs_t *ufuncs,213hb_codepoint_t u,214hb_codepoint_t *decomposed);215216217/**218* hb_font_get_glyph_v_kerning_func_t:219*220* A virtual method for the #hb_font_funcs_t of an #hb_font_t object.221*222* This method should retrieve the kerning-adjustment value for a glyph-pair in223* the specified font, for vertical text segments.224*225**/226typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_v_kerning_func_t;227228/**229* hb_font_funcs_set_glyph_v_kerning_func:230* @ffuncs: A font-function structure231* @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign232* @user_data: Data to pass to @func233* @destroy: (nullable): The function to call when @user_data is not needed anymore234*235* Sets the implementation function for #hb_font_get_glyph_v_kerning_func_t.236*237* Since: 0.9.2238* Deprecated: 2.0.0239**/240HB_EXTERN void241hb_font_funcs_set_glyph_v_kerning_func (hb_font_funcs_t *ffuncs,242hb_font_get_glyph_v_kerning_func_t func,243void *user_data, hb_destroy_func_t destroy);244245HB_EXTERN hb_position_t246hb_font_get_glyph_v_kerning (hb_font_t *font,247hb_codepoint_t top_glyph, hb_codepoint_t bottom_glyph);248249#endif250251HB_END_DECLS252253#endif /* HB_DEPRECATED_H */254255256