HB_FONT_FUNC_IMPLEMENT (glyph) \
HB_FONT_FUNC_IMPLEMENT (glyph_h_advance) \
HB_FONT_FUNC_IMPLEMENT (glyph_v_advance) \
+ HB_FONT_FUNC_IMPLEMENT (glyph_h_origin) \
HB_FONT_FUNC_IMPLEMENT (glyph_v_origin) \
- HB_FONT_FUNC_IMPLEMENT (h_kerning) \
- HB_FONT_FUNC_IMPLEMENT (v_kerning) \
+ HB_FONT_FUNC_IMPLEMENT (glyph_h_kerning) \
+ HB_FONT_FUNC_IMPLEMENT (glyph_v_kerning) \
HB_FONT_FUNC_IMPLEMENT (glyph_extents) \
- HB_FONT_FUNC_IMPLEMENT (contour_point)
+ HB_FONT_FUNC_IMPLEMENT (glyph_contour_point)
struct {
}
static hb_bool_t
+hb_font_get_glyph_h_origin_nil (hb_font_t *font HB_UNUSED,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t glyph,
+ hb_position_t *x_origin,
+ hb_position_t *y_origin,
+ void *user_data HB_UNUSED)
+{
+ if (font->parent) {
+ hb_bool_t ret = hb_font_get_glyph_h_origin (font->parent,
+ glyph,
+ x_origin, y_origin);
+ font->parent_scale_distance (x_origin, y_origin);
+ return ret;
+ }
+
+ *x_origin = *y_origin = 0;
+ return FALSE;
+}
+
+static hb_bool_t
hb_font_get_glyph_v_origin_nil (hb_font_t *font HB_UNUSED,
void *font_data HB_UNUSED,
hb_codepoint_t glyph,
}
static hb_bool_t
-hb_font_get_h_kerning_nil (hb_font_t *font HB_UNUSED,
- void *font_data HB_UNUSED,
- hb_codepoint_t left_glyph,
- hb_codepoint_t right_glyph,
- hb_position_t *x_kern,
- hb_position_t *y_kern,
- void *user_data HB_UNUSED)
+hb_font_get_glyph_h_kerning_nil (hb_font_t *font HB_UNUSED,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t left_glyph,
+ hb_codepoint_t right_glyph,
+ hb_position_t *x_kern,
+ hb_position_t *y_kern,
+ void *user_data HB_UNUSED)
{
if (font->parent) {
- hb_bool_t ret = hb_font_get_h_kerning (font->parent,
- left_glyph, right_glyph,
- x_kern, y_kern);
+ hb_bool_t ret = hb_font_get_glyph_h_kerning (font->parent,
+ left_glyph, right_glyph,
+ x_kern, y_kern);
font->parent_scale_distance (x_kern, y_kern);
return ret;
}
}
static hb_bool_t
-hb_font_get_v_kerning_nil (hb_font_t *font HB_UNUSED,
- void *font_data HB_UNUSED,
- hb_codepoint_t top_glyph,
- hb_codepoint_t bottom_glyph,
- hb_position_t *x_kern,
- hb_position_t *y_kern,
- void *user_data HB_UNUSED)
+hb_font_get_glyph_v_kerning_nil (hb_font_t *font HB_UNUSED,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t top_glyph,
+ hb_codepoint_t bottom_glyph,
+ hb_position_t *x_kern,
+ hb_position_t *y_kern,
+ void *user_data HB_UNUSED)
{
if (font->parent) {
- hb_bool_t ret = hb_font_get_v_kerning (font->parent,
- top_glyph, bottom_glyph,
- x_kern, y_kern);
+ hb_bool_t ret = hb_font_get_glyph_v_kerning (font->parent,
+ top_glyph, bottom_glyph,
+ x_kern, y_kern);
font->parent_scale_distance (x_kern, y_kern);
return ret;
}
hb_font_get_glyph_extents_nil (hb_font_t *font HB_UNUSED,
void *font_data HB_UNUSED,
hb_codepoint_t glyph,
- hb_bool_t *vertical,
hb_glyph_extents_t *extents,
void *user_data HB_UNUSED)
{
if (font->parent) {
hb_bool_t ret = hb_font_get_glyph_extents (font->parent,
glyph,
- vertical,
extents);
font->parent_scale_position (&extents->x_bearing, &extents->y_bearing);
font->parent_scale_distance (&extents->width, &extents->height);
}
static hb_bool_t
-hb_font_get_contour_point_nil (hb_font_t *font HB_UNUSED,
- void *font_data HB_UNUSED,
- hb_codepoint_t glyph,
- unsigned int point_index,
- hb_bool_t *vertical,
- hb_position_t *x,
- hb_position_t *y,
- void *user_data HB_UNUSED)
+hb_font_get_glyph_contour_point_nil (hb_font_t *font HB_UNUSED,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t glyph,
+ unsigned int point_index,
+ hb_position_t *x,
+ hb_position_t *y,
+ void *user_data HB_UNUSED)
{
if (font->parent) {
- hb_bool_t ret = hb_font_get_contour_point (font->parent,
- glyph, point_index,
- vertical,
- x, y);
+ hb_bool_t ret = hb_font_get_glyph_contour_point (font->parent,
+ glyph, point_index,
+ x, y);
font->parent_scale_position (x, y);
return ret;
}
}
hb_bool_t
+hb_font_get_glyph_h_origin (hb_font_t *font,
+ hb_codepoint_t glyph,
+ hb_position_t *x_origin, hb_position_t *y_origin)
+{
+ *x_origin = *y_origin = 0;
+ return font->klass->get.glyph_h_origin (font, font->user_data,
+ glyph, x_origin, y_origin,
+ font->klass->user_data.glyph_h_origin);
+}
+
+hb_bool_t
hb_font_get_glyph_v_origin (hb_font_t *font,
hb_codepoint_t glyph,
hb_position_t *x_origin, hb_position_t *y_origin)
}
hb_bool_t
-hb_font_get_h_kerning (hb_font_t *font,
- hb_codepoint_t left_glyph, hb_codepoint_t right_glyph,
- hb_position_t *x_kern, hb_position_t *y_kern)
+hb_font_get_glyph_h_kerning (hb_font_t *font,
+ hb_codepoint_t left_glyph, hb_codepoint_t right_glyph,
+ hb_position_t *x_kern, hb_position_t *y_kern)
{
*x_kern = *y_kern = 0;
- return font->klass->get.h_kerning (font, font->user_data,
- left_glyph, right_glyph,
- x_kern, y_kern,
- font->klass->user_data.h_kerning);
+ return font->klass->get.glyph_h_kerning (font, font->user_data,
+ left_glyph, right_glyph,
+ x_kern, y_kern,
+ font->klass->user_data.glyph_h_kerning);
}
hb_bool_t
-hb_font_get_v_kerning (hb_font_t *font,
- hb_codepoint_t left_glyph, hb_codepoint_t right_glyph,
- hb_position_t *x_kern, hb_position_t *y_kern)
+hb_font_get_glyph_v_kerning (hb_font_t *font,
+ hb_codepoint_t left_glyph, hb_codepoint_t right_glyph,
+ hb_position_t *x_kern, hb_position_t *y_kern)
{
*x_kern = *y_kern = 0;
- return font->klass->get.v_kerning (font, font->user_data,
+ return font->klass->get.glyph_v_kerning (font, font->user_data,
left_glyph, right_glyph,
x_kern, y_kern,
- font->klass->user_data.v_kerning);
+ font->klass->user_data.glyph_v_kerning);
}
hb_bool_t
hb_font_get_glyph_extents (hb_font_t *font,
hb_codepoint_t glyph,
- hb_bool_t *vertical,
hb_glyph_extents_t *extents)
{
memset (extents, 0, sizeof (*extents));
return font->klass->get.glyph_extents (font, font->user_data,
glyph,
- vertical,
extents,
font->klass->user_data.glyph_extents);
}
hb_bool_t
-hb_font_get_contour_point (hb_font_t *font,
- hb_codepoint_t glyph, unsigned int point_index,
- hb_bool_t *vertical,
- hb_position_t *x, hb_position_t *y)
+hb_font_get_glyph_contour_point (hb_font_t *font,
+ hb_codepoint_t glyph, unsigned int point_index,
+ hb_position_t *x, hb_position_t *y)
{
*x = *y = 0;
- return font->klass->get.contour_point (font, font->user_data,
- glyph, point_index,
- vertical,
- x, y,
- font->klass->user_data.contour_point);
+ return font->klass->get.glyph_contour_point (font, font->user_data,
+ glyph, point_index,
+ x, y,
+ font->klass->user_data.glyph_contour_point);
}
}
void
-hb_font_get_kerning_for_direction (hb_font_t *font,
- hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
- hb_direction_t direction,
- hb_position_t *x_kern, hb_position_t *y_kern)
+hb_font_get_glyph_origin_for_direction (hb_font_t *font,
+ hb_codepoint_t glyph,
+ hb_direction_t direction,
+ hb_position_t *x_origin, hb_position_t *y_origin)
+{
+ if (HB_DIRECTION_IS_VERTICAL (direction)) {
+ hb_bool_t ret = hb_font_get_glyph_v_origin (font, glyph, x_origin, y_origin);
+ if (!ret) {
+ /* TODO Simulate using XXX h_origin and font_extents */
+ }
+ } else {
+ hb_font_get_glyph_h_origin (font, glyph, x_origin, y_origin);
+ }
+}
+
+void
+hb_font_get_glyph_kerning_for_direction (hb_font_t *font,
+ hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
+ hb_direction_t direction,
+ hb_position_t *x_kern, hb_position_t *y_kern)
{
switch (direction) {
case HB_DIRECTION_LTR:
case HB_DIRECTION_RTL:
- hb_font_get_h_kerning (font, first_glyph, second_glyph, x_kern, y_kern);
+ hb_font_get_glyph_h_kerning (font, first_glyph, second_glyph, x_kern, y_kern);
break;
case HB_DIRECTION_TTB:
case HB_DIRECTION_BTT:
- hb_font_get_v_kerning (font, first_glyph, second_glyph, x_kern, y_kern);
+ hb_font_get_glyph_v_kerning (font, first_glyph, second_glyph, x_kern, y_kern);
break;
case HB_DIRECTION_INVALID:
hb_direction_t direction,
hb_glyph_extents_t *extents)
{
- hb_bool_t vertical = HB_DIRECTION_IS_VERTICAL (direction);
- hb_bool_t ret = hb_font_get_glyph_extents (font, glyph, &vertical, extents);
+ hb_bool_t ret = hb_font_get_glyph_extents (font, glyph, extents);
if (ret) {
- if (vertical != HB_DIRECTION_IS_VERTICAL (direction)) {
- /* XXX Adjust origin */
- }
+ /* XXX Adjust origin */
} else {
/* TODO Simulate using get_h_advance and font_extents? */
}
}
hb_bool_t
-hb_font_get_contour_point_for_direction (hb_font_t *font,
- hb_codepoint_t glyph, unsigned int point_index,
- hb_direction_t direction,
- hb_position_t *x, hb_position_t *y)
+hb_font_get_glyph_contour_point_for_direction (hb_font_t *font,
+ hb_codepoint_t glyph, unsigned int point_index,
+ hb_direction_t direction,
+ hb_position_t *x, hb_position_t *y)
{
- hb_bool_t vertical = HB_DIRECTION_IS_VERTICAL (direction);
- hb_bool_t ret = hb_font_get_contour_point (font, glyph, point_index, &vertical, x, y);
+ hb_bool_t ret = hb_font_get_glyph_contour_point (font, glyph, point_index, x, y);
- if (ret && vertical != HB_DIRECTION_IS_VERTICAL (direction)) {
+ if (ret) {
/* XXX Adjust origin */
}
typedef hb_bool_t (*hb_font_get_glyph_advance_func_t) (hb_font_t *font, void *font_data,
hb_codepoint_t glyph,
- hb_position_t *x_advance, hb_position_t *y_advance,
+ hb_position_t *x, hb_position_t *y,
void *user_data);
typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_h_advance_func_t;
typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_v_advance_func_t;
-typedef hb_bool_t (*hb_font_get_glyph_v_origin_func_t) (hb_font_t *font, void *font_data,
- hb_codepoint_t glyph,
- hb_position_t *x_origin, hb_position_t *y_origin,
- void *user_data);
+typedef hb_bool_t (*hb_font_get_glyph_origin_func_t) (hb_font_t *font, void *font_data,
+ hb_codepoint_t glyph,
+ hb_position_t *x, hb_position_t *y,
+ void *user_data);
+typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_h_origin_func_t;
+typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_v_origin_func_t;
-typedef hb_bool_t (*hb_font_get_kerning_func_t) (hb_font_t *font, void *font_data,
- hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
- hb_position_t *x_kern, hb_position_t *y_kern,
- void *user_data);
-typedef hb_font_get_kerning_func_t hb_font_get_h_kerning_func_t;
-typedef hb_font_get_kerning_func_t hb_font_get_v_kerning_func_t;
+typedef hb_bool_t (*hb_font_get_glyph_kerning_func_t) (hb_font_t *font, void *font_data,
+ hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
+ hb_position_t *x, hb_position_t *y,
+ void *user_data);
+typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_h_kerning_func_t;
+typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_v_kerning_func_t;
typedef hb_bool_t (*hb_font_get_glyph_extents_func_t) (hb_font_t *font, void *font_data,
hb_codepoint_t glyph,
- hb_bool_t *vertical,
hb_glyph_extents_t *extents,
void *user_data);
-typedef hb_bool_t (*hb_font_get_contour_point_func_t) (hb_font_t *font, void *font_data,
- hb_codepoint_t glyph, unsigned int point_index,
- hb_bool_t *vertical,
- hb_position_t *x, hb_position_t *y,
- void *user_data);
+typedef hb_bool_t (*hb_font_get_glyph_contour_point_func_t) (hb_font_t *font, void *font_data,
+ hb_codepoint_t glyph, unsigned int point_index,
+ hb_position_t *x, hb_position_t *y,
+ void *user_data);
/* func setters */
void *user_data, hb_destroy_func_t destroy);
void
+hb_font_funcs_set_glyph_h_origin_func (hb_font_funcs_t *ffuncs,
+ hb_font_get_glyph_h_origin_func_t glyph_advance_func,
+ void *user_data, hb_destroy_func_t destroy);
+void
hb_font_funcs_set_glyph_v_origin_func (hb_font_funcs_t *ffuncs,
hb_font_get_glyph_v_origin_func_t glyph_advance_func,
void *user_data, hb_destroy_func_t destroy);
void
-hb_font_funcs_set_h_kerning_func (hb_font_funcs_t *ffuncs,
- hb_font_get_h_kerning_func_t kerning_func,
- void *user_data, hb_destroy_func_t destroy);
+hb_font_funcs_set_glyph_h_kerning_func (hb_font_funcs_t *ffuncs,
+ hb_font_get_glyph_h_kerning_func_t kerning_func,
+ void *user_data, hb_destroy_func_t destroy);
void
-hb_font_funcs_set_v_kerning_func (hb_font_funcs_t *ffuncs,
- hb_font_get_v_kerning_func_t kerning_func,
- void *user_data, hb_destroy_func_t destroy);
+hb_font_funcs_set_glyph_v_kerning_func (hb_font_funcs_t *ffuncs,
+ hb_font_get_glyph_v_kerning_func_t kerning_func,
+ void *user_data, hb_destroy_func_t destroy);
void
hb_font_funcs_set_glyph_extents_func (hb_font_funcs_t *ffuncs,
hb_font_get_glyph_extents_func_t glyph_extents_func,
void *user_data, hb_destroy_func_t destroy);
void
-hb_font_funcs_set_contour_point_func (hb_font_funcs_t *ffuncs,
- hb_font_get_contour_point_func_t contour_point_func,
- void *user_data, hb_destroy_func_t destroy);
+hb_font_funcs_set_glyph_contour_point_func (hb_font_funcs_t *ffuncs,
+ hb_font_get_glyph_contour_point_func_t glyph_contour_point_func,
+ void *user_data, hb_destroy_func_t destroy);
/* func dispatch */
hb_bool_t
hb_font_get_glyph_h_advance (hb_font_t *font,
hb_codepoint_t glyph,
- hb_position_t *x_advance, hb_position_t *y_advance);
+ hb_position_t *x, hb_position_t *y);
hb_bool_t
hb_font_get_glyph_v_advance (hb_font_t *font,
hb_codepoint_t glyph,
- hb_position_t *x_advance, hb_position_t *y_advance);
+ hb_position_t *x, hb_position_t *y);
hb_bool_t
+hb_font_get_glyph_h_origin (hb_font_t *font,
+ hb_codepoint_t glyph,
+ hb_position_t *x, hb_position_t *y);
+hb_bool_t
hb_font_get_glyph_v_origin (hb_font_t *font,
hb_codepoint_t glyph,
- hb_position_t *x_kern, hb_position_t *y_kern);
+ hb_position_t *x, hb_position_t *y);
hb_bool_t
-hb_font_get_h_kerning (hb_font_t *font,
- hb_codepoint_t left_glyph, hb_codepoint_t right_glyph,
- hb_position_t *x_kern, hb_position_t *y_kern);
+hb_font_get_glyph_h_kerning (hb_font_t *font,
+ hb_codepoint_t left_glyph, hb_codepoint_t right_glyph,
+ hb_position_t *x, hb_position_t *y);
hb_bool_t
-hb_font_get_v_kerning (hb_font_t *font,
- hb_codepoint_t top_glyph, hb_codepoint_t bottom_glyph,
- hb_position_t *x_kern, hb_position_t *y_kern);
+hb_font_get_glyph_v_kerning (hb_font_t *font,
+ hb_codepoint_t top_glyph, hb_codepoint_t bottom_glyph,
+ hb_position_t *x, hb_position_t *y);
hb_bool_t
hb_font_get_glyph_extents (hb_font_t *font,
hb_codepoint_t glyph,
- hb_bool_t *vertical,
hb_glyph_extents_t *extents);
hb_bool_t
-hb_font_get_contour_point (hb_font_t *font,
- hb_codepoint_t glyph, unsigned int point_index,
- hb_bool_t *vertical,
- hb_position_t *x, hb_position_t *y);
+hb_font_get_glyph_contour_point (hb_font_t *font,
+ hb_codepoint_t glyph, unsigned int point_index,
+ hb_position_t *x, hb_position_t *y);
/* high-level funcs, with fallback */
hb_font_get_glyph_advance_for_direction (hb_font_t *font,
hb_codepoint_t glyph,
hb_direction_t direction,
- hb_position_t *x_advance, hb_position_t *y_advance);
+ hb_position_t *x, hb_position_t *y);
+void
+hb_font_get_glyph_origin_for_direction (hb_font_t *font,
+ hb_codepoint_t glyph,
+ hb_direction_t direction,
+ hb_position_t *x, hb_position_t *y);
void
-hb_font_get_kerning_for_direction (hb_font_t *font,
- hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
- hb_direction_t direction,
- hb_position_t *x_kern, hb_position_t *y_kern);
+hb_font_get_glyph_kerning_for_direction (hb_font_t *font,
+ hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
+ hb_direction_t direction,
+ hb_position_t *x, hb_position_t *y);
void
hb_font_get_glyph_extents_for_direction (hb_font_t *font,
hb_glyph_extents_t *extents);
hb_bool_t
-hb_font_get_contour_point_for_direction (hb_font_t *font,
- hb_codepoint_t glyph, unsigned int point_index,
- hb_direction_t direction,
- hb_position_t *x, hb_position_t *y);
+hb_font_get_glyph_contour_point_for_direction (hb_font_t *font,
+ hb_codepoint_t glyph, unsigned int point_index,
+ hb_direction_t direction,
+ hb_position_t *x, hb_position_t *y);
/*
}
static hb_bool_t
+hb_ft_get_glyph_h_origin (hb_font_t *font HB_UNUSED,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t glyph HB_UNUSED,
+ hb_position_t *x_origin HB_UNUSED,
+ hb_position_t *y_origin HB_UNUSED,
+ void *user_data HB_UNUSED)
+{
+ /* We always work in the horizontal coordinates. */
+ return TRUE;
+}
+
+static hb_bool_t
hb_ft_get_glyph_v_origin (hb_font_t *font HB_UNUSED,
void *font_data,
hb_codepoint_t glyph,
if (unlikely (FT_Load_Glyph (ft_face, glyph, load_flags)))
return FALSE;
- *y_origin = ft_face->glyph->metrics.vertAdvance;
+ /* XXX */*y_origin = ft_face->glyph->metrics.vertAdvance;
return TRUE;
}
static hb_bool_t
-hb_ft_get_h_kerning (hb_font_t *font HB_UNUSED,
- void *font_data,
- hb_codepoint_t left_glyph,
- hb_codepoint_t right_glyph,
- hb_position_t *x_kern,
- hb_position_t *y_kern,
- void *user_data HB_UNUSED)
+hb_ft_get_glyph_h_kerning (hb_font_t *font HB_UNUSED,
+ void *font_data,
+ hb_codepoint_t left_glyph,
+ hb_codepoint_t right_glyph,
+ hb_position_t *x_kern,
+ hb_position_t *y_kern,
+ void *user_data HB_UNUSED)
{
FT_Face ft_face = (FT_Face) font_data;
FT_Vector kerning;
}
static hb_bool_t
-hb_ft_get_v_kerning (hb_font_t *font HB_UNUSED,
- void *font_data,
- hb_codepoint_t top_glyph,
- hb_codepoint_t bottom_glyph,
- hb_position_t *x_kern,
- hb_position_t *y_kern,
- void *user_data HB_UNUSED)
+hb_ft_get_glyph_v_kerning (hb_font_t *font HB_UNUSED,
+ void *font_data HB_UNUSED,
+ hb_codepoint_t top_glyph HB_UNUSED,
+ hb_codepoint_t bottom_glyph HB_UNUSED,
+ hb_position_t *x_kern HB_UNUSED,
+ hb_position_t *y_kern HB_UNUSED,
+ void *user_data HB_UNUSED)
{
/* FreeType API doesn't support vertical kerning */
return FALSE;
hb_ft_get_glyph_extents (hb_font_t *font HB_UNUSED,
void *font_data,
hb_codepoint_t glyph,
- hb_bool_t *vertical,
hb_glyph_extents_t *extents,
void *user_data HB_UNUSED)
{
}
static hb_bool_t
-hb_ft_get_contour_point (hb_font_t *font HB_UNUSED,
- void *font_data,
- hb_codepoint_t glyph,
- unsigned int point_index,
- hb_bool_t *vertical,
- hb_position_t *x,
- hb_position_t *y,
- void *user_data HB_UNUSED)
+hb_ft_get_glyph_contour_point (hb_font_t *font HB_UNUSED,
+ void *font_data,
+ hb_codepoint_t glyph,
+ unsigned int point_index,
+ hb_position_t *x,
+ hb_position_t *y,
+ void *user_data HB_UNUSED)
{
FT_Face ft_face = (FT_Face) font_data;
int load_flags = FT_LOAD_DEFAULT;
*x = ft_face->glyph->outline.points[point_index].x;
*y = ft_face->glyph->outline.points[point_index].y;
- *vertical = FALSE; /* We always return position in horizontal coordinates */
return TRUE;
}
hb_ft_get_glyph,
hb_ft_get_glyph_h_advance,
hb_ft_get_glyph_v_advance,
+ hb_ft_get_glyph_h_origin,
hb_ft_get_glyph_v_origin,
- hb_ft_get_h_kerning,
- hb_ft_get_v_kerning,
+ hb_ft_get_glyph_h_kerning,
+ hb_ft_get_glyph_v_kerning,
hb_ft_get_glyph_extents,
- hb_ft_get_contour_point,
+ hb_ft_get_glyph_contour_point,
}
};
inline int get_caret_value (hb_font_t *font, hb_direction_t direction, hb_codepoint_t glyph_id) const
{
hb_position_t x, y;
- if (hb_font_get_contour_point_for_direction (font, glyph_id, caretValuePoint, direction, &x, &y))
+ if (hb_font_get_glyph_contour_point_for_direction (font, glyph_id, caretValuePoint, direction, &x, &y))
return HB_DIRECTION_IS_HORIZONTAL (direction) ? x : y;
else
return 0;
hb_bool_t ret = false;
if (x_ppem || y_ppem)
- ret = hb_font_get_contour_point_for_direction (font, glyph_id, anchorPoint, direction, &cx, &cy);
+ ret = hb_font_get_glyph_contour_point_for_direction (font, glyph_id, anchorPoint, direction, &cx, &cy);
*x = x_ppem && ret ? cx : font->em_scale_x (xCoordinate);
*y = y_ppem && ret ? cy : font->em_scale_y (yCoordinate);
}
unsigned int count = c->buffer->len;
for (unsigned int i = 1; i < count; i++) {
hb_position_t x_kern, y_kern, kern1, kern2;
- hb_font_get_kerning_for_direction (c->font,
- c->buffer->info[i - 1].codepoint, c->buffer->info[i].codepoint,
- c->buffer->props.direction,
- &x_kern, &y_kern);
+ hb_font_get_glyph_kerning_for_direction (c->font,
+ c->buffer->info[i - 1].codepoint, c->buffer->info[i].codepoint,
+ c->buffer->props.direction,
+ &x_kern, &y_kern);
kern1 = x_kern >> 1;
kern2 = x_kern - kern1;