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_face_t *face;
hb_buffer_t *buffer;
hb_direction_t original_direction;
hb_bool_t applied_substitute_complex;
hb_bool_t applied_position_complex;
-
- hb_ot_shape_plan_t *plan;
};
/* Do it! */
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. */
c->original_direction = c->buffer->props.direction;
}
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
hb_ot_shape (hb_font_t *font,
hb_face_t *face,
hb_buffer_t *buffer,
hb_ot_shape_plan_t plan;
hb_ot_shape_plan_internal (&plan, face, &buffer->props, 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);
+ hb_ot_shape_execute (&plan, font, face, buffer, user_features, num_user_features);
}