#endif
#ifdef HB_LEAN
+#define HB_DISABLE_DEPRECATED
#define HB_NO_BITMAP
#define HB_NO_CFF
#define HB_NO_MATH
/* Closure. */
+#ifdef HB_DISABLE_DEPRECATED
+#define HB_IF_NOT_DEPRECATED(x)
+#else
+#define HB_IF_NOT_DEPRECATED(x) x
+#endif
+
#ifdef HB_NO_AAT
#define HB_NO_SHAPE_AAT
#endif
return ret;
}
+#ifndef HB_DISABLE_DEPRECATED
static hb_position_t
hb_font_get_glyph_h_kerning_nil (hb_font_t *font HB_UNUSED,
void *font_data HB_UNUSED,
{
return font->parent_scale_y_distance (font->parent->get_glyph_v_kerning (top_glyph, bottom_glyph));
}
+#endif
static hb_bool_t
hb_font_get_glyph_extents_nil (hb_font_t *font HB_UNUSED,
return font->get_glyph_v_origin (glyph, x, y);
}
+#ifndef HB_DISABLE_DEPRECATED
/**
* hb_font_get_glyph_h_kerning:
* @font: a font.
{
return font->get_glyph_v_kerning (top_glyph, bottom_glyph);
}
+#endif
/**
* hb_font_get_glyph_extents:
return font->subtract_glyph_origin_for_direction (glyph, direction, x, y);
}
+#ifndef HB_DISABLE_DEPRECATED
/**
* hb_font_get_glyph_kerning_for_direction:
* @font: a font.
{
return font->get_glyph_kerning_for_direction (first_glyph, second_glyph, direction, x, y);
}
+#endif
/**
* hb_font_get_glyph_extents_for_origin:
}
+#ifndef HB_DISABLE_DEPRECATED
/*
* Deprecated get_glyph_func():
*/
trampoline,
trampoline_destroy);
}
+#endif
HB_FONT_FUNC_IMPLEMENT (glyph_v_advances) \
HB_FONT_FUNC_IMPLEMENT (glyph_h_origin) \
HB_FONT_FUNC_IMPLEMENT (glyph_v_origin) \
- HB_FONT_FUNC_IMPLEMENT (glyph_h_kerning) \
- HB_FONT_FUNC_IMPLEMENT (glyph_v_kerning) \
+ HB_IF_NOT_DEPRECATED (HB_FONT_FUNC_IMPLEMENT (glyph_h_kerning)) \
+ HB_IF_NOT_DEPRECATED (HB_FONT_FUNC_IMPLEMENT (glyph_v_kerning)) \
HB_FONT_FUNC_IMPLEMENT (glyph_extents) \
HB_FONT_FUNC_IMPLEMENT (glyph_contour_point) \
HB_FONT_FUNC_IMPLEMENT (glyph_name) \
hb_position_t get_glyph_h_kerning (hb_codepoint_t left_glyph,
hb_codepoint_t right_glyph)
{
+#ifdef HB_DISABLE_DEPRECATED
+ return 0;
+#else
return klass->get.f.glyph_h_kerning (this, user_data,
left_glyph, right_glyph,
klass->user_data.glyph_h_kerning);
+#endif
}
hb_position_t get_glyph_v_kerning (hb_codepoint_t top_glyph,
hb_codepoint_t bottom_glyph)
{
+#ifdef HB_DISABLE_DEPRECATED
+ return 0;
+#else
return klass->get.f.glyph_v_kerning (this, user_data,
top_glyph, bottom_glyph,
klass->user_data.glyph_v_kerning);
+#endif
}
hb_bool_t get_glyph_extents (hb_codepoint_t glyph,
{
}
+#ifndef HB_DISABLE_DEPRECATED
/**
* hb_graphite2_font_get_gr_font:
*
{
return nullptr;
}
+#endif
/*
/* We don't ifdef-out the fallback code such that compiler always
* sees it and makes sure it's compilable. */
- UChar utf16[2], normalized[2 * HB_UNICODE_MAX_DECOMPOSITION_LEN + 1];
+ UChar utf16[2], normalized[2 * 19/*HB_UNICODE_MAX_DECOMPOSITION_LEN*/ + 1];
unsigned int len;
hb_bool_t ret, err;
UErrorCode icu_err;
return false;
}
+#ifndef HB_DISABLE_DEPRECATED
/**
* hb_ot_layout_table_choose_script:
* @face: #hb_face_t to work upon
for (t = script_tags; *t; t++);
return hb_ot_layout_table_select_script (face, table_tag, t - script_tags, script_tags, script_index, chosen_script);
}
+#endif
/**
* hb_ot_layout_table_select_script:
}
+#ifndef HB_DISABLE_DEPRECATED
/**
* hb_ot_layout_script_find_language:
* @face: #hb_face_t to work upon
*
* Return value: true if the language tag is found, false otherwise
*
+ * Since: ??
+ * Deprecated: ??
**/
hb_bool_t
hb_ot_layout_script_find_language (hb_face_t *face,
&language_tag,
language_index);
}
+#endif
/**
*
* Return value: true if the language tag is found, false otherwise
*
- *
* Since: 2.0.0
**/
hb_bool_t
}
+#ifndef HB_DISABLE_DEPRECATED
struct hb_ot_shape_fallback_kern_driver_t
{
hb_ot_shape_fallback_kern_driver_t (hb_font_t *font_,
hb_font_t *font;
hb_direction_t direction;
};
+#endif
/* Performs font-assisted kerning. */
void
return;
#endif
+#ifndef HB_DISABLE_DEPRECATED
if (HB_DIRECTION_IS_HORIZONTAL (buffer->props.direction) ?
!font->has_glyph_h_kerning_func () :
!font->has_glyph_v_kerning_func ())
if (reverse)
buffer->reverse ();
+#endif
}
return HB_SCRIPT_UNKNOWN;
}
+#ifndef HB_DISABLE_DEPRECATED
void
hb_ot_tags_from_script (hb_script_t script,
hb_tag_t *script_tag_1,
*script_tag_1 = count > 0 ? tags[0] : HB_OT_TAG_DEFAULT_SCRIPT;
*script_tag_2 = count > 1 ? tags[1] : HB_OT_TAG_DEFAULT_SCRIPT;
}
+#endif
/*
* Complete list at:
/*{"??", {HB_TAG('Y','I','C',' ')}},*/ /* Yi Classic */
/*{"zh?", {HB_TAG('Z','H','P',' ')}},*/ /* Chinese Phonetic */
+#ifndef HB_DISABLE_DEPRECATED
hb_tag_t
hb_ot_tag_from_language (hb_language_t language)
{
hb_ot_tags_from_script_and_language (HB_SCRIPT_UNKNOWN, language, nullptr, nullptr, &count, tags);
return count > 0 ? tags[0] : HB_OT_TAG_DEFAULT_LANGUAGE;
}
+#endif
static void
hb_ot_tags_from_language (const char *lang_str,
unsigned int get_axis_count () const { return axisCount; }
+#ifndef HB_DISABLE_DEPRECATED
void get_axis_deprecated (unsigned int axis_index,
hb_ot_var_axis_t *info) const
{
info->min_value = hb_min (info->default_value, axis.minValue / 65536.f);
info->max_value = hb_max (info->default_value, axis.maxValue / 65536.f);
}
+#endif
void get_axis_info (unsigned int axis_index,
hb_ot_var_axis_info_t *info) const
info->reserved = 0;
}
+#ifndef HB_DISABLE_DEPRECATED
unsigned int get_axes_deprecated (unsigned int start_offset,
unsigned int *axes_count /* IN/OUT */,
hb_ot_var_axis_t *axes_array /* OUT */) const
}
return axisCount;
}
+#endif
unsigned int get_axis_infos (unsigned int start_offset,
unsigned int *axes_count /* IN/OUT */,
return axisCount;
}
+#ifndef HB_DISABLE_DEPRECATED
bool find_axis_deprecated (hb_tag_t tag,
unsigned int *axis_index,
hb_ot_var_axis_t *info) const
*axis_index = HB_OT_VAR_NO_AXIS_INDEX;
return false;
}
+#endif
bool find_axis_info (hb_tag_t tag,
hb_ot_var_axis_info_t *info) const
return face->table.fvar->get_axis_count ();
}
+#ifndef HB_DISABLE_DEPRECATED
/**
* hb_ot_var_get_axes:
*
{
return face->table.fvar->find_axis_deprecated (axis_tag, axis_index, axis_info);
}
+#endif
/**
* hb_ot_var_get_axis_infos:
set->symmetric_difference (other);
}
+#ifndef HB_DISABLE_DEPRECATED
/**
* hb_set_invert:
* @set: a set.
hb_set_invert (hb_set_t *set HB_UNUSED)
{
}
+#endif
/**
* hb_set_get_population:
return HB_UNICODE_COMBINING_CLASS_NOT_REORDERED;
}
+#ifndef HB_DISABLE_DEPRECATED
static unsigned int
hb_unicode_eastasian_width_nil (hb_unicode_funcs_t *ufuncs HB_UNUSED,
hb_codepoint_t unicode HB_UNUSED,
{
return 1;
}
+#endif
static hb_unicode_general_category_t
hb_unicode_general_category_nil (hb_unicode_funcs_t *ufuncs HB_UNUSED,
}
+#ifndef HB_DISABLE_DEPRECATED
static unsigned int
hb_unicode_decompose_compatibility_nil (hb_unicode_funcs_t *ufuncs HB_UNUSED,
hb_codepoint_t u HB_UNUSED,
{
return 0;
}
+#endif
extern "C" hb_unicode_funcs_t *hb_glib_get_unicode_funcs ();
return ufuncs->decompose (ab, a, b);
}
+#ifndef HB_DISABLE_DEPRECATED
/**
* hb_unicode_decompose_compatibility:
* @ufuncs: Unicode functions.
{
return ufuncs->decompose_compatibility (u, decomposed);
}
+#endif
/* See hb-unicode.hh for details. */
#define HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS \
HB_UNICODE_FUNC_IMPLEMENT (combining_class) \
- HB_UNICODE_FUNC_IMPLEMENT (eastasian_width) \
+ HB_IF_NOT_DEPRECATED (HB_UNICODE_FUNC_IMPLEMENT (eastasian_width)) \
HB_UNICODE_FUNC_IMPLEMENT (general_category) \
HB_UNICODE_FUNC_IMPLEMENT (mirroring) \
HB_UNICODE_FUNC_IMPLEMENT (script) \
HB_UNICODE_FUNC_IMPLEMENT (compose) \
HB_UNICODE_FUNC_IMPLEMENT (decompose) \
- HB_UNICODE_FUNC_IMPLEMENT (decompose_compatibility) \
+ HB_IF_NOT_DEPRECATED (HB_UNICODE_FUNC_IMPLEMENT (decompose_compatibility)) \
/* ^--- Add new callbacks here */
/* Simple callbacks are those taking a hb_codepoint_t and returning a hb_codepoint_t */
#define HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE \
HB_UNICODE_FUNC_IMPLEMENT (hb_unicode_combining_class_t, combining_class) \
- HB_UNICODE_FUNC_IMPLEMENT (unsigned int, eastasian_width) \
+ HB_IF_NOT_DEPRECATED (HB_UNICODE_FUNC_IMPLEMENT (unsigned int, eastasian_width)) \
HB_UNICODE_FUNC_IMPLEMENT (hb_unicode_general_category_t, general_category) \
HB_UNICODE_FUNC_IMPLEMENT (hb_codepoint_t, mirroring) \
HB_UNICODE_FUNC_IMPLEMENT (hb_script_t, script) \
unsigned int decompose_compatibility (hb_codepoint_t u,
hb_codepoint_t *decomposed)
{
+#ifdef HB_DISABLE_DEPRECATED
+ unsigned int ret = 0;
+#else
unsigned int ret = func.decompose_compatibility (this, u, decomposed, user_data.decompose_compatibility);
+#endif
if (ret == 1 && u == decomposed[0]) {
decomposed[0] = 0;
return 0;