texlive[46090] Build/source/libs: harfbuzz-1.7.3

commits+kakuto at tug.org commits+kakuto at tug.org
Mon Dec 18 23:30:27 CET 2017


Revision: 46090
          http://tug.org/svn/texlive?view=revision&revision=46090
Author:   kakuto
Date:     2017-12-18 23:30:27 +0100 (Mon, 18 Dec 2017)
Log Message:
-----------
harfbuzz-1.7.3

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/CMakeLists.txt
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/NEWS
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/README
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/config.h.in
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-debug.hh
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.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-shape-complex-indic.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-tag.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-digest-private.hh
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-private.hh
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc
    trunk/Build/source/libs/harfbuzz/version.ac

Modified: trunk/Build/source/libs/README
===================================================================
--- trunk/Build/source/libs/README	2017-12-18 01:22:21 UTC (rev 46089)
+++ trunk/Build/source/libs/README	2017-12-18 22:30:27 UTC (rev 46090)
@@ -24,7 +24,7 @@
 graphite2 1.3.10 - checked 20jun17
   http://sourceforge.net/projects/silgraphite/files/graphite2/
 
-harfbuzz 1.7.2 - checked 05dec17
+harfbuzz 1.7.3 - checked 18dec17
   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-12-18 01:22:21 UTC (rev 46089)
+++ trunk/Build/source/libs/harfbuzz/ChangeLog	2017-12-18 22:30:27 UTC (rev 46090)
@@ -1,3 +1,8 @@
+2017-12-18  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
+
+	Import harfbuzz-1.7.3.
+	* version.ac: Adjusted.
+
 2017-12-05  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
 
 	Import harfbuzz-1.7.2.

Modified: trunk/Build/source/libs/harfbuzz/TLpatches/ChangeLog
===================================================================
--- trunk/Build/source/libs/harfbuzz/TLpatches/ChangeLog	2017-12-18 01:22:21 UTC (rev 46089)
+++ trunk/Build/source/libs/harfbuzz/TLpatches/ChangeLog	2017-12-18 22:30:27 UTC (rev 46090)
@@ -1,3 +1,8 @@
+2017-12-18  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
+
+	Imported harfbuzz-1.7.3 source tree from:
+	  http://www.freedesktop.org/software/harfbuzz/release/
+
 2017-12-05  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
 
 	Imported harfbuzz-1.7.2 source tree from:

Modified: trunk/Build/source/libs/harfbuzz/TLpatches/TL-Changes
===================================================================
--- trunk/Build/source/libs/harfbuzz/TLpatches/TL-Changes	2017-12-18 01:22:21 UTC (rev 46089)
+++ trunk/Build/source/libs/harfbuzz/TLpatches/TL-Changes	2017-12-18 22:30:27 UTC (rev 46090)
@@ -1,4 +1,4 @@
-Changes applied to the harfbuzz-1.7.2/ tree as obtained from:
+Changes applied to the harfbuzz-1.7.3/ 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-12-18 01:22:21 UTC (rev 46089)
+++ trunk/Build/source/libs/harfbuzz/configure	2017-12-18 22:30:27 UTC (rev 46090)
@@ -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.7.2.
+# Generated by GNU Autoconf 2.69 for harfbuzz (TeX Live) 1.7.3.
 #
 # 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.7.2'
-PACKAGE_STRING='harfbuzz (TeX Live) 1.7.2'
+PACKAGE_VERSION='1.7.3'
+PACKAGE_STRING='harfbuzz (TeX Live) 1.7.3'
 PACKAGE_BUGREPORT='tex-k at tug.org'
 PACKAGE_URL=''
 
@@ -1314,7 +1314,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.7.2 to adapt to many kinds of systems.
+\`configure' configures harfbuzz (TeX Live) 1.7.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1385,7 +1385,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of harfbuzz (TeX Live) 1.7.2:";;
+     short | recursive ) echo "Configuration of harfbuzz (TeX Live) 1.7.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1492,7 +1492,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-harfbuzz (TeX Live) configure 1.7.2
+harfbuzz (TeX Live) configure 1.7.3
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2082,7 +2082,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.7.2, which was
+It was created by harfbuzz (TeX Live) $as_me 1.7.3, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -4005,7 +4005,7 @@
 
 # Define the identity of the package.
  PACKAGE='harfbuzz--tex-live-'
- VERSION='1.7.2'
+ VERSION='1.7.3'
 
 
 # Some tools Automake needs.
@@ -4199,8 +4199,8 @@
 
 HB_VERSION_MAJOR=1
 HB_VERSION_MINOR=7
-HB_VERSION_MICRO=2
-HB_VERSION=1.7.2
+HB_VERSION_MICRO=3
+HB_VERSION=1.7.3
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -6989,7 +6989,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.7.2, which was
+This file was extended by harfbuzz (TeX Live) $as_me 1.7.3, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -7055,7 +7055,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.7.2
+harfbuzz (TeX Live) config.status 1.7.3
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/CMakeLists.txt
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/CMakeLists.txt	2017-12-18 01:22:21 UTC (rev 46089)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/CMakeLists.txt	2017-12-18 22:30:27 UTC (rev 46090)
@@ -1,6 +1,7 @@
 cmake_minimum_required(VERSION 2.8.0)
 project(harfbuzz)
 
+enable_testing()
 
 ## Limit framework build to Xcode generator
 if (BUILD_FRAMEWORK)
@@ -683,3 +684,7 @@
     endif ()
   endif ()
 endif ()
+
+# Needs to come last so that variables defined above are passed to
+# subdirectories.
+add_subdirectory(test)

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog	2017-12-18 01:22:21 UTC (rev 46089)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog	2017-12-18 22:30:27 UTC (rev 46090)
@@ -1,3 +1,370 @@
+commit 1245395a60ab6b04fc4653c448a97bb6ffee672c
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Sun Dec 17 12:32:33 2017 -0500
+
+    [coretext] In hb_coretext_font_create() set ptem
+
+    Otherwise setting the CTFont was ineffective as it would have been
+    recreated anyway unless font size was set to 18 CSS points.
+
+ src/hb-coretext.cc | 14 +++++++++++---
+ 1 file changed, 11 insertions(+), 3 deletions(-)
+
+commit 493a005d9527b6075f3c1ca4b41c22d7805f975c
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Sat Dec 16 11:49:39 2017 -0500
+
+    [set] In add_sorted_array(), bail if data is not sorted
+
+ src/hb-set-private.hh | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+commit a7bd6d7a4c53ff61d7d8286a594aaa0a0e15b1a1
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Sat Dec 16 11:11:18 2017 -0500
+
+    [collect_glyphs] Bail if input data looks like garbage
+
+    Specificaly, when a range or sorted array has unexpected order,
+    we take that as
+    font data being garbage and bail out.  This fixes significant slowdown
+    on a bad
+    version of Chandas font which has a 600KB GPOS with garbage inside.
+
+    Later on, I like to add a maximum-work counter for collect_glyphs
+    to protect
+    against malicious fonts as well.
+
+    Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=794896
+
+ src/hb-ot-layout-common-private.hh | 14 +++++++-------
+ src/hb-set-private.hh              |  4 ++--
+ 2 files changed, 9 insertions(+), 9 deletions(-)
+
+commit 1ce7d6e215ef9d5386010bcdbbca79ef01811596
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Sat Dec 16 11:36:16 2017 -0500
+
+    [set] Optimize add_array() / add_sorted_array()
+
+    Does page lookup as needed.
+
+ src/hb-set-private.hh | 54
+ ++++++++++++++++++++++++++++++++++++---------------
+ 1 file changed, 38 insertions(+), 16 deletions(-)
+
+commit 71e6adf1e2d65eb905a0ba247672fe36169955ef
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Sat Dec 16 11:07:37 2017 -0500
+
+    [collect_glyphs] handle ClassDef better
+
+ src/hb-ot-layout-common-private.hh   | 63
+ ++++++++++++++++++++++++++++++------
+ src/hb-ot-layout-gdef-table.hh       |  2 +-
+ src/hb-ot-layout-gpos-table.hh       |  5 +--
+ src/hb-ot-layout-gsubgpos-private.hh |  2 +-
+ 4 files changed, 56 insertions(+), 16 deletions(-)
+
+commit 87cc5a65cb4b98a3a857b5846085ef0814b392a8
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Sat Dec 16 06:18:07 2017 -0800
+
+    [collect_glyphs] In PairPosFornat2 do not collect classDef1
+
+    The coverage already covered that.
+
+ src/hb-ot-layout-gpos-table.hh | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+commit 81f27df4d9db1bfc1dd04593cbd121397b86e9a6
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Sat Dec 16 06:12:06 2017 -0800
+
+    More work towards improving collect_glyphs() against bad input
+
+    The three "XXXXX"'s should be switched to false.  Doing that
+    separately for ease
+    of bisecting...
+
+ src/hb-ot-layout-common-private.hh |  7 +++----
+ src/hb-ot-layout-gpos-table.hh     | 25 ++++++++++---------------
+ src/hb-ot-layout-gsub-table.hh     | 35
+ +++++++++++++----------------------
+ src/hb-set-digest-private.hh       |  6 ++++--
+ src/hb-set-private.hh              | 36
+ ++++++++++++++++++------------------
+ 5 files changed, 48 insertions(+), 61 deletions(-)
+
+commit 5d02572034e3dafbe87000fd0aa34b858bd95075
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Thu Dec 14 19:33:55 2017 -0800
+
+    [set] Add add_sorted_array()
+
+    Not optimized to use sortedness yet.  Also start putting in place
+    infra
+    to faster reject bad data.
+
+    A version of Chandas.ttf found on some Chrome bots has 660kb of GPOS,
+    mostly junk.  That is causing 48 million of set->add() calls in
+    collect_glyphs(), which is insane.
+
+    In the upcoming commits, I'll be speeding that up by optimizing
+    add_sorted_array(), while also reducing work by rejecting out-of-sort
+    arrays quickly and propagate the rejection.
+
+    Part of https://bugs.chromium.org/p/chromium/issues/detail?id=794896
+
+ src/hb-ot-layout-common-private.hh   | 51
+ +++++++++++++++++++++++-------------
+ src/hb-ot-layout-gdef-table.hh       |  2 +-
+ src/hb-ot-layout-gpos-table.hh       | 10 +++----
+ src/hb-ot-layout-gsubgpos-private.hh |  2 +-
+ src/hb-set-digest-private.hh         | 31 ++++++++++++++++++----
+ src/hb-set-private.hh                | 21 +++++++++++++--
+ 6 files changed, 84 insertions(+), 33 deletions(-)
+
+commit 9d6511a7343ba150e8072e5fe91732db54a92309
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Thu Dec 14 19:04:55 2017 -0800
+
+    [set] Reduce number of preallocated pages from 8 to 1
+
+    Now that pagesize is 8192, this feels better.
+
+ src/hb-set-private.hh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit ae2e2b068e1ab68d1f814165cb86fa38deef1f5b
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Thu Dec 14 18:15:14 2017 -0800
+
+    Fix partial tracing debug builds
+
+ src/hb-debug.hh | 16 +++++++++++++---
+ 1 file changed, 13 insertions(+), 3 deletions(-)
+
+commit 9daa88cd790b80a8bc7eaae2e7eec6f2f9fc60cf
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Thu Dec 14 13:37:48 2017 -0800
+
+    Minor
+
+ src/hb-set-private.hh | 11 +++++++++++
+ src/hb-set.cc         |  6 ++----
+ 2 files changed, 13 insertions(+), 4 deletions(-)
+
+commit f424a342233ae32bbfabbdeadf59c82420b0880b
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Thu Dec 14 13:30:38 2017 -0800
+
+    [set] Change pagesize from 512 bits to 8192 bits
+
+    Fixes perf regression on some heavy fonts in Chrome's FT+HB
+    interaction.
+
+    See:
+    https://bugs.chromium.org/p/chromium/issues/detail?id=782220
+
+    More work to be done:
+    https://bugs.chromium.org/p/chromium/issues/detail?id=794896
+
+ src/hb-set-private.hh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 0fe62c1f333200523e10663f47a58b82e3f22154
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Wed Dec 13 13:12:20 2017 -0800
+
+    [set] Add add_array()
+
+    To be used to optimize adding a whole bunch of (sorted) items at
+    the same time,
+    as in CoverageFormat1.
+
+ src/hb-ot-layout-common-private.hh |  4 +---
+ src/hb-set-digest-private.hh       | 12 ++++++++++++
+ src/hb-set-private.hh              |  6 ++++++
+ 3 files changed, 19 insertions(+), 3 deletions(-)
+
+commit 20e69c950d431391f92335f8845e5d4291aca8f3
+Author: ebraminio <ebrahim at gnu.org>
+Date:   Thu Dec 7 12:24:12 2017 +0330
+
+    [test] print commented line, like the original script (#649)
+
+ test/shaping/run-tests.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+commit 71ad2777c52aeb0842038881899499a49cb895f2
+Author: ebraminio <ebrahim at gnu.org>
+Date:   Thu Dec 7 11:35:36 2017 +0330
+
+    [ci] Add an after distribution test runner (#648)
+
+ .circleci/config.yml | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+commit 5f061d27d5289c7608a6579dca668b1f5be7f4e8
+Author: ebraminio <ebrahim at gnu.org>
+Date:   Thu Dec 7 11:22:55 2017 +0330
+
+    Rewrite run-tests in python (#647)
+
+ test/shaping/Makefile.am  |   4 +-
+ test/shaping/run-tests.py | 115
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ test/shaping/run-tests.sh |  65 --------------------------
+ 3 files changed, 117 insertions(+), 67 deletions(-)
+
+commit 3ce6c7bd96296a44950110e84ade76c7c1df06e4
+Author: Khaled Hosny <khaledhosny at eglug.org>
+Date:   Wed Dec 6 21:08:20 2017 +0200
+
+    [ci] Sort out Travis configuration
+
+    Use a matrix to avoid a gazillion if's.
+
+ .ci/deploy-docs.sh   |  2 ++
+ .ci/run-coveralls.sh | 14 +++++++++++
+ .travis.yml          | 69
+ ++++++++++++++++++++++++++++++++--------------------
+ 3 files changed, 58 insertions(+), 27 deletions(-)
+
+commit 5a6d2b986a02fc47fa9dcbb330e6949af8e375ff
+Author: ebraminio <ebrahim at gnu.org>
+Date:   Wed Dec 6 18:27:27 2017 +0330
+
+    [ci] minor improvements (#644)
+
+ .circleci/config.yml | 3 +++
+ appveyor.yml         | 2 +-
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+commit 840a32e3f3ed0a85bfa84e69efaeb504d92d1aa7
+Author: Khaled Hosny <khaledhosny at eglug.org>
+Date:   Wed Dec 6 00:49:25 2017 +0200
+
+    Run cmake tests on CI builds
+
+ .circleci/config.yml | 6 ++++--
+ appveyor.yml         | 2 +-
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+commit c8609551485cfca6f9629c565b9dd5f02aa14f3e
+Author: Khaled Hosny <khaledhosny at eglug.org>
+Date:   Wed Dec 6 00:43:28 2017 +0200
+
+    Add API tests to cmake build
+
+ CMakeLists.txt          |  5 +++++
+ test/CMakeLists.txt     |  1 +
+ test/api/CMakeLists.txt | 39 +++++++++++++++++++++++++++++++++++++++
+ test/api/hb-test.h      |  2 ++
+ test/api/test-c.c       |  2 ++
+ 5 files changed, 49 insertions(+)
+
+commit f19126dd35b03f6e05a67cbc406b3ce4a3e35022
+Author: Khaled Hosny <khaledhosny at eglug.org>
+Date:   Tue Dec 5 22:52:54 2017 +0200
+
+    We are already inside “if HAVE_GLIB” check
+
+ test/api/Makefile.am | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+commit 7af48a3f37abac0aa1a1ad79c98399a9a71bd903
+Author: ebraminio <ebrahim at gnu.org>
+Date:   Wed Dec 6 14:22:19 2017 +0330
+
+    [ci] Don't cache msys2 folder
+
+ appveyor.yml | 1 -
+ 1 file changed, 1 deletion(-)
+
+commit b6f505c7164e302d2990cf056b73e918a641e976
+Author: ebraminio <ebrahim at gnu.org>
+Date:   Wed Dec 6 13:51:04 2017 +0330
+
+    [ci] Enable glib and freetype on appveyor cmake (#643)
+
+ appveyor.yml | 29 +++++++++++++++++++++--------
+ 1 file changed, 21 insertions(+), 8 deletions(-)
+
+commit 03b7a221f701a9b003890878e730ad175c3fdd86
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Tue Dec 5 13:12:11 2017 -0800
+
+    [debug] Use %p to print pointers
+
+    Fixes https://github.com/harfbuzz/harfbuzz/issues/640
+
+ src/hb-debug.hh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 353cc6fbf09d16aad18b48a3a46ec7dd348aedc6
+Author: Ebrahim Byagowi <ebrahim at gnu.org>
+Date:   Wed Dec 6 00:04:30 2017 +0330
+
+    [ci] Fix appveyor badge
+
+ README | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 0dc03ef75724376927a7d63b991508c2901fcdf9
+Author: Nathan Willis <nwillis at glyphography.com>
+Date:   Tue Dec 5 17:43:09 2017 +0000
+
+    Indic: always hyphenate pre-base-reordering, for clarity.
+
+ src/hb-ot-shape-complex-indic.cc | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+commit be59f3cbf4e3269ea05d5a707cdae04a32e097ce
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Tue Dec 5 09:01:28 2017 -0800
+
+    Silence unused-variables warning on MSVC
+
+    Fixes https://github.com/harfbuzz/harfbuzz/issues/635
+
+ src/hb-private.hh | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit 80c1b01f054c5d65ca96a568aaf1c28ffe97215b
+Author: David Corbett <corbett.dav at husky.neu.edu>
+Date:   Tue Dec 5 08:28:42 2017 -0500
+
+    Allow digits in language system tags
+
+ src/hb-ot-tag.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 85bb89a88bdfae02fb7c27c7b994f4f22723442a
+Author: David Corbett <corbett.dav at husky.neu.edu>
+Date:   Mon Dec 4 15:15:27 2017 -0500
+
+    Fix string matching in parse_bool
+
+ src/hb-common.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 0fd89dc61c6a26253aa9bb85e8dfd9faded11440
+Author: Olivier Blin <olivier.blin at softathome.com>
+Date:   Mon Dec 4 18:58:41 2017 +0100
+
+    [hb-ft] Fix build when Multiple Master font support is disabled
+    in freetype
+
+    FT_Set_Var_Blend_Coordinates() is not available when "Multiple Master
+    font interface" is disabled in freetype's modules.cfg
+
+ configure.ac         | 1 +
+ src/hb-ft.cc         | 2 ++
+ util/helper-cairo.cc | 2 ++
+ 3 files changed, 5 insertions(+)
+
 commit 843f7f70355f62511a5d8be3b905c853bf362629
 Author: Behdad Esfahbod <behdad at behdad.org>
 Date:   Mon Dec 4 08:52:39 2017 -0800

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/NEWS
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/NEWS	2017-12-18 01:22:21 UTC (rev 46089)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/NEWS	2017-12-18 22:30:27 UTC (rev 46090)
@@ -1,3 +1,13 @@
+Overview of changes leading to 1.7.3
+Monday, December 18, 2017
+====================================
+
+- hb_set_t performance tuning and optimizations.
+- Speed up collect_glyphs() and reject garbage data.
+- In hb_coretext_font_create() set font point-size (ptem).
+- Misc fixes.
+
+
 Overview of changes leading to 1.7.2
 Monday, December 4, 2017
 ====================================

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/README
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/README	2017-12-18 01:22:21 UTC (rev 46089)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/README	2017-12-18 22:30:27 UTC (rev 46090)
@@ -1,5 +1,5 @@
 [![Build Status](https://travis-ci.org/harfbuzz/harfbuzz.svg)](https://travis-ci.org/harfbuzz/harfbuzz)
-[![Build Status](https://ci.appveyor.com/api/projects/status/4oaq58ns2h0m2soa?svg=true)](https://ci.appveyor.com/project/harfbuzz/harfbuzz)
+[![Build status](https://ci.appveyor.com/api/projects/status/0t0flrxpstj9lb9w?svg=true)](https://ci.appveyor.com/project/harfbuzz/harfbuzz)
 [![CircleCI](https://circleci.com/gh/harfbuzz/harfbuzz.svg?style=svg)](https://circleci.com/gh/harfbuzz/harfbuzz)
 [![Coverage Status](https://img.shields.io/coveralls/harfbuzz/harfbuzz.svg)](https://coveralls.io/r/harfbuzz/harfbuzz)
 [ABI Tracker](http://abi-laboratory.pro/tracker/timeline/harfbuzz/)

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/config.h.in
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/config.h.in	2017-12-18 01:22:21 UTC (rev 46089)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/config.h.in	2017-12-18 22:30:27 UTC (rev 46090)
@@ -39,6 +39,9 @@
 /* Define to 1 if you have the `FT_Get_Var_Blend_Coordinates' function. */
 #undef HAVE_FT_GET_VAR_BLEND_COORDINATES
 
+/* Define to 1 if you have the `FT_Set_Var_Blend_Coordinates' function. */
+#undef HAVE_FT_SET_VAR_BLEND_COORDINATES
+
 /* Define to 1 if you have the `getpagesize' function. */
 #undef HAVE_GETPAGESIZE
 

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac	2017-12-18 01:22:21 UTC (rev 46089)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac	2017-12-18 22:30:27 UTC (rev 46090)
@@ -1,6 +1,6 @@
 AC_PREREQ([2.64])
 AC_INIT([HarfBuzz],
-        [1.7.2],
+        [1.7.3],
         [https://github.com/harfbuzz/harfbuzz/issues/new],
         [harfbuzz],
         [http://harfbuzz.org/])
@@ -354,6 +354,7 @@
 	save_libs=$LIBS
 	LIBS="$LIBS $FREETYPE_LIBS"
 	AC_CHECK_FUNCS(FT_Get_Var_Blend_Coordinates)
+	AC_CHECK_FUNCS(FT_Set_Var_Blend_Coordinates)
 	LIBS=$save_libs
 fi
 AM_CONDITIONAL(HAVE_FREETYPE, $have_freetype)

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc	2017-12-18 01:22:21 UTC (rev 46089)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc	2017-12-18 22:30:27 UTC (rev 46090)
@@ -784,9 +784,9 @@
     (*pp)++;
 
   /* CSS allows on/off as aliases 1/0. */
-  if (*pp - p == 2 || 0 == strncmp (p, "on", 2))
+  if (*pp - p == 2 && 0 == strncmp (p, "on", 2))
     *pv = 1;
-  else if (*pp - p == 3 || 0 == strncmp (p, "off", 2))
+  else if (*pp - p == 3 && 0 == strncmp (p, "off", 3))
     *pv = 0;
   else
     return false;

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc	2017-12-18 01:22:21 UTC (rev 46089)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc	2017-12-18 22:30:27 UTC (rev 46090)
@@ -39,7 +39,7 @@
 #define HB_CORETEXT_DEFAULT_FONT_SIZE 12.f
 
 static CGFloat
-coretext_font_size (float ptem)
+coretext_font_size_from_ptem (float ptem)
 {
   /* CoreText points are CSS pixels (96 per inch),
    * NOT typographic points (72 per inch).
@@ -49,6 +49,12 @@
   ptem *= 96.f / 72.f;
   return ptem <= 0.f ? HB_CORETEXT_DEFAULT_FONT_SIZE : ptem;
 }
+static float
+coretext_font_size_to_ptem (CGFloat size)
+{
+  size *= 72.f / 96.f;
+  return size <= 0.f ? 0 : size;
+}
 
 static void
 release_table_data (void *user_data)
@@ -84,7 +90,7 @@
 
 HB_SHAPER_DATA_ENSURE_DEFINE(coretext, face)
 HB_SHAPER_DATA_ENSURE_DEFINE_WITH_CONDITION(coretext, font,
-	fabs (CTFontGetSize((CTFontRef) data) - coretext_font_size (font->ptem)) <= .5
+	fabs (CTFontGetSize((CTFontRef) data) - coretext_font_size_from_ptem (font->ptem)) <= .5
 )
 
 static CTFontDescriptorRef
@@ -282,7 +288,7 @@
   if (unlikely (!hb_coretext_shaper_face_data_ensure (face))) return nullptr;
   CGFontRef cg_font = (CGFontRef) HB_SHAPER_DATA_GET (face);
 
-  CTFontRef ct_font = create_ct_font (cg_font, coretext_font_size (font->ptem));
+  CTFontRef ct_font = create_ct_font (cg_font, coretext_font_size_from_ptem (font->ptem));
 
   if (unlikely (!ct_font))
   {
@@ -314,6 +320,8 @@
   if (unlikely (hb_object_is_inert (font)))
     return font;
 
+  hb_font_set_ptem (font, coretext_font_size_to_ptem (CTFontGetSize(ct_font)));
+
   /* Let there be dragons here... */
   HB_SHAPER_DATA_GET (font) = (hb_coretext_shaper_font_data_t *) CFRetain (ct_font);
 

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-debug.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-debug.hh	2017-12-18 01:22:21 UTC (rev 46089)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-debug.hh	2017-12-18 22:30:27 UTC (rev 46090)
@@ -93,7 +93,7 @@
   fprintf (stderr, "%-10s", what ? what : "");
 
   if (obj)
-    fprintf (stderr, "(%0*lx) ", (unsigned int) (2 * sizeof (void *)), (unsigned long) obj);
+    fprintf (stderr, "(%*p) ", (unsigned int) (2 * sizeof (void *)), obj);
   else
     fprintf (stderr, " %*s  ", (unsigned int) (2 * sizeof (void *)), "");
 
@@ -220,8 +220,8 @@
 {}
 
 template <int max_level, typename ret_t>
-struct hb_auto_trace_t {
-
+struct hb_auto_trace_t
+{
   explicit inline hb_auto_trace_t (unsigned int *plevel_,
 				   const char *what_,
 				   const void *obj_,
@@ -269,8 +269,18 @@
   bool returned;
 };
 template <typename ret_t> /* Make sure we don't use hb_auto_trace_t when not tracing. */
-struct hb_auto_trace_t<0, ret_t>;
+struct hb_auto_trace_t<0, ret_t>
+{
+  explicit inline hb_auto_trace_t (unsigned int *plevel_,
+				   const char *what_,
+				   const void *obj_,
+				   const char *func,
+				   const char *message,
+				   ...) HB_PRINTF_FUNC(6, 7) {}
 
+  inline ret_t ret (ret_t v, unsigned int line HB_UNUSED = 0) { return v; }
+};
+
 /* For disabled tracing; optimize out everything.
  * https://github.com/harfbuzz/harfbuzz/pull/605 */
 template <typename ret_t>

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc	2017-12-18 01:22:21 UTC (rev 46089)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc	2017-12-18 22:30:27 UTC (rev 46090)
@@ -747,6 +747,7 @@
     FT_Set_Transform (ft_face, &matrix, nullptr);
   }
 
+#ifdef HAVE_FT_SET_VAR_BLEND_COORDINATES
   unsigned int num_coords;
   const int *coords = hb_font_get_var_coords_normalized (font, &num_coords);
   if (num_coords)
@@ -760,6 +761,7 @@
       free (ft_coords);
     }
   }
+#endif
 
   ft_face->generic.data = blob;
   ft_face->generic.finalizer = (FT_Generic_Finalizer) _release_blob;

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-12-18 01:22:21 UTC (rev 46089)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-common-private.hh	2017-12-18 22:30:27 UTC (rev 46090)
@@ -155,8 +155,8 @@
   }
 
   template <typename set_t>
-  inline void add_coverage (set_t *glyphs) const {
-    glyphs->add_range (start, end);
+  inline bool add_coverage (set_t *glyphs) const {
+    return glyphs->add_range (start, end);
   }
 
   GlyphID	start;		/* First GlyphID in the range */
@@ -715,10 +715,8 @@
   }
 
   template <typename set_t>
-  inline void add_coverage (set_t *glyphs) const {
-    unsigned int count = glyphArray.len;
-    for (unsigned int i = 0; i < count; i++)
-      glyphs->add (glyphArray[i]);
+  inline bool add_coverage (set_t *glyphs) const {
+    return glyphs->add_sorted_array (glyphArray.array, glyphArray.len);
   }
 
   public:
@@ -817,10 +815,12 @@
   }
 
   template <typename set_t>
-  inline void add_coverage (set_t *glyphs) const {
+  inline bool add_coverage (set_t *glyphs) const {
     unsigned int count = rangeRecord.len;
     for (unsigned int i = 0; i < count; i++)
-      rangeRecord[i].add_coverage (glyphs);
+      if (unlikely (!rangeRecord[i].add_coverage (glyphs)))
+        return false;
+    return true;
   }
 
   public:
@@ -927,12 +927,14 @@
     }
   }
 
+  /* Might return false if array looks unsorted.
+   * Used for faster rejection of corrupt data. */
   template <typename set_t>
-  inline void add_coverage (set_t *glyphs) const {
+  inline bool add_coverage (set_t *glyphs) const {
     switch (u.format) {
-    case 1: u.format1.add_coverage (glyphs); break;
-    case 2: u.format2.add_coverage (glyphs); break;
-    default:                                 break;
+    case 1: return u.format1.add_coverage (glyphs);
+    case 2: return u.format2.add_coverage (glyphs);
+    default:return false;
     }
   }
 
@@ -1018,11 +1020,36 @@
   }
 
   template <typename set_t>
-  inline void add_class (set_t *glyphs, unsigned int klass) const {
+  inline bool add_coverage (set_t *glyphs) const {
+    unsigned int start = 0;
     unsigned int count = classValue.len;
     for (unsigned int i = 0; i < count; i++)
+    {
+      if (classValue[i])
+        continue;
+
+      if (start != i)
+	if (unlikely (!glyphs->add_range (startGlyph + start, startGlyph + i)))
+	  return false;
+
+      start = i + 1;
+    }
+    if (start != count)
+      if (unlikely (!glyphs->add_range (startGlyph + start, startGlyph + count)))
+	return false;
+
+    return true;
+  }
+
+  template <typename set_t>
+  inline bool add_class (set_t *glyphs, unsigned int klass) const {
+    unsigned int count = classValue.len;
+    for (unsigned int i = 0; i < count; i++)
+    {
       if (classValue[i] == klass)
         glyphs->add (startGlyph + i);
+    }
+    return true;
   }
 
   inline bool intersects_class (const hb_set_t *glyphs, unsigned int klass) const {
@@ -1075,11 +1102,25 @@
   }
 
   template <typename set_t>
-  inline void add_class (set_t *glyphs, unsigned int klass) const {
+  inline bool add_coverage (set_t *glyphs) const {
     unsigned int count = rangeRecord.len;
     for (unsigned int i = 0; i < count; i++)
+      if (rangeRecord[i].value)
+	if (unlikely (!rangeRecord[i].add_coverage (glyphs)))
+	  return false;
+    return true;
+  }
+
+  template <typename set_t>
+  inline bool add_class (set_t *glyphs, unsigned int klass) const {
+    unsigned int count = rangeRecord.len;
+    for (unsigned int i = 0; i < count; i++)
+    {
       if (rangeRecord[i].value == klass)
-        rangeRecord[i].add_coverage (glyphs);
+        if (unlikely (!rangeRecord[i].add_coverage (glyphs)))
+	  return false;
+    }
+    return true;
   }
 
   inline bool intersects_class (const hb_set_t *glyphs, unsigned int klass) const {
@@ -1137,14 +1178,28 @@
     }
   }
 
-  inline void add_class (hb_set_t *glyphs, unsigned int klass) const {
+  /* Might return false if array looks unsorted.
+   * Used for faster rejection of corrupt data. */
+  template <typename set_t>
+  inline bool add_coverage (set_t *glyphs) const {
     switch (u.format) {
-    case 1: u.format1.add_class (glyphs, klass); return;
-    case 2: u.format2.add_class (glyphs, klass); return;
-    default:return;
+    case 1: return u.format1.add_coverage (glyphs);
+    case 2: return u.format2.add_coverage (glyphs);
+    default:return false;
     }
   }
 
+  /* Might return false if array looks unsorted.
+   * Used for faster rejection of corrupt data. */
+  template <typename set_t>
+  inline bool add_class (set_t *glyphs, unsigned int klass) const {
+    switch (u.format) {
+    case 1: return u.format1.add_class (glyphs, klass);
+    case 2: return u.format2.add_class (glyphs, klass);
+    default:return false;
+    }
+  }
+
   inline bool intersects_class (const hb_set_t *glyphs, unsigned int klass) const {
     switch (u.format) {
     case 1: return u.format1.intersects_class (glyphs, klass);

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-12-18 01:22:21 UTC (rev 46089)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gpos-table.hh	2017-12-18 22:30:27 UTC (rev 46090)
@@ -462,7 +462,7 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
-    (this+coverage).add_coverage (c->input);
+    if (unlikely (!(this+coverage).add_coverage (c->input))) return;
   }
 
   inline const Coverage &get_coverage (void) const
@@ -510,7 +510,7 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
-    (this+coverage).add_coverage (c->input);
+    if (unlikely (!(this+coverage).add_coverage (c->input))) return;
   }
 
   inline const Coverage &get_coverage (void) const
@@ -607,12 +607,7 @@
     unsigned int record_size = UINT16::static_size * (1 + len1 + len2);
 
     const PairValueRecord *record = CastP<PairValueRecord> (arrayZ);
-    unsigned int count = len;
-    for (unsigned int i = 0; i < count; i++)
-    {
-      c->input->add (record->secondGlyph);
-      record = &StructAtOffset<PairValueRecord> (record, record_size);
-    }
+    c->input->add_array (&record->secondGlyph, len, record_size);
   }
 
   inline bool apply (hb_apply_context_t *c,
@@ -689,7 +684,7 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
-    (this+coverage).add_coverage (c->input);
+    if (unlikely (!(this+coverage).add_coverage (c->input))) return;
     unsigned int count = pairSet.len;
     for (unsigned int i = 0; i < count; i++)
       (this+pairSet[i]).collect_glyphs (c, valueFormat);
@@ -755,17 +750,8 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
-    (this+coverage).add_coverage (c->input);
-
-    unsigned int count1 = class1Count;
-    const ClassDef &klass1 = this+classDef1;
-    for (unsigned int i = 0; i < count1; i++)
-      klass1.add_class (c->input, i);
-
-    unsigned int count2 = class2Count;
-    const ClassDef &klass2 = this+classDef2;
-    for (unsigned int i = 0; i < count2; i++)
-      klass2.add_class (c->input, i);
+    if (unlikely (!(this+coverage).add_coverage (c->input))) return;
+    if (unlikely (!(this+classDef2).add_coverage (c->input))) return;
   }
 
   inline const Coverage &get_coverage (void) const
@@ -906,7 +892,7 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
-    (this+coverage).add_coverage (c->input);
+    if (unlikely (!(this+coverage).add_coverage (c->input))) return;
   }
 
   inline const Coverage &get_coverage (void) const
@@ -1064,8 +1050,8 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
-    (this+markCoverage).add_coverage (c->input);
-    (this+baseCoverage).add_coverage (c->input);
+    if (unlikely (!(this+markCoverage).add_coverage (c->input))) return;
+    if (unlikely (!(this+baseCoverage).add_coverage (c->input))) return;
   }
 
   inline const Coverage &get_coverage (void) const
@@ -1167,8 +1153,8 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
-    (this+markCoverage).add_coverage (c->input);
-    (this+ligatureCoverage).add_coverage (c->input);
+    if (unlikely (!(this+markCoverage).add_coverage (c->input))) return;
+    if (unlikely (!(this+ligatureCoverage).add_coverage (c->input))) return;
   }
 
   inline const Coverage &get_coverage (void) const
@@ -1280,8 +1266,8 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
-    (this+mark1Coverage).add_coverage (c->input);
-    (this+mark2Coverage).add_coverage (c->input);
+    if (unlikely (!(this+mark1Coverage).add_coverage (c->input))) return;
+    if (unlikely (!(this+mark2Coverage).add_coverage (c->input))) return;
   }
 
   inline const Coverage &get_coverage (void) const

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-12-18 01:22:21 UTC (rev 46089)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsub-table.hh	2017-12-18 22:30:27 UTC (rev 46090)
@@ -54,6 +54,7 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
+    if (unlikely (!(this+coverage).add_coverage (c->input))) return;
     Coverage::Iter iter;
     for (iter.init (this+coverage); iter.more (); iter.next ())
     {
@@ -60,7 +61,6 @@
       /* TODO Switch to range-based API to work around malicious fonts.
        * https://github.com/harfbuzz/harfbuzz/issues/363 */
       hb_codepoint_t glyph_id = iter.get_glyph ();
-      c->input->add (glyph_id);
       c->output->add ((glyph_id + deltaGlyphID) & 0xFFFFu);
     }
   }
@@ -139,6 +139,7 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
+    if (unlikely (!(this+coverage).add_coverage (c->input))) return;
     Coverage::Iter iter;
     unsigned int count = substitute.len;
     for (iter.init (this+coverage); iter.more (); iter.next ())
@@ -145,7 +146,6 @@
     {
       if (unlikely (iter.get_coverage () >= count))
         break; /* Work around malicious fonts. https://github.com/harfbuzz/harfbuzz/issues/363 */
-      c->input->add (iter.get_glyph ());
       c->output->add (substitute[iter.get_coverage ()]);
     }
   }
@@ -269,9 +269,7 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
-    unsigned int count = substitute.len;
-    for (unsigned int i = 0; i < count; i++)
-      c->output->add (substitute[i]);
+    c->output->add_array (substitute.array, substitute.len);
   }
 
   inline bool apply (hb_apply_context_t *c) const
@@ -348,7 +346,7 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
-    (this+coverage).add_coverage (c->input);
+    if (unlikely (!(this+coverage).add_coverage (c->input))) return;
     unsigned int count = sequence.len;
     for (unsigned int i = 0; i < count; i++)
 	(this+sequence[i]).collect_glyphs (c);
@@ -474,6 +472,7 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
+    if (unlikely (!(this+coverage).add_coverage (c->input))) return;
     Coverage::Iter iter;
     unsigned int count = alternateSet.len;
     for (iter.init (this+coverage); iter.more (); iter.next ())
@@ -480,11 +479,8 @@
     {
       if (unlikely (iter.get_coverage () >= count))
         break; /* Work around malicious fonts. https://github.com/harfbuzz/harfbuzz/issues/363 */
-      c->input->add (iter.get_glyph ());
       const AlternateSet &alt_set = this+alternateSet[iter.get_coverage ()];
-      unsigned int count = alt_set.len;
-      for (unsigned int i = 0; i < count; i++)
-	c->output->add (alt_set[i]);
+      c->output->add_array (alt_set.array, alt_set.len);
     }
   }
 
@@ -615,9 +611,7 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
-    unsigned int count = component.len;
-    for (unsigned int i = 1; i < count; i++)
-      c->input->add (component[i]);
+    c->input->add_array (component.array, component.len ? component.len - 1 : 0);
     c->output->add (ligGlyph);
   }
 
@@ -801,6 +795,7 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
+    if (unlikely (!(this+coverage).add_coverage (c->input))) return;
     Coverage::Iter iter;
     unsigned int count = ligatureSet.len;
     for (iter.init (this+coverage); iter.more (); iter.next ())
@@ -807,7 +802,6 @@
     {
       if (unlikely (iter.get_coverage () >= count))
         break; /* Work around malicious fonts. https://github.com/harfbuzz/harfbuzz/issues/363 */
-      c->input->add (iter.get_glyph ());
       (this+ligatureSet[iter.get_coverage ()]).collect_glyphs (c);
     }
   }
@@ -970,25 +964,22 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
+    if (unlikely (!(this+coverage).add_coverage (c->input))) return;
 
-    const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
-
     unsigned int count;
 
-    (this+coverage).add_coverage (c->input);
-
     count = backtrack.len;
     for (unsigned int i = 0; i < count; i++)
-      (this+backtrack[i]).add_coverage (c->before);
+      if (unlikely (!(this+backtrack[i]).add_coverage (c->before))) return;
 
+    const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
     count = lookahead.len;
     for (unsigned int i = 0; i < count; i++)
-      (this+lookahead[i]).add_coverage (c->after);
+      if (unlikely (!(this+lookahead[i]).add_coverage (c->after))) return;
 
     const ArrayOf<GlyphID> &substitute = StructAfter<ArrayOf<GlyphID> > (lookahead);
     count = substitute.len;
-    for (unsigned int i = 0; i < count; i++)
-      c->output->add (substitute[i]);
+    c->output->add_array (substitute.array, substitute.len);
   }
 
   inline const Coverage &get_coverage (void) const

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-12-18 01:22:21 UTC (rev 46089)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.cc	2017-12-18 22:30:27 UTC (rev 46090)
@@ -714,7 +714,7 @@
    * following algorithm: starting from the end of the syllable, move backwards
    * until a consonant is found that does not have a below-base or post-base
    * form (post-base forms have to follow below-base forms), or that is not a
-   * pre-base reordering Ra, or arrive at the first consonant. The consonant
+   * pre-base-reordering Ra, or arrive at the first consonant. The consonant
    * stopped at will be the base.
    *
    *   o If the syllable starts with Ra + Halant (in a script that has Reph)
@@ -785,11 +785,11 @@
 	    if (info[i].indic_position() == POS_BELOW_C)
 	      seen_below = true;
 
-	    /* -> or that is not a pre-base reordering Ra,
+	    /* -> or that is not a pre-base-reordering Ra,
 	     *
 	     * IMPLEMENTATION NOTES:
 	     *
-	     * Our pre-base reordering Ra's are marked POS_POST_C, so will be skipped
+	     * Our pre-base-reordering Ra's are marked POS_POST_C, so will be skipped
 	     * by the logic above already.
 	     */
 
@@ -1124,7 +1124,7 @@
   unsigned int pref_len = 2;
   if (indic_plan->mask_array[PREF] && base + pref_len < end)
   {
-    /* Find a Halant,Ra sequence and mark it for pre-base reordering processing. */
+    /* Find a Halant,Ra sequence and mark it for pre-base-reordering processing. */
     for (unsigned int i = base + 1; i + pref_len - 1 < end; i++) {
       hb_codepoint_t glyphs[2];
       for (unsigned int j = 0; j < pref_len; j++)
@@ -1518,7 +1518,7 @@
 
     /*       3. If reph should be repositioned after the main consonant: find the
      *          first consonant not ligated with main, or find the first
-     *          consonant that is not a potential pre-base reordering Ra.
+     *          consonant that is not a potential pre-base-reordering Ra.
      */
     if (reph_pos == REPH_POS_AFTER_MAIN)
     {
@@ -1607,13 +1607,13 @@
   }
 
 
-  /*   o Reorder pre-base reordering consonants:
+  /*   o Reorder pre-base-reordering consonants:
    *
-   *     If a pre-base reordering consonant is found, reorder it according to
+   *     If a pre-base-reordering consonant is found, reorder it according to
    *     the following rules:
    */
 
-  if (try_pref && base + 1 < end) /* Otherwise there can't be any pre-base reordering Ra. */
+  if (try_pref && base + 1 < end) /* Otherwise there can't be any pre-base-reordering Ra. */
   {
     for (unsigned int i = base + 1; i < end; i++)
       if ((info[i].mask & indic_plan->mask_array[PREF]) != 0)

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-tag.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-tag.cc	2017-12-18 01:22:21 UTC (rev 46089)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-tag.cc	2017-12-18 22:30:27 UTC (rev 46090)
@@ -920,7 +920,7 @@
     char tag[4];
     int i;
     s += 6;
-    for (i = 0; i < 4 && ISALPHA (s[i]); i++)
+    for (i = 0; i < 4 && ISALNUM (s[i]); i++)
       tag[i] = TOUPPER (s[i]);
     if (i) {
       for (; i < 4; i++)

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh	2017-12-18 01:22:21 UTC (rev 46089)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh	2017-12-18 22:30:27 UTC (rev 46090)
@@ -112,6 +112,8 @@
 #endif
 #if __GNUC__ >= 4
 #define HB_UNUSED	__attribute__((unused))
+#elif defined(_MSC_VER) /* https://github.com/harfbuzz/harfbuzz/issues/635 */
+#define HB_UNUSED __pragma(warning(suppress: 4100 4101))
 #else
 #define HB_UNUSED
 #endif

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-digest-private.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-digest-private.hh	2017-12-18 01:22:21 UTC (rev 46089)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-digest-private.hh	2017-12-18 22:30:27 UTC (rev 46090)
@@ -71,7 +71,7 @@
     mask |= mask_for (g);
   }
 
-  inline void add_range (hb_codepoint_t a, hb_codepoint_t b) {
+  inline bool add_range (hb_codepoint_t a, hb_codepoint_t b) {
     if ((b >> shift) - (a >> shift) >= mask_bits - 1)
       mask = (mask_t) -1;
     else {
@@ -79,8 +79,29 @@
       mask_t mb = mask_for (b);
       mask |= mb + (mb - ma) - (mb < ma);
     }
+    return true;
   }
 
+  template <typename T>
+  inline void add_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
+  {
+    for (unsigned int i = 0; i < count; i++)
+    {
+      add (*array);
+      array = (const T *) (stride + (const char *) array);
+    }
+  }
+  template <typename T>
+  inline bool add_sorted_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
+  {
+    for (unsigned int i = 0; i < count; i++)
+    {
+      add (*array);
+      array = (const T *) (stride + (const char *) array);
+    }
+    return true;
+  }
+
   inline bool may_have (hb_codepoint_t g) const {
     return !!(mask & mask_for (g));
   }
@@ -108,10 +129,24 @@
     tail.add (g);
   }
 
-  inline void add_range (hb_codepoint_t a, hb_codepoint_t b) {
+  inline bool add_range (hb_codepoint_t a, hb_codepoint_t b) {
     head.add_range (a, b);
     tail.add_range (a, b);
+    return true;
   }
+  template <typename T>
+  inline void add_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
+  {
+    head.add_array (array, count, stride);
+    tail.add_array (array, count, stride);
+  }
+  template <typename T>
+  inline bool add_sorted_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
+  {
+    head.add_sorted_array (array, count, stride);
+    tail.add_sorted_array (array, count, stride);
+    return true;
+  }
 
   inline bool may_have (hb_codepoint_t g) const {
     return head.may_have (g) && tail.may_have (g);

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-private.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-private.hh	2017-12-18 01:22:21 UTC (rev 46089)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-private.hh	2017-12-18 22:30:27 UTC (rev 46090)
@@ -70,20 +70,19 @@
 
     inline void add_range (hb_codepoint_t a, hb_codepoint_t b)
     {
-     elt_t *la = &elt (a);
-     elt_t *lb = &elt (b);
-     if (la == lb)
-       *la |= (mask (b) << 1) - mask(a);
-     else
-     {
-       *la |= ~(mask (a) - 1);
-       la++;
+      elt_t *la = &elt (a);
+      elt_t *lb = &elt (b);
+      if (la == lb)
+        *la |= (mask (b) << 1) - mask(a);
+      else
+      {
+	*la |= ~(mask (a) - 1);
+	la++;
 
-       memset (la, 0xff, (char *) lb - (char *) la);
+	memset (la, 0xff, (char *) lb - (char *) la);
 
-       *lb |= ((mask (b) << 1) - 1);
-
-     }
+	*lb |= ((mask (b) << 1) - 1);
+      }
     }
 
     inline bool is_equal (const page_t *other) const
@@ -151,7 +150,7 @@
       return 0;
     }
 
-    static const unsigned int PAGE_BITS = 512; /* Use to tune. */
+    static const unsigned int PAGE_BITS = 8192; /* Use to tune. */
     static_assert ((PAGE_BITS & ((PAGE_BITS) - 1)) == 0, "");
 
     typedef uint64_t elt_t;
@@ -182,8 +181,19 @@
   ASSERT_POD ();
   bool in_error;
   hb_prealloced_array_t<page_map_t, 8> page_map;
-  hb_prealloced_array_t<page_t, 8> pages;
+  hb_prealloced_array_t<page_t, 1> pages;
 
+  inline void init (void)
+  {
+    page_map.init ();
+    pages.init ();
+  }
+  inline void finish (void)
+  {
+    page_map.finish ();
+    pages.finish ();
+  }
+
   inline bool resize (unsigned int count)
   {
     if (unlikely (in_error)) return false;
@@ -215,39 +225,89 @@
   {
     if (unlikely (in_error)) return;
     if (unlikely (g == INVALID)) return;
-    page_t *page = page_for_insert (g);
-    if (unlikely (!page)) return;
+    page_t *page = page_for_insert (g); if (unlikely (!page)) return;
     page->add (g);
   }
-  inline void add_range (hb_codepoint_t a, hb_codepoint_t b)
+  inline bool add_range (hb_codepoint_t a, hb_codepoint_t b)
   {
-    if (unlikely (in_error || a > b || a == INVALID || b == INVALID)) return;
+    if (unlikely (in_error || a > b || a == INVALID || b == INVALID)) return false;
     unsigned int ma = get_major (a);
     unsigned int mb = get_major (b);
     if (ma == mb)
     {
-      page_t *page = page_for_insert (a);
-      if (unlikely (!page)) return;
+      page_t *page = page_for_insert (a); if (unlikely (!page)) return false;
       page->add_range (a, b);
     }
     else
     {
-      page_t *page = page_for_insert (a);
-      if (unlikely (!page)) return;
+      page_t *page = page_for_insert (a); if (unlikely (!page)) return false;
       page->add_range (a, major_start (ma + 1) - 1);
 
       for (unsigned int m = ma + 1; m < mb; m++)
       {
-	page = page_for_insert (major_start (m));
-	if (unlikely (!page)) return;
+	page = page_for_insert (major_start (m)); if (unlikely (!page)) return false;
 	page->init1 ();
       }
 
-      page = page_for_insert (b);
-      if (unlikely (!page)) return;
+      page = page_for_insert (b); if (unlikely (!page)) return false;
       page->add_range (major_start (mb), b);
     }
+    return true;
   }
+
+  template <typename T>
+  inline void add_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
+  {
+    if (unlikely (in_error)) return;
+    if (!count) return;
+    hb_codepoint_t g = *array;
+    while (count)
+    {
+      unsigned int m = get_major (g);
+      page_t *page = page_for_insert (g); if (unlikely (!page)) return;
+      unsigned int start = major_start (m);
+      unsigned int end = major_start (m + 1);
+      do
+      {
+	page->add (g);
+
+	array++;
+	count--;
+      }
+      while (count && (g = *array, start <= g && g < end));
+    }
+  }
+
+  /* Might return false if array looks unsorted.
+   * Used for faster rejection of corrupt data. */
+  template <typename T>
+  inline bool add_sorted_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
+  {
+    if (unlikely (in_error)) return false;
+    if (!count) return true;
+    hb_codepoint_t g = *array;
+    hb_codepoint_t last_g = g;
+    while (count)
+    {
+      unsigned int m = get_major (g);
+      page_t *page = page_for_insert (g); if (unlikely (!page)) return false;
+      unsigned int end = major_start (m + 1);
+      do
+      {
+        /* If we try harder we can change the following comparison to <=;
+	 * Not sure if it's worth it. */
+        if (g < last_g) return false;
+	last_g = g;
+	page->add (g);
+
+	array++;
+	count--;
+      }
+      while (count && (g = *array, g < end));
+    }
+    return true;
+  }
+
   inline void del (hb_codepoint_t g)
   {
     if (unlikely (in_error)) return;

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc	2017-12-18 01:22:21 UTC (rev 46089)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc	2017-12-18 22:30:27 UTC (rev 46090)
@@ -45,8 +45,7 @@
   if (!(set = hb_object_create<hb_set_t> ()))
     return hb_set_get_empty ();
 
-  set->page_map.init ();
-  set->pages.init ();
+  set->init ();
 
   return set;
 }
@@ -96,8 +95,7 @@
 {
   if (!hb_object_destroy (set)) return;
 
-  set->page_map.finish ();
-  set->pages.finish ();
+  set->finish ();
 
   free (set);
 }

Modified: trunk/Build/source/libs/harfbuzz/version.ac
===================================================================
--- trunk/Build/source/libs/harfbuzz/version.ac	2017-12-18 01:22:21 UTC (rev 46089)
+++ trunk/Build/source/libs/harfbuzz/version.ac	2017-12-18 22:30:27 UTC (rev 46090)
@@ -8,4 +8,4 @@
 dnl --------------------------------------------------------
 dnl
 dnl  m4-include this file to define the current harfbuzz version
-m4_define([harfbuzz_version], [1.7.2])
+m4_define([harfbuzz_version], [1.7.3])



More information about the tex-live-commits mailing list