[HarfBuzz] harfbuzz: Branch 'master' - 5 commits
Behdad Esfahbod
behdad at kemper.freedesktop.org
Tue Jan 30 19:01:24 UTC 2018
.travis.yml | 2
CMakeLists.txt | 40 ++++++----
src/check-defs.sh | 4 -
src/check-libstdc++.sh | 13 ++-
src/hb-aat-layout-common-private.hh | 33 --------
test/shaping/data/text-rendering-tests/DISABLED | 7 +
test/shaping/data/text-rendering-tests/Makefile.sources | 7 +
test/shaping/data/text-rendering-tests/fonts/TestMORXEighteen.ttf |binary
test/shaping/data/text-rendering-tests/fonts/TestMORXSeventeen.ttf |binary
test/shaping/data/text-rendering-tests/fonts/TestMORXSixteen.ttf |binary
test/shaping/data/text-rendering-tests/fonts/TestMORXTwenty.ttf |binary
test/shaping/data/text-rendering-tests/fonts/TestMORXTwentyone.ttf |binary
test/shaping/data/text-rendering-tests/fonts/TestMORXTwentytwo.ttf |binary
test/shaping/data/text-rendering-tests/tests/MORX-14.tests | 1
test/shaping/data/text-rendering-tests/tests/MORX-16.tests | 1
test/shaping/data/text-rendering-tests/tests/MORX-17.tests | 1
test/shaping/data/text-rendering-tests/tests/MORX-18.tests | 4 +
test/shaping/data/text-rendering-tests/tests/MORX-19.tests | 2
test/shaping/data/text-rendering-tests/tests/MORX-20.tests | 7 +
test/shaping/data/text-rendering-tests/tests/MORX-21.tests | 1
test/shaping/data/text-rendering-tests/tests/MORX-22.tests | 1
21 files changed, 72 insertions(+), 52 deletions(-)
New commits:
commit e89df6e1aee9cb6fe1268643ce19816808baf0c4
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Tue Jan 30 10:58:44 2018 -0800
[aat] Limit number of DontAdvance transitions
Remove the faulty loop-detection logic. Use max-ops for breaking
out of infinite loops or heavy work.
https://twitter.com/behdadesfahbod/status/958065026262183936
diff --git a/src/hb-aat-layout-common-private.hh b/src/hb-aat-layout-common-private.hh
index d62bafc5..b5395bba 100644
--- a/src/hb-aat-layout-common-private.hh
+++ b/src/hb-aat-layout-common-private.hh
@@ -615,13 +615,7 @@ struct StateTableDriver
machine (machine_),
buffer (buffer_),
num_glyphs (face_->get_num_glyphs ()),
- last_zero (0),
- dont_advance_set (nullptr) {}
-
- inline ~StateTableDriver (void)
- {
- hb_set_destroy (dont_advance_set);
- }
+ last_zero (0) {}
template <typename context_t>
inline void drive (context_t *c)
@@ -648,27 +642,7 @@ struct StateTableDriver
if (unlikely (!c->transition (this, entry)))
break;
- if (entry->flags & context_t::DontAdvance)
- {
- if (!last_was_dont_advance)
- {
- if (dont_advance_set)
- dont_advance_set->clear ();
- else
- dont_advance_set = hb_set_create ();
- }
-
- unsigned int key = info[buffer->idx].codepoint ^ (state << 16);
- if (likely (!dont_advance_set->has (key)))
- {
- dont_advance_set->add (key);
- last_was_dont_advance = true;
- }
- else
- last_was_dont_advance = false;
- }
- else
- last_was_dont_advance = false;
+ last_was_dont_advance = (entry->flags & context_t::DontAdvance) && buffer->max_ops--;
state = entry->newState;
@@ -692,9 +666,6 @@ struct StateTableDriver
hb_buffer_t *buffer;
unsigned int num_glyphs;
unsigned int last_zero;
-
- private:
- hb_set_t *dont_advance_set; /* Infinite-loop detection */
};
commit e00743b47d25a2487b7f232a514a042e2962a089
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Mon Jan 29 10:07:05 2018 -0800
[test/text-rendering-tests] Update from upstream
diff --git a/test/shaping/data/text-rendering-tests/DISABLED b/test/shaping/data/text-rendering-tests/DISABLED
index 45b8510a..1439d43f 100644
--- a/test/shaping/data/text-rendering-tests/DISABLED
+++ b/test/shaping/data/text-rendering-tests/DISABLED
@@ -16,6 +16,13 @@ tests/MORX-11.tests
tests/MORX-12.tests
tests/MORX-13.tests
tests/MORX-14.tests
+tests/MORX-16.tests
+tests/MORX-17.tests
+tests/MORX-18.tests
+tests/MORX-19.tests
+tests/MORX-20.tests
+tests/MORX-21.tests
+tests/MORX-22.tests
# Rounding differences
tests/SHARAN-1.tests
diff --git a/test/shaping/data/text-rendering-tests/Makefile.sources b/test/shaping/data/text-rendering-tests/Makefile.sources
index 311812c7..c28487f8 100644
--- a/test/shaping/data/text-rendering-tests/Makefile.sources
+++ b/test/shaping/data/text-rendering-tests/Makefile.sources
@@ -39,6 +39,13 @@ DISBALED_TESTS = \
tests/MORX-12.tests \
tests/MORX-13.tests \
tests/MORX-14.tests \
+ tests/MORX-16.tests \
+ tests/MORX-17.tests \
+ tests/MORX-18.tests \
+ tests/MORX-19.tests \
+ tests/MORX-20.tests \
+ tests/MORX-21.tests \
+ tests/MORX-22.tests \
tests/MORX-1.tests \
tests/MORX-2.tests \
tests/MORX-3.tests \
diff --git a/test/shaping/data/text-rendering-tests/fonts/TestMORXEighteen.ttf b/test/shaping/data/text-rendering-tests/fonts/TestMORXEighteen.ttf
new file mode 100644
index 00000000..91c364f3
Binary files /dev/null and b/test/shaping/data/text-rendering-tests/fonts/TestMORXEighteen.ttf differ
diff --git a/test/shaping/data/text-rendering-tests/fonts/TestMORXSeventeen.ttf b/test/shaping/data/text-rendering-tests/fonts/TestMORXSeventeen.ttf
new file mode 100644
index 00000000..9dd3a844
Binary files /dev/null and b/test/shaping/data/text-rendering-tests/fonts/TestMORXSeventeen.ttf differ
diff --git a/test/shaping/data/text-rendering-tests/fonts/TestMORXSixteen.ttf b/test/shaping/data/text-rendering-tests/fonts/TestMORXSixteen.ttf
new file mode 100644
index 00000000..e34e1fec
Binary files /dev/null and b/test/shaping/data/text-rendering-tests/fonts/TestMORXSixteen.ttf differ
diff --git a/test/shaping/data/text-rendering-tests/fonts/TestMORXTwenty.ttf b/test/shaping/data/text-rendering-tests/fonts/TestMORXTwenty.ttf
new file mode 100644
index 00000000..769e29bc
Binary files /dev/null and b/test/shaping/data/text-rendering-tests/fonts/TestMORXTwenty.ttf differ
diff --git a/test/shaping/data/text-rendering-tests/fonts/TestMORXTwentyone.ttf b/test/shaping/data/text-rendering-tests/fonts/TestMORXTwentyone.ttf
new file mode 100644
index 00000000..41016804
Binary files /dev/null and b/test/shaping/data/text-rendering-tests/fonts/TestMORXTwentyone.ttf differ
diff --git a/test/shaping/data/text-rendering-tests/fonts/TestMORXTwentytwo.ttf b/test/shaping/data/text-rendering-tests/fonts/TestMORXTwentytwo.ttf
new file mode 100644
index 00000000..4459e8a7
Binary files /dev/null and b/test/shaping/data/text-rendering-tests/fonts/TestMORXTwentytwo.ttf differ
diff --git a/test/shaping/data/text-rendering-tests/tests/MORX-14.tests b/test/shaping/data/text-rendering-tests/tests/MORX-14.tests
index bff742f3..13692476 100644
--- a/test/shaping/data/text-rendering-tests/tests/MORX-14.tests
+++ b/test/shaping/data/text-rendering-tests/tests/MORX-14.tests
@@ -1 +1,2 @@
../fonts/TestMORXFourteen.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0041,U+0042,U+0043,U+0044,U+0045:[B|C at 626,0|D at 1222,0|E at 1896,0|A at 2452,0]
+../fonts/TestMORXFourteen.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0041,U+0042,U+0042,U+0042,U+0043,U+0043,U+0043,U+0044,U+0044,U+0044,U+0042,U+0043,U+0044,U+0043,U+0045:[B|B at 626,0|B at 1252,0|C at 1878,0|C at 2474,0|C at 3070,0|D at 3666,0|D at 4340,0|D at 5014,0|B at 5688,0|C at 6314,0|D at 6910,0|C at 7584,0|E at 8180,0|A at 8736,0]
diff --git a/test/shaping/data/text-rendering-tests/tests/MORX-16.tests b/test/shaping/data/text-rendering-tests/tests/MORX-16.tests
new file mode 100644
index 00000000..ce0d5b2f
--- /dev/null
+++ b/test/shaping/data/text-rendering-tests/tests/MORX-16.tests
@@ -0,0 +1 @@
+../fonts/TestMORXSixteen.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0041,U+0042,U+0043,U+0044,U+0045:[B|C at 626,0|D at 1222,0|E at 1896,0|A at 2452,0]
diff --git a/test/shaping/data/text-rendering-tests/tests/MORX-17.tests b/test/shaping/data/text-rendering-tests/tests/MORX-17.tests
new file mode 100644
index 00000000..6e1c94c4
--- /dev/null
+++ b/test/shaping/data/text-rendering-tests/tests/MORX-17.tests
@@ -0,0 +1 @@
+../fonts/TestMORXSeventeen.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0041,U+0042:[B|A at 626,0]
diff --git a/test/shaping/data/text-rendering-tests/tests/MORX-18.tests b/test/shaping/data/text-rendering-tests/tests/MORX-18.tests
new file mode 100644
index 00000000..b032a76f
--- /dev/null
+++ b/test/shaping/data/text-rendering-tests/tests/MORX-18.tests
@@ -0,0 +1,4 @@
+../fonts/TestMORXEighteen.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0041,U+0042,U+0043,U+0044,U+0045:[A|B.alt at 639,0|C at 1639,0|D.alt1 at 2235,0|E at 3235,0]
+../fonts/TestMORXEighteen.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0041,U+0042,U+0042,U+0042,U+0044,U+0045:[A|B at 639,0|B at 1265,0|B.alt at 1891,0|D.alt1 at 2891,0|E at 3891,0]
+../fonts/TestMORXEighteen.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0041,U+0042,U+0044,U+0045:[A|B.alt at 639,0|D.alt1 at 1639,0|E at 2639,0]
+../fonts/TestMORXEighteen.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0041,U+0042,U+0045:[A|B at 639,0|E at 1265,0]
diff --git a/test/shaping/data/text-rendering-tests/tests/MORX-19.tests b/test/shaping/data/text-rendering-tests/tests/MORX-19.tests
new file mode 100644
index 00000000..e9b9dc44
--- /dev/null
+++ b/test/shaping/data/text-rendering-tests/tests/MORX-19.tests
@@ -0,0 +1,2 @@
+../fonts/TestMORXEighteen.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0041,U+0043,U+0044,U+0045:[A.alt|C at 1000,0|D.alt1 at 1596,0|E at 2596,0]
+../fonts/TestMORXEighteen.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0044:[D.alt]
diff --git a/test/shaping/data/text-rendering-tests/tests/MORX-20.tests b/test/shaping/data/text-rendering-tests/tests/MORX-20.tests
new file mode 100644
index 00000000..8d04192b
--- /dev/null
+++ b/test/shaping/data/text-rendering-tests/tests/MORX-20.tests
@@ -0,0 +1,7 @@
+../fonts/TestMORXTwenty.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0041,U+0042,U+0043,U+0044,U+0045:[A|B at 639,0|C.alt at 1265,0|D at 2265,0|E.alt1 at 2939,0]
+../fonts/TestMORXTwenty.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0041,U+0042,U+0043:[A|B at 639,0|C.alt at 1265,0]
+../fonts/TestMORXTwenty.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0041,U+0042,U+0045:[A|B.alt at 639,0|E.alt1 at 1639,0]
+../fonts/TestMORXTwenty.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0041,U+0045:[A.alt|E.alt1 at 1000,0]
+../fonts/TestMORXTwenty.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0045,U+0045:[E|E at 556,0]
+../fonts/TestMORXTwenty.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0041:[A.alt]
+../fonts/TestMORXTwenty.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0045:[E]
diff --git a/test/shaping/data/text-rendering-tests/tests/MORX-21.tests b/test/shaping/data/text-rendering-tests/tests/MORX-21.tests
new file mode 100644
index 00000000..a6087559
--- /dev/null
+++ b/test/shaping/data/text-rendering-tests/tests/MORX-21.tests
@@ -0,0 +1 @@
+../fonts/TestMORXTwentyone.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0041,U+0042,U+0043,U+0044,U+0045:[A|B.alt at 639,0|C at 1639,0|D at 2235,0|E at 2909,0]
diff --git a/test/shaping/data/text-rendering-tests/tests/MORX-22.tests b/test/shaping/data/text-rendering-tests/tests/MORX-22.tests
new file mode 100644
index 00000000..960874c1
--- /dev/null
+++ b/test/shaping/data/text-rendering-tests/tests/MORX-22.tests
@@ -0,0 +1 @@
+../fonts/TestMORXTwentytwo.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0041:[C]
commit 29d901286e632fa4de5ea198cc455cae56bc09a8
Author: Ebrahim Byagowi <ebrahim at gnu.org>
Date: Tue Jan 30 10:01:46 2018 +0330
[cmake] Build src/ executables (#733)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c0853d6d..3a593666 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -126,7 +126,7 @@ if (BUILD_SHARED_LIBS)
if (WIN32 AND NOT MINGW)
add_definitions("-DHB_EXTERN=__declspec(dllexport) extern")
else ()
- set (CMAKE_CXX_FLAGS "-fvisibility-inlines-hidden ${CMAKE_CXX_FLAGS}")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden")
endif ()
endif ()
@@ -272,8 +272,10 @@ if (HB_HAVE_FREETYPE)
list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-ft.cc)
list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-ft.h)
+ # So check_funcs can find its headers
set (CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${FREETYPE_INCLUDE_DIRS})
set (CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${FREETYPE_LIBRARIES})
+
check_funcs(FT_Get_Var_Blend_Coordinates FT_Set_Var_Blend_Coordinates FT_Done_MM_Var)
endif ()
@@ -522,19 +524,16 @@ if (UNIX OR MINGW)
link_libraries(-Bsymbolic-functions)
# Make sure we don't link to libstdc++
- if (BUILD_SHARED_LIBS AND (
- CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR
- CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
- ))
- set (CMAKE_CXX_FLAGS "-fno-rtti -fno-exceptions ${CMAKE_CXX_FLAGS}")
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti -fno-exceptions")
+ set (CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "m") # libm
+ set (CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "")
+ set_target_properties(harfbuzz PROPERTIES LINKER_LANGUAGE C)
endif ()
- set (CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "m") # libm
- set (CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "")
- set_target_properties(harfbuzz PROPERTIES LINKER_LANGUAGE C)
# No threadsafe statics as we do it ourselves
if (BUILD_SHARED_LIBS)
- set (CMAKE_CXX_FLAGS "-fno-threadsafe-statics ${CMAKE_CXX_FLAGS}")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-threadsafe-statics")
endif ()
endif ()
@@ -775,16 +774,29 @@ endif ()
if (UNIX AND CMAKE_GENERATOR STREQUAL "Ninja")
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
- set (CMAKE_CXX_FLAGS "-fcolor-diagnostics ${CMAKE_CXX_FLAGS}")
- set (CMAKE_C_FLAGS "-fcolor-diagnostics ${CMAKE_C_FLAGS}")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcolor-diagnostics")
endif ()
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
- set (CMAKE_CXX_FLAGS "-fdiagnostics-color ${CMAKE_CXX_FLAGS}")
- set (CMAKE_C_FLAGS "-fdiagnostics-color ${CMAKE_C_FLAGS}")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-color")
endif ()
endif ()
+## src/ executables
+foreach (prog main test test-would-substitute test-size-params test-buffer-serialize hb-ot-tag)
+ set (prog_name ${prog})
+ if (${prog_name} STREQUAL "test")
+ # test can not be used as a valid executable name on cmake, lets special case it
+ set (prog_name test-test)
+ endif ()
+ add_executable(${prog_name} ${PROJECT_SOURCE_DIR}/src/${prog}.cc)
+ target_link_libraries(${prog_name} harfbuzz ${THIRD_PARTY_LIBS})
+endforeach ()
+set_target_properties(hb-ot-tag PROPERTIES COMPILE_FLAGS "-DMAIN")
+
+
## Tests
if (UNIX OR MINGW)
if (BUILD_SHARED_LIBS)
commit 55cae0d72eecb5116008815b598481dd1404fc6a
Author: Ebrahim Byagowi <ebrahim at gnu.org>
Date: Mon Jan 29 18:05:24 2018 +0330
[test] Use 'otool -L' where ldd doesn't exist (macOS) (#732)
diff --git a/src/check-libstdc++.sh b/src/check-libstdc++.sh
index 4295180c..e4aaeb2b 100755
--- a/src/check-libstdc++.sh
+++ b/src/check-libstdc++.sh
@@ -9,10 +9,15 @@ stat=0
if which ldd 2>/dev/null >/dev/null; then
- :
+ LDD=ldd
else
- echo "check-libstdc++.sh: 'ldd' not found; skipping test"
- exit 77
+ # macOS specific tool
+ if which otool 2>/dev/null >/dev/null; then
+ LDD="otool -L"
+ else
+ echo "check-libstdc++.sh: 'ldd' not found; skipping test"
+ exit 77
+ fi
fi
tested=false
@@ -21,7 +26,7 @@ for suffix in so dylib; do
if ! test -f "$so"; then continue; fi
echo "Checking that we are not linking to libstdc++ or libc++"
- if ldd $so | grep 'libstdc[+][+]\|libc[+][+]'; then
+ if $LDD $so | grep 'libstdc[+][+]\|libc[+][+]'; then
echo "Ouch, linked to libstdc++ or libc++"
stat=1
fi
commit 2ec7dd1f6cb78ee6a0621aa98f18500d3318c90c
Author: David Corbett <corbett.dav at husky.neu.edu>
Date: Sun Jan 28 17:48:28 2018 -0500
Fix Travis build on macOS (#731)
diff --git a/.travis.yml b/.travis.yml
index b9913065..5516e711 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -55,7 +55,7 @@ matrix:
- ./autogen.sh
- ./configure $CONFIGURE_OPTS --with-coretext
- make
- - make check || (cat `find -name '*.log'` && false)
+ - make check || (cat `find . -name '*.log'` && false)
notifications:
irc: "irc.freenode.org#harfbuzz"
diff --git a/src/check-defs.sh b/src/check-defs.sh
index 9b4b7572..c6697831 100755
--- a/src/check-defs.sh
+++ b/src/check-defs.sh
@@ -27,11 +27,11 @@ for def in $defs; do
so=$libs/lib${lib}.$suffix
if ! test -f "$so"; then continue; fi
- EXPORTED_SYMBOLS="`nm "$so" | grep ' [BCDGINRSTVW] .' | grep -v ' _fini\>\| _init\>\| _fdata\>\| _ftext\>\| _fbss\>\| __bss_start\>\| __bss_start__\>\| __bss_end__\>\| _edata\>\| _end\>\| _bss_end__\>\| __end__\>\| __gcov_flush\>\| llvm_' | cut -d' ' -f3`"
-
# On mac, C symbols are prefixed with _
if test $suffix = dylib; then prefix="_"; fi
+ EXPORTED_SYMBOLS="`nm "$so" | grep ' [BCDGINRSTVW] .' | grep -v " $prefix"'\(_fini\>\|_init\>\|_fdata\>\|_ftext\>\|_fbss\>\|__bss_start\>\|__bss_start__\>\|__bss_end__\>\|_edata\>\|_end\>\|_bss_end__\>\|__end__\>\|__gcov_flush\>\|llvm_\)' | cut -d' ' -f3`"
+
if test -f "$so"; then
echo "Checking that $so has the same symbol list as $def"
More information about the HarfBuzz
mailing list