[HarfBuzz] harfbuzz: Branch 'master' - 2 commits

Behdad Esfahbod behdad at kemper.freedesktop.org
Tue Feb 13 02:49:57 UTC 2018


 src/hb-ot-cbdt-table.hh |    2 +-
 src/hb-ot-hmtx-table.hh |    2 +-
 src/hb-subset.cc        |    4 ----
 3 files changed, 2 insertions(+), 6 deletions(-)

New commits:
commit 96f1f52ea3a42b27f59aecffe65c918295e53b3b
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Feb 12 18:48:51 2018 -0800

    Use hb_face_get_upem() instead of face->get_upem()
    
    Such that hmtx accelerator can be used from libharfbuzz-subset.

diff --git a/src/hb-ot-cbdt-table.hh b/src/hb-ot-cbdt-table.hh
index 6c2b9a88..e4519529 100644
--- a/src/hb-ot-cbdt-table.hh
+++ b/src/hb-ot-cbdt-table.hh
@@ -377,7 +377,7 @@ struct CBDT
   {
     inline void init (hb_face_t *face)
     {
-      upem = face->get_upem();
+      upem = hb_face_get_upem (face);
 
       cblc_blob = Sanitizer<CBLC>().sanitize (face->reference_table (HB_OT_TAG_CBLC));
       cbdt_blob = Sanitizer<CBDT>().sanitize (face->reference_table (HB_OT_TAG_CBDT));
diff --git a/src/hb-ot-hmtx-table.hh b/src/hb-ot-hmtx-table.hh
index eed48902..b4ba2490 100644
--- a/src/hb-ot-hmtx-table.hh
+++ b/src/hb-ot-hmtx-table.hh
@@ -69,7 +69,7 @@ struct hmtxvmtx
     inline void init (hb_face_t *face,
 		      unsigned int default_advance_ = 0)
     {
-      default_advance = default_advance_ ? default_advance_ : face->get_upem ();
+      default_advance = default_advance_ ? default_advance_ : hb_face_get_upem (face);
 
       bool got_font_extents = false;
       if (T::os2Tag)
commit 3d66f441cc4d4feb2fd4b03be9f764c91f4de8b2
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Feb 12 18:43:42 2018 -0800

    [subset] Remove unreachable code
    
    sanitizer.sanitize never return nullptr.

diff --git a/src/hb-subset.cc b/src/hb-subset.cc
index 94600617..3b022dd4 100644
--- a/src/hb-subset.cc
+++ b/src/hb-subset.cc
@@ -112,10 +112,6 @@ _subset (hb_subset_plan_t *plan, hb_face_t *source)
 {
     OT::Sanitizer<TableType> sanitizer;
     hb_blob_t *source_blob = sanitizer.sanitize (source->reference_table (TableType::tableTag));
-    if (unlikely(!source_blob)) {
-      DEBUG_MSG(SUBSET, nullptr, "Failed to reference table for tag %d", TableType::tableTag);
-      return nullptr;
-    }
     const TableType *table = OT::Sanitizer<TableType>::lock_instance (source_blob);
     hb_blob_t *result = table->subset(plan, source);
 


More information about the HarfBuzz mailing list