texlive[45105] Build/source/libs: harfbuzz 1.5.0

commits+kakuto at tug.org commits+kakuto at tug.org
Thu Aug 24 09:10:36 CEST 2017


Revision: 45105
          http://tug.org/svn/texlive?view=revision&revision=45105
Author:   kakuto
Date:     2017-08-24 09:10:36 +0200 (Thu, 24 Aug 2017)
Log Message:
-----------
harfbuzz 1.5.0

Modified Paths:
--------------
    trunk/Build/source/libs/README
    trunk/Build/source/libs/harfbuzz/ChangeLog
    trunk/Build/source/libs/harfbuzz/TLpatches/ChangeLog
    trunk/Build/source/libs/harfbuzz/TLpatches/TL-Changes
    trunk/Build/source/libs/harfbuzz/configure
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/NEWS
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-private.hh
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-serialize.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.h
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-directwrite.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face-private.hh
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font-private.hh
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-graphite2.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-common-private.hh
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gpos-table.hh
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsub-table.hh
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-private.hh
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hangul.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-thai.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode-private.hh
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-uniscribe.cc
    trunk/Build/source/libs/harfbuzz/version.ac

Modified: trunk/Build/source/libs/README
===================================================================
--- trunk/Build/source/libs/README	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/README	2017-08-24 07:10:36 UTC (rev 45105)
@@ -24,7 +24,7 @@
 graphite2 1.3.10 - checked 20jun17
   http://sourceforge.net/projects/silgraphite/files/graphite2/
 
-harfbuzz 1.4.8 - checked 09aug17
+harfbuzz 1.5.0 - checked 24aug17
   http://www.freedesktop.org/software/harfbuzz/release/
 
 icu 58.2 - checked 13mar17

Modified: trunk/Build/source/libs/harfbuzz/ChangeLog
===================================================================
--- trunk/Build/source/libs/harfbuzz/ChangeLog	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/ChangeLog	2017-08-24 07:10:36 UTC (rev 45105)
@@ -1,3 +1,8 @@
+2017-08-24  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
+
+	Import harfbuzz-1.5.0.
+	* version.ac: Adjusted.
+
 2017-08-09  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
 
 	Import harfbuzz-1.4.8.

Modified: trunk/Build/source/libs/harfbuzz/TLpatches/ChangeLog
===================================================================
--- trunk/Build/source/libs/harfbuzz/TLpatches/ChangeLog	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/TLpatches/ChangeLog	2017-08-24 07:10:36 UTC (rev 45105)
@@ -1,3 +1,8 @@
+2017-08-24  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
+
+	Imported harfbuzz-1.5.0 source tree from:
+	  http://www.freedesktop.org/software/harfbuzz/release/
+
 2017-08-09  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
 
 	Imported harfbuzz-1.4.8 source tree from:

Modified: trunk/Build/source/libs/harfbuzz/TLpatches/TL-Changes
===================================================================
--- trunk/Build/source/libs/harfbuzz/TLpatches/TL-Changes	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/TLpatches/TL-Changes	2017-08-24 07:10:36 UTC (rev 45105)
@@ -1,4 +1,4 @@
-Changes applied to the harfbuzz-1.4.8/ tree as obtained from:
+Changes applied to the harfbuzz-1.5.0/ tree as obtained from:
 	http://www.freedesktop.org/software/harfbuzz/release/
 
 Removed:

Modified: trunk/Build/source/libs/harfbuzz/configure
===================================================================
--- trunk/Build/source/libs/harfbuzz/configure	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/configure	2017-08-24 07:10:36 UTC (rev 45105)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for harfbuzz (TeX Live) 1.4.8.
+# Generated by GNU Autoconf 2.69 for harfbuzz (TeX Live) 1.5.0.
 #
 # Report bugs to <tex-k at tug.org>.
 #
@@ -580,8 +580,8 @@
 # Identity of this package.
 PACKAGE_NAME='harfbuzz (TeX Live)'
 PACKAGE_TARNAME='harfbuzz--tex-live-'
-PACKAGE_VERSION='1.4.8'
-PACKAGE_STRING='harfbuzz (TeX Live) 1.4.8'
+PACKAGE_VERSION='1.5.0'
+PACKAGE_STRING='harfbuzz (TeX Live) 1.5.0'
 PACKAGE_BUGREPORT='tex-k at tug.org'
 PACKAGE_URL=''
 
@@ -1312,7 +1312,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures harfbuzz (TeX Live) 1.4.8 to adapt to many kinds of systems.
+\`configure' configures harfbuzz (TeX Live) 1.5.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1383,7 +1383,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of harfbuzz (TeX Live) 1.4.8:";;
+     short | recursive ) echo "Configuration of harfbuzz (TeX Live) 1.5.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1490,7 +1490,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-harfbuzz (TeX Live) configure 1.4.8
+harfbuzz (TeX Live) configure 1.5.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2080,7 +2080,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by harfbuzz (TeX Live) $as_me 1.4.8, which was
+It was created by harfbuzz (TeX Live) $as_me 1.5.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -4003,7 +4003,7 @@
 
 # Define the identity of the package.
  PACKAGE='harfbuzz--tex-live-'
- VERSION='1.4.8'
+ VERSION='1.5.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -4205,9 +4205,9 @@
 
 
 HB_VERSION_MAJOR=1
-HB_VERSION_MINOR=4
-HB_VERSION_MICRO=8
-HB_VERSION=1.4.8
+HB_VERSION_MINOR=5
+HB_VERSION_MICRO=0
+HB_VERSION=1.5.0
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -6866,7 +6866,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by harfbuzz (TeX Live) $as_me 1.4.8, which was
+This file was extended by harfbuzz (TeX Live) $as_me 1.5.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -6932,7 +6932,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-harfbuzz (TeX Live) config.status 1.4.8
+harfbuzz (TeX Live) config.status 1.5.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog	2017-08-24 07:10:36 UTC (rev 45105)
@@ -1,3 +1,488 @@
+commit 224d20e4e1c62416ff842a81188dfeff069f895b
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Wed Aug 23 14:41:48 2017 -0700
+
+    [docs] Minor
+
+ docs/harfbuzz-docs.xml     | 12 ++++++++++++
+ docs/harfbuzz-sections.txt | 10 ++++++++++
+ src/hb-buffer.cc           |  8 +++++++-
+ 3 files changed, 29 insertions(+), 1 deletion(-)
+
+commit 4387b059a0603b17024de48d57bee6a3b5e9e56c
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Wed Aug 23 14:35:58 2017 -0700
+
+    [test] Add --verify to hb-shape
+
+    Disabled for now.  Will enable and fix failures after next release.
+
+ test/shaping/run-tests.sh | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit b2dd0c1c32ba30714355baca1857d64c1608b4c2
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Wed Aug 23 13:12:54 2017 -0700
+
+    Add hb_glyph_info_get_glyph_flags()
+
+    New API.
+
+ src/hb-buffer.cc | 17 +++++++++++++++++
+ src/hb-buffer.h  |  9 ++++++++-
+ 2 files changed, 25 insertions(+), 1 deletion(-)
+
+commit 3e8f4f145255a905029c6b5cb8f40e6dcca096f3
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Tue Aug 22 17:56:25 2017 -0700
+
+    Rename HB_BUFFER_DIFF_FLAG_MASK_MISMATCH to
+    HB_BUFFER_DIFF_FLAG_GLYPH_FLAGS_MISMATCH
+
+ src/hb-buffer.cc | 2 +-
+ src/hb-buffer.h  | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit a9e52a1af4c039bc53090a9c1e4c1136fc542605
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Tue Aug 15 17:30:18 2017 -0700
+
+    [util] Prefix trace lines with "trace:", and error lines with "error:"
+
+ util/hb-shape.cc | 12 ++++++------
+ util/options.cc  |  4 ++--
+ util/options.hh  |  1 +
+ 3 files changed, 9 insertions(+), 8 deletions(-)
+
+commit 7ea10c35a34c894e87ee6576d6d4ba3e78535a27
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Tue Aug 15 17:12:28 2017 -0700
+
+    [util] Respect eot/bot in safe-to-break test; hook up hb_buffer_diff()
+
+ util/options.hh | 38 ++++++++++++++++++++++++++------------
+ 1 file changed, 26 insertions(+), 12 deletions(-)
+
+commit 8820ba29dfd2e1302377da62a0527939a0d7d9fb
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Tue Aug 15 17:12:21 2017 -0700
+
+    Fix warning about "may be used uninitialized"
+
+ src/hb-ot-layout-common-private.hh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 91770e1c567d87fc513e8d39576e51c3853b1f23
+Author: Emil A Eklund (eae) <eae at eae.net>
+Date:   Tue Aug 15 16:25:18 2017 -0700
+
+    Fix signed/unsigned warning (#522)
+
+    Change hb_buffer_diff to explicitly cast result of abs to unsigned
+    when
+    comparing with position_fuzz to avoid unsafe signed/unsigned
+    comparions
+    warnings on windows.
+
+ src/hb-buffer.cc | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+commit 587f15ece316df7c86f386518aba48a6a44c061d
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Mon Aug 14 15:23:10 2017 -0700
+
+    Minor
+
+ src/hb-face-private.hh |  8 ++++----
+ src/hb-face.cc         |  8 ++++----
+ src/hb-font-private.hh | 14 +++++++-------
+ src/hb-font.cc         | 14 +++++++-------
+ 4 files changed, 22 insertions(+), 22 deletions(-)
+
+commit a88e2a73f34067381a81577c3f60bc5c2a6f2eea
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Mon Aug 14 14:49:21 2017 -0700
+
+    [util] Fix leaks
+
+ util/options.hh | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit 338e61ad1b40110a70c4fb497b117bcb07548467
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Mon Aug 14 12:36:38 2017 -0700
+
+    Fix typo
+
+ src/hb-buffer.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 331d66c7fe27a7649454486000827f0c36d6eb36
+Author: Jonathan Kew <jfkthame at gmail.com>
+Date:   Sat Jul 19 23:09:09 2014 +0100
+
+    Add function to compare two buffers
+
+    Based on patch from Jonathan Kew.
+
+    Needs more cleaning up and documentation.
+
+    New API:
+    hb_buffer_diff_flags_t
+    hb_buffer_diff()
+
+ src/hb-buffer-private.hh   |  1 +
+ src/hb-buffer-serialize.cc |  4 +--
+ src/hb-buffer.cc           | 82
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-buffer.h            | 39 ++++++++++++++++++++++
+ 4 files changed, 124 insertions(+), 2 deletions(-)
+
+commit 219af509ef8269e51f1396b18521c75b000d8dda
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Sun Aug 13 15:10:26 2017 -0700
+
+    [graphite2] Fix warning
+
+ src/hb-graphite2.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 239119a631fee7701be4d444adeda808b915863a
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Sun Aug 13 15:08:34 2017 -0700
+
+    [unsafe-to-break] Mark all positions as unsafe in alternative shapers
+
+ src/hb-coretext.cc    | 6 ++++++
+ src/hb-directwrite.cc | 2 ++
+ src/hb-graphite2.cc   | 1 +
+ src/hb-uniscribe.cc   | 2 ++
+ 4 files changed, 11 insertions(+)
+
+commit 05fabbd03eae7b84ebbce7abbdc55c1d67ceacf9
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Fri Aug 11 19:51:06 2017 -0700
+
+    [unsafe-to-break] Towards verifying unsafe-to-break in --verify
+
+    We break and shape fragments and reconstruct shape result from them.
+    Remains to compare to original buffer.  Going to add some buffer
+    comparison API and use here, instead of open-coding.
+
+ src/hb-buffer.cc |   5 ++-
+ util/options.hh  | 131
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
+ 2 files changed, 133 insertions(+), 3 deletions(-)
+
+commit 6ce25f57c663f86326262a5ff7a42288f358ed51
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Fri Aug 11 19:31:05 2017 -0700
+
+    Fix hb_buffer_append()
+
+    Ouch!
+
+ src/hb-buffer.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 1c17c2bde5bdf74a652b78d71b64e3aaa75ec43d
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Fri Aug 11 19:06:07 2017 -0700
+
+    [unsafe-to-break] Copy flag to all glyphs in a cluster
+
+    Makes consumption easier.
+
+ src/hb-buffer-private.hh    | 46
+ +++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-buffer.cc            | 28 ++++++---------------------
+ src/hb-ot-layout-private.hh |  3 +--
+ src/hb-ot-shape.cc          | 27 ++++++++++++++++++++++++++
+ 4 files changed, 80 insertions(+), 24 deletions(-)
+
+commit ec104e5912417c0fdc8c7cb004c684aea26eb1dc
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Fri Aug 11 18:24:27 2017 -0700
+
+    [unsafe-to-break] Mark unsafe is cluster merging is disabled
+
+    We were relying on cluster merges not requiring unsafe flagging
+    because
+    they get merged.  If cluster level requests no merging, then we flag
+    unsafe when merge would have happened.
+
+ src/hb-buffer.cc | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit 39a97494304a7e6b8999e59a92ce4d24ba9b881a
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Fri Aug 11 15:52:06 2017 -0700
+
+    New API: hb_buffer_append()
+
+ src/hb-buffer.cc | 52
+ +++++++++++++++++++++++++++++++++++++++++++++++++++-
+ src/hb-buffer.h  |  6 ++++++
+ 2 files changed, 57 insertions(+), 1 deletion(-)
+
+commit d2052278f24b3279503d5fa215a7834c2d21f91c
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Fri Aug 11 15:12:25 2017 -0700
+
+    [util] Add --verify to hb-shape / hb-view that verifies shape results
+
+    Right now it checks for monotone cluster values.  Other checks to
+    be added.
+
+ util/hb-shape.cc       |  7 ++-----
+ util/options.cc        |  2 ++
+ util/options.hh        | 42 +++++++++++++++++++++++++++++++++++++++---
+ util/shape-consumer.hh | 12 ++++++++----
+ util/view-cairo.hh     |  7 ++-----
+ 5 files changed, 53 insertions(+), 17 deletions(-)
+
+commit 14a639ea592cba971e5548f0942dd395c602c7a8
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Fri Aug 11 11:30:39 2017 -0700
+
+    [unsafe-to-break] Fix Use-of-uninitialized-value in
+    unsafe_to_break_set_mask
+
+    Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3011
+
+ src/hb-ot-shape-complex-hangul.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit e43aad55524cc1d4008ce337c2863a8546706d2e
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Thu Aug 10 20:54:15 2017 -0700
+
+    [unsafe-to-break] Flag in Thai PUA shaping
+
+ src/hb-ot-shape-complex-thai.cc | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit eae009602b5503c53a7f8ab053912563a97bbfa4
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Thu Aug 10 20:50:48 2017 -0700
+
+    [unsafe-to-break] Flag in Hangul shaper
+
+ src/hb-ot-shape-complex-hangul.cc | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+commit b65aa1cd4778e0103a2a1ed0e1b1012a09cf1f48
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Thu Aug 10 20:32:02 2017 -0700
+
+    [unsafe-to-break] Flag during mark attachment
+
+ src/hb-ot-layout-gpos-table.hh | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit c4712f8e372ee42749cda56cc7c28dc110a07ea9
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Thu Aug 10 20:27:21 2017 -0700
+
+    Fix test
+
+ test/api/test-buffer.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 882ebdadd6b3420ef2d3f296cd7416c76ee9901f
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Thu Aug 10 20:23:17 2017 -0700
+
+    [unsafe-to-break] Flag during cursive positioning
+
+ src/hb-ot-layout-gpos-table.hh | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 2d158ca37673f2b262f2381854559d6872d8fb45
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Thu Aug 10 20:19:15 2017 -0700
+
+    [unsafe-to-break] Flag during kerning
+
+ src/hb-ot-layout-gpos-table.hh | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit a7c4972ccefaaf48dfd6f0f4588df0c785aa33d2
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Thu Aug 10 20:16:15 2017 -0700
+
+    [unsafe-to-break] Flag during fallback positioning
+
+ src/hb-ot-shape-fallback.cc | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit e2a2b5b229c92f1de3b9c3ea111cd1ffa75b18fc
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Thu Aug 10 20:10:12 2017 -0700
+
+    [unsafe-to-break] Be careful with flag propagation when merging
+    clusters
+
+ src/hb-buffer-private.hh | 13 +++++++++++++
+ src/hb-buffer.cc         | 17 ++++++++++-------
+ src/hb-ot-shape.cc       |  3 ++-
+ 3 files changed, 25 insertions(+), 8 deletions(-)
+
+commit f2868c200896a96a34fc1bba4d43eddc03789da2
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Thu Aug 10 19:58:05 2017 -0700
+
+    Set mask to 0, instead of 1, by default
+
+    This shouldn't matter.
+
+ src/hb-buffer.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 9e005c5d86cd4c19383093f76a237cc8f5f12fb7
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Thu Aug 10 18:45:33 2017 -0700
+
+    [unsafe-to-break] Mark Indic-like clusters as unsafe-to-break
+
+ src/hb-ot-shape-complex-indic.cc   | 2 ++
+ src/hb-ot-shape-complex-myanmar.cc | 2 ++
+ src/hb-ot-shape-complex-use.cc     | 2 ++
+ 3 files changed, 6 insertions(+)
+
+commit 5287ccc935c86b6f5e6867592b64bc2461384f45
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Thu Aug 10 14:25:53 2017 -0700
+
+    [unsafe-to-break] Allocate public bits from 0
+
+ src/hb-buffer.h  |  5 +++--
+ src/hb-ot-map.cc | 15 +++++++++------
+ 2 files changed, 12 insertions(+), 8 deletions(-)
+
+commit 91ce0c45d6782057a2736f7b76a3c49cadbea070
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Thu May 5 16:13:03 2016 +0100
+
+    [safe-to-break] Fix logic when there is no out-buffer
+
+ src/hb-buffer.cc | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+commit a043c99f778ffdde15d212fe23468cb9f51036bc
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Wed May 4 19:51:22 2016 +0200
+
+    [unsafe-to-break] Simplify logic
+
+    Always use the algorithm for non-monotone case.  It's more robust.
+
+ src/hb-buffer.cc | 57
+ +++++++++++++-------------------------------------------
+ 1 file changed, 13 insertions(+), 44 deletions(-)
+
+commit 40bd7e9a1cf422b17f15d0f66547bde9098e6ef3
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Mon May 2 14:47:45 2016 +0200
+
+    [unsafe-to-break] Add UNSAFE_TO_BREAK flag
+
+    Not all shapers code is updated to set this properly.
+    GSUB and Arabic shaper are updated.
+    GPOS and other shapers are NOT.
+
+    Fixes https://github.com/behdad/harfbuzz/issues/224
+
+ src/hb-buffer-private.hh             | 26 ++++++++------
+ src/hb-buffer-serialize.cc           | 24 +++++++++----
+ src/hb-buffer.cc                     | 67
+ ++++++++++++++++++++++++++++++++++++
+ src/hb-buffer.h                      | 10 ++++--
+ src/hb-ot-layout-gsub-table.hh       |  7 ++--
+ src/hb-ot-layout-gsubgpos-private.hh | 27 ++++++++++-----
+ src/hb-ot-map.cc                     |  2 ++
+ src/hb-ot-shape-complex-arabic.cc    |  3 ++
+ util/hb-shape.cc                     |  2 ++
+ util/options.cc                      |  1 +
+ util/options.hh                      |  2 ++
+ 11 files changed, 142 insertions(+), 29 deletions(-)
+
+commit 3e44748ebe1524aef6feb01c42d342e8a2d77d34
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Wed Aug 9 22:09:01 2017 -0700
+
+    [util] Fix two other Coverity warnings
+
+ util/options.cc | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit 356f93b64b6005f44bcfc329f6f9e150ec32fc26
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Wed Aug 9 22:06:53 2017 -0700
+
+    [util] Fix warning
+
+ util/shape-consumer.hh | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit ac8c4e56d8b8c2e7a8f4802f83deb935bd6bbbd3
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Wed Aug 9 22:05:08 2017 -0700
+
+    [ft] Fix theoretical leak
+
+ src/hb-ft.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 5a330575768f5a213072230b9ec8faabac9c5737
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Wed Aug 9 17:23:28 2017 -0700
+
+    Treat HAMZA ABOVE similar to SHADD for sorting purposes
+
+    Part of https://github.com/behdad/harfbuzz/issues/509
+
+ src/hb-unicode-private.hh | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit 68af14d5cc666ebf0596766cbed87cc9404fd50f
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Wed Aug 9 17:09:21 2017 -0700
+
+    Protect against div-by-zero in CBDT extent code
+
+    Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1452#c5
+
+    CC https://github.com/behdad/harfbuzz/issues/139
+
+ src/hb-ft.cc         | 4 ++--
+ src/hb-ot-font.cc    | 6 +++---
+ src/hb-shape-plan.cc | 4 ++--
+ 3 files changed, 7 insertions(+), 7 deletions(-)
+
+commit 3b54d0337e6119a4397573f5589b771a68b2ecd9
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Tue Aug 8 18:37:03 2017 -0700
+
+    Add tests for 'avar' fix 5dc30451b80f6bb0079424a130875c10486e4d34
+
+ test/shaping/Makefile.am                           |   1 +
+ .../d23d76ea0909c14972796937ba072b5a40c1e257.ttf   | Bin 0 -> 1812 bytes
+ test/shaping/record-test.sh                        |   1 +
+ test/shaping/tests/variations-rvrn.tests           | 100
+ +++++++++++++++++++++
+ 4 files changed, 102 insertions(+)
+
+commit 7917792f01603f91b703d12e12d8baced655a615
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Tue Aug 8 13:17:03 2017 -0700
+
+    1.4.8
+
+ NEWS         | 9 +++++++++
+ configure.ac | 2 +-
+ 2 files changed, 10 insertions(+), 1 deletion(-)
+
 commit 5dc30451b80f6bb0079424a130875c10486e4d34
 Author: Behdad Esfahbod <behdad at behdad.org>
 Date:   Mon Aug 7 21:37:07 2017 -0700

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/NEWS
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/NEWS	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/NEWS	2017-08-24 07:10:36 UTC (rev 45105)
@@ -1,3 +1,47 @@
+Overview of changes leading to 1.5.0
+Wednesday, August 23, 2017
+====================================
+
+- Misc new API, for appending a buffer to another, and for comparing
+  contents of two buffers for types of differences.
+
+- New "unsafe-to-break" API.  Can be used to speed up reshaping
+  in line-breaking situations.  Essentially, after shaping, it returns
+  positions in the input string (some of the cluster boundaries) that
+  are "safe to break" in that if the text is segmented at that position
+  and two sides reshaped and concatenated, the shaping result is
+  exactly the same as shaping the text in one piece.
+
+  hb-view and hb-shape and hb-shape now take --verify, which verifies
+  the above property.
+
+  Some corner cases of the implementation are still not quite working.
+  Those will be fixed in subsequent releases.
+
+- New API:
+
+hb_buffer_append()
+
+hb_glyph_flags_t
+HB_GLYPH_FLAG_UNSAFE_TO_BREAK
+HB_GLYPH_FLAG_DEFINED
+hb_glyph_info_get_glyph_flags()
+
+HB_BUFFER_SERIALIZE_FLAG_GLYPH_FLAGS
+
+hb_buffer_diff_flags_t
+HB_BUFFER_DIFF_FLAG_EQUAL
+HB_BUFFER_DIFF_FLAG_CONTENT_TYPE_MISMATCH
+HB_BUFFER_DIFF_FLAG_LENGTH_MISMATCH
+HB_BUFFER_DIFF_FLAG_NOTDEF_PRESENT
+HB_BUFFER_DIFF_FLAG_DOTTED_CIRCLE_PRESENT
+HB_BUFFER_DIFF_FLAG_CODEPOINT_MISMATCH
+HB_BUFFER_DIFF_FLAG_CLUSTER_MISMATCH
+HB_BUFFER_DIFF_FLAG_GLYPH_FLAGS_MISMATCH
+HB_BUFFER_DIFF_FLAG_POSITION_MISMATCH
+hb_buffer_diff
+
+
 Overview of changes leading to 1.4.8
 Tuesday, August 8, 2017
 ====================================

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac	2017-08-24 07:10:36 UTC (rev 45105)
@@ -1,6 +1,6 @@
 AC_PREREQ([2.64])
 AC_INIT([HarfBuzz],
-        [1.4.8],
+        [1.5.0],
         [https://github.com/behdad/harfbuzz/issues/new],
         [harfbuzz],
         [http://harfbuzz.org/])

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-private.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-private.hh	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-private.hh	2017-08-24 07:10:36 UTC (rev 45105)
@@ -50,6 +50,7 @@
 
 HB_MARK_AS_FLAG_T (hb_buffer_flags_t);
 HB_MARK_AS_FLAG_T (hb_buffer_serialize_flags_t);
+HB_MARK_AS_FLAG_T (hb_buffer_diff_flags_t);
 
 enum hb_buffer_scratch_flags_t {
   HB_BUFFER_SCRATCH_FLAG_DEFAULT			= 0x00000000u,
@@ -57,6 +58,8 @@
   HB_BUFFER_SCRATCH_FLAG_HAS_DEFAULT_IGNORABLES		= 0x00000002u,
   HB_BUFFER_SCRATCH_FLAG_HAS_SPACE_FALLBACK		= 0x00000004u,
   HB_BUFFER_SCRATCH_FLAG_HAS_GPOS_ATTACHMENT		= 0x00000008u,
+  HB_BUFFER_SCRATCH_FLAG_HAS_UNSAFE_TO_BREAK		= 0x00000010u,
+
   /* Reserved for complex shapers' internal use. */
   HB_BUFFER_SCRATCH_FLAG_COMPLEX0			= 0x01000000u,
   HB_BUFFER_SCRATCH_FLAG_COMPLEX1			= 0x02000000u,
@@ -232,25 +235,31 @@
     for (unsigned int j = 0; j < len; j++)
       info[j].mask |= mask;
   }
-  HB_INTERNAL void set_masks (hb_mask_t value,
-			      hb_mask_t mask,
-			      unsigned int cluster_start,
-			      unsigned int cluster_end);
+  HB_INTERNAL void set_masks (hb_mask_t value, hb_mask_t mask,
+			      unsigned int cluster_start, unsigned int cluster_end);
 
-  HB_INTERNAL void merge_clusters (unsigned int start,
-				   unsigned int end)
+  inline void merge_clusters (unsigned int start, unsigned int end)
   {
     if (end - start < 2)
       return;
     merge_clusters_impl (start, end);
   }
-  HB_INTERNAL void merge_clusters_impl (unsigned int start,
-					unsigned int end);
-  HB_INTERNAL void merge_out_clusters (unsigned int start,
-				       unsigned int end);
+  HB_INTERNAL void merge_clusters_impl (unsigned int start, unsigned int end);
+  HB_INTERNAL void merge_out_clusters (unsigned int start, unsigned int end);
   /* Merge clusters for deleting current glyph, and skip it. */
   HB_INTERNAL void delete_glyph (void);
 
+  inline void unsafe_to_break (unsigned int start,
+			       unsigned int end)
+  {
+    if (end - start < 2)
+      return;
+    unsafe_to_break_impl (start, end);
+  }
+  HB_INTERNAL void unsafe_to_break_impl (unsigned int start, unsigned int end);
+  HB_INTERNAL void unsafe_to_break_from_outbuffer (unsigned int start, unsigned int end);
+
+
   /* Internal methods */
   HB_INTERNAL bool enlarge (unsigned int size);
 
@@ -282,9 +291,66 @@
     return ret;
   }
   HB_INTERNAL bool message_impl (hb_font_t *font, const char *fmt, va_list ap) HB_PRINTF_FUNC(3, 0);
+
+  static inline void
+  set_cluster (hb_glyph_info_t &info, unsigned int cluster, unsigned int mask = 0)
+  {
+    if (info.cluster != cluster)
+    {
+      if (mask & HB_GLYPH_FLAG_UNSAFE_TO_BREAK)
+	info.mask |= HB_GLYPH_FLAG_UNSAFE_TO_BREAK;
+      else
+	info.mask &= ~HB_GLYPH_FLAG_UNSAFE_TO_BREAK;
+    }
+    info.cluster = cluster;
+  }
+
+  int
+  _unsafe_to_break_find_min_cluster (const hb_glyph_info_t *info,
+				     unsigned int start, unsigned int end,
+				     unsigned int cluster) const
+  {
+    for (unsigned int i = start; i < end; i++)
+      cluster = MIN (cluster, info[i].cluster);
+    return cluster;
+  }
+  void
+  _unsafe_to_break_set_mask (hb_glyph_info_t *info,
+			     unsigned int start, unsigned int end,
+			     unsigned int cluster)
+  {
+    for (unsigned int i = start; i < end; i++)
+      if (cluster != info[i].cluster)
+      {
+	scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_UNSAFE_TO_BREAK;
+	info[i].mask |= HB_GLYPH_FLAG_UNSAFE_TO_BREAK;
+      }
+  }
 };
 
 
+/* Loop over clusters. Duplicated in foreach_syllable(). */
+#define foreach_cluster(buffer, start, end) \
+  for (unsigned int \
+       _count = buffer->len, \
+       start = 0, end = _count ? _next_cluster (buffer, 0) : 0; \
+       start < _count; \
+       start = end, end = _next_cluster (buffer, start))
+
+static inline unsigned int
+_next_cluster (hb_buffer_t *buffer, unsigned int start)
+{
+  hb_glyph_info_t *info = buffer->info;
+  unsigned int count = buffer->len;
+
+  unsigned int cluster = info[start].cluster;
+  while (++start < count && cluster == info[start].cluster)
+    ;
+
+  return start;
+}
+
+
 #define HB_BUFFER_XALLOCATE_VAR(b, func, var) \
   b->func (offsetof (hb_glyph_info_t, var) - offsetof(hb_glyph_info_t, var1), \
 	   sizeof (b->info[0].var))

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-serialize.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-serialize.cc	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-serialize.cc	2017-08-24 07:10:36 UTC (rev 45105)
@@ -145,20 +145,26 @@
 
     if (!(flags & HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS))
     {
-      p += snprintf (p, ARRAY_LENGTH (b) - (p - b), ",\"dx\":%d,\"dy\":%d",
-		     pos[i].x_offset, pos[i].y_offset);
-      p += snprintf (p, ARRAY_LENGTH (b) - (p - b), ",\"ax\":%d,\"ay\":%d",
-		     pos[i].x_advance, pos[i].y_advance);
+      p += MAX (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), ",\"dx\":%d,\"dy\":%d",
+			     pos[i].x_offset, pos[i].y_offset));
+      p += MAX (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), ",\"ax\":%d,\"ay\":%d",
+			     pos[i].x_advance, pos[i].y_advance));
     }
 
+    if (flags & HB_BUFFER_SERIALIZE_FLAG_GLYPH_FLAGS)
+    {
+      if (info[i].mask & HB_GLYPH_FLAG_DEFINED)
+	p += MAX (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), ",\"fl\":%u", info[i].mask & HB_GLYPH_FLAG_DEFINED));
+    }
+
     if (flags & HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS)
     {
       hb_glyph_extents_t extents;
       hb_font_get_glyph_extents(font, info[i].codepoint, &extents);
       p += MAX (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), ",\"xb\":%d,\"yb\":%d",
-        extents.x_bearing, extents.y_bearing));
+		extents.x_bearing, extents.y_bearing));
       p += MAX (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), ",\"w\":%d,\"h\":%d",
-        extents.width, extents.height));
+		extents.width, extents.height));
     }
 
     *p++ = '}';
@@ -226,6 +232,12 @@
 	p += MAX (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), ",%d", pos[i].y_advance));
     }
 
+    if (flags & HB_BUFFER_SERIALIZE_FLAG_GLYPH_FLAGS)
+    {
+      if (info[i].mask &HB_GLYPH_FLAG_DEFINED)
+	p += MAX (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), "#%X", info[i].mask &HB_GLYPH_FLAG_DEFINED));
+    }
+
     if (flags & HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS)
     {
       hb_glyph_extents_t extents;

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.cc	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.cc	2017-08-24 07:10:36 UTC (rev 45105)
@@ -267,7 +267,7 @@
 
   memset (glyph, 0, sizeof (*glyph));
   glyph->codepoint = codepoint;
-  glyph->mask = 1;
+  glyph->mask = 0;
   glyph->cluster = cluster;
 
   len++;
@@ -550,9 +550,12 @@
 				  unsigned int end)
 {
   if (cluster_level == HB_BUFFER_CLUSTER_LEVEL_CHARACTERS)
+  {
+    unsafe_to_break (start, end);
     return;
+  }
 
-  uint32_t cluster = info[start].cluster;
+  unsigned int cluster = info[start].cluster;
 
   for (unsigned int i = start + 1; i < end; i++)
     cluster = MIN (cluster, info[i].cluster);
@@ -568,10 +571,10 @@
   /* If we hit the start of buffer, continue in out-buffer. */
   if (idx == start)
     for (unsigned int i = out_len; i && out_info[i - 1].cluster == info[start].cluster; i--)
-      out_info[i - 1].cluster = cluster;
+      set_cluster (out_info[i - 1], cluster);
 
   for (unsigned int i = start; i < end; i++)
-    info[i].cluster = cluster;
+    set_cluster (info[i], cluster);
 }
 void
 hb_buffer_t::merge_out_clusters (unsigned int start,
@@ -583,7 +586,7 @@
   if (unlikely (end - start < 2))
     return;
 
-  uint32_t cluster = out_info[start].cluster;
+  unsigned int cluster = out_info[start].cluster;
 
   for (unsigned int i = start + 1; i < end; i++)
     cluster = MIN (cluster, out_info[i].cluster);
@@ -599,14 +602,16 @@
   /* If we hit the end of out-buffer, continue in buffer. */
   if (end == out_len)
     for (unsigned int i = idx; i < len && info[i].cluster == out_info[end - 1].cluster; i++)
-      info[i].cluster = cluster;
+      set_cluster (info[i], cluster);
 
   for (unsigned int i = start; i < end; i++)
-    out_info[i].cluster = cluster;
+    set_cluster (out_info[i], cluster);
 }
 void
 hb_buffer_t::delete_glyph ()
 {
+  /* The logic here is duplicated in hb_ot_hide_default_ignorables(). */
+
   unsigned int cluster = info[idx].cluster;
   if (idx + 1 < len && cluster == info[idx + 1].cluster)
   {
@@ -619,9 +624,10 @@
     /* Merge cluster backward. */
     if (cluster < out_info[out_len - 1].cluster)
     {
+      unsigned int mask = info[idx].mask;
       unsigned int old_cluster = out_info[out_len - 1].cluster;
       for (unsigned i = out_len; i && out_info[i - 1].cluster == old_cluster; i--)
-	out_info[i - 1].cluster = cluster;
+	set_cluster (out_info[i - 1], cluster, mask);
     }
     goto done;
   }
@@ -638,6 +644,32 @@
 }
 
 void
+hb_buffer_t::unsafe_to_break_impl (unsigned int start, unsigned int end)
+{
+  unsigned int cluster = (unsigned int) -1;
+  cluster = _unsafe_to_break_find_min_cluster (info, start, end, cluster);
+  _unsafe_to_break_set_mask (info, start, end, cluster);
+}
+void
+hb_buffer_t::unsafe_to_break_from_outbuffer (unsigned int start, unsigned int end)
+{
+  if (!have_output)
+  {
+    unsafe_to_break_impl (start, end);
+    return;
+  }
+
+  assert (start <= out_len);
+  assert (idx <= end);
+
+  unsigned int cluster = (unsigned int) -1;
+  cluster = _unsafe_to_break_find_min_cluster (out_info, start, out_len, cluster);
+  cluster = _unsafe_to_break_find_min_cluster (info, idx, end, cluster);
+  _unsafe_to_break_set_mask (out_info, start, out_len, cluster);
+  _unsafe_to_break_set_mask (info, idx, end, cluster);
+}
+
+void
 hb_buffer_t::guess_segment_properties (void)
 {
   assert (content_type == HB_BUFFER_CONTENT_TYPE_UNICODE ||
@@ -1380,6 +1412,23 @@
 }
 
 /**
+ * hb_glyph_info_get_glyph_flags:
+ * @info: a #hb_glyph_info_t.
+ *
+ * Returns glyph flags encoded within a #hb_glyph_info_t.
+ *
+ * Return value:
+ * The #hb_glyph_flags_t encoded within @info.
+ *
+ * Since: 1.5.0
+ **/
+hb_glyph_flags_t
+(hb_glyph_info_get_glyph_flags) (const hb_glyph_info_t *info)
+{
+  return hb_glyph_info_get_glyph_flags (info);
+}
+
+/**
  * hb_buffer_reverse:
  * @buffer: an #hb_buffer_t.
  *
@@ -1666,6 +1715,58 @@
 }
 
 
+/**
+ * hb_buffer_append:
+ * @buffer: an #hb_buffer_t.
+ * @source: source #hb_buffer_t.
+ * @start: start index into source buffer to copy.  Use 0 to copy from start of buffer.
+ * @end: end index into source buffer to copy.  Use (unsigned int) -1 to copy to end of buffer.
+ *
+ * Append (part of) contents of another buffer to this buffer.
+ *
+ * Since: 1.5.0
+ **/
+HB_EXTERN void
+hb_buffer_append (hb_buffer_t *buffer,
+		  hb_buffer_t *source,
+		  unsigned int start,
+		  unsigned int end)
+{
+  assert (!buffer->have_output && !source->have_output);
+  assert (buffer->have_positions == source->have_positions ||
+	  !buffer->len || !source->len);
+  assert (buffer->content_type == source->content_type ||
+	  !buffer->len || !source->len);
+
+  if (end > source->len)
+    end = source->len;
+  if (start > end)
+    start = end;
+  if (start == end)
+    return;
+
+  if (!buffer->len)
+    buffer->content_type = source->content_type;
+  if (!buffer->have_positions && source->have_positions)
+    buffer->clear_positions ();
+
+  if (buffer->len + (end - start) < buffer->len) /* Overflows. */
+  {
+    buffer->in_error = true;
+    return;
+  }
+
+  unsigned int orig_len = buffer->len;
+  hb_buffer_set_length (buffer, buffer->len + (end - start));
+  if (buffer->in_error)
+    return;
+
+  memcpy (buffer->info + orig_len, source->info + start, (end - start) * sizeof (buffer->info[0]));
+  if (buffer->have_positions)
+    memcpy (buffer->pos + orig_len, source->pos + start, (end - start) * sizeof (buffer->pos[0]));
+}
+
+
 static int
 compare_info_codepoint (const hb_glyph_info_t *pa,
 			const hb_glyph_info_t *pb)
@@ -1736,7 +1837,8 @@
 hb_buffer_normalize_glyphs (hb_buffer_t *buffer)
 {
   assert (buffer->have_positions);
-  assert (buffer->content_type == HB_BUFFER_CONTENT_TYPE_GLYPHS);
+  assert (buffer->content_type == HB_BUFFER_CONTENT_TYPE_GLYPHS ||
+	  (!buffer->len && buffer->content_type == HB_BUFFER_CONTENT_TYPE_INVALID));
 
   bool backward = HB_DIRECTION_IS_BACKWARD (buffer->props.direction);
 
@@ -1775,7 +1877,95 @@
   }
 }
 
+
 /*
+ * Comparing buffers.
+ */
+
+/**
+ * hb_buffer_diff:
+ *
+ *
+ * Since: 1.5.0
+ **/
+hb_buffer_diff_flags_t
+hb_buffer_diff (hb_buffer_t *buffer,
+		hb_buffer_t *reference,
+		hb_codepoint_t dottedcircle_glyph,
+		unsigned int position_fuzz)
+{
+  if (buffer->content_type != reference->content_type)
+    return HB_BUFFER_DIFF_FLAG_CONTENT_TYPE_MISMATCH;
+
+  hb_buffer_diff_flags_t result = HB_BUFFER_DIFF_FLAG_EQUAL;
+
+  unsigned int count = reference->len;
+
+  if (buffer->len != count)
+  {
+    /*
+     * we can't compare glyph-by-glyph, but we do want to know if there
+     * are .notdef or dottedcircle glyphs present in the reference buffer
+     */
+    const hb_glyph_info_t *info = reference->info;
+    unsigned int i;
+    for (i = 0; i < count; i++)
+    {
+      if (info[i].codepoint == dottedcircle_glyph)
+        result |= HB_BUFFER_DIFF_FLAG_DOTTED_CIRCLE_PRESENT;
+      else if (info[i].codepoint == 0)
+        result |= HB_BUFFER_DIFF_FLAG_NOTDEF_PRESENT;
+    }
+    result |= HB_BUFFER_DIFF_FLAG_LENGTH_MISMATCH;
+    return hb_buffer_diff_flags_t (result);
+  }
+
+  if (!count)
+    return hb_buffer_diff_flags_t (result);
+
+  const hb_glyph_info_t *buf_info = buffer->info;
+  const hb_glyph_info_t *ref_info = reference->info;
+  for (unsigned int i = 0; i < count; i++)
+  {
+    if (buf_info->codepoint != ref_info->codepoint)
+      result |= HB_BUFFER_DIFF_FLAG_CODEPOINT_MISMATCH;
+    if (buf_info->cluster != ref_info->cluster)
+      result |= HB_BUFFER_DIFF_FLAG_CLUSTER_MISMATCH;
+    if ((buf_info->mask & HB_GLYPH_FLAG_DEFINED) != (ref_info->mask & HB_GLYPH_FLAG_DEFINED))
+      result |= HB_BUFFER_DIFF_FLAG_GLYPH_FLAGS_MISMATCH;
+    if (ref_info->codepoint == dottedcircle_glyph)
+      result |= HB_BUFFER_DIFF_FLAG_DOTTED_CIRCLE_PRESENT;
+    else if (ref_info->codepoint == 0)
+      result |= HB_BUFFER_DIFF_FLAG_NOTDEF_PRESENT;
+    buf_info++;
+    ref_info++;
+  }
+
+  if (buffer->content_type == HB_BUFFER_CONTENT_TYPE_GLYPHS)
+  {
+    assert (buffer->have_positions);
+    const hb_glyph_position_t *buf_pos = buffer->pos;
+    const hb_glyph_position_t *ref_pos = reference->pos;
+    for (unsigned int i = 0; i < count; i++)
+    {
+      if ((unsigned int) abs (buf_pos->x_advance - ref_pos->x_advance) > position_fuzz ||
+          (unsigned int) abs (buf_pos->y_advance - ref_pos->y_advance) > position_fuzz ||
+          (unsigned int) abs (buf_pos->x_offset - ref_pos->x_offset) > position_fuzz ||
+          (unsigned int) abs (buf_pos->y_offset - ref_pos->y_offset) > position_fuzz)
+      {
+        result |= HB_BUFFER_DIFF_FLAG_POSITION_MISMATCH;
+        break;
+      }
+      buf_pos++;
+      ref_pos++;
+    }
+  }
+
+  return result;
+}
+
+
+/*
  * Debugging.
  */
 

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.h
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.h	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.h	2017-08-24 07:10:36 UTC (rev 45105)
@@ -63,7 +63,7 @@
  */
 typedef struct hb_glyph_info_t {
   hb_codepoint_t codepoint;
-  hb_mask_t      mask;
+  hb_mask_t      mask; /* Holds hb_glyph_flags_t after hb_shape(), plus other things. */
   uint32_t       cluster;
 
   /*< private >*/
@@ -71,6 +71,19 @@
   hb_var_int_t   var2;
 } hb_glyph_info_t;
 
+typedef enum { /*< flags >*/
+  HB_GLYPH_FLAG_UNSAFE_TO_BREAK		= 0x00000001,
+
+  HB_GLYPH_FLAG_DEFINED			= 0x00000001 /* OR of all defined flags */
+} hb_glyph_flags_t;
+
+HB_EXTERN hb_glyph_flags_t
+hb_glyph_info_get_glyph_flags (const hb_glyph_info_t *info);
+
+#define hb_glyph_info_get_glyph_flags(info) \
+	((hb_glyph_flags_t) ((unsigned int) (info)->mask & HB_GLYPH_FLAG_DEFINED))
+
+
 /**
  * hb_glyph_position_t:
  * @x_advance: how much the line advances after drawing this glyph when setting
@@ -163,6 +176,7 @@
 hb_buffer_get_user_data (hb_buffer_t        *buffer,
 			 hb_user_data_key_t *key);
 
+
 /**
  * hb_buffer_content_type_t:
  * @HB_BUFFER_CONTENT_TYPE_INVALID: Initial value for new buffer.
@@ -359,6 +373,11 @@
 			  unsigned int          item_offset,
 			  int                   item_length);
 
+HB_EXTERN void
+hb_buffer_append (hb_buffer_t *buffer,
+		  hb_buffer_t *source,
+		  unsigned int start,
+		  unsigned int end);
 
 HB_EXTERN hb_bool_t
 hb_buffer_set_length (hb_buffer_t  *buffer,
@@ -403,7 +422,8 @@
   HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS		= 0x00000001u,
   HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS		= 0x00000002u,
   HB_BUFFER_SERIALIZE_FLAG_NO_GLYPH_NAMES	= 0x00000004u,
-  HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS	= 0x00000008u
+  HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS	= 0x00000008u,
+  HB_BUFFER_SERIALIZE_FLAG_GLYPH_FLAGS		= 0x00000010u
 } hb_buffer_serialize_flags_t;
 
 /**
@@ -453,6 +473,45 @@
 
 
 /*
+ * Compare buffers
+ */
+
+typedef enum { /*< flags >*/
+  HB_BUFFER_DIFF_FLAG_EQUAL			= 0x0000,
+
+  /* Buffers with different content_type cannot be meaningfully compared
+   * in any further detail. */
+  HB_BUFFER_DIFF_FLAG_CONTENT_TYPE_MISMATCH	= 0X0001,
+
+  /* For buffers with differing length, the per-glyph comparison is not
+   * attempted, though we do still scan reference for dottedcircle / .notdef
+   * glyphs. */
+  HB_BUFFER_DIFF_FLAG_LENGTH_MISMATCH		= 0X0002,
+
+  /* We want to know if dottedcircle / .notdef glyphs are present in the
+   * reference, as we may not care so much about other differences in this
+   * case. */
+  HB_BUFFER_DIFF_FLAG_NOTDEF_PRESENT		= 0x0004,
+  HB_BUFFER_DIFF_FLAG_DOTTED_CIRCLE_PRESENT	= 0x0008,
+
+  /* If the buffers have the same length, we compare them glyph-by-glyph
+   * and report which aspect(s) of the glyph info/position are different. */
+  HB_BUFFER_DIFF_FLAG_CODEPOINT_MISMATCH	= 0x0010,
+  HB_BUFFER_DIFF_FLAG_CLUSTER_MISMATCH		= 0x0020,
+  HB_BUFFER_DIFF_FLAG_GLYPH_FLAGS_MISMATCH	= 0x0040,
+  HB_BUFFER_DIFF_FLAG_POSITION_MISMATCH		= 0x0080
+
+} hb_buffer_diff_flags_t;
+
+/* Compare the contents of two buffers, report types of differences. */
+hb_buffer_diff_flags_t
+hb_buffer_diff (hb_buffer_t *buffer,
+		hb_buffer_t *reference,
+		hb_codepoint_t dottedcircle_glyph,
+		unsigned int position_fuzz);
+
+
+/*
  * Debugging.
  */
 

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc	2017-08-24 07:10:36 UTC (rev 45105)
@@ -1180,6 +1180,9 @@
 	pos->x_advance = info->mask;
 	pos->x_offset = info->var1.i32;
 	pos->y_offset = info->var2.i32;
+
+	info->mask = HB_GLYPH_FLAG_UNSAFE_TO_BREAK;
+
 	info++, pos++;
       }
     else
@@ -1188,6 +1191,9 @@
 	pos->y_advance = info->mask;
 	pos->x_offset = info->var1.i32;
 	pos->y_offset = info->var2.i32;
+
+	info->mask = HB_GLYPH_FLAG_UNSAFE_TO_BREAK;
+
 	info++, pos++;
       }
 

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-directwrite.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-directwrite.cc	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-directwrite.cc	2017-08-24 07:10:36 UTC (rev 45105)
@@ -880,6 +880,8 @@
     pos->x_offset =
       x_mult * (isRightToLeft ? -info->var1.i32 : info->var1.i32);
     pos->y_offset = y_mult * info->var2.i32;
+
+    info->mask = HB_GLYPH_FLAG_UNSAFE_TO_BREAK;
   }
 
   if (isRightToLeft)

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face-private.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face-private.hh	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face-private.hh	2017-08-24 07:10:36 UTC (rev 45105)
@@ -55,10 +55,10 @@
   mutable unsigned int num_glyphs;	/* Number of glyphs. */
 
   enum dirty_t {
-    NOTHING	= 0x0000,
-    INDEX	= 0x0001,
-    UPEM	= 0x0002,
-    NUM_GLYPHS	= 0x0004,
+    DIRTY_NOTHING	= 0x0000,
+    DIRTY_INDEX		= 0x0001,
+    DIRTY_UPEM		= 0x0002,
+    DIRTY_NUM_GLYPHS	= 0x0004,
   } dirty;
 
   struct hb_shaper_data_t shaper_data;	/* Various shaper data. */

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc	2017-08-24 07:10:36 UTC (rev 45105)
@@ -51,7 +51,7 @@
   1000, /* upem */
   0,    /* num_glyphs */
 
-  hb_face_t::NOTHING, /* dirty */
+  hb_face_t::DIRTY_NOTHING, /* dirty */
 
   {
 #define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_INVALID,
@@ -370,7 +370,7 @@
   if (face->index == index)
     return;
 
-  face->dirty |= face->INDEX;
+  face->dirty |= face->DIRTY_INDEX;
 
   face->index = index;
 }
@@ -410,7 +410,7 @@
   if (face->upem == upem)
     return;
 
-  face->dirty |= face->UPEM;
+  face->dirty |= face->DIRTY_UPEM;
 
   face->upem = upem;
 }
@@ -459,7 +459,7 @@
   if (face->num_glyphs == glyph_count)
     return;
 
-  face->dirty |= face->NUM_GLYPHS;
+  face->dirty |= face->DIRTY_NUM_GLYPHS;
 
   face->num_glyphs = glyph_count;
 }

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font-private.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font-private.hh	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font-private.hh	2017-08-24 07:10:36 UTC (rev 45105)
@@ -117,13 +117,13 @@
   hb_destroy_func_t  destroy;
 
   enum dirty_t {
-    NOTHING	= 0x0000,
-    FACE	= 0x0001,
-    PARENT	= 0x0002,
-    FUNCS	= 0x0004,
-    SCALE	= 0x0008,
-    PPEM	= 0x0010,
-    VARIATIONS	= 0x0020,
+    DIRTY_NOTHING	= 0x0000,
+    DIRTY_FACE		= 0x0001,
+    DIRTY_PARENT	= 0x0002,
+    DIRTY_FUNCS		= 0x0004,
+    DIRTY_SCALE		= 0x0008,
+    DIRTY_PPEM		= 0x0010,
+    DIRTY_VARIATIONS	= 0x0020,
   } dirty;
 
   struct hb_shaper_data_t shaper_data;

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.cc	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.cc	2017-08-24 07:10:36 UTC (rev 45105)
@@ -1196,7 +1196,7 @@
     NULL, /* user_data */
     NULL, /* destroy */
 
-    hb_font_t::NOTHING, /* dirty */
+    hb_font_t::DIRTY_NOTHING, /* dirty */
 
     {
 #define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_INVALID,
@@ -1353,7 +1353,7 @@
   if (parent == font->parent)
     return;
 
-  font->dirty |= font->PARENT;
+  font->dirty |= font->DIRTY_PARENT;
 
   hb_font_t *old = font->parent;
 
@@ -1400,7 +1400,7 @@
   if (font->face == face)
     return;
 
-  font->dirty |= font->FACE;
+  font->dirty |= font->DIRTY_FACE;
 
   hb_face_t *old = font->face;
 
@@ -1455,7 +1455,7 @@
   if (!klass)
     klass = hb_font_funcs_get_empty ();
 
-  font->dirty |= font->FUNCS;
+  font->dirty |= font->DIRTY_FUNCS;
 
   hb_font_funcs_reference (klass);
   hb_font_funcs_destroy (font->klass);
@@ -1515,7 +1515,7 @@
   if (font->x_scale == x_scale && font->y_scale == y_scale)
     return;
 
-  font->dirty |= font->SCALE;
+  font->dirty |= font->DIRTY_SCALE;
 
   font->x_scale = x_scale;
   font->y_scale = y_scale;
@@ -1561,7 +1561,7 @@
   if (font->x_ppem == x_ppem && font->y_ppem == y_ppem)
     return;
 
-  font->dirty |= font->PPEM;
+  font->dirty |= font->DIRTY_PPEM;
 
   font->x_ppem = x_ppem;
   font->y_ppem = y_ppem;
@@ -1603,7 +1603,7 @@
     return;
   }
 
-  font->dirty |= font->VARIATIONS;
+  font->dirty |= font->DIRTY_VARIATIONS;
 
   free (font->coords);
 

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc	2017-08-24 07:10:36 UTC (rev 45105)
@@ -493,7 +493,7 @@
     return NULL;
 
   buffer = (FT_Byte *) malloc (length);
-  if (buffer == NULL)
+  if (!buffer)
     return NULL;
 
   error = FT_Load_Sfnt_Table (ft_face, tag, 0, buffer, &length);
@@ -521,7 +521,7 @@
 {
   hb_face_t *face;
 
-  if (ft_face->stream->read == NULL) {
+  if (!ft_face->stream->read) {
     hb_blob_t *blob;
 
     blob = hb_blob_create ((const char *) ft_face->stream->base,
@@ -632,9 +632,9 @@
 
 	hb_font_set_var_coords_normalized (font, coords, mm_var->num_axis);
       }
-      free (coords);
-      free (ft_coords);
     }
+    free (coords);
+    free (ft_coords);
     free (mm_var);
   }
 #endif

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-graphite2.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-graphite2.cc	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-graphite2.cc	2017-08-24 07:10:36 UTC (rev 45105)
@@ -355,6 +355,7 @@
       hb_glyph_info_t *info = &buffer->info[clusters[i].base_glyph + j];
       info->codepoint = gids[clusters[i].base_glyph + j];
       info->cluster = clusters[i].cluster;
+      info->mask = HB_GLYPH_FLAG_UNSAFE_TO_BREAK;
       info->var1.i32 = clusters[i].advance;     // all glyphs in the cluster get the same advance
     }
   }
@@ -365,7 +366,7 @@
   float yscale = (float) font->y_scale / upem;
   yscale *= yscale / xscale;
   /* Positioning. */
-  int currclus = -1;
+  unsigned int currclus = (unsigned int) -1;
   const hb_glyph_info_t *info = buffer->info;
   hb_glyph_position_t *pPos = hb_buffer_get_glyph_positions (buffer, NULL);
   if (!HB_DIRECTION_IS_BACKWARD(buffer->props.direction))

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc	2017-08-24 07:10:36 UTC (rev 45105)
@@ -224,7 +224,7 @@
   const OT::CBDT *cbdt;
 
   unsigned int cbdt_len;
-  float upem;
+  unsigned int upem;
 
   inline void init (hb_face_t *face)
   {
@@ -254,11 +254,11 @@
   {
     unsigned int x_ppem = upem, y_ppem = upem; /* TODO Use font ppem if available. */
 
-    if (cblc == NULL)
+    if (!cblc)
       return false;  // Not a color bitmap font.
 
     const OT::IndexSubtableRecord *subtable_record = this->cblc->find_table(glyph, &x_ppem, &y_ppem);
-    if (subtable_record == NULL)
+    if (!subtable_record || !x_ppem || !y_ppem)
       return false;
 
     if (subtable_record->get_extents (extents))

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-common-private.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-common-private.hh	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-common-private.hh	2017-08-24 07:10:36 UTC (rev 45105)
@@ -941,7 +941,7 @@
   }
 
   struct Iter {
-    Iter (void) : format (0) {};
+    Iter (void) : format (0), u () {};
     inline void init (const Coverage &c_) {
       format = c_.u.format;
       switch (format) {
@@ -982,8 +982,8 @@
     private:
     unsigned int format;
     union {
+    CoverageFormat2::Iter	format2; /* Put this one first since it's larger; helps shut up compiler. */
     CoverageFormat1::Iter	format1;
-    CoverageFormat2::Iter	format2;
     } u;
   };
 

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gpos-table.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gpos-table.hh	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gpos-table.hh	2017-08-24 07:10:36 UTC (rev 45105)
@@ -432,6 +432,7 @@
 
     hb_position_t mark_x, mark_y, base_x, base_y;
 
+    buffer->unsafe_to_break (glyph_pos, buffer->idx);
     mark_anchor.get_anchor (c, buffer->cur().codepoint, &mark_x, &mark_y);
     glyph_anchor.get_anchor (c, buffer->info[glyph_pos].codepoint, &base_x, &base_y);
 
@@ -643,6 +644,7 @@
         min = mid + 1;
       else
       {
+        buffer->unsafe_to_break (buffer->idx, pos + 1);
 	valueFormats[0].apply_value (c, this, &record->values[0], buffer->cur_pos());
 	valueFormats[1].apply_value (c, this, &record->values[len1], buffer->pos[pos]);
 	if (len2)
@@ -790,6 +792,7 @@
     unsigned int klass2 = (this+classDef2).get_class (buffer->info[skippy_iter.idx].codepoint);
     if (unlikely (klass1 >= class1Count || klass2 >= class2Count)) return_trace (false);
 
+    buffer->unsafe_to_break (buffer->idx, skippy_iter.idx + 1);
     const Value *v = &values[record_len * (klass1 * class2Count + klass2)];
     valueFormat1.apply_value (c, this, v, buffer->cur_pos());
     valueFormat2.apply_value (c, this, v + len1, buffer->pos[skippy_iter.idx]);
@@ -929,6 +932,7 @@
     unsigned int i = buffer->idx;
     unsigned int j = skippy_iter.idx;
 
+    buffer->unsafe_to_break (i, j);
     hb_position_t entry_x, entry_y, exit_x, exit_y;
     (this+this_record.exitAnchor).get_anchor (c, buffer->info[i].codepoint, &exit_x, &exit_y);
     (this+next_record.entryAnchor).get_anchor (c, buffer->info[j].codepoint, &entry_x, &entry_y);

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsub-table.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsub-table.hh	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsub-table.hh	2017-08-24 07:10:36 UTC (rev 45105)
@@ -1014,14 +1014,17 @@
     const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
     const ArrayOf<GlyphID> &substitute = StructAfter<ArrayOf<GlyphID> > (lookahead);
 
+  unsigned int start_index = 0, end_index = 0;
     if (match_backtrack (c,
 			 backtrack.len, (USHORT *) backtrack.array,
-			 match_coverage, this) &&
+			 match_coverage, this,
+			 &start_index) &&
         match_lookahead (c,
 			 lookahead.len, (USHORT *) lookahead.array,
 			 match_coverage, this,
-			 1))
+			 1, &end_index))
     {
+      c->buffer->unsafe_to_break_from_outbuffer (start_index, end_index);
       c->replace_glyph_inplace (substitute[index]);
       /* Note: We DON'T decrease buffer->idx.  The main loop does it
        * for us.  This is useful for preventing surprises if someone

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh	2017-08-24 07:10:36 UTC (rev 45105)
@@ -891,7 +891,8 @@
 				    unsigned int count,
 				    const USHORT backtrack[],
 				    match_func_t match_func,
-				    const void *match_data)
+				    const void *match_data,
+				    unsigned int *match_start)
 {
   TRACE_APPLY (NULL);
 
@@ -903,6 +904,8 @@
     if (!skippy_iter.prev ())
       return_trace (false);
 
+  *match_start = skippy_iter.idx;
+
   return_trace (true);
 }
 
@@ -911,7 +914,8 @@
 				    const USHORT lookahead[],
 				    match_func_t match_func,
 				    const void *match_data,
-				    unsigned int offset)
+				    unsigned int offset,
+				    unsigned int *end_index)
 {
   TRACE_APPLY (NULL);
 
@@ -923,6 +927,8 @@
     if (!skippy_iter.next ())
       return_trace (false);
 
+  *end_index = skippy_iter.idx + 1;
+
   return_trace (true);
 }
 
@@ -1145,10 +1151,11 @@
 		      inputCount, input,
 		      lookup_context.funcs.match, lookup_context.match_data,
 		      &match_length, match_positions)
-      && apply_lookup (c,
+      && (c->buffer->unsafe_to_break (c->buffer->idx, c->buffer->idx + match_length),
+	  apply_lookup (c,
 		       inputCount, match_positions,
 		       lookupCount, lookupRecord,
-		       match_length);
+		       match_length));
 }
 
 struct Rule
@@ -1666,7 +1673,7 @@
 					       const LookupRecord lookupRecord[],
 					       ChainContextApplyLookupContext &lookup_context)
 {
-  unsigned int match_length = 0;
+  unsigned int start_index = 0, match_length = 0, end_index = 0;
   unsigned int match_positions[HB_MAX_CONTEXT_LENGTH];
   return match_input (c,
 		      inputCount, input,
@@ -1674,15 +1681,17 @@
 		      &match_length, match_positions)
       && match_backtrack (c,
 			  backtrackCount, backtrack,
-			  lookup_context.funcs.match, lookup_context.match_data[0])
+			  lookup_context.funcs.match, lookup_context.match_data[0],
+			  &start_index)
       && match_lookahead (c,
 			  lookaheadCount, lookahead,
 			  lookup_context.funcs.match, lookup_context.match_data[2],
-			  match_length)
-      && apply_lookup (c,
+			  match_length, &end_index)
+      && (c->buffer->unsafe_to_break_from_outbuffer (start_index, end_index),
+          apply_lookup (c,
 		       inputCount, match_positions,
 		       lookupCount, lookupRecord,
-		       match_length);
+		       match_length));
 }
 
 struct ChainRule

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-private.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-private.hh	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-private.hh	2017-08-24 07:10:36 UTC (rev 45105)
@@ -197,8 +197,7 @@
 #define syllable()		var1.u8[3] /* GSUB/GPOS shaping boundaries */
 
 
-/* loop over syllables */
-
+/* Loop over syllables. Based on foreach_cluster(). */
 #define foreach_syllable(buffer, start, end) \
   for (unsigned int \
        _count = buffer->len, \

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map.cc	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map.cc	2017-08-24 07:10:36 UTC (rev 45105)
@@ -138,8 +138,12 @@
 			      const int    *coords,
 			      unsigned int  num_coords)
 {
-  m.global_mask = 1;
+  ASSERT_STATIC (!(HB_GLYPH_FLAG_DEFINED & (HB_GLYPH_FLAG_DEFINED + 1)));
+  unsigned int global_bit_mask = HB_GLYPH_FLAG_DEFINED + 1;
+  unsigned int global_bit_shift = _hb_popcount32 (HB_GLYPH_FLAG_DEFINED);
 
+  m.global_mask = global_bit_mask;
+
   unsigned int required_feature_index[2];
   hb_tag_t required_feature_tag[2];
   /* We default to applying required feature in stage 0.  If the required
@@ -190,7 +194,8 @@
 
 
   /* Allocate bits now */
-  unsigned int next_bit = 1;
+  unsigned int next_bit = global_bit_shift + 1;
+
   for (unsigned int i = 0; i < feature_infos.len; i++)
   {
     const feature_info_t *info = &feature_infos[i];
@@ -249,8 +254,8 @@
     map->auto_zwj = !(info->flags & F_MANUAL_ZWJ);
     if ((info->flags & F_GLOBAL) && info->max_value == 1) {
       /* Uses the global bit */
-      map->shift = 0;
-      map->mask = 1;
+      map->shift = global_bit_shift;
+      map->mask = global_bit_mask;
     } else {
       map->shift = next_bit;
       map->mask = (1u << (next_bit + bits_needed)) - (1u << next_bit);
@@ -287,7 +292,7 @@
 	add_lookups (m, face, table_index,
 		     required_feature_index[table_index],
 		     variations_index,
-		     1 /* mask */);
+		     global_bit_mask);
 
       for (unsigned i = 0; i < m.features.len; i++)
         if (m.features[i].stage[table_index] == stage)

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic.cc	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic.cc	2017-08-24 07:10:36 UTC (rev 45105)
@@ -321,7 +321,10 @@
     const arabic_state_table_entry *entry = &arabic_state_table[state][this_type];
 
     if (entry->prev_action != NONE && prev != (unsigned int) -1)
+    {
       info[prev].arabic_shaping_action() = entry->prev_action;
+      buffer->unsafe_to_break (prev, i + 1);
+    }
 
     info[i].arabic_shaping_action() = entry->curr_action;
 

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hangul.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hangul.cc	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hangul.cc	2017-08-24 07:10:36 UTC (rev 45105)
@@ -202,6 +202,7 @@
       if (start < end && end == buffer->out_len)
       {
 	/* Tone mark follows a valid syllable; move it in front, unless it's zero width. */
+        buffer->unsafe_to_break_from_outbuffer (start, buffer->idx);
 	buffer->next_glyph ();
 	if (!is_zero_width_char (font, u))
 	{
@@ -258,6 +259,7 @@
 	  else
 	    t = 0; /* The next character was not a trailing jamo. */
 	}
+	buffer->unsafe_to_break (buffer->idx, buffer->idx + (t ? 3 : 2));
 
 	/* We've got a syllable <L,V,T?>; see if it can potentially be composed. */
 	if (isCombiningL (l) && isCombiningV (v) && (t == 0 || isCombiningT (t)))
@@ -322,6 +324,8 @@
 	  end = start + 1;
 	  continue;
 	}
+	else
+	  buffer->unsafe_to_break (buffer->idx, buffer->idx + 2); /* Mark unsafe between LV and T. */
       }
 
       /* Otherwise, decompose if font doesn't support <LV> or <LVT>,
@@ -368,6 +372,8 @@
 	    buffer->merge_out_clusters (start, end);
 	  continue;
 	}
+	else if ((!tindex && buffer->idx + 1 < count && isT (buffer->cur(+1).codepoint)))
+	  buffer->unsafe_to_break (buffer->idx, buffer->idx + 2); /* Mark unsafe between LV and T. */
       }
 
       if (has_glyph)

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.cc	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.cc	2017-08-24 07:10:36 UTC (rev 45105)
@@ -624,6 +624,8 @@
 		 hb_buffer_t *buffer)
 {
   find_syllables (buffer);
+  foreach_syllable (buffer, start, end)
+    buffer->unsafe_to_break (start, end);
 }
 
 static int

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.cc	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.cc	2017-08-24 07:10:36 UTC (rev 45105)
@@ -297,6 +297,8 @@
 		 hb_buffer_t *buffer)
 {
   find_syllables (buffer);
+  foreach_syllable (buffer, start, end)
+    buffer->unsafe_to_break (start, end);
 }
 
 static int

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-thai.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-thai.cc	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-thai.cc	2017-08-24 07:10:36 UTC (rev 45105)
@@ -244,6 +244,7 @@
     /* At least one of the above/below actions is NOP. */
     thai_action_t action = above_edge.action != NOP ? above_edge.action : below_edge.action;
 
+    buffer->unsafe_to_break (base, i);
     if (action == RD)
       info[base].codepoint = thai_pua_shape (info[base].codepoint, action, font);
     else

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use.cc	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use.cc	2017-08-24 07:10:36 UTC (rev 45105)
@@ -354,6 +354,8 @@
 		 hb_buffer_t *buffer)
 {
   find_syllables (buffer);
+  foreach_syllable (buffer, start, end)
+    buffer->unsafe_to_break (start, end);
   setup_rphf_mask (plan, buffer);
   setup_topographical_masks (plan, buffer);
 }

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback.cc	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback.cc	2017-08-24 07:10:36 UTC (rev 45105)
@@ -307,6 +307,9 @@
 		      unsigned int end)
 {
   hb_direction_t horiz_dir = HB_DIRECTION_INVALID;
+
+  buffer->unsafe_to_break (base, end);
+
   hb_glyph_extents_t base_extents;
   if (!font->get_glyph_extents (buffer->info[base].codepoint,
 				&base_extents))

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc	2017-08-24 07:10:36 UTC (rev 45105)
@@ -509,9 +509,10 @@
 	  /* Merge cluster backward. */
 	  if (cluster < info[j - 1].cluster)
 	  {
+	    unsigned int mask = info[i].mask;
 	    unsigned int old_cluster = info[j - 1].cluster;
 	    for (unsigned k = j; k && info[k - 1].cluster == old_cluster; k--)
-	      info[k - 1].cluster = cluster;
+	      buffer->set_cluster (info[k - 1], cluster, mask);
 	  }
 	  continue;
 	}
@@ -782,7 +783,32 @@
   _hb_buffer_deallocate_gsubgpos_vars (c->buffer);
 }
 
+static inline void
+hb_propagate_flags (hb_buffer_t *buffer)
+{
+  /* Propagate cluster-level glyph flags to be the same on all cluster glyphs.
+   * Simplifies using them. */
 
+  if (!(buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_UNSAFE_TO_BREAK))
+    return;
+
+  hb_glyph_info_t *info = buffer->info;
+
+  foreach_cluster (buffer, start, end)
+  {
+    unsigned int mask = 0;
+    for (unsigned int i = start; i < end; i++)
+      if (info[i].mask & HB_GLYPH_FLAG_UNSAFE_TO_BREAK)
+      {
+	 mask = HB_GLYPH_FLAG_UNSAFE_TO_BREAK;
+	 break;
+      }
+    if (mask)
+      for (unsigned int i = start; i < end; i++)
+	info[i].mask |= mask;
+  }
+}
+
 /* Pull it all together! */
 
 static void
@@ -825,6 +851,8 @@
   if (c->plan->shaper->postprocess_glyphs)
     c->plan->shaper->postprocess_glyphs (c->plan, c->buffer, c->font);
 
+  hb_propagate_flags (c->buffer);
+
   _hb_buffer_deallocate_unicode_vars (c->buffer);
 
   c->buffer->props.direction = c->target_direction;

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc	2017-08-24 07:10:36 UTC (rev 45105)
@@ -160,7 +160,7 @@
   assert (props->direction != HB_DIRECTION_INVALID);
 
   hb_face_make_immutable (face);
-  shape_plan->default_shaper_list = shaper_list == NULL;
+  shape_plan->default_shaper_list = !shaper_list;
   shape_plan->face_unsafe = face;
   shape_plan->props = *props;
   shape_plan->num_user_features = num_user_features;
@@ -423,7 +423,7 @@
   return hb_segment_properties_equal (&shape_plan->props, &proposal->props) &&
 	 hb_shape_plan_user_features_match (shape_plan, proposal) &&
 	 hb_shape_plan_coords_match (shape_plan, proposal) &&
-	 ((shape_plan->default_shaper_list && proposal->shaper_list == NULL) ||
+	 ((shape_plan->default_shaper_list && !proposal->shaper_list) ||
 	  (shape_plan->shaper_func == proposal->shaper_func));
 }
 

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode-private.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode-private.hh	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode-private.hh	2017-08-24 07:10:36 UTC (rev 45105)
@@ -105,6 +105,10 @@
   inline unsigned int
   modified_combining_class (hb_codepoint_t unicode)
   {
+    /* XXX This hack belongs to the Arabic shaper:
+     * Put HAMZA ABOVE in the same class as SHADDA. */
+    if (unlikely (unicode == 0x0654u)) unicode = 0x0651u;
+
     /* XXX This hack belongs to the Myanmar shaper. */
     if (unlikely (unicode == 0x1037u)) unicode = 0x103Au;
 

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-uniscribe.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-uniscribe.cc	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-uniscribe.cc	2017-08-24 07:10:36 UTC (rev 45105)
@@ -1024,6 +1024,8 @@
     pos->x_advance = x_mult * (int32_t) info->mask;
     pos->x_offset = x_mult * (backward ? -info->var1.i32 : info->var1.i32);
     pos->y_offset = y_mult * info->var2.i32;
+
+    info->mask = HB_GLYPH_FLAG_UNSAFE_TO_BREAK;
   }
 
   if (backward)

Modified: trunk/Build/source/libs/harfbuzz/version.ac
===================================================================
--- trunk/Build/source/libs/harfbuzz/version.ac	2017-08-24 00:21:30 UTC (rev 45104)
+++ trunk/Build/source/libs/harfbuzz/version.ac	2017-08-24 07:10:36 UTC (rev 45105)
@@ -8,4 +8,4 @@
 dnl --------------------------------------------------------
 dnl
 dnl  m4-include this file to define the current harfbuzz version
-m4_define([harfbuzz_version], [1.4.8])
+m4_define([harfbuzz_version], [1.5.0])



More information about the tex-live-commits mailing list