diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-08-02 22:27:18 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-08-02 22:27:18 +0000 |
commit | 00cddd8f501726c55398988ec393b39824688bc9 (patch) | |
tree | c383dbf0c33772288a3fef798ce38252fc41d462 /Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc | |
parent | 86d37d58807bbc32cbda99be0644cca69261a6ea (diff) |
harfbuzz 1.8.5
git-svn-id: svn://tug.org/texlive/trunk@48337 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc')
-rw-r--r-- | Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc index 2fef09d03d3..fab2aa3a9f8 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc @@ -31,8 +31,6 @@ #include "hb-face-private.hh" #include "hb-blob-private.hh" #include "hb-open-file-private.hh" -#include "hb-ot-head-table.hh" -#include "hb-ot-maxp-table.hh" @@ -52,10 +50,13 @@ hb_face_count (hb_blob_t *blob) if (unlikely (!blob)) return 0; - hb_blob_t *sanitized = OT::Sanitizer<OT::OpenTypeFontFile> ().sanitize (blob); + /* TODO We shouldn't be sanitizing blob. Port to run sanitizer and return if not sane. */ + hb_blob_t *sanitized = OT::hb_sanitize_context_t().sanitize_blob<OT::OpenTypeFontFile> (hb_blob_reference (blob)); const OT::OpenTypeFontFile& ot = *sanitized->as<OT::OpenTypeFontFile> (); + unsigned int ret = ot.get_face_count (); + hb_blob_destroy (sanitized); - return ot.get_face_count (); + return ret; } /* @@ -188,7 +189,7 @@ hb_face_create (hb_blob_t *blob, if (unlikely (!blob)) blob = hb_blob_get_empty (); - hb_face_for_data_closure_t *closure = _hb_face_for_data_closure_create (OT::Sanitizer<OT::OpenTypeFontFile>().sanitize (hb_blob_reference (blob)), index); + hb_face_for_data_closure_t *closure = _hb_face_for_data_closure_create (OT::hb_sanitize_context_t().sanitize_blob<OT::OpenTypeFontFile> (hb_blob_reference (blob)), index); if (unlikely (!closure)) return hb_face_get_empty (); @@ -445,15 +446,6 @@ hb_face_get_upem (hb_face_t *face) return face->get_upem (); } -void -hb_face_t::load_upem (void) const -{ - hb_blob_t *head_blob = OT::Sanitizer<OT::head>().sanitize (reference_table (HB_OT_TAG_head)); - const OT::head *head_table = head_blob->as<OT::head> (); - upem = head_table->get_upem (); - hb_blob_destroy (head_blob); -} - /** * hb_face_set_glyph_count: * @face: a face. @@ -489,15 +481,6 @@ hb_face_get_glyph_count (hb_face_t *face) return face->get_num_glyphs (); } -void -hb_face_t::load_num_glyphs (void) const -{ - hb_blob_t *maxp_blob = OT::Sanitizer<OT::maxp>().sanitize (reference_table (HB_OT_TAG_maxp)); - const OT::maxp *maxp_table = maxp_blob->as<OT::maxp> (); - num_glyphs = maxp_table->get_num_glyphs (); - hb_blob_destroy (maxp_blob); -} - /** * hb_face_get_table_tags: * @face: a face. |