[HarfBuzz] harfbuzz: Branch 'master' - 8 commits
Behdad Esfahbod
behdad at kemper.freedesktop.org
Tue Nov 6 15:26:37 UTC 2018
src/hb-aat-layout.cc | 2 +-
src/hb-ot-layout.cc | 2 +-
test/api/Makefile.am | 2 +-
test/api/test-ot-name.c | 27 ++++++++++++++++++++++++---
test/fuzzing/Makefile.am | 2 ++
test/fuzzing/hb-shape-fuzzer.cc | 6 +++---
6 files changed, 32 insertions(+), 9 deletions(-)
New commits:
commit 8790b2740a334f1789fb0cf329f2b8ac9733793c
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Tue Nov 6 10:24:54 2018 -0500
[fuzzing] Fix test
diff --git a/test/fuzzing/hb-shape-fuzzer.cc b/test/fuzzing/hb-shape-fuzzer.cc
index ec69d514..70ad08b4 100644
--- a/test/fuzzing/hb-shape-fuzzer.cc
+++ b/test/fuzzing/hb-shape-fuzzer.cc
@@ -33,10 +33,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
hb_buffer_guess_segment_properties (buffer);
hb_shape (font, buffer, NULL, 0);
hb_buffer_destroy (buffer);
- }
- /* Misc calls on face. */
- test_face (face, text32[15]);
+ /* Misc calls on face. */
+ test_face (face, text32[15]);
+ }
hb_font_destroy (font);
hb_face_destroy (face);
commit 3af0a7edd0c99aaef846ae787056d7664bc69d35
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Tue Nov 6 10:20:57 2018 -0500
[fuzzing] Add make check-valgrind
diff --git a/test/fuzzing/Makefile.am b/test/fuzzing/Makefile.am
index 25060886..54178ff4 100644
--- a/test/fuzzing/Makefile.am
+++ b/test/fuzzing/Makefile.am
@@ -68,5 +68,7 @@ hb_subset_fuzzer_DEPENDENCIES = \
check:
EXEEXT="$(EXEEXT)" srcdir="$(srcdir)" builddir="$(builddir)" $(srcdir)/run-shape-fuzzer-tests.py
EXEEXT="$(EXEEXT)" srcdir="$(srcdir)" builddir="$(builddir)" $(srcdir)/run-subset-fuzzer-tests.py
+check-valgrind:
+ $(AM_V_at)RUN_VALGRIND=1 $(MAKE) $(AM_MAKEFLGS) check
-include $(top_srcdir)/git.mk
commit b062378ce640eb418cb413b595b79cc81a193209
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Tue Nov 6 10:20:36 2018 -0500
[test] Minor
diff --git a/test/api/.valgrind-suppressions b/test/api/.valgrind-suppressions
deleted file mode 100644
index e69de29b..00000000
diff --git a/test/api/Makefile.am b/test/api/Makefile.am
index b307cd12..e6e08a25 100644
--- a/test/api/Makefile.am
+++ b/test/api/Makefile.am
@@ -148,7 +148,7 @@ check-gtester:
# Check tests under valgrind. Saves log to log-valgrind.txt
VALGRIND_FLAGS = \
- --tool=memcheck --suppressions=$(srcdir)/.valgrind-suppressions \
+ --tool=memcheck
--track-origins=yes \
--leak-check=yes
$(EXTRA_VALGRIND_FLAGS)
commit 37f421c951c853dff165df6731d0ab9c46350790
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Tue Nov 6 10:03:38 2018 -0500
Minor
diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc
index 34d5729c..6da1d3fd 100644
--- a/src/hb-ot-layout.cc
+++ b/src/hb-ot-layout.cc
@@ -183,7 +183,7 @@ _hb_ot_blacklist_gdef (unsigned int gdef_len,
return false;
}
-HB_INTERNAL void
+void
OT::GDEF::accelerator_t::init (hb_face_t *face)
{
this->blob = hb_sanitize_context_t().reference_table<GDEF> (face);
commit b6112e5ea4d08fcbfa8f7cb4ef3903514a6e99f3
Author: Ebrahim Byagowi <ebrahim at gnu.org>
Date: Tue Nov 6 11:42:47 2018 +0330
[test] Fix -Weverything bot complain
diff --git a/test/api/test-ot-name.c b/test/api/test-ot-name.c
index c844f48e..71a8727b 100644
--- a/test/api/test-ot-name.c
+++ b/test/api/test-ot-name.c
@@ -27,7 +27,7 @@
#include <hb-ot.h>
-hb_face_t *face;
+static hb_face_t *face;
static void
test_ot_layout_feature_get_name_ids_and_characters (void)
commit a49df419f04b4065fc7f70a77c5cbc453e6ba906
Author: Ebrahim Byagowi <ebrahim at gnu.org>
Date: Tue Nov 6 11:26:30 2018 +0330
[test] Test hb_ot_name_{list_names,get_utf8} on test-ot-name
diff --git a/test/api/test-ot-name.c b/test/api/test-ot-name.c
index 431ee3a2..c844f48e 100644
--- a/test/api/test-ot-name.c
+++ b/test/api/test-ot-name.c
@@ -27,10 +27,11 @@
#include <hb-ot.h>
+hb_face_t *face;
+
static void
test_ot_layout_feature_get_name_ids_and_characters (void)
{
- hb_face_t *face = hb_test_open_font_file ("fonts/cv01.otf");
hb_tag_t cv01 = HB_TAG ('c','v','0','1');
unsigned int feature_index;
if (!hb_ot_layout_language_find_feature (face,
@@ -68,8 +69,24 @@ test_ot_layout_feature_get_name_ids_and_characters (void)
g_assert_cmpint (char_count, ==, 2);
g_assert_cmpint (characters[0], ==, 10);
g_assert_cmpint (characters[1], ==, 24030);
+}
- hb_face_destroy (face);
+static void
+test_ot_name (void)
+{
+ unsigned int num_entries;
+ const hb_ot_name_entry_t *entries;
+ entries = hb_ot_name_list_names (face, &num_entries);
+ g_assert_cmpuint (12, ==, num_entries);
+ hb_ot_name_id_t name_id = entries[3].name_id;
+ g_assert_cmpuint (3, ==, name_id);
+ hb_language_t lang = entries[3].language;
+ g_assert_cmpstr ("en", ==, hb_language_to_string (lang));
+ char text[10];
+ unsigned int text_size = 10;
+ g_assert_cmpuint (27, ==, hb_ot_name_get_utf8 (face, name_id, lang, &text_size, text));
+ g_assert_cmpuint (9, ==, text_size);
+ g_assert_cmpstr (text, ==, "FontForge");
}
int
@@ -78,6 +95,10 @@ main (int argc, char **argv)
g_test_init (&argc, &argv, NULL);
hb_test_add (test_ot_layout_feature_get_name_ids_and_characters);
+ hb_test_add (test_ot_name);
- return hb_test_run ();
+ face = hb_test_open_font_file ("fonts/cv01.otf");
+ unsigned int status = hb_test_run ();
+ hb_face_destroy (face);
+ return status;
}
commit 9139cc23ea9fb339be9426860e0c72038d32a2ab
Author: Ebrahim Byagowi <ebrahim at gnu.org>
Date: Tue Nov 6 11:17:14 2018 +0330
Fix link issue of some of the bots
e.g. https://circleci.com/gh/harfbuzz/harfbuzz/52410
diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc
index 1b366eb7..34d5729c 100644
--- a/src/hb-ot-layout.cc
+++ b/src/hb-ot-layout.cc
@@ -183,7 +183,7 @@ _hb_ot_blacklist_gdef (unsigned int gdef_len,
return false;
}
-inline void
+HB_INTERNAL void
OT::GDEF::accelerator_t::init (hb_face_t *face)
{
this->blob = hb_sanitize_context_t().reference_table<GDEF> (face);
commit 98b37f0c109d0f7454e91c9563c56d1903d6d496
Author: Ebrahim Byagowi <ebrahim at gnu.org>
Date: Tue Nov 6 09:16:28 2018 +0330
[mort] Fix table detection logic
mort really needs some initial tests at least.
diff --git a/src/hb-aat-layout.cc b/src/hb-aat-layout.cc
index 1912de0d..5a4e227c 100644
--- a/src/hb-aat-layout.cc
+++ b/src/hb-aat-layout.cc
@@ -196,7 +196,7 @@ hb_aat_layout_compile_map (const hb_aat_map_builder_t *mapper,
hb_bool_t
hb_aat_layout_has_substitution (hb_face_t *face)
{
- return face->table.morx->has_data ();
+ return face->table.morx->has_data () ||
face->table.mort->has_data ();
}
More information about the HarfBuzz
mailing list