diff --git a/src/hb-font.cc b/src/hb-font.cc index 521120afd..2475089df 100644 --- a/src/hb-font.cc +++ b/src/hb-font.cc @@ -319,7 +319,7 @@ hb_face_create_for_tables (hb_get_table_func_t get_table, face->ot_layout = _hb_ot_layout_new (face); - face->head_blob = Sanitizer
::sanitize (hb_face_get_table (face, HB_OT_TAG_head)); + face->head_blob = Sanitizer::sanitize (hb_face_reference_table (face, HB_OT_TAG_head)); face->head_table = Sanitizer::lock_instance (face->head_blob); return face; @@ -408,7 +408,7 @@ hb_face_destroy (hb_face_t *face) } hb_blob_t * -hb_face_get_table (hb_face_t *face, +hb_face_reference_table (hb_face_t *face, hb_tag_t tag) { hb_blob_t *blob; diff --git a/src/hb-font.h b/src/hb-font.h index 29cd5cbd4..397b586f9 100644 --- a/src/hb-font.h +++ b/src/hb-font.h @@ -67,13 +67,10 @@ hb_face_destroy (hb_face_t *face); * table vs a zero-length table vs a very short table. It only leads to implementations * that check for non-NULL and assume that they've got a usable table going on... This * actually happened with Firefox. - * - * - It has to be renamed to reference_table() since unlike any other _get_ API, a reference - * ownership transfer happens and the user is responsible to destroy the result. */ hb_blob_t * -hb_face_get_table (hb_face_t *face, - hb_tag_t tag); +hb_face_reference_table (hb_face_t *face, + hb_tag_t tag); unsigned int hb_face_get_upem (hb_face_t *face); diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index f1287c5c9..7990fe951 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -47,13 +47,13 @@ _hb_ot_layout_new (hb_face_t *face) /* Remove this object altogether */ hb_ot_layout_t *layout = (hb_ot_layout_t *) calloc (1, sizeof (hb_ot_layout_t)); - layout->gdef_blob = Sanitizer