From bf8c57ba745c02370c38198adfdcd8075ba38b13 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 3 Aug 2011 17:38:04 -0400 Subject: [PATCH] [API] Add hb_face_get_blob() Need to think more about it. --- src/hb-font.cc | 10 ++++++++++ src/hb-font.h | 3 +++ 2 files changed, 13 insertions(+) diff --git a/src/hb-font.cc b/src/hb-font.cc index 0406e10..d92f598 100644 --- a/src/hb-font.cc +++ b/src/hb-font.cc @@ -686,6 +686,16 @@ hb_face_is_immutable (hb_face_t *face) hb_blob_t * +hb_face_get_blob (hb_face_t *face) +{ + if (face->destroy != (hb_destroy_func_t) _hb_face_for_data_closure_destroy) + return hb_blob_get_empty (); + + hb_face_for_data_closure_t *data = (hb_face_for_data_closure_t *) face->user_data; + return data->blob; +} + +hb_blob_t * hb_face_reference_table (hb_face_t *face, hb_tag_t tag) { diff --git a/src/hb-font.h b/src/hb-font.h index 37d36b4..2675c6e 100644 --- a/src/hb-font.h +++ b/src/hb-font.h @@ -80,6 +80,9 @@ hb_face_is_immutable (hb_face_t *face); hb_blob_t * +hb_face_get_blob (hb_face_t *face); + +hb_blob_t * hb_face_reference_table (hb_face_t *face, hb_tag_t tag); -- 2.7.4