return v;
}
inline hb_position_t parent_scale_x_position (hb_position_t v) {
- return parent_scale_x_distance (v); /* We don't have translation right now */
+ return parent_scale_x_distance (v);
}
inline hb_position_t parent_scale_y_position (hb_position_t v) {
- return parent_scale_y_distance (v); /* We don't have translation right now */
+ return parent_scale_y_distance (v);
}
inline void parent_scale_distance (hb_position_t *x, hb_position_t *y) {
return FALSE;
}
-static hb_bool_t
+static void
hb_font_get_glyph_h_advance_nil (hb_font_t *font HB_UNUSED,
void *font_data HB_UNUSED,
hb_codepoint_t glyph,
- hb_position_t *x,
- hb_position_t *y,
+ hb_position_t *advance,
void *user_data HB_UNUSED)
{
if (font->parent) {
- hb_bool_t ret = hb_font_get_glyph_h_advance (font->parent,
- glyph,
- x, y);
- font->parent_scale_distance (x, y);
- return ret;
+ hb_font_get_glyph_h_advance (font->parent,
+ glyph,
+ advance);
+ *advance = font->parent_scale_x_distance (*advance);
+ return;
}
- *x = *y = 0;
- return FALSE;
+ *advance = 0;
}
-static hb_bool_t
+static void
hb_font_get_glyph_v_advance_nil (hb_font_t *font HB_UNUSED,
void *font_data HB_UNUSED,
hb_codepoint_t glyph,
- hb_position_t *x,
- hb_position_t *y,
+ hb_position_t *advance,
void *user_data HB_UNUSED)
{
if (font->parent) {
- hb_bool_t ret = hb_font_get_glyph_v_advance (font->parent,
- glyph,
- x, y);
- font->parent_scale_distance (x, y);
- return ret;
+ hb_font_get_glyph_v_advance (font->parent,
+ glyph,
+ advance);
+ *advance = font->parent_scale_y_distance (*advance);
+ return;
}
- *x = *y = 0;
- return FALSE;
+ *advance = 0;
}
static hb_bool_t
hb_bool_t ret = hb_font_get_glyph_h_origin (font->parent,
glyph,
x, y);
- font->parent_scale_distance (x, y);
+ if (ret)
+ font->parent_scale_position (x, y);
return ret;
}
hb_bool_t ret = hb_font_get_glyph_v_origin (font->parent,
glyph,
x, y);
- font->parent_scale_distance (x, y);
+ if (ret)
+ font->parent_scale_position (x, y);
return ret;
}
return FALSE;
}
-static hb_bool_t
+static void
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,
- hb_position_t *y,
+ hb_position_t *kerning,
void *user_data HB_UNUSED)
{
if (font->parent) {
- hb_bool_t ret = hb_font_get_glyph_h_kerning (font->parent,
- left_glyph, right_glyph,
- x, y);
- font->parent_scale_distance (x, y);
- return ret;
+ hb_font_get_glyph_h_kerning (font->parent,
+ left_glyph, right_glyph,
+ kerning);
+ *kerning = font->parent_scale_x_distance (*kerning);
+ return;
}
- *x = *y = 0;
- return FALSE;
+ *kerning = 0;
}
-static hb_bool_t
+static void
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,
- hb_position_t *y,
+ hb_position_t *kerning,
void *user_data HB_UNUSED)
{
if (font->parent) {
- hb_bool_t ret = hb_font_get_glyph_v_kerning (font->parent,
- top_glyph, bottom_glyph,
- x, y);
- font->parent_scale_distance (x, y);
- return ret;
+ hb_font_get_glyph_v_kerning (font->parent,
+ top_glyph, bottom_glyph,
+ kerning);
+ *kerning = font->parent_scale_y_distance (*kerning);
+ return;
}
- *x = *y = 0;
- return FALSE;
+ *kerning = 0;
}
static hb_bool_t
hb_bool_t ret = hb_font_get_glyph_extents (font->parent,
glyph,
extents);
- font->parent_scale_position (&extents->x_bearing, &extents->y_bearing);
- font->parent_scale_distance (&extents->width, &extents->height);
+ if (ret) {
+ font->parent_scale_position (&extents->x_bearing, &extents->y_bearing);
+ font->parent_scale_distance (&extents->width, &extents->height);
+ }
return ret;
}
- extents->x_bearing = extents->y_bearing = 0;
- extents->width = extents->height = 0;
+ memset (extents, 0, sizeof (*extents));
return FALSE;
}
hb_bool_t ret = hb_font_get_glyph_contour_point (font->parent,
glyph, point_index,
x, y);
- font->parent_scale_position (x, y);
+ if (ret)
+ font->parent_scale_position (x, y);
return ret;
}
font->klass->user_data.glyph);
}
-hb_bool_t
+void
hb_font_get_glyph_h_advance (hb_font_t *font,
hb_codepoint_t glyph,
- hb_position_t *x, hb_position_t *y)
+ hb_position_t *advance)
{
- *x = *y = 0;
- return font->klass->get.glyph_h_advance (font, font->user_data,
- glyph, x, y,
- font->klass->user_data.glyph_h_advance);
+ *advance = 0;
+ font->klass->get.glyph_h_advance (font, font->user_data,
+ glyph, advance,
+ font->klass->user_data.glyph_h_advance);
}
-hb_bool_t
+void
hb_font_get_glyph_v_advance (hb_font_t *font,
hb_codepoint_t glyph,
- hb_position_t *x, hb_position_t *y)
+ hb_position_t *advance)
{
- *x = *y = 0;
- return font->klass->get.glyph_v_advance (font, font->user_data,
- glyph, x, y,
- font->klass->user_data.glyph_v_advance);
+ *advance = 0;
+ font->klass->get.glyph_v_advance (font, font->user_data,
+ glyph, advance,
+ font->klass->user_data.glyph_v_advance);
}
hb_bool_t
font->klass->user_data.glyph_v_origin);
}
-hb_bool_t
+void
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_position_t *kerning)
{
- *x = *y = 0;
+ *kerning = 0;
return font->klass->get.glyph_h_kerning (font, font->user_data,
left_glyph, right_glyph,
- x, y,
+ kerning,
font->klass->user_data.glyph_h_kerning);
}
-hb_bool_t
+void
hb_font_get_glyph_v_kerning (hb_font_t *font,
hb_codepoint_t left_glyph, hb_codepoint_t right_glyph,
- hb_position_t *x, hb_position_t *y)
+ hb_position_t *kerning)
{
- *x = *y = 0;
+ *kerning = 0;
return font->klass->get.glyph_v_kerning (font, font->user_data,
left_glyph, right_glyph,
- x, y,
+ kerning,
font->klass->user_data.glyph_v_kerning);
}
hb_direction_t direction,
hb_position_t *x, hb_position_t *y)
{
- if (HB_DIRECTION_IS_VERTICAL (direction)) {
- hb_bool_t ret = hb_font_get_glyph_v_advance (font, glyph, x, y);
- if (!ret) {
- /* TODO return font_extents.ascent + font_extents.descent? */
- }
+ if (likely (HB_DIRECTION_IS_HORIZONTAL (direction))) {
+ *y = 0;
+ hb_font_get_glyph_h_advance (font, glyph, x);
} else {
- hb_font_get_glyph_h_advance (font, glyph, x, y);
+ *x = 0;
+ hb_font_get_glyph_v_advance (font, glyph, y);
}
}
hb_direction_t direction,
hb_position_t *x, hb_position_t *y)
{
- if (HB_DIRECTION_IS_VERTICAL (direction)) {
+ if (likely (HB_DIRECTION_IS_HORIZONTAL (direction))) {
+ hb_font_get_glyph_h_origin (font, glyph, x, y);
+ } else {
hb_bool_t ret = hb_font_get_glyph_v_origin (font, glyph, x, y);
if (!ret) {
/* TODO return h_origin/2. and font_extents.ascent */
}
- } else {
- hb_font_get_glyph_h_origin (font, glyph, x, y);
}
}
hb_direction_t direction,
hb_position_t *x, hb_position_t *y)
{
- switch (direction) {
- case HB_DIRECTION_LTR:
- case HB_DIRECTION_RTL:
- hb_font_get_glyph_h_kerning (font, first_glyph, second_glyph, x, y);
- break;
-
- case HB_DIRECTION_TTB:
- case HB_DIRECTION_BTT:
- hb_font_get_glyph_v_kerning (font, first_glyph, second_glyph, x, y);
- break;
-
- case HB_DIRECTION_INVALID:
- default:
- break;
+ if (likely (HB_DIRECTION_IS_HORIZONTAL (direction))) {
+ *y = 0;
+ hb_font_get_glyph_h_kerning (font, first_glyph, second_glyph, x);
+ } else {
+ *x = 0;
+ hb_font_get_glyph_v_kerning (font, first_glyph, second_glyph, y);
}
}
-void
-hb_font_get_glyph_extents_for_direction (hb_font_t *font,
- hb_codepoint_t glyph,
- hb_direction_t direction,
- hb_glyph_extents_t *extents)
+hb_bool_t
+hb_font_get_glyph_extents_for_origin (hb_font_t *font,
+ hb_codepoint_t glyph,
+ hb_direction_t direction,
+ hb_glyph_extents_t *extents)
{
hb_bool_t ret = hb_font_get_glyph_extents (font, glyph, extents);
if (ret)
hb_font_subtract_glyph_origin_for_direction (font, glyph, direction, &extents->x_bearing, &extents->y_bearing);
+
+ return ret;
}
hb_bool_t
-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_font_get_glyph_contour_point_for_origin (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 ret = hb_font_get_glyph_contour_point (font, glyph, point_index, x, y);
void *user_data);
-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, hb_position_t *y,
- void *user_data);
+typedef void (*hb_font_get_glyph_advance_func_t) (hb_font_t *font, void *font_data,
+ hb_codepoint_t glyph,
+ hb_position_t *advance,
+ 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_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_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 void (*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 *kerning,
+ 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;
hb_codepoint_t unicode, hb_codepoint_t variation_selector,
hb_codepoint_t *glyph);
-hb_bool_t
+void
hb_font_get_glyph_h_advance (hb_font_t *font,
hb_codepoint_t glyph,
- hb_position_t *x, hb_position_t *y);
-hb_bool_t
+ hb_position_t *advance);
+void
hb_font_get_glyph_v_advance (hb_font_t *font,
hb_codepoint_t glyph,
- hb_position_t *x, hb_position_t *y);
+ hb_position_t *advance);
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
+void
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_position_t *kerning);
+void
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_position_t *kerning);
hb_bool_t
hb_font_get_glyph_extents (hb_font_t *font,
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_codepoint_t glyph,
- hb_direction_t direction,
- hb_glyph_extents_t *extents);
+hb_bool_t
+hb_font_get_glyph_extents_for_origin (hb_font_t *font,
+ hb_codepoint_t glyph,
+ hb_direction_t direction,
+ hb_glyph_extents_t *extents);
hb_bool_t
-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_font_get_glyph_contour_point_for_origin (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_destroy_func_t destroy);
-/*
- * We should add support for full matrices.
- */
void
hb_font_set_scale (hb_font_t *font,
int x_scale,
return *glyph != 0;
}
-static hb_bool_t
+static void
hb_ft_get_glyph_h_advance (hb_font_t *font HB_UNUSED,
void *font_data,
hb_codepoint_t glyph,
- hb_position_t *x,
- hb_position_t *y,
+ hb_position_t *advance,
void *user_data HB_UNUSED)
{
FT_Face ft_face = (FT_Face) font_data;
int load_flags = FT_LOAD_DEFAULT;
if (unlikely (FT_Load_Glyph (ft_face, glyph, load_flags)))
- return FALSE;
+ return;
- *x = ft_face->glyph->metrics.horiAdvance;
- return TRUE;
+ *advance = ft_face->glyph->metrics.horiAdvance;
}
-static hb_bool_t
+static void
hb_ft_get_glyph_v_advance (hb_font_t *font HB_UNUSED,
void *font_data,
hb_codepoint_t glyph,
- hb_position_t *x,
- hb_position_t *y,
+ hb_position_t *advance,
void *user_data HB_UNUSED)
{
FT_Face ft_face = (FT_Face) font_data;
int load_flags = FT_LOAD_DEFAULT;
if (unlikely (FT_Load_Glyph (ft_face, glyph, load_flags)))
- return FALSE;
+ return;
/* Note: FreeType's vertical metrics grows downward while other FreeType coordinates
* have a Y growing upward. Hence the extra negation. */
- *y = -ft_face->glyph->metrics.vertAdvance;
- return TRUE;
+ *advance = -ft_face->glyph->metrics.vertAdvance;
}
static hb_bool_t
*x = ft_face->glyph->metrics.horiBearingX - ft_face->glyph->metrics.vertBearingX;
*y = ft_face->glyph->metrics.horiBearingY - (-ft_face->glyph->metrics.vertBearingY);
- /* TODO ??
- if (glyph->format == FT_GLYPH_FORMAT_OUTLINE)
- FT_Vector_Transform (&vector, &scaled_font->unscaled->Current_Shape);
- */
-
return TRUE;
}
-static hb_bool_t
+static void
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,
- hb_position_t *y,
+ hb_position_t *kerning,
void *user_data HB_UNUSED)
{
FT_Face ft_face = (FT_Face) font_data;
- FT_Vector kerning;
+ FT_Vector kerningv;
- if (FT_Get_Kerning (ft_face, left_glyph, right_glyph, FT_KERNING_DEFAULT, &kerning))
- return FALSE;
+ if (FT_Get_Kerning (ft_face, left_glyph, right_glyph, FT_KERNING_DEFAULT, &kerningv))
+ return;
- *x = kerning.x;
- *y = kerning.y;
- return TRUE;
+ *kerning = kerningv.x;
}
-static hb_bool_t
+static void
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 HB_UNUSED,
- hb_position_t *y HB_UNUSED,
+ hb_position_t *kerning HB_UNUSED,
void *user_data HB_UNUSED)
{
/* FreeType API doesn't support vertical kerning */
- return FALSE;
+ return;
}
static hb_bool_t
/*
* Copyright © 2007,2008,2009 Red Hat, Inc.
- * Copyright © 2010 Google, Inc.
+ * Copyright © 2010,2011 Google, Inc.
*
* This is part of HarfBuzz, a text shaping library.
*
friend struct CaretValue;
private:
- inline int get_caret_value (hb_font_t *font, hb_direction_t direction, hb_codepoint_t glyph_id HB_UNUSED) const
+ inline hb_position_t get_caret_value (hb_font_t *font, hb_direction_t direction, hb_codepoint_t glyph_id HB_UNUSED) const
{
return HB_DIRECTION_IS_HORIZONTAL (direction) ? font->em_scale_x (coordinate) : font->em_scale_y (coordinate);
}
friend struct CaretValue;
private:
- inline int get_caret_value (hb_font_t *font, hb_direction_t direction, hb_codepoint_t glyph_id) const
+ inline hb_position_t 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_glyph_contour_point_for_direction (font, glyph_id, caretValuePoint, direction, &x, &y))
+ if (hb_font_get_glyph_contour_point_for_origin (font, glyph_id, caretValuePoint, direction, &x, &y))
return HB_DIRECTION_IS_HORIZONTAL (direction) ? x : y;
else
return 0;
{
friend struct CaretValue;
- inline int get_caret_value (hb_font_t *font, hb_direction_t direction, hb_codepoint_t glyph_id) const
+ inline hb_position_t get_caret_value (hb_font_t *font, hb_direction_t direction, hb_codepoint_t glyph_id) const
{
return HB_DIRECTION_IS_HORIZONTAL (direction) ?
font->em_scale_x (coordinate) + (this+deviceTable).get_x_delta (font) :
struct CaretValue
{
- inline int get_caret_value (hb_font_t *font, hb_direction_t direction, hb_codepoint_t glyph_id) const
+ inline hb_position_t get_caret_value (hb_font_t *font, hb_direction_t direction, hb_codepoint_t glyph_id) const
{
switch (u.format) {
case 1: return u.format1.get_caret_value (font, direction, glyph_id);
hb_codepoint_t glyph_id,
unsigned int start_offset,
unsigned int *caret_count /* IN/OUT */,
- int *caret_array /* OUT */) const
+ hb_position_t *caret_array /* OUT */) const
{
if (caret_count) {
const OffsetTo<CaretValue> *array = carets.sub_array (start_offset, caret_count);
hb_codepoint_t glyph_id,
unsigned int start_offset,
unsigned int *caret_count /* IN/OUT */,
- int *caret_array /* OUT */) const
+ hb_position_t *caret_array /* OUT */) const
{
unsigned int index = (this+coverage) (glyph_id);
if (index == NOT_COVERED)
hb_codepoint_t glyph_id,
unsigned int start_offset,
unsigned int *caret_count /* IN/OUT */,
- int *caret_array /* OUT */) const
+ hb_position_t *caret_array /* OUT */) const
{ return (this+ligCaretList).get_lig_carets (font, direction, glyph_id, start_offset, caret_count, caret_array); }
inline bool has_mark_sets (void) const { return version >= 0x00010002 && markGlyphSetsDef[0] != 0; }
private:
inline void get_anchor (hb_font_t *font, hb_codepoint_t glyph_id HB_UNUSED,
- hb_direction_t direction HB_UNUSED,
hb_position_t *x, hb_position_t *y) const
{
*x = font->em_scale_x (xCoordinate);
private:
inline void get_anchor (hb_font_t *font, hb_codepoint_t glyph_id,
- hb_direction_t direction,
hb_position_t *x, hb_position_t *y) const
{
unsigned int x_ppem = font->x_ppem;
hb_bool_t ret = false;
if (x_ppem || y_ppem)
- ret = hb_font_get_glyph_contour_point_for_direction (font, glyph_id, anchorPoint, direction, &cx, &cy);
+ ret = hb_font_get_glyph_contour_point_for_origin (font, glyph_id, anchorPoint, HB_DIRECTION_LTR, &cx, &cy);
*x = x_ppem && ret ? cx : font->em_scale_x (xCoordinate);
*y = y_ppem && ret ? cy : font->em_scale_y (yCoordinate);
}
private:
inline void get_anchor (hb_font_t *font, hb_codepoint_t glyph_id HB_UNUSED,
- hb_direction_t direction HB_UNUSED,
hb_position_t *x, hb_position_t *y) const
{
*x = font->em_scale_x (xCoordinate);
*y = font->em_scale_y (yCoordinate);
- /* pixel -> fractional pixel */
if (font->x_ppem)
*x += (this+xDeviceTable).get_x_delta (font);
if (font->y_ppem)
struct Anchor
{
inline void get_anchor (hb_font_t *font, hb_codepoint_t glyph_id,
- hb_direction_t direction,
hb_position_t *x, hb_position_t *y) const
{
*x = *y = 0;
switch (u.format) {
- case 1: u.format1.get_anchor (font, glyph_id, direction, x, y); return;
- case 2: u.format2.get_anchor (font, glyph_id, direction, x, y); return;
- case 3: u.format3.get_anchor (font, glyph_id, direction, x, y); return;
- default: return;
+ case 1: u.format1.get_anchor (font, glyph_id, x, y); return;
+ case 2: u.format2.get_anchor (font, glyph_id, x, y); return;
+ case 3: u.format3.get_anchor (font, glyph_id, x, y); return;
+ default: return;
}
}
hb_position_t mark_x, mark_y, base_x, base_y;
- mark_anchor.get_anchor (c->font, c->buffer->info[c->buffer->i].codepoint, c->direction, &mark_x, &mark_y);
- glyph_anchor.get_anchor (c->font, c->buffer->info[glyph_pos].codepoint, c->direction, &base_x, &base_y);
+ mark_anchor.get_anchor (c->font, c->buffer->info[c->buffer->i].codepoint, &mark_x, &mark_y);
+ glyph_anchor.get_anchor (c->font, c->buffer->info[glyph_pos].codepoint, &base_x, &base_y);
hb_glyph_position_t &o = c->buffer->pos[c->buffer->i];
o.x_offset = base_x - mark_x;
unsigned int i = c->buffer->i;
hb_position_t entry_x, entry_y, exit_x, exit_y;
- (this+this_record.exitAnchor).get_anchor (c->font, c->buffer->info[i].codepoint, c->direction, &exit_x, &exit_y);
- (this+next_record.entryAnchor).get_anchor (c->font, c->buffer->info[j].codepoint, c->direction, &entry_x, &entry_y);
+ (this+this_record.exitAnchor).get_anchor (c->font, c->buffer->info[i].codepoint, &exit_x, &exit_y);
+ (this+next_record.entryAnchor).get_anchor (c->font, c->buffer->info[j].codepoint, &entry_x, &entry_y);
/* Align the exit anchor of the left/top glyph with the entry anchor of the right/bottom glyph
* by adjusting advance of the left/top glyph. */
hb_codepoint_t glyph,
unsigned int start_offset,
unsigned int *caret_count /* IN/OUT */,
- int *caret_array /* OUT */);
+ hb_position_t *caret_array /* OUT */);
/*
if (!hb_ot_layout_has_positioning (c->face))
return;
+ unsigned int count = c->buffer->len;
+ for (unsigned int i = 0; i < count; i++) {
+ hb_font_add_glyph_origin_for_direction (c->font, c->buffer->info[i].codepoint,
+ HB_DIRECTION_LTR,
+ &c->buffer->pos[i].x_offset,
+ &c->buffer->pos[i].y_offset);
+ }
+
c->plan->map.position (c->font, c->face, c->buffer);
+ for (unsigned int i = 0; i < count; i++) {
+ hb_font_subtract_glyph_origin_for_direction (c->font, c->buffer->info[i].codepoint,
+ HB_DIRECTION_LTR,
+ &c->buffer->pos[i].x_offset,
+ &c->buffer->pos[i].y_offset);
+ }
+
hb_ot_layout_position_finish (c->buffer);
c->applied_position_complex = TRUE;