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

Behdad Esfahbod behdad at kemper.freedesktop.org
Sat Nov 24 22:24:09 UTC 2018


 .circleci/config.yml                                 |   16 ++++++++++--
 src/hb-aat-layout-kerx-table.hh                      |   21 ---------------
 src/hb-aat-layout-morx-table.hh                      |    8 ------
 src/hb-machinery.hh                                  |   25 -------------------
 test/shaping/data/in-house/Makefile.sources          |    3 +-
 test/shaping/data/in-house/tests/macos-10.12.6.tests |    2 -
 test/shaping/data/in-house/tests/macos-10.13.6.tests |   13 +++++++++
 7 files changed, 30 insertions(+), 58 deletions(-)

New commits:
commit bbdb6edb3e1cea4c5b7076c4f6b3e6998ae36dae
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Sat Nov 24 17:15:38 2018 -0500

    [sanitize] Remove now-unused set_object() machinery

diff --git a/src/hb-machinery.hh b/src/hb-machinery.hh
index edef5405..9ca247d9 100644
--- a/src/hb-machinery.hh
+++ b/src/hb-machinery.hh
@@ -259,34 +259,11 @@ struct hb_sanitize_context_t :
 
   inline void set_max_ops (int max_ops_) { max_ops = max_ops_; }
 
-  template <typename T>
-  inline void set_object (const T& obj)
-  {
-    reset_object ();
-
-    const char *obj_start = (const char *) &obj;
-    const char *obj_end = (const char *) &obj + obj.get_size ();
-    assert (obj_start <= obj_end); /* Must not overflow. */
-
-    if (unlikely (obj_end < this->start || this->end < obj_start))
-      this->start = this->end = nullptr;
-    else
-    {
-      this->start = MAX (this->start, obj_start);
-      this->end   = MIN (this->end  , obj_end  );
-    }
-  }
-
-  inline void reset_object (void)
+  inline void start_processing (void)
   {
     this->start = this->blob->data;
     this->end = this->start + this->blob->length;
     assert (this->start <= this->end); /* Must not overflow. */
-  }
-
-  inline void start_processing (void)
-  {
-    reset_object ();
     this->max_ops = MAX ((unsigned int) (this->end - this->start) * HB_SANITIZE_MAX_OPS_FACTOR,
 			 (unsigned) HB_SANITIZE_MAX_OPS_MIN);
     this->edit_count = 0;
commit 15905a2a2998f7ddd964f920a4828602235d6b00
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Sat Nov 24 17:14:39 2018 -0500

    [aat.kerx] Remove kerx subtable boundary enforcement
    
    Have not encountered fonts needing this, but same reasoning as
    for morx (see previos commit.)

diff --git a/src/hb-aat-layout-kerx-table.hh b/src/hb-aat-layout-kerx-table.hh
index fbeb35b0..b5c1e1d1 100644
--- a/src/hb-aat-layout-kerx-table.hh
+++ b/src/hb-aat-layout-kerx-table.hh
@@ -926,12 +926,6 @@ struct KerxTable
       if (reverse)
 	c->buffer->reverse ();
 
-      /* See comment in sanitize() for conditional here. */
-      if (i < count - 1)
-	c->sanitizer.set_object (*st);
-      else
-	c->sanitizer.reset_object ();
-
       ret |= st->dispatch (c);
 
       if (reverse)
@@ -943,7 +937,6 @@ struct KerxTable
       st = &StructAfter<SubTable> (*st);
       c->set_lookup_index (c->lookup_index + 1);
     }
-    c->sanitizer.reset_object ();
 
     return ret;
   }
@@ -962,24 +955,10 @@ struct KerxTable
     unsigned int count = thiz()->tableCount;
     for (unsigned int i = 0; i < count; i++)
     {
-      c->reset_object ();
-      if (unlikely (!st->u.header.sanitize (c)))
-	return_trace (false);
-      /* OpenType kern table has 2-byte subtable lengths.  That's limiting.
-       * MS implementation also only supports one subtable, of format 0,
-       * anyway.  Certain versions of some fonts, like Calibry, contain
-       * kern subtable that exceeds 64kb.  Looks like, the subtable length
-       * is simply ignored.  Which makes sense.  It's only needed if you
-       * have multiple subtables.  To handle such fonts, we just ignore
-       * the length for the last subtable. */
-      if (i < count - 1)
-	c->set_object (*st);
-
       if (unlikely (!st->sanitize (c)))
 	return_trace (false);
       st = &StructAfter<SubTable> (*st);
     }
-    c->reset_object ();
 
     return_trace (true);
   }
commit ae8ed58a6e53441d9ccbf67afd8a00b815cde99e
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Sat Nov 24 17:11:09 2018 -0500

    [aat.morx] Remove set_object() business
    
    With OS X 10.13 Apple Chancery fails to ligate if we limit each morx
    sub-chain to its declared length.  Perhaps their newer compiler does
    object-sharing across sub-chains.  Anyway, since that's a valid, if
    unspecified, way to compile tables, remove enforcement.
    
    Probably do the same with kern/kerx.

diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh
index dc406f59..77abf457 100644
--- a/src/hb-aat-layout-morx-table.hh
+++ b/src/hb-aat-layout-morx-table.hh
@@ -1026,8 +1026,6 @@ struct Chain
       if (reverse)
         c->buffer->reverse ();
 
-      c->sanitizer.set_object (*subtable);
-
       subtable->dispatch (c);
 
       if (reverse)
@@ -1041,7 +1039,6 @@ struct Chain
       subtable = &StructAfter<ChainSubtable<Types> > (*subtable);
       c->set_lookup_index (c->lookup_index + 1);
     }
-    c->sanitizer.reset_object ();
   }
 
   inline unsigned int get_size (void) const { return length; }
@@ -1061,15 +1058,10 @@ struct Chain
     unsigned int count = subtableCount;
     for (unsigned int i = 0; i < count; i++)
     {
-      c->reset_object ();
-      if (unlikely (!c->check_struct (subtable)))
-	return_trace (false);
-      c->set_object (*subtable);
       if (!subtable->sanitize (c))
 	return_trace (false);
       subtable = &StructAfter<ChainSubtable<Types> > (*subtable);
     }
-    c->reset_object ();
 
     return_trace (true);
   }
commit b518e5af9f66414396752069bb8f43466a9236fa
Author: Ebrahim Byagowi <ebrahim at gnu.org>
Date:   Sun Nov 25 01:39:00 2018 +0330

    Add 10.13.6 aat fonts tests and bot (#1409)

diff --git a/.circleci/config.yml b/.circleci/config.yml
index e56aabb7..e546f89f 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -2,7 +2,7 @@ version: 2
 
 jobs:
 
-  macos-10.12-aat-fonts:
+  macos-10.12.6-aat-fonts:
     macos:
       xcode: "9.2.0"
     steps:
@@ -13,6 +13,17 @@ jobs:
       - run: make -j4
       - run: make check || .ci/fail.sh
 
+  macos-10.13.6-aat-fonts:
+    macos:
+      xcode: "10.1.0"
+    steps:
+      - checkout
+      - run: brew update-reset
+      - run: brew install wget pkg-config libtool ragel freetype glib cairo
+      - run: ./autogen.sh --with-freetype --with-glib --with-gobject --with-cairo
+      - run: make -j4
+      - run: make check || .ci/fail.sh
+
   # macos-llvm-gcc-4.2:
   #   macos:
   #     xcode: "8.3.3"
@@ -313,7 +324,8 @@ workflows:
   build:
     jobs:
       # macOS
-      - macos-10.12-aat-fonts
+      - macos-10.12.6-aat-fonts
+      - macos-10.13.6-aat-fonts
       #- macos-llvm-gcc-4.2
       #- macos-notest-apple-gcc-i686-4.2
       - macos-notest-ios
diff --git a/test/shaping/data/in-house/Makefile.sources b/test/shaping/data/in-house/Makefile.sources
index d548e961..1a3d1775 100644
--- a/test/shaping/data/in-house/Makefile.sources
+++ b/test/shaping/data/in-house/Makefile.sources
@@ -33,7 +33,8 @@ TESTS = \
 	tests/khmer-misc.tests \
 	tests/language-tags.tests \
 	tests/ligature-id.tests \
-	tests/macos.tests \
+	tests/macos-10.12.6.tests \
+	tests/macos-10.13.6.tests \
 	tests/mark-attachment.tests \
 	tests/mark-filtering-sets.tests \
 	tests/mongolian-variation-selector.tests \
diff --git a/test/shaping/data/in-house/tests/macos.tests b/test/shaping/data/in-house/tests/macos-10.12.6.tests
similarity index 99%
rename from test/shaping/data/in-house/tests/macos.tests
rename to test/shaping/data/in-house/tests/macos-10.12.6.tests
index 53268fba..0f10fedf 100644
--- a/test/shaping/data/in-house/tests/macos.tests
+++ b/test/shaping/data/in-house/tests/macos-10.12.6.tests
@@ -1,5 +1,3 @@
-
-# 10.12:
 /System/Library/Fonts/Times.dfont at 39c954614d3f3317b28564db06d5b7b7a6ff0e39::U+0066,U+0069:[fi=0+1139]
 /Library/Fonts/Khmer MN.ttc at 5f5b1072df99b7355d3066ea85fe82969d13c94a::U+17A2,U+1780,U+17D2,U+179F,U+179A,U+1781,U+17D2,U+1798,U+17C2,U+179A:[km_qa=0+1025|km_ka=1+1025|km_sa.sub=1+517|km_ro=4+593|km_vs_ae=5+605|km_kha=5+1025|km_mo.sub=5+0|km_ro=9+593]
 /Library/Fonts/Tamil MN.ttc at 37a2020c3f86ebcc45e02c1de5fdf81e2676989d::U+0BA4,U+0BCA,U+0B95,U+0BC1,U+0B95,U+0BCD,U+0B95,U+0BAA,U+0BCD,U+0BAA,U+0B9F,U+0BCD,U+0B9F,U+0BC1:[tgm_e=0+1702|tgc_ta=0+1598|tgm_aa=0+1074|tgc_ka=2 at -74,0+1518|tgm_u=2+1205|tgc_ka=4+1592|tgm_pulli=4+503|tgc_ka=6+1592|tgc_pa=7+1370|tgm_pulli=7+503|tgc_pa=9+1370|tgc_tta=10+1566|tgm_pulli=10+503|tgc_tta=12+1566|tgm_u=12+1205]
diff --git a/test/shaping/data/in-house/tests/macos-10.13.6.tests b/test/shaping/data/in-house/tests/macos-10.13.6.tests
new file mode 100644
index 00000000..9d456d2d
--- /dev/null
+++ b/test/shaping/data/in-house/tests/macos-10.13.6.tests
@@ -0,0 +1,13 @@
+/System/Library/Fonts/Times.ttc at 896098b6979306ad84355025459f7c68b029139c::U+0066,U+0069:[fi=0+1139]
+/Library/Fonts/Khmer MN.ttc at 782ba6cf3fca0512ab348dfe08345a2d5dc5bf2c::U+17A2,U+1780,U+17D2,U+179F,U+179A,U+1781,U+17D2,U+1798,U+17C2,U+179A:[km_qa=0+1025|km_ka=1+1025|km_sa.sub=1+517|km_ro=4+593|km_vs_ae=5+605|km_kha=5+1025|km_mo.sub=5+0|km_ro=9+593]
+# The following is broken
+#/Library/Fonts/Tamil MN.ttc at 3de37f3f8f3cb6015b093fbd6e9d323daaf6fb1d::U+0BA4,U+0BCA,U+0B95,U+0BC1,U+0B95,U+0BCD,U+0B95,U+0BAA,U+0BCD,U+0BAA,U+0B9F,U+0BCD,U+0B9F,U+0BC1:[tgm_e=0+1702|tgc_ta=0+1598|tgm_aa=0+1074|tgc_ka=2 at -74,0+1518|tgm_u=2+1205|tgc_ka=4+1592|tgm_pulli=4+503|tgc_ka=6+1592|tgc_pa=7+1370|tgm_pulli=7+503|tgc_pa=9+1370|tgc_tta=10+1566|tgm_pulli=10+503|tgc_tta=12+1566|tgm_u=12+1205]
+/System/Library/Fonts/Times.ttc at 896098b6979306ad84355025459f7c68b029139c::U+0041,U+0066,U+0300,U+0066,U+0069,U+005A:[A=0+1479|f=1+682|gravecmb=1 at -480,588+0|fi=3+1139|Z=5+1251]
+/System/Library/Fonts/LucidaGrande.ttc at 63ba1b1de4709bd832ca76bd62368dd99fc34269::U+05E1,U+05B0:[shevahebrew=0 at -7,0+0|samekhhebrew=0+1361]
+# The following is broken
+#/Library/Fonts/Apple Chancery.ttf at 4ec49cba0d4e68d025ada0498c4df1b2f9fd57ac::U+0054,U+0068,U+0020,U+0074,U+0068,U+0020,U+006C,U+006C,U+0020,U+0074,U+0065,U+0020,U+0074,U+006F,U+0020,U+0074,U+0072,U+0020,U+0066,U+0072,U+0020,U+0066,U+0075,U+0020,U+0066,U+006A:[T_h=0+2308|space=2+569|t_h=3+1687|space=5+569|l_l=6+1108|space=8+569|t_e=9+1408|space=11+569|t_o=12+1531|space=14+569|t_r=15+1385|space=17+569|f_r=18+1432|space=20+569|f_u=21+1733|space=23+569|f_j=24+1073]
+/System/Library/Fonts/GeezaPro.ttc at ab26ea45dcaa5e1c5a958e42af10e10d330e7334::U+0627,U+0644,U+0623,U+064E,U+0628,U+0652,U+062C,U+064E,U+062F,U+0650,U+064A,U+064E,U+0651,U+0629,U+0640,U+0627,U+0644,U+0639,U+064E,U+0631,U+064E,U+0628,U+0650,U+064A,U+064E,U+0651,U+0629:[u0629.final.tehMarbuta=26+713|u064e_u0651.shaddaFatha=23 at 0,-200+0|u064a.medial.yeh=23+656|u0650.kasra=21 at 80,290+80|u0628.initial.beh=21 at -80,0+576|u064e.fatha=19 at 200,-570+200|u0631.final.reh=19 at -200,0+702|u064e.fatha=17 at 200,-200+200|u0639.medial.ain=17 at -200,0+738|u0644.initial.lam=16+515|u0627.final.alef=15+647|u0640.tatweel=14+449|u0629.final.tehMarbuta=13+713|u064e_u0651.shaddaFatha=10 at 0,-200+0|u064a.initial.yeh=10+656|u0650.kasra=8 at 80,570+80|u062f.final.dal=8 at -80,0+822|u064e.fatha=6 at 290,-160+290|u062c.medial.jeem=6 at -290,0+1069|u0652.sukun=4 at 0,-200+0|u0628.initial.beh=4+656|u064e.fatha=1 at -252,120+-252|u0644_u0623.isolated.lamHamzaOnAlef=1 at 120,0+1282|u0627.alef=0+647]
+/System/Library/Fonts/GeezaPro.ttc at ab26ea45dcaa5e1c5a958e42af10e10d330e7334::U+0628,U+064A,U+064E,U+0651,U+0629:[u0629.final.tehMarbuta=4+713|u064e_u0651.shaddaFatha=1 at 0,-200+0|u064a.medial.yeh=1+656|u0628.initial.beh=0+656]
+/System/Library/Fonts/GeezaPro.ttc at ab26ea45dcaa5e1c5a958e42af10e10d330e7334::U+0631,U+0628:[u0628.beh=1+1415|u0631.reh=0 at -202,0+700]
+/System/Library/Fonts/GeezaPro.ttc at ab26ea45dcaa5e1c5a958e42af10e10d330e7334::U+0628,U+064F:[u064f.damma=0 at 250,-250+250|u0628.beh=0 at -250,0+1165]
+/System/Library/Fonts/SFNSDisplay.ttf at c8948f464ff822a5f9bbf2e12d0e4e32268815aa::U+0056,U+0041,U+0056,U+0041:[gid332=0+1227|gid4=1 at -65,0+1162|gid332=2 at -65,0+1162|gid4=3 at -65,0+1227]


More information about the HarfBuzz mailing list