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

Behdad Esfahbod behdad at kemper.freedesktop.org
Mon Feb 19 00:29:28 UTC 2018


 src/hb-aat-layout-kerx-table.hh |    2 +-
 src/hb-ot-cmap-table.hh         |   22 +++++++++++-----------
 2 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 6fa690c75a572a1076124b428b76929b2674e532
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Sun Feb 18 16:27:59 2018 -0800

    Fix debug build
    
    Context needs to be called 'c'. The TRACE_* rely on that.

diff --git a/src/hb-ot-cmap-table.hh b/src/hb-ot-cmap-table.hh
index e7494df6..284b62cd 100644
--- a/src/hb-ot-cmap-table.hh
+++ b/src/hb-ot-cmap-table.hh
@@ -271,13 +271,13 @@ struct CmapSubtableLongSegmented
     return_trace (c->check_struct (this) && groups.sanitize (c));
   }
 
-  inline bool serialize (hb_serialize_context_t *context,
+  inline bool serialize (hb_serialize_context_t *c,
                          hb_prealloced_array_t<CmapSubtableLongGroup> &group_data)
   {
     TRACE_SERIALIZE (this);
-    if (unlikely (!context->extend_min (*this))) return_trace (false);
+    if (unlikely (!c->extend_min (*this))) return_trace (false);
     Supplier<CmapSubtableLongGroup> supplier (group_data.array, group_data.len);
-    if (unlikely (!groups.serialize (context, supplier, group_data.len))) return_trace (false);
+    if (unlikely (!groups.serialize (c, supplier, group_data.len))) return_trace (false);
     return true;
   }
 
@@ -555,37 +555,37 @@ struct cmap
 		       size_t dest_sz,
 		       void *dest) const
   {
-    hb_serialize_context_t context (dest, dest_sz);
+    hb_serialize_context_t c (dest, dest_sz);
 
-    OT::cmap *cmap = context.start_serialize<OT::cmap> ();
-    if (unlikely (!context.extend_min (*cmap)))
+    OT::cmap *cmap = c.start_serialize<OT::cmap> ();
+    if (unlikely (!c.extend_min (*cmap)))
     {
       return false;
     }
 
     cmap->version.set (0);
 
-    if (unlikely (!cmap->encodingRecord.serialize (&context, /* numTables */ 1))) return false;
+    if (unlikely (!cmap->encodingRecord.serialize (&c, /* numTables */ 1))) return false;
 
     EncodingRecord &rec = cmap->encodingRecord[0];
     rec.platformID.set (3); // Windows
     rec.encodingID.set (10); // Unicode UCS-4
 
     /* capture offset to subtable */
-    CmapSubtable &subtable = rec.subtable.serialize (&context, cmap);
+    CmapSubtable &subtable = rec.subtable.serialize (&c, cmap);
 
     subtable.u.format.set (12);
 
     CmapSubtableFormat12 &format12 = subtable.u.format12;
-    if (unlikely (!context.extend_min (format12))) return false;
+    if (unlikely (!c.extend_min (format12))) return false;
 
     format12.format.set (12);
     format12.reservedZ.set (0);
     format12.lengthZ.set (16 + 12 * groups.len);
 
-    if (unlikely (!format12.serialize (&context, groups))) return false;
+    if (unlikely (!format12.serialize (&c, groups))) return false;
 
-    context.end_serialize ();
+    c.end_serialize ();
 
     return true;
   }
commit 05d1e77db8f3e5280e93b6885ff4f7df113b612b
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Sun Feb 18 16:26:04 2018 -0800

    [aat] Silence warning

diff --git a/src/hb-aat-layout-kerx-table.hh b/src/hb-aat-layout-kerx-table.hh
index 4a40d1c2..b061f11d 100644
--- a/src/hb-aat-layout-kerx-table.hh
+++ b/src/hb-aat-layout-kerx-table.hh
@@ -76,7 +76,7 @@ struct KerxSubTableFormat0
 {
   inline int get_kerning (hb_codepoint_t left, hb_codepoint_t right) const
   {
-    hb_glyph_pair_t pair = {left, right};
+    //hb_glyph_pair_t pair = {left, right};
     //int i = pairs.bsearch (pair);
     //if (i == -1)
       return 0;


More information about the HarfBuzz mailing list