diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index 8bc741698..e21bd4583 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -186,7 +186,7 @@ struct hb_sanitize_context_t : inline void start_processing (void) { this->start = hb_blob_get_data (this->blob, nullptr); - this->end = this->start + hb_blob_get_length (this->blob); + this->end = this->start + this->blob->length; assert (this->start <= this->end); /* Must not overflow. */ this->max_ops = MAX ((unsigned int) (this->end - this->start) * HB_SANITIZE_MAX_OPS_FACTOR, (unsigned) HB_SANITIZE_MAX_OPS_MIN); @@ -329,7 +329,7 @@ struct Sanitizer unsigned int edit_count = c->edit_count; if (edit_count && !c->writable) { c->start = hb_blob_get_data_writable (blob, nullptr); - c->end = c->start + hb_blob_get_length (blob); + c->end = c->start + blob->length; if (c->start) { c->writable = true; diff --git a/src/hb-ot-kern-table.hh b/src/hb-ot-kern-table.hh index 9366dbf48..b0fdea4a7 100644 --- a/src/hb-ot-kern-table.hh +++ b/src/hb-ot-kern-table.hh @@ -364,7 +364,7 @@ struct kern { blob = Sanitizer().sanitize (face->reference_table (HB_OT_TAG_kern)); table = blob->as (); - table_length = hb_blob_get_length (blob); + table_length = blob->length; } inline void fini (void) { diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index d5efde294..368a84658 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -77,9 +77,9 @@ _hb_ot_layout_create (hb_face_t *face) * See this thread for why we finally had to bend in and do this: * https://lists.freedesktop.org/archives/harfbuzz/2016-February/005489.html */ - unsigned int gdef_len = hb_blob_get_length (layout->gdef_blob); - unsigned int gsub_len = hb_blob_get_length (layout->gsub_blob); - unsigned int gpos_len = hb_blob_get_length (layout->gpos_blob); + unsigned int gdef_len = layout->gdef_blob->length; + unsigned int gsub_len = layout->gsub_blob->length; + unsigned int gpos_len = layout->gpos_blob->length; if (0 /* sha1sum:c5ee92f0bca4bfb7d06c4d03e8cf9f9cf75d2e8a Windows 7? timesi.ttf */ || (442 == gdef_len && 42038 == gpos_len && 2874 == gsub_len) diff --git a/src/hb-ot-post-table.hh b/src/hb-ot-post-table.hh index bb5f9b313..8ba5ee103 100644 --- a/src/hb-ot-post-table.hh +++ b/src/hb-ot-post-table.hh @@ -111,7 +111,7 @@ struct post { blob = Sanitizer().sanitize (face->reference_table (HB_OT_TAG_post)); const post *table = blob->as (); - unsigned int table_length = hb_blob_get_length (blob); + unsigned int table_length = blob->length; version = table->version.to_int (); index_to_offset.init ();