};
+struct ankr;
struct hb_aat_apply_context_t :
hb_dispatch_context_t<hb_aat_apply_context_t, bool, HB_DEBUG_APPLY>
hb_face_t *face;
hb_buffer_t *buffer;
hb_sanitize_context_t sanitizer;
+ const ankr &ankr_table;
/* Unused. For debug tracing only. */
unsigned int lookup_index;
inline hb_aat_apply_context_t (hb_ot_shape_plan_t *plan_,
hb_font_t *font_,
hb_buffer_t *buffer_,
- hb_blob_t *table) :
+ hb_blob_t *table,
+ const ankr &ankr_table_ = Null(ankr)) :
plan (plan_), font (font_), face (font->face), buffer (buffer_),
- sanitizer (), lookup_index (0), debug_depth (0)
+ sanitizer (), ankr_table (ankr_table_), lookup_index (0), debug_depth (0)
{
sanitizer.init (table);
sanitizer.set_num_glyphs (face->get_num_glyphs ());
*blob = hb_ot_face_data (face)->kerx.get_blob ();
return kerx;
}
+static inline const AAT::ankr&
+_get_ankr (hb_face_t *face)
+{
+ if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(AAT::ankr);
+ return *(hb_ot_face_data (face)->ankr.get ());
+}
hb_bool_t
hb_blob_t *blob;
const AAT::kerx& kerx = _get_kerx (font->face, &blob);
- AAT::hb_aat_apply_context_t c (plan, font, buffer, blob);
+ AAT::hb_aat_apply_context_t c (plan, font, buffer, blob, _get_ankr (font->face));
kerx.apply (&c);
}