Add hb_ot_shape_execute()
Not public yet.
This commit is contained in:
parent
49baa1f69e
commit
fd3d32d31c
@ -38,7 +38,8 @@ HB_BEGIN_DECLS
|
|||||||
|
|
||||||
struct hb_ot_shape_context_t
|
struct hb_ot_shape_context_t
|
||||||
{
|
{
|
||||||
/* Input to hb_ot_shape() */
|
/* Input to hb_ot_shape_execute() */
|
||||||
|
hb_ot_shape_plan_t *plan;
|
||||||
hb_font_t *font;
|
hb_font_t *font;
|
||||||
hb_face_t *face;
|
hb_face_t *face;
|
||||||
hb_buffer_t *buffer;
|
hb_buffer_t *buffer;
|
||||||
@ -49,8 +50,6 @@ struct hb_ot_shape_context_t
|
|||||||
hb_direction_t original_direction;
|
hb_direction_t original_direction;
|
||||||
hb_bool_t applied_substitute_complex;
|
hb_bool_t applied_substitute_complex;
|
||||||
hb_bool_t applied_position_complex;
|
hb_bool_t applied_position_complex;
|
||||||
|
|
||||||
hb_ot_shape_plan_t *plan;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ hb_position_complex_fallback_visual (hb_ot_shape_context_t *c)
|
|||||||
/* Do it! */
|
/* Do it! */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
hb_ot_shape_internal (hb_ot_shape_context_t *c)
|
hb_ot_shape_execute_internal (hb_ot_shape_context_t *c)
|
||||||
{
|
{
|
||||||
/* Save the original direction, we use it later. */
|
/* Save the original direction, we use it later. */
|
||||||
c->original_direction = c->buffer->props.direction;
|
c->original_direction = c->buffer->props.direction;
|
||||||
@ -332,6 +332,18 @@ hb_ot_shape_plan_internal (hb_ot_shape_plan_t *plan,
|
|||||||
plan->map.compile (face, props);
|
plan->map.compile (face, props);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
hb_ot_shape_execute (hb_ot_shape_plan_t *plan,
|
||||||
|
hb_font_t *font,
|
||||||
|
hb_face_t *face,
|
||||||
|
hb_buffer_t *buffer,
|
||||||
|
const hb_feature_t *user_features,
|
||||||
|
unsigned int num_user_features)
|
||||||
|
{
|
||||||
|
hb_ot_shape_context_t c = {plan, font, face, buffer, user_features, num_user_features};
|
||||||
|
hb_ot_shape_execute_internal (&c);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
hb_ot_shape (hb_font_t *font,
|
hb_ot_shape (hb_font_t *font,
|
||||||
hb_face_t *face,
|
hb_face_t *face,
|
||||||
@ -342,10 +354,7 @@ hb_ot_shape (hb_font_t *font,
|
|||||||
hb_ot_shape_plan_t plan;
|
hb_ot_shape_plan_t plan;
|
||||||
|
|
||||||
hb_ot_shape_plan_internal (&plan, face, &buffer->props, user_features, num_user_features);
|
hb_ot_shape_plan_internal (&plan, face, &buffer->props, user_features, num_user_features);
|
||||||
|
hb_ot_shape_execute (&plan, font, face, buffer, user_features, num_user_features);
|
||||||
hb_ot_shape_context_t c = {font, face, buffer, user_features, num_user_features};
|
|
||||||
c.plan = &plan;
|
|
||||||
hb_ot_shape_internal (&c);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user