Bug 1388551 - Update harfbuzz to version 1.4.8. r=jfkthame
--- a/gfx/harfbuzz/NEWS
+++ b/gfx/harfbuzz/NEWS
@@ -1,8 +1,17 @@
+Overview of changes leading to 1.4.8
+Tuesday, August 8, 2017
+====================================
+
+- Major fix to avar table handling.
+- Rename hb-shape --show-message to --trace.
+- Build fixes.
+
+
Overview of changes leading to 1.4.7
Tuesday, July 18, 2017
====================================
- Multiple Indic, Tibetan, and Cham fixes.
- CoreText: Allow disabling kerning.
- Adjust Arabic feature order again.
- Misc build fixes.
--- a/gfx/harfbuzz/README-mozilla
+++ b/gfx/harfbuzz/README-mozilla
@@ -1,14 +1,14 @@
-gfx/harfbuzz status as of 2017-07-19:
+gfx/harfbuzz status as of 2017-08-08:
This directory contains the harfbuzz source from the 'master' branch of
https://github.com/behdad/harfbuzz.
-Current version: 1.4.7
+Current version: 1.4.8
UPDATING:
Note that gfx/harfbuzz/src/hb-version.h is not present in the upstream Git
repository. It is created at build time by the harfbuzz build system;
but as we don't use that build system in mozilla, it is necessary to refresh
this file when updating harfbuzz, and check it into the mozilla tree.
new file mode 100644
--- /dev/null
+++ b/gfx/harfbuzz/THANKS
@@ -0,0 +1,7 @@
+Bradley Grainger
+Khaled Hosny
+Kenichi Ishibashi
+Ryan Lortie
+Jeff Muizelaar
+suzuki toshiya
+Philip Withnall
--- a/gfx/harfbuzz/configure.ac
+++ b/gfx/harfbuzz/configure.ac
@@ -1,11 +1,11 @@
AC_PREREQ([2.64])
AC_INIT([HarfBuzz],
- [1.4.7],
+ [1.4.8],
[https://github.com/behdad/harfbuzz/issues/new],
[harfbuzz],
[http://harfbuzz.org/])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src/harfbuzz.pc.in])
AC_CONFIG_HEADERS([config.h])
--- a/gfx/harfbuzz/src/check-defs.sh
+++ b/gfx/harfbuzz/src/check-defs.sh
@@ -16,17 +16,17 @@ fi
defs="harfbuzz.def"
$MAKE $defs > /dev/null
tested=false
for def in $defs; do
lib=`echo "$def" | sed 's/[.]def$//;s@.*/@@'`
so=.libs/lib${lib}.so
- 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`"
+ 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`"
if test -f "$so"; then
echo "Checking that $so has the same symbol list as $def"
{
echo EXPORTS
echo "$EXPORTED_SYMBOLS"
# cheat: copy the last line from the def file!
--- a/gfx/harfbuzz/src/check-symbols.sh
+++ b/gfx/harfbuzz/src/check-symbols.sh
@@ -15,17 +15,17 @@ else
fi
echo "Checking that we are not exposing internal symbols"
tested=false
for suffix in so dylib; do
so=.libs/libharfbuzz.$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\>\| ___gcov_flush\>\| llvm_\| _llvm_' | cut -d' ' -f3`"
+ 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\>\| ___gcov_flush\>\| llvm_\| _llvm_' | cut -d' ' -f3`"
prefix=`basename "$so" | sed 's/libharfbuzz/hb/; s/-/_/g; s/[.].*//'`
# On mac, C symbols are prefixed with _
if test $suffix = dylib; then prefix="_$prefix"; fi
echo "Processing $so"
if echo "$EXPORTED_SYMBOLS" | grep -v "^${prefix}_"; then
--- a/gfx/harfbuzz/src/harfbuzz-icu.pc
+++ b/gfx/harfbuzz/src/harfbuzz-icu.pc
@@ -1,13 +1,13 @@
prefix=/usr/local
exec_prefix=/usr/local
libdir=/usr/local/lib
includedir=/usr/local/include
Name: harfbuzz
Description: HarfBuzz text shaping library ICU integration
-Version: 1.4.7
+Version: 1.4.8
Requires: harfbuzz
Requires.private: icu-uc
Libs: -L${libdir} -lharfbuzz-icu
Cflags: -I${includedir}/harfbuzz
--- a/gfx/harfbuzz/src/harfbuzz.pc
+++ b/gfx/harfbuzz/src/harfbuzz.pc
@@ -1,13 +1,13 @@
prefix=/usr/local
exec_prefix=/usr/local
libdir=/usr/local/lib
includedir=/usr/local/include
Name: harfbuzz
Description: HarfBuzz text shaping library
-Version: 1.4.7
+Version: 1.4.8
Libs: -L${libdir} -lharfbuzz
Libs.private:
Requires.private: glib-2.0 >= 2.19.1
Cflags: -I${includedir}/harfbuzz
--- a/gfx/harfbuzz/src/hb-ot-shape-complex-indic.cc
+++ b/gfx/harfbuzz/src/hb-ot-shape-complex-indic.cc
@@ -195,17 +195,17 @@ set_indic_properties (hb_glyph_info_t &i
/* The following take marks in standalone clusters, similar to Avagraha. */
else if (unlikely (hb_in_ranges<hb_codepoint_t> (u, 0xA8F2u, 0xA8F7u,
0x1CE9u, 0x1CECu,
0x1CEEu, 0x1CF1u)))
{
cat = OT_Symbol;
ASSERT_STATIC ((int) INDIC_SYLLABIC_CATEGORY_AVAGRAHA == OT_Symbol);
}
- else if (unlikely (hb_in_range (u, 0x17CDu, 0x17D1u) ||
+ else if (unlikely (hb_in_range<hb_codepoint_t> (u, 0x17CDu, 0x17D1u) ||
u == 0x17CBu || u == 0x17D3u || u == 0x17DDu)) /* Khmer Various signs */
{
/* These can occur mid-syllable (eg. before matras), even though Unicode marks them as Syllable_Modifier.
* https://github.com/roozbehp/unicode-data/issues/5 */
cat = OT_M;
pos = POS_ABOVE_C;
}
--- a/gfx/harfbuzz/src/hb-ot-var-avar-table.hh
+++ b/gfx/harfbuzz/src/hb-ot-var-avar-table.hh
@@ -52,18 +52,23 @@ struct AxisValueMap
struct SegmentMaps : ArrayOf<AxisValueMap>
{
inline int map (int value) const
{
/* The following special-cases are not part of OpenType, which requires
* that at least -1, 0, and +1 must be mapped. But we include these as
* part of a better error recovery scheme. */
- if (!len)
- return value;
+ if (len < 2)
+ {
+ if (!len)
+ return value;
+ else /* len == 1*/
+ return value - array[0].fromCoord + array[0].toCoord;
+ }
if (value <= array[0].fromCoord)
return value - array[0].fromCoord + array[0].toCoord;
unsigned int i;
unsigned int count = len;
for (i = 1; i < count && value > array[i].fromCoord; i++)
;
@@ -71,18 +76,18 @@ struct SegmentMaps : ArrayOf<AxisValueMa
if (value >= array[i].fromCoord)
return value - array[i].fromCoord + array[i].toCoord;
if (unlikely (array[i-1].fromCoord == array[i].fromCoord))
return array[i-1].toCoord;
int denom = array[i].fromCoord - array[i-1].fromCoord;
return array[i-1].toCoord +
- (array[i].toCoord - array[i-1].toCoord) *
- (value - array[i-1].fromCoord + denom/2) / denom;
+ ((array[i].toCoord - array[i-1].toCoord) *
+ (value - array[i-1].fromCoord) + denom/2) / denom;
}
DEFINE_SIZE_ARRAY (2, array);
};
/*
* avar — Axis Variations Table
*/
--- a/gfx/harfbuzz/src/hb-version.h
+++ b/gfx/harfbuzz/src/hb-version.h
@@ -33,19 +33,19 @@
#include "hb-common.h"
HB_BEGIN_DECLS
#define HB_VERSION_MAJOR 1
#define HB_VERSION_MINOR 4
-#define HB_VERSION_MICRO 7
+#define HB_VERSION_MICRO 8
-#define HB_VERSION_STRING "1.4.7"
+#define HB_VERSION_STRING "1.4.8"
#define HB_VERSION_ATLEAST(major,minor,micro) \
((major)*10000+(minor)*100+(micro) <= \
HB_VERSION_MAJOR*10000+HB_VERSION_MINOR*100+HB_VERSION_MICRO)
HB_EXTERN void
hb_version (unsigned int *major,