src/hb-open-file.hh                                |   18 ++++++------------
 test/shaping/data/in-house/Makefile.sources        |    1 +
 test/shaping/data/in-house/fonts/TestDFONT.dfont   |binary
 test/shaping/data/in-house/fonts/TestTTC.ttc       |binary
 test/shaping/data/in-house/tests/collections.tests |    6 ++++++
 5 files changed, 13 insertions(+), 12 deletions(-)

New commits:
commit d5c509272f2fbd1b4c56e3b530da7e42e7f03901
Author: Behdad Esfahbod <beh...@behdad.org>
Date:   Tue Sep 11 17:18:21 2018 +0200

    [dfont] Fix test expecatation and minor touch up
    
    I have no way to authoritatively know, but looks like test font only has one
    face.  So, adjust test expectation instead.

diff --git a/src/hb-open-file.hh b/src/hb-open-file.hh
index 608de0a9..39c6aeb8 100644
--- a/src/hb-open-file.hh
+++ b/src/hb-open-file.hh
@@ -300,7 +300,7 @@ struct ResourceRefItem
 
   HBINT16      id;             /* Resource ID, is really should be signed? */
   HBINT16      nameOffset;     /* Offset from beginning of resource name list
-                                * to resource name, minus means there is no */
+                                * to resource name, minus means there is none. 
*/
   HBUINT8      attr;           /* Resource attributes */
   HBUINT24     dataOffset;     /* Offset from beginning of resource data to
                                 * data for this resource */
@@ -318,15 +318,9 @@ struct ResourceTypeItem
     return_trace (likely (c->check_struct (this)));
   }
 
-  inline unsigned int get_resource_count () const
-  {
-    return numRes + 1;
-  }
+  inline unsigned int get_resource_count () const { return numRes + 1; }
 
-  inline bool is_sfnt () const
-  {
-    return type == HB_TAG ('s','f','n','t');
-  }
+  inline bool is_sfnt () const { return type == HB_TAG ('s','f','n','t'); }
 
   inline const ResourceRefItem& get_ref_item (const void *base,
                                              unsigned int i) const
@@ -335,11 +329,11 @@ struct ResourceTypeItem
   }
 
   protected:
-  Tag          type;           /* Resource type */
-  HBUINT16     numRes;         /* Number of resource this type in map minus 1 
*/
+  Tag          type;           /* Resource type. */
+  HBUINT16     numRes;         /* Number of resources minus 1. */
   OffsetTo<UnsizedArrayOf<ResourceRefItem> >
                refList;        /* Offset from beginning of resource type list
-                                * to reference list for this type */
+                                * to reference item list for this type. */
   public:
   DEFINE_SIZE_STATIC (8);
 };
diff --git a/test/shaping/data/in-house/tests/collections.tests 
b/test/shaping/data/in-house/tests/collections.tests
index d9ecdabb..85653c54 100644
--- a/test/shaping/data/in-house/tests/collections.tests
+++ b/test/shaping/data/in-house/tests/collections.tests
@@ -1,5 +1,5 @@
 ../fonts/TestDFONT.dfont:--face-index=0 
--font-funcs=ot:U+2026,U+0020,U+002E:[ellipsis=0+723|space=1+250|period=2+241]
-../fonts/TestDFONT.dfont:--face-index=1 
--font-funcs=ot:U+2026,U+0020,U+002E:[ellipsis=0+723|space=1+250|period=2+241]
+../fonts/TestDFONT.dfont:--face-index=1 
--font-funcs=ot:U+2026,U+0020,U+002E:[gid0=0+1000|gid0=1+1000|gid0=2+1000]
 ../fonts/TestDFONT.dfont:--face-index=2 
--font-funcs=ot:U+2026,U+0020,U+002E:[gid0=0+1000|gid0=1+1000|gid0=2+1000]
 ../fonts/TestTTC.ttc:--face-index=0 
--font-funcs=ot:U+2026,U+0020,U+002E:[ellipsis=0+723|space=1+250|period=2+241]
 ../fonts/TestTTC.ttc:--face-index=1 
--font-funcs=ot:U+2026,U+0020,U+002E:[ellipsis=0+723|space=1+250|period=2+241]
commit 2b2ed1e536061cfd3a0f29522118f42b451678bd
Author: Ebrahim Byagowi <ebra...@gnu.org>
Date:   Mon Jul 2 17:26:43 2018 +0430

    [dfont] Add test

diff --git a/test/shaping/data/in-house/Makefile.sources 
b/test/shaping/data/in-house/Makefile.sources
index 1bb8604e..c0b85f2f 100644
--- a/test/shaping/data/in-house/Makefile.sources
+++ b/test/shaping/data/in-house/Makefile.sources
@@ -6,6 +6,7 @@ TESTS = \
        tests/arabic-stch.tests \
        tests/automatic-fractions.tests \
        tests/cluster.tests \
+       tests/collections.tests \
        tests/color-fonts.tests \
        tests/context-matching.tests \
        tests/cursive-positioning.tests \
diff --git a/test/shaping/data/in-house/fonts/TestDFONT.dfont 
b/test/shaping/data/in-house/fonts/TestDFONT.dfont
new file mode 100644
index 00000000..a6ea7009
Binary files /dev/null and b/test/shaping/data/in-house/fonts/TestDFONT.dfont 
differ
diff --git a/test/shaping/data/in-house/fonts/TestTTC.ttc 
b/test/shaping/data/in-house/fonts/TestTTC.ttc
new file mode 100644
index 00000000..a21fe89d
Binary files /dev/null and b/test/shaping/data/in-house/fonts/TestTTC.ttc differ
diff --git a/test/shaping/data/in-house/tests/collections.tests 
b/test/shaping/data/in-house/tests/collections.tests
new file mode 100644
index 00000000..d9ecdabb
--- /dev/null
+++ b/test/shaping/data/in-house/tests/collections.tests
@@ -0,0 +1,6 @@
+../fonts/TestDFONT.dfont:--face-index=0 
--font-funcs=ot:U+2026,U+0020,U+002E:[ellipsis=0+723|space=1+250|period=2+241]
+../fonts/TestDFONT.dfont:--face-index=1 
--font-funcs=ot:U+2026,U+0020,U+002E:[ellipsis=0+723|space=1+250|period=2+241]
+../fonts/TestDFONT.dfont:--face-index=2 
--font-funcs=ot:U+2026,U+0020,U+002E:[gid0=0+1000|gid0=1+1000|gid0=2+1000]
+../fonts/TestTTC.ttc:--face-index=0 
--font-funcs=ot:U+2026,U+0020,U+002E:[ellipsis=0+723|space=1+250|period=2+241]
+../fonts/TestTTC.ttc:--face-index=1 
--font-funcs=ot:U+2026,U+0020,U+002E:[ellipsis=0+723|space=1+250|period=2+241]
+../fonts/TestTTC.ttc:--face-index=2 
--font-funcs=ot:U+2026,U+0020,U+002E:[gid0=0+1000|gid0=1+1000|gid0=2+1000]
_______________________________________________
HarfBuzz mailing list
HarfBuzz@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/harfbuzz

Reply via email to