hb-deprecated: HarfBuzz Manual

## hb-deprecated hb-deprecated — Deprecated API |

## Functions

void | hb_font_funcs_set_glyph_func ()
hb_bool_t | (*hb_font_get_glyph_func_t) ()
hb_bool_t | hb_ot_layout_table_choose_script ()
hb_bool_t | hb_ot_layout_table_find_script ()
hb_tag_t | hb_ot_tag_from_language ()
void | hb_ot_tags_from_script ()
hb_bool_t | hb_ot_var_find_axis ()
unsigned int | hb_ot_var_get_axes ()
unsigned int | (*hb_unicode_eastasian_width_func_t) ()
unsigned int | hb_unicode_eastasian_width ()
void | hb_unicode_funcs_set_eastasian_width_func ()
unsigned int | (*hb_unicode_decompose_compatibility_func_t) ()
unsigned int | hb_unicode_decompose_compatibility ()
void | hb_unicode_funcs_set_decompose_compatibility_func ()
void | hb_font_funcs_set_glyph_v_kerning_func ()
void | hb_font_get_glyph_shape ()
void | (*hb_font_get_glyph_shape_func_t) ()
void | hb_font_funcs_set_glyph_shape_func ()
hb_position_t | hb_font_get_glyph_v_kerning ()

## Types and Values

#define | HB_BUFFER_FLAGS_DEFAULT
#define | HB_BUFFER_SERIALIZE_FLAGS_DEFAULT
#define | HB_SCRIPT_CANADIAN_ABORIGINAL
#define | HB_MATH_GLYPH_PART_FLAG_EXTENDER
#define | HB_OT_MATH_SCRIPT
#define | HB_OT_VAR_NO_AXIS_INDEX
| hb_ot_var_axis_t
#define | HB_UNICODE_MAX_DECOMPOSITION_LEN
#define | HB_UNICODE_COMBINING_CLASS_CCC133
typedef | hb_font_get_glyph_v_kerning_func_t

## Includes

    #include <hb.h>

## Description

These API have been deprecated in favor of newer API, or because they were deemed unnecessary.

## Functions

### hb_font_funcs_set_glyph_func ()

    void
    hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs,
                                  hb_font_get_glyph_func_t func,
                                  void *user_data,
                                  hb_destroy_func_t destroy);

`hb_font_funcs_set_glyph_func` has been deprecated since version 1.2.3 and should not be used in newly-written code.

Deprecated. Use `hb_font_funcs_set_nominal_glyph_func()` and `hb_font_funcs_set_variation_glyph_func()` instead.

#### Parameters

ffuncs | The font-functions structure |
func | callback function. | [closure user_data][destroy destroy][scope notified]
user_data | data to pass to `func` |
destroy | function to call when `user_data` is not needed anymore. | [nullable]

Since: 0.9.2

### hb_font_get_glyph_func_t ()

    hb_bool_t
    (*hb_font_get_glyph_func_t) (hb_font_t *font,
                                 void *font_data,
                                 hb_codepoint_t unicode,
                                 hb_codepoint_t variation_selector,
                                 hb_codepoint_t *glyph,
                                 void *user_data);

`hb_font_get_glyph_func_t` has been deprecated since version 1.2.3 and should not be used in newly-written code.

A virtual method for the hb_font_funcs_t of an hb_font_t object.

This method should retrieve the glyph ID for a specified Unicode code point font, with an optional variation selector.

#### Parameters

font | hb_font_t to work upon |
font_data | `font` user data pointer |
unicode | The Unicode code point to query |
variation_selector | The variation-selector code point to query |
glyph | The glyph ID retrieved. | [out]
user_data | User data pointer passed by the caller |

#### Returns

`true` if data found, `false` otherwise

### hb_ot_layout_table_choose_script ()

    hb_bool_t
    hb_ot_layout_table_choose_script (hb_face_t *face,
                                      hb_tag_t table_tag,
                                      const hb_tag_t *script_tags,
                                      unsigned int *script_index,
                                      hb_tag_t *chosen_script);

`hb_ot_layout_table_choose_script` is deprecated and should not be used in newly-written code.

Deprecated since 2.0.0

#### Parameters

face | hb_face_t to work upon |
table_tag | HB_OT_TAG_GSUB or HB_OT_TAG_GPOS |
script_tags | Array of hb_tag_t script tags |
script_index | The index of the chosen script. | [out]
chosen_script | hb_tag_t of the chosen script. | [out]

### hb_ot_layout_table_find_script ()

    hb_bool_t
    hb_ot_layout_table_find_script (hb_face_t *face,
                                    hb_tag_t table_tag,
                                    hb_tag_t script_tag,
                                    unsigned int *script_index);

Fetches the index if a given script tag in the specified face's GSUB table or GPOS table.

#### Parameters

face | hb_face_t to work upon |
table_tag | HB_OT_TAG_GSUB or HB_OT_TAG_GPOS |
script_tag | hb_tag_t of the script tag requested |
script_index | The index of the requested script tag. | [out]

#### Returns

`true` if the script is found, `false` otherwise

### hb_ot_tag_from_language ()

    hb_tag_t
    hb_ot_tag_from_language (hb_language_t language);

`hb_ot_tag_from_language` has been deprecated since version 2.0.0 and should not be used in newly-written code.

use `hb_ot_tags_from_script_and_language()` instead

Converts an hb_language_t to an hb_tag_t.

#### Parameters

language | an hb_language_t to convert. |

Since: 0.6.0

### hb_ot_tags_from_script ()

    void
    hb_ot_tags_from_script (hb_script_t script,
                            hb_tag_t *script_tag_1,
                            hb_tag_t *script_tag_2);

`hb_ot_tags_from_script` has been deprecated since version 2.0.0 and should not be used in newly-written code.

use `hb_ot_tags_from_script_and_language()` instead

Converts an hb_script_t to script tags.

#### Parameters

script | an hb_script_t to convert. |
script_tag_1 | output hb_tag_t. | [out]
script_tag_2 | output hb_tag_t. | [out]

Since: 0.6.0

### hb_ot_var_find_axis ()

    hb_bool_t
    hb_ot_var_find_axis (hb_face_t *face,
                         hb_tag_t axis_tag,
                         unsigned int *axis_index,
                         hb_ot_var_axis_t *axis_info);

`hb_ot_var_find_axis` has been deprecated since version 2.2.0 and should not be used in newly-written code.

- use `hb_ot_var_find_axis_info()` instead

Fetches the variation-axis information corresponding to the specified axis tag in the specified face.

#### Parameters

face | hb_face_t to work upon |
axis_tag | The hb_tag_t of the variation axis to query |
axis_index | The index of the variation axis |
axis_info | The hb_ot_var_axis_info_t of the axis tag queried. | [out]

Since: 1.4.2

### hb_ot_var_get_axes ()

    unsigned int
    hb_ot_var_get_axes (hb_face_t *face,
                        unsigned int start_offset,
                        unsigned int *axes_count,
                        hb_ot_var_axis_t *axes_array);

`hb_ot_var_get_axes` has been deprecated since version 2.2.0 and should not be used in newly-written code.

use `hb_ot_var_get_axis_infos()` instead

Fetches a list of all variation axes in the specified face. The list returned will begin at the offset provided.

#### Parameters

face | hb_face_t to work upon |
start_offset | offset of the first lookup to retrieve |
axes_count | Input = the maximum number of variation axes to return; Output = the actual number of variation axes returned (may be zero). | [inout][optional]
axes_array | The array of variation axes found. | [out caller-allocates][array length=axes_count]

Since: 1.4.2

### hb_unicode_eastasian_width_func_t ()

    unsigned int
    (*hb_unicode_eastasian_width_func_t) (hb_unicode_funcs_t *ufuncs,
                                          hb_codepoint_t unicode,
                                          void *user_data);

`hb_unicode_eastasian_width_func_t` has been deprecated since version 2.0.0 and should not be used in newly-written code.

A virtual method for the hb_unicode_funcs_t structure.

#### Parameters

ufuncs | A Unicode-functions structure |
unicode | The code point to query |
user_data | User data pointer passed by the caller |

### hb_unicode_eastasian_width ()

    unsigned int
    hb_unicode_eastasian_width (hb_unicode_funcs_t *ufuncs,
                                hb_codepoint_t unicode);

`hb_unicode_eastasian_width` has been deprecated since version 2.0.0 and should not be used in newly-written code.

Don't use. Not used by HarfBuzz.

#### Parameters

ufuncs | a Unicode-function structure |
unicode | The code point to query |

Since: 0.9.2

### hb_unicode_funcs_set_eastasian_width_func ()

    void
    hb_unicode_funcs_set_eastasian_width_func
                                   (hb_unicode_funcs_t *ufuncs,
                                    hb_unicode_eastasian_width_func_t func,
                                    void *user_data,
                                    hb_destroy_func_t destroy);

`hb_unicode_funcs_set_eastasian_width_func` has been deprecated since version 2.0.0 and should not be used in newly-written code.

Sets the implementation function for hb_unicode_eastasian_width_func_t.

#### Parameters

ufuncs | a Unicode-function structure |
func | The callback function to assign. | [closure user_data][destroy destroy][scope notified]
user_data | Data to pass to `func` |
destroy | The function to call when `user_data` is not needed anymore. | [nullable]

Since: 0.9.2

### hb_unicode_decompose_compatibility_func_t ()

    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_decompose_compatibility_func_t` has been deprecated since version 2.0.0 and should not be used in newly-written code.

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.

#### Parameters

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()` |

#### Returns

number of codepoints in the full compatibility decomposition of `u` , or 0 if no decomposition available.

### hb_unicode_decompose_compatibility ()

    unsigned int
    hb_unicode_decompose_compatibility (hb_unicode_funcs_t *ufuncs,
                                        hb_codepoint_t u,
                                        hb_codepoint_t *decomposed);

`hb_unicode_decompose_compatibility` has been deprecated since version 2.0.0 and should not be used in newly-written code.

Fetches the compatibility decomposition of a Unicode code point. Deprecated.

#### Parameters

ufuncs | The Unicode-functions structure |
u | Code point to decompose |
decomposed | Compatibility decomposition of `u` . | [out]

#### Returns

length of `decomposed` .

Since: 0.9.2

### hb_unicode_funcs_set_decompose_compatibility_func ()

    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_funcs_set_decompose_compatibility_func` has been deprecated since version 2.0.0 and should not be used in newly-written code.

Sets the implementation function for hb_unicode_decompose_compatibility_func_t.

#### Parameters

ufuncs | A Unicode-functions structure |
func | The callback function to assign. | [closure user_data][destroy destroy][scope notified]
user_data | Data to pass to `func` |
destroy | The function to call when `user_data` is not needed anymore. | [nullable]

Since: 0.9.2

### hb_font_funcs_set_glyph_v_kerning_func ()

    void
    hb_font_funcs_set_glyph_v_kerning_func
                                   (hb_font_funcs_t *ffuncs,
                                    hb_font_get_glyph_v_kerning_func_t func,
                                    void *user_data,
                                    hb_destroy_func_t destroy);

`hb_font_funcs_set_glyph_v_kerning_func` has been deprecated since version 2.0.0 and should not be used in newly-written code.

Sets the implementation function for hb_font_get_glyph_v_kerning_func_t.

#### Parameters

ffuncs | A font-function structure |
func | The callback function to assign. | [closure user_data][destroy destroy][scope notified]
user_data | Data to pass to `func` |
destroy | The function to call when `user_data` is not needed anymore. | [nullable]

Since: 0.9.2

### hb_font_get_glyph_shape ()

    void
    hb_font_get_glyph_shape (hb_font_t *font,
                             hb_codepoint_t glyph,
                             hb_draw_funcs_t *dfuncs,
                             void *draw_data);

`hb_font_get_glyph_shape` has been deprecated since version 7.0.0 and should not be used in newly-written code.

Use `hb_font_draw_glyph()` instead

Fetches the glyph shape that corresponds to a glyph in the specified `font` . The shape is returned by way of calls to the callbacks of the `dfuncs` objects, with `draw_data` passed to them.

#### Parameters

font | hb_font_t to work upon |
glyph | The glyph ID |
dfuncs | hb_draw_funcs_t to draw to |
draw_data | User data to pass to draw callbacks |

Since: 4.0.0

### hb_font_get_glyph_shape_func_t ()

    void
    (*hb_font_get_glyph_shape_func_t) (hb_font_t *font,
                                       void *font_data,
                                       hb_codepoint_t glyph,
                                       hb_draw_funcs_t *draw_funcs,
                                       void *draw_data,
                                       void *user_data);

`hb_font_get_glyph_shape_func_t` has been deprecated since version 7.0.0 and should not be used in newly-written code.

Use hb_font_draw_glyph_func_t instead

A virtual method for the hb_font_funcs_t of an hb_font_t object.

#### Parameters

font | hb_font_t to work upon |
font_data | `font` user data pointer |
glyph | The glyph ID to query |
draw_funcs | The draw functions to send the shape data to |
draw_data | The data accompanying the draw functions |
user_data | User data pointer passed by the caller |

Since: 4.0.0

### hb_font_funcs_set_glyph_shape_func ()

    void
    hb_font_funcs_set_glyph_shape_func (hb_font_funcs_t *ffuncs,
                                        hb_font_get_glyph_shape_func_t func,
                                        void *user_data,
                                        hb_destroy_func_t destroy);

`hb_font_funcs_set_glyph_shape_func` has been deprecated since version 7.0.0 and should not be used in newly-written code.

Use `hb_font_funcs_set_draw_glyph_func()` instead

Sets the implementation function for hb_font_get_glyph_shape_func_t, which is the same as hb_font_draw_glyph_func_t.

#### Parameters

ffuncs | A font-function structure |
func | The callback function to assign. | [closure user_data][destroy destroy][scope notified]
user_data | Data to pass to `func` |
destroy | The function to call when `user_data` is not needed anymore. | [nullable]

Since: 4.0.0

### hb_font_get_glyph_v_kerning ()

    hb_position_t
    hb_font_get_glyph_v_kerning (hb_font_t *font,
                                 hb_codepoint_t top_glyph,
                                 hb_codepoint_t bottom_glyph);

`hb_font_get_glyph_v_kerning` has been deprecated since version 2.0.0 and should not be used in newly-written code.

Fetches the kerning-adjustment value for a glyph-pair in the specified font, for vertical text segments.

It handles legacy kerning only (as returned by the corresponding hb_font_funcs_t function).

#### Parameters

font | hb_font_t to work upon |
top_glyph | The glyph ID of the top glyph in the glyph pair |
bottom_glyph | The glyph ID of the bottom glyph in the glyph pair |

#### Returns

The kerning adjustment value

Since: 0.9.2

## Types and Values

### HB_BUFFER_FLAGS_DEFAULT

    #define HB_BUFFER_FLAGS_DEFAULT			HB_BUFFER_FLAG_DEFAULT

`HB_BUFFER_FLAGS_DEFAULT` has been deprecated since version 0.9.20 and should not be used in newly-written code.

Use HB_BUFFER_FLAG_DEFAULT instead.

### HB_BUFFER_SERIALIZE_FLAGS_DEFAULT

    #define HB_BUFFER_SERIALIZE_FLAGS_DEFAULT HB_BUFFER_SERIALIZE_FLAG_DEFAULT

`HB_BUFFER_SERIALIZE_FLAGS_DEFAULT` has been deprecated since version 0.9.20 and should not be used in newly-written code.

Use HB_BUFFER_SERIALIZE_FLAG_DEFAULT instead.

### HB_SCRIPT_CANADIAN_ABORIGINAL

    #define HB_SCRIPT_CANADIAN_ABORIGINAL		HB_SCRIPT_CANADIAN_SYLLABICS

`HB_SCRIPT_CANADIAN_ABORIGINAL` has been deprecated since version 0.9.20 and should not be used in newly-written code.

Use HB_SCRIPT_CANADIAN_SYLLABICS instead:

### HB_MATH_GLYPH_PART_FLAG_EXTENDER

    #define HB_MATH_GLYPH_PART_FLAG_EXTENDER HB_OT_MATH_GLYPH_PART_FLAG_EXTENDER

`HB_MATH_GLYPH_PART_FLAG_EXTENDER` has been deprecated since version 2.5.1 and should not be used in newly-written code.

Use HB_OT_MATH_GLYPH_PART_FLAG_EXTENDER instead.

### HB_OT_MATH_SCRIPT

    #define HB_OT_MATH_SCRIPT HB_OT_TAG_MATH_SCRIPT

`HB_OT_MATH_SCRIPT` has been deprecated since version 3.4.0 and should not be used in newly-written code.

Use HB_SCRIPT_MATH or HB_OT_TAG_MATH_SCRIPT instead.

Previous versions of this documentation recommended passing HB_OT_MATH_SCRIPT to `hb_buffer_set_script()` to enable math shaping, but this usage is no longer supported. Use HB_SCRIPT_MATH instead.

Since: 1.3.3

### HB_OT_VAR_NO_AXIS_INDEX

    #define HB_OT_VAR_NO_AXIS_INDEX		0xFFFFFFFFu

`HB_OT_VAR_NO_AXIS_INDEX` has been deprecated since version 2.2.0 and should not be used in newly-written code.

Do not use.

Since: 1.4.2

### hb_ot_var_axis_t

    typedef struct {
      hb_tag_t tag;
      hb_ot_name_id_t name_id;
      float min_value;
      float default_value;
      float max_value;
    } hb_ot_var_axis_t;

`hb_ot_var_axis_t` has been deprecated since version 2.2.0 and should not be used in newly-written code.

Use hb_ot_var_axis_info_t instead.

#### Members

hb_tag_t `tag`; | axis tag |
hb_ot_name_id_t `name_id`; | axis name identifier |
float `min_value`; | minimum value of the axis |
float `default_value`; | default value of the axis |
float `max_value`; | maximum value of the axis |

Since: 1.4.2

### HB_UNICODE_MAX_DECOMPOSITION_LEN

    #define HB_UNICODE_MAX_DECOMPOSITION_LEN (18+1) /* codepoints */

`HB_UNICODE_MAX_DECOMPOSITION_LEN` has been deprecated since version 2.0.0 and should not be used in newly-written code.

See Unicode 6.1 for details on the maximum decomposition length.

### HB_UNICODE_COMBINING_CLASS_CCC133

    #define HB_UNICODE_COMBINING_CLASS_CCC133 133

`HB_UNICODE_COMBINING_CLASS_CCC133` has been deprecated since version 7.2.0 and should not be used in newly-written code.

[Tibetan]

### hb_font_get_glyph_v_kerning_func_t

    typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_v_kerning_func_t;

`hb_font_get_glyph_v_kerning_func_t` is deprecated and should not be used in newly-written code.

A virtual method for the hb_font_funcs_t of an hb_font_t object.

This method should retrieve the kerning-adjustment value for a glyph-pair in the specified font, for vertical text segments.