提交 3e284e02 编写于 作者: B Behdad Esfahbod

[shape-plan] Minor

上级 420c9de6
......@@ -68,11 +68,12 @@ _hb_apply_morx (hb_face_t *face)
hb_aat_layout_has_substitution (face);
}
hb_ot_shape_planner_t::hb_ot_shape_planner_t (const hb_shape_plan_t *master_plan) :
face (master_plan->face_unsafe),
props (master_plan->props),
map (face, &props),
aat_map (face, &props),
hb_ot_shape_planner_t::hb_ot_shape_planner_t (hb_face_t *face,
const hb_segment_properties_t *props) :
face (face),
props (*props),
map (face, props),
aat_map (face, props),
apply_morx (_hb_apply_morx (face)),
shaper (apply_morx ?
&_hb_ot_complex_shaper_default :
......@@ -148,18 +149,19 @@ hb_ot_shape_planner_t::compile (hb_ot_shape_plan_t &plan,
}
bool
hb_ot_shape_plan_t::init0 (hb_shape_plan_t *shape_plan,
const hb_feature_t *user_features,
unsigned int num_user_features,
const int *coords,
unsigned int num_coords)
hb_ot_shape_plan_t::init0 (hb_face_t *face,
const hb_segment_properties_t *props,
const hb_feature_t *user_features,
unsigned int num_user_features,
const int *coords,
unsigned int num_coords)
{
map.init ();
aat_map.init ();
hb_ot_shape_planner_t planner (shape_plan);
hb_ot_shape_planner_t planner (face, props);
hb_ot_shape_collect_features (&planner, &shape_plan->props,
hb_ot_shape_collect_features (&planner, props,
user_features, num_user_features);
planner.compile (*this, coords, num_coords);
......
......@@ -73,12 +73,12 @@ struct hb_ot_shape_plan_t
inline void substitute (hb_font_t *font, hb_buffer_t *buffer) const { map.substitute (this, font, buffer); }
inline void position (hb_font_t *font, hb_buffer_t *buffer) const { map.position (this, font, buffer); }
HB_INTERNAL bool init0 (hb_shape_plan_t *shape_plan,
const hb_feature_t *user_features,
unsigned int num_user_features,
const int *coords,
unsigned int num_coords);
HB_INTERNAL bool init0 (hb_face_t *face,
const hb_segment_properties_t *props,
const hb_feature_t *user_features,
unsigned int num_user_features,
const int *coords,
unsigned int num_coords);
HB_INTERNAL void fini (void);
};
......@@ -94,7 +94,8 @@ struct hb_ot_shape_planner_t
bool apply_morx : 1;
const struct hb_ot_complex_shaper_t *shaper;
HB_INTERNAL hb_ot_shape_planner_t (const hb_shape_plan_t *master_plan);
HB_INTERNAL hb_ot_shape_planner_t (hb_face_t *face,
const hb_segment_properties_t *props);
HB_INTERNAL void compile (hb_ot_shape_plan_t &plan,
const int *coords,
......
......@@ -178,7 +178,8 @@ hb_shape_plan_create2 (hb_face_t *face,
coords, num_coords,
shaper_list);
if (unlikely (!shape_plan->ot.init0 (shape_plan,
if (unlikely (!shape_plan->ot.init0 (face,
props,
user_features,
num_user_features,
coords,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册