diff --git a/src/hb-aat-layout-ankr-table.hh b/src/hb-aat-layout-ankr-table.hh index b1c115cf4..68179a64e 100644 --- a/src/hb-aat-layout-ankr-table.hh +++ b/src/hb-aat-layout-ankr-table.hh @@ -62,8 +62,7 @@ struct ankr const Anchor &get_anchor (hb_codepoint_t glyph_id, unsigned int i, - unsigned int num_glyphs, - const char *end) const + unsigned int num_glyphs) const { const OffsetTo *offset = (this+lookupTable).get_value (glyph_id, num_glyphs); if (!offset) diff --git a/src/hb-aat-layout-common.hh b/src/hb-aat-layout-common.hh index ef75d7a4a..eec348005 100644 --- a/src/hb-aat-layout-common.hh +++ b/src/hb-aat-layout-common.hh @@ -825,7 +825,6 @@ struct hb_aat_apply_context_t : hb_buffer_t *buffer; hb_sanitize_context_t sanitizer; const ankr *ankr_table; - const char *ankr_end; /* Unused. For debug tracing only. */ unsigned int lookup_index; @@ -838,7 +837,7 @@ struct hb_aat_apply_context_t : HB_INTERNAL ~hb_aat_apply_context_t (); - HB_INTERNAL void set_ankr_table (const AAT::ankr *ankr_table_, const char *ankr_end_); + HB_INTERNAL void set_ankr_table (const AAT::ankr *ankr_table_); void set_lookup_index (unsigned int i) { lookup_index = i; } }; diff --git a/src/hb-aat-layout-kerx-table.hh b/src/hb-aat-layout-kerx-table.hh index cde2388ec..f52593926 100644 --- a/src/hb-aat-layout-kerx-table.hh +++ b/src/hb-aat-layout-kerx-table.hh @@ -549,12 +549,10 @@ struct KerxSubTableFormat4 unsigned int currAnchorPoint = *data++; const Anchor &markAnchor = c->ankr_table->get_anchor (c->buffer->info[mark].codepoint, markAnchorPoint, - c->sanitizer.get_num_glyphs (), - c->ankr_end); + c->sanitizer.get_num_glyphs ()); const Anchor &currAnchor = c->ankr_table->get_anchor (c->buffer->cur ().codepoint, currAnchorPoint, - c->sanitizer.get_num_glyphs (), - c->ankr_end); + c->sanitizer.get_num_glyphs ()); o.x_offset = c->font->em_scale_x (markAnchor.xCoordinate) - c->font->em_scale_x (currAnchor.xCoordinate); o.y_offset = c->font->em_scale_y (markAnchor.yCoordinate) - c->font->em_scale_y (currAnchor.yCoordinate); diff --git a/src/hb-aat-layout.cc b/src/hb-aat-layout.cc index 8de8205f5..5168a9c85 100644 --- a/src/hb-aat-layout.cc +++ b/src/hb-aat-layout.cc @@ -157,7 +157,6 @@ AAT::hb_aat_apply_context_t::hb_aat_apply_context_t (const hb_ot_shape_plan_t *p buffer (buffer_), sanitizer (), ankr_table (&Null(AAT::ankr)), - ankr_end (nullptr), lookup_index (0), debug_depth (0) { @@ -171,12 +170,8 @@ AAT::hb_aat_apply_context_t::~hb_aat_apply_context_t () { sanitizer.end_processing (); } void -AAT::hb_aat_apply_context_t::set_ankr_table (const AAT::ankr *ankr_table_, - const char *ankr_end_) -{ - ankr_table = ankr_table_; - ankr_end = ankr_end_; -} +AAT::hb_aat_apply_context_t::set_ankr_table (const AAT::ankr *ankr_table_) +{ ankr_table = ankr_table_; } /* @@ -286,11 +281,8 @@ hb_aat_layout_position (const hb_ot_shape_plan_t *plan, hb_blob_t *kerx_blob = font->face->table.kerx.get_blob (); const AAT::kerx& kerx = *kerx_blob->as (); - hb_blob_t *ankr_blob = font->face->table.ankr.get_blob ();; - const AAT::ankr& ankr = *font->face->table.ankr; - AAT::hb_aat_apply_context_t c (plan, font, buffer, kerx_blob); - c.set_ankr_table (&ankr, ankr_blob->data + ankr_blob->length); + c.set_ankr_table (font->face->table.ankr.get ()); kerx.apply (&c); }