static return_t default_return_value (void) { return false; }
bool stop_sublookup_iteration (return_t r) const { return r; }
- hb_ot_shape_plan_t *plan;
+ const hb_ot_shape_plan_t *plan;
hb_font_t *font;
hb_face_t *face;
hb_buffer_t *buffer;
unsigned int lookup_index;
unsigned int debug_depth;
- HB_INTERNAL hb_aat_apply_context_t (hb_ot_shape_plan_t *plan_,
+ HB_INTERNAL hb_aat_apply_context_t (const hb_ot_shape_plan_t *plan_,
hb_font_t *font_,
hb_buffer_t *buffer_,
hb_blob_t *blob = const_cast<hb_blob_t *> (&Null(hb_blob_t)));
* hb_aat_apply_context_t
*/
-AAT::hb_aat_apply_context_t::hb_aat_apply_context_t (hb_ot_shape_plan_t *plan_,
+AAT::hb_aat_apply_context_t::hb_aat_apply_context_t (const hb_ot_shape_plan_t *plan_,
hb_font_t *font_,
hb_buffer_t *buffer_,
hb_blob_t *blob) :
}
void
-hb_aat_layout_substitute (hb_ot_shape_plan_t *plan,
+hb_aat_layout_substitute (const hb_ot_shape_plan_t *plan,
hb_font_t *font,
hb_buffer_t *buffer)
{
}
void
-hb_aat_layout_position (hb_ot_shape_plan_t *plan,
+hb_aat_layout_position (const hb_ot_shape_plan_t *plan,
hb_font_t *font,
hb_buffer_t *buffer)
{
}
void
-hb_aat_layout_track (hb_ot_shape_plan_t *plan,
+hb_aat_layout_track (const hb_ot_shape_plan_t *plan,
hb_font_t *font,
hb_buffer_t *buffer)
{
hb_aat_layout_has_substitution (hb_face_t *face);
HB_INTERNAL void
-hb_aat_layout_substitute (hb_ot_shape_plan_t *plan,
+hb_aat_layout_substitute (const hb_ot_shape_plan_t *plan,
hb_font_t *font,
hb_buffer_t *buffer);
hb_aat_layout_has_positioning (hb_face_t *face);
HB_INTERNAL void
-hb_aat_layout_position (hb_ot_shape_plan_t *plan,
+hb_aat_layout_position (const hb_ot_shape_plan_t *plan,
hb_font_t *font,
hb_buffer_t *buffer);
hb_aat_layout_has_tracking (hb_face_t *face);
HB_INTERNAL void
-hb_aat_layout_track (hb_ot_shape_plan_t *plan,
+hb_aat_layout_track (const hb_ot_shape_plan_t *plan,
hb_font_t *font,
hb_buffer_t *buffer);
}
void
-hb_ot_layout_kern (hb_ot_shape_plan_t *plan,
+hb_ot_layout_kern (const hb_ot_shape_plan_t *plan,
hb_font_t *font,
hb_buffer_t *buffer)
{
hb_ot_layout_has_cross_kerning (hb_face_t *face);
HB_INTERNAL void
-hb_ot_layout_kern (hb_ot_shape_plan_t *plan,
+hb_ot_layout_kern (const hb_ot_shape_plan_t *plan,
hb_font_t *font,
hb_buffer_t *buffer);
aat_map.fini ();
}
+void
+hb_ot_shape_plan_t::substitute (hb_font_t *font,
+ hb_buffer_t *buffer) const
+{
+ if (unlikely (apply_morx))
+ hb_aat_layout_substitute (this, font, buffer);
+ else
+ map.substitute (this, font, buffer);
+}
+
+void
+hb_ot_shape_plan_t::position (hb_font_t *font,
+ hb_buffer_t *buffer) const
+{
+ if (this->apply_gpos)
+ map.position (this, font, buffer);
+ else if (this->apply_kerx)
+ hb_aat_layout_position (this, font, buffer);
+ else if (this->apply_kern)
+ hb_ot_layout_kern (this, font, buffer);
+ else
+ _hb_ot_shape_fallback_kern (this, font, buffer);
+
+ if (this->apply_trak)
+ hb_aat_layout_track (this, font, buffer);
+}
+
static const hb_ot_map_feature_t
common_features[] =
if (c->plan->fallback_glyph_classes)
hb_synthesize_glyph_classes (c->buffer);
- if (unlikely (c->plan->apply_morx))
- hb_aat_layout_substitute (c->plan, c->font, c->buffer);
- else
- c->plan->substitute (c->font, buffer);
+ c->plan->substitute (c->font, buffer);
}
static inline void
break;
}
- if (c->plan->apply_gpos)
- c->plan->position (c->font, c->buffer);
- else if (c->plan->apply_kerx)
- hb_aat_layout_position (c->plan, c->font, c->buffer);
- else if (c->plan->apply_kern)
- hb_ot_layout_kern (c->plan, c->font, c->buffer);
- else
- _hb_ot_shape_fallback_kern (c->plan, c->font, c->buffer);
-
- if (c->plan->apply_trak)
- hb_aat_layout_track (c->plan, c->font, c->buffer);
+ c->plan->position (c->font, c->buffer);
if (c->plan->zero_marks)
switch (c->plan->shaper->zero_width_marks)
bool apply_morx : 1;
bool apply_trak : 1;
-
inline void collect_lookups (hb_tag_t table_tag, hb_set_t *lookups) const
{
unsigned int table_index;
}
map.collect_lookups (table_index, lookups);
}
- 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_face_t *face,
const hb_shape_plan_key_t *key);
HB_INTERNAL void fini (void);
+
+ HB_INTERNAL void substitute (hb_font_t *font, hb_buffer_t *buffer) const;
+ HB_INTERNAL void position (hb_font_t *font, hb_buffer_t *buffer) const;
};
struct hb_shape_plan_t;