Home | History | Annotate | Download | only in src

Lines Matching defs:shape_plan

40 hb_shape_plan_plan (hb_shape_plan_t    *shape_plan,
49 if (hb_##shaper##_shaper_face_data_ensure (shape_plan->face_unsafe)) { \
50 HB_SHAPER_DATA (shaper, shape_plan) = \
51 HB_SHAPER_DATA_CREATE_FUNC (shaper, shape_plan) (shape_plan, user_features, num_user_features); \
52 shape_plan->shaper_func = _hb_##shaper##_shape; \
53 shape_plan->shaper_name = #shaper; \
107 hb_shape_plan_t *shape_plan;
116 if (!(shape_plan = hb_object_create<hb_shape_plan_t> ())) {
124 shape_plan->default_shaper_list = shaper_list == NULL;
125 shape_plan->face_unsafe = face;
126 shape_plan->props = *props;
127 shape_plan->num_user_features = num_user_features;
128 shape_plan->user_features = features;
132 hb_shape_plan_plan (shape_plan, user_features, num_user_features, shaper_list);
134 return shape_plan;
174 * @shape_plan: a shape plan.
183 hb_shape_plan_reference (hb_shape_plan_t *shape_plan)
185 return hb_object_reference (shape_plan);
190 * @shape_plan: a shape plan.
197 hb_shape_plan_destroy (hb_shape_plan_t *shape_plan)
199 if (!hb_object_destroy (shape_plan)) return;
201 #define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_DESTROY(shaper, shape_plan);
205 free (shape_plan->user_features);
207 free (shape_plan);
212 * @shape_plan: a shape plan.
225 hb_shape_plan_set_user_data (hb_shape_plan_t *shape_plan,
231 return hb_object_set_user_data (shape_plan, key, data, destroy, replace);
236 * @shape_plan: a shape plan.
246 hb_shape_plan_get_user_data (hb_shape_plan_t *shape_plan,
249 return hb_object_get_user_data (shape_plan, key);
255 * @shape_plan: a shape plan.
268 hb_shape_plan_execute (hb_shape_plan_t *shape_plan,
274 if (unlikely (hb_object_is_inert (shape_plan) ||
279 assert (shape_plan->face_unsafe == font->face);
280 assert (hb_segment_properties_equal (&shape_plan->props, &buffer->props));
284 return HB_SHAPER_DATA (shaper, shape_plan) && \
286 _hb_##shaper##_shape (shape_plan, font, buffer, features, num_features); \
292 else if (shape_plan->shaper_func == _hb_##shaper##_shape) \
309 hb_shape_plan_hash (const hb_shape_plan_t *shape_plan)
311 return hb_segment_properties_hash (&shape_plan->props) +
312 shape_plan->default_shaper_list ? 0 : (intptr_t) shape_plan->shaper_func;
331 hb_shape_plan_user_features_match (const hb_shape_plan_t *shape_plan,
334 if (proposal->num_user_features != shape_plan->num_user_features) return false;
336 if (proposal->user_features[i].tag != shape_plan->user_features[i].tag ||
337 proposal->user_features[i].value != shape_plan->user_features[i].value ||
338 proposal->user_features[i].start != shape_plan->user_features[i].start ||
339 proposal->user_features[i].end != shape_plan->user_features[i].end) return false;
344 hb_shape_plan_matches (const hb_shape_plan_t *shape_plan,
347 return hb_segment_properties_equal (&shape_plan->props, &proposal->props) &&
348 hb_shape_plan_user_features_match (shape_plan, proposal) &&
349 ((shape_plan->default_shaper_list && proposal->shaper_list == NULL) ||
350 (shape_plan->shaper_func == proposal->shaper_func));
421 if (hb_shape_plan_matches (node->shape_plan, &proposal))
422 return hb_shape_plan_reference (node->shape_plan);
426 hb_shape_plan_t *shape_plan = hb_shape_plan_create (face, props, user_features, num_user_features, shaper_list);
431 return shape_plan;
435 return shape_plan;
437 node->shape_plan = shape_plan;
441 hb_shape_plan_destroy (shape_plan);
446 return hb_shape_plan_reference (shape_plan);
451 * @shape_plan: a shape plan.
460 hb_shape_plan_get_shaper (hb_shape_plan_t *shape_plan)
462 return shape_plan->shaper_name;