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

Behdad Esfahbod behdad at kemper.freedesktop.org
Mon Feb 12 01:49:46 UTC 2018


 .circleci/config.yml        |    6 ++++--
 docs/harfbuzz-sections.txt  |    4 ++++
 src/hb-gobject-structs.h    |    4 ++--
 src/hb-open-type-private.hh |    8 +++++++-
 src/hb-ot-cmap-table.hh     |    9 ++++-----
 src/hb-ot-layout.cc         |    2 ++
 src/hb-private.hh           |    4 +---
 src/hb-subset-plan.cc       |    2 +-
 test/subset/CMakeLists.txt  |    8 ++++----
 test/subset/run-tests.py    |    1 +
 10 files changed, 30 insertions(+), 18 deletions(-)

New commits:
commit b5f25844fbdd3167051c8d3586b404ae7f077b3b
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Sun Feb 11 19:49:18 2018 -0600

    [docs] Minor update

diff --git a/docs/harfbuzz-sections.txt b/docs/harfbuzz-sections.txt
index 1e1afb39..a9b4d53e 100644
--- a/docs/harfbuzz-sections.txt
+++ b/docs/harfbuzz-sections.txt
@@ -327,7 +327,9 @@ HB_GOBJECT_TYPE_GLYPH_FLAGS
 HB_GOBJECT_TYPE_MEMORY_MODE
 HB_GOBJECT_TYPE_OT_LAYOUT_GLYPH_CLASS
 HB_GOBJECT_TYPE_OT_MATH_CONSTANT
+HB_GOBJECT_TYPE_OT_MATH_GLYPH_PART
 HB_GOBJECT_TYPE_OT_MATH_GLYPH_PART_FLAGS
+HB_GOBJECT_TYPE_OT_MATH_GLYPH_VARIANT
 HB_GOBJECT_TYPE_OT_MATH_KERN
 HB_GOBJECT_TYPE_SCRIPT
 HB_GOBJECT_TYPE_SHAPE_PLAN
@@ -356,7 +358,9 @@ hb_gobject_glyph_flags_get_type
 hb_gobject_memory_mode_get_type
 hb_gobject_ot_layout_glyph_class_get_type
 hb_gobject_ot_math_constant_get_type
+hb_gobject_ot_math_glyph_part_get_type
 hb_gobject_ot_math_glyph_part_flags_get_type
+hb_gobject_ot_math_glyph_variant_get_type
 hb_gobject_ot_math_kern_get_type
 hb_gobject_script_get_type
 hb_gobject_shape_plan_get_type
commit 41906cd5efc2fe17f5fff3fa5fe8488e0cdc6399
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Sun Feb 11 19:46:06 2018 -0600

    [subset] Another fixup
    
    I broke this in c31fcf4c58d96eb7d9781a986991b1a79ac7be44

diff --git a/src/hb-ot-cmap-table.hh b/src/hb-ot-cmap-table.hh
index a2a6f8ba..030b822b 100644
--- a/src/hb-ot-cmap-table.hh
+++ b/src/hb-ot-cmap-table.hh
@@ -590,7 +590,7 @@ struct cmap
 
   hb_blob_t * subset (hb_subset_plan_t *plan, hb_face_t *source) const
   {
-    hb_prealloced_array_t<CmapSubtableLongGroup> groups;
+    hb_auto_array_t<CmapSubtableLongGroup> groups;
 
     populate_groups(plan->codepoints, &groups);
 
diff --git a/test/subset/run-tests.py b/test/subset/run-tests.py
index fe9582a7..faf61595 100755
--- a/test/subset/run-tests.py
+++ b/test/subset/run-tests.py
@@ -42,6 +42,7 @@ def run_test(test):
 		    "--font-file=" + test.font_path,
 		    "--output-file=" + out_file,
 		    "--unicodes=%s" % test.unicodes()]
+	print (' '.join(cli_args))
 	_, return_code = cmd(cli_args)
 
 	if return_code:
commit cd32177a322b5fd70c92f67f21b64686bf5d5533
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Sun Feb 11 19:34:05 2018 -0600

    Try at fixing multiple-definition of NullPool
    
    If we don't have visibility, make NullPool static.

diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh
index ef49ea91..e5bea337 100644
--- a/src/hb-open-type-private.hh
+++ b/src/hb-open-type-private.hh
@@ -134,7 +134,13 @@ static inline Type& StructAfter(TObject &X)
 
 #define HB_NULL_POOL_SIZE 264
 static_assert (HB_NULL_POOL_SIZE % sizeof (void *) == 0, "Align HB_NULL_POOL_SIZE.");
-extern HB_INTERNAL const void * const _hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)];
+
+#ifdef HB_NO_VISIBILITY
+static
+#else
+extern HB_INTERNAL
+#endif
+const void * const _hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)];
 
 /* Generic nul-content Null objects. */
 template <typename Type>
diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc
index 8ad36d22..4cf6c722 100644
--- a/src/hb-ot-layout.cc
+++ b/src/hb-ot-layout.cc
@@ -40,7 +40,9 @@
 #include "hb-ot-map-private.hh"
 
 
+#ifndef HB_NO_VISIBILITY
 const void * const OT::_hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
+#endif
 
 
 hb_ot_layout_t *
diff --git a/src/hb-private.hh b/src/hb-private.hh
index 4a8d950d..a516624a 100644
--- a/src/hb-private.hh
+++ b/src/hb-private.hh
@@ -120,9 +120,7 @@ extern "C" void  hb_free_impl(void *ptr);
 #endif
 
 #ifndef HB_INTERNAL
-# ifdef __SUNPRO_CC
-#  define HB_INTERNAL __hidden
-# elif !defined(__MINGW32__) && !defined(__CYGWIN__)
+# if !defined(HB_NO_VISIBILITY) && !defined(__MINGW32__) && !defined(__CYGWIN__)
 #  define HB_INTERNAL __attribute__((__visibility__("hidden")))
 # else
 #  define HB_INTERNAL
commit 3d421ce30713582484471baba76470c84dabc118
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Sun Feb 11 19:01:44 2018 -0600

    [subset] Use auto_array_t where it does make sense
    
    Better fix for https://github.com/harfbuzz/harfbuzz/pull/775

diff --git a/src/hb-subset-plan.cc b/src/hb-subset-plan.cc
index 95d4aeb9..a06d38ae 100644
--- a/src/hb-subset-plan.cc
+++ b/src/hb-subset-plan.cc
@@ -75,8 +75,7 @@ _populate_gids_to_retain (hb_face_t *face,
   OT::cmap::accelerator_t cmap;
   cmap.init (face);
 
-  hb_prealloced_array_t<unsigned int> bad_indices;
-  bad_indices.init ();
+  hb_auto_array_t<unsigned int> bad_indices;
 
   old_gids.alloc (codepoints.len);
   bool has_zero = false;
commit 9aa2eb61e6cb3e4308140bed8a8531877ffd6adf
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Sun Feb 11 19:00:42 2018 -0600

    Minor

diff --git a/src/hb-ot-cmap-table.hh b/src/hb-ot-cmap-table.hh
index 70a9f647..a2a6f8ba 100644
--- a/src/hb-ot-cmap-table.hh
+++ b/src/hb-ot-cmap-table.hh
@@ -61,7 +61,7 @@ struct CmapSubtableFormat0
   HBUINT16	format;		/* Format number is set to 0. */
   HBUINT16	lengthZ;	/* Byte length of this subtable. */
   HBUINT16	languageZ;	/* Ignore. */
-  HBUINT8		glyphIdArray[256];/* An array that maps character
+  HBUINT8	glyphIdArray[256];/* An array that maps character
 				 * code to glyph index values. */
   public:
   DEFINE_SIZE_STATIC (6 + 256);
@@ -278,7 +278,8 @@ struct CmapSubtableLongSegmented
     TRACE_SERIALIZE (this);
     if (unlikely(!context->extend_min (*this))) return_trace (false);
     if (unlikely(!groups.serialize(context, group_count))) return_trace (false);
-    for (unsigned int i = 0; i < group_count; i++) {
+    for (unsigned int i = 0; i < group_count; i++)
+    {
       const CmapSubtableLongGroup &group = group_supplier[i];
       memcpy(&groups[i], &group, sizeof(group));
     }
@@ -581,9 +582,7 @@ struct cmap
 
     OT::Supplier<CmapSubtableLongGroup> group_supplier  (&groups[0], groups.len, sizeof (CmapSubtableLongGroup));
     if (unlikely(!format12.serialize(&context, groups.len, group_supplier)))
-    {
       return false;
-    }
 
     context.end_serialize ();
     return true;
commit ae6d0259b4f075885070f833d0f2a96333bf4af3
Author: Ebrahim Byagowi <ebrahim at gnu.org>
Date:   Sun Feb 11 15:40:55 2018 +0330

    Install fonttools on two bots and enable cmake hb-subset test (#777)

diff --git a/.circleci/config.yml b/.circleci/config.yml
index 11ca1d7a..c90ef4c4 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -7,7 +7,8 @@ jobs:
       - image: ubuntu:17.10
     steps:
       - checkout
-      - run: apt update && apt install -y ninja-build binutils libtool autoconf automake make cmake gcc g++ pkg-config ragel gtk-doc-tools libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev
+      - run: apt update && apt install -y ninja-build binutils libtool autoconf automake make cmake gcc g++ pkg-config ragel gtk-doc-tools libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev python python-pip
+      - run: pip install fonttools
       - run: ./autogen.sh && make distcheck && rm -rf harfbuzz-*
       - run: make distdir && cd harfbuzz-* && cmake -DHB_CHECK=ON -Bbuild -H. -GNinja && ninja -Cbuild && CTEST_OUTPUT_ON_FAILURE=1 ninja -Cbuild test && ninja -Cbuild install
 
@@ -43,7 +44,8 @@ jobs:
       - image: ubuntu:17.10
     steps:
       - checkout
-      - run: apt update && apt install -y ninja-build binutils cmake gcc g++ pkg-config ragel gtk-doc-tools libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev
+      - run: apt update && apt install -y ninja-build binutils cmake gcc g++ pkg-config ragel gtk-doc-tools libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev python python-pip
+      - run: pip install fonttools
       - run: cmake -DHB_CHECK=ON -Bbuild -H. -GNinja
       - run: ninja -Cbuild
       - run: CTEST_OUTPUT_ON_FAILURE=1 ninja -Cbuild test
diff --git a/test/subset/CMakeLists.txt b/test/subset/CMakeLists.txt
index 6fe377e1..ea04105c 100644
--- a/test/subset/CMakeLists.txt
+++ b/test/subset/CMakeLists.txt
@@ -2,9 +2,9 @@ if (HB_BUILD_UTILS)
   file (READ "${CMAKE_CURRENT_SOURCE_DIR}/data/Makefile.sources" SOURCES)
   extract_make_variable (TESTS ${SOURCES})
   foreach (test IN ITEMS ${TESTS})
-# TODO(grieger): Re-enable once ttx is available in CI environments.
-#    add_test (NAME ${test}
-#      COMMAND python run-tests.py $<TARGET_FILE:hb-subset> "data/${test}"
-#      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+    add_test (NAME ${test}
+      COMMAND python run-tests.py $<TARGET_FILE:hb-subset> "data/${test}"
+      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+    set_property(TEST ${test} PROPERTY SKIP_RETURN_CODE 77)
   endforeach ()
 endif ()
commit c8d4c2e32f1cea610a9c91dc6b0c32e9ffe84f20
Author: Ebrahim Byagowi <ebrahim at gnu.org>
Date:   Sun Feb 11 13:15:44 2018 +0330

    Initialize bad_indices on hb-subset (#775)

diff --git a/src/hb-subset-plan.cc b/src/hb-subset-plan.cc
index 7f4448bf..95d4aeb9 100644
--- a/src/hb-subset-plan.cc
+++ b/src/hb-subset-plan.cc
@@ -76,6 +76,7 @@ _populate_gids_to_retain (hb_face_t *face,
   cmap.init (face);
 
   hb_prealloced_array_t<unsigned int> bad_indices;
+  bad_indices.init ();
 
   old_gids.alloc (codepoints.len);
   bool has_zero = false;
commit 5845e5ca3bac21c0b03e71eab282b02fb7e868a4
Author: Ebrahim Byagowi <ebrahim at gnu.org>
Date:   Sun Feb 11 12:03:33 2018 +0330

    fix gobject compile issue (#773)

diff --git a/src/hb-gobject-structs.h b/src/hb-gobject-structs.h
index 3b057d56..a34b06ab 100644
--- a/src/hb-gobject-structs.h
+++ b/src/hb-gobject-structs.h
@@ -112,10 +112,10 @@ HB_EXTERN GType hb_gobject_user_data_key_get_type (void);
 #define HB_GOBJECT_TYPE_USER_DATA_KEY (hb_gobject_user_data_key_get_type ())
 
 HB_EXTERN GType hb_gobject_ot_math_glyph_variant_get_type (void);
-#define HB_GOBJECT_TYPE_USER_DATA_KEY (hb_gobject_ot_math_glyph_variant_get_type ())
+#define HB_GOBJECT_TYPE_OT_MATH_GLYPH_VARIANT (hb_gobject_ot_math_glyph_variant_get_type ())
 
 HB_EXTERN GType hb_gobject_ot_math_glyph_part_get_type (void);
-#define HB_GOBJECT_TYPE_USER_DATA_KEY (hb_gobject_ot_math_glyph_part_get_type ())
+#define HB_GOBJECT_TYPE_OT_MATH_GLYPH_PART (hb_gobject_ot_math_glyph_part_get_type ())
 
 
 HB_END_DECLS


More information about the HarfBuzz mailing list