texlive[48018] Build/source/libs: harfbuzz 1.8.1

commits+kakuto at tug.org commits+kakuto at tug.org
Fri Jun 15 06:38:42 CEST 2018


Revision: 48018
          http://tug.org/svn/texlive?view=revision&revision=48018
Author:   kakuto
Date:     2018-06-15 06:38:41 +0200 (Fri, 15 Jun 2018)
Log Message:
-----------
harfbuzz 1.8.1

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/RELEASING.md
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-map-private.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.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.h
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-table.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-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/harfbuzz-src/src/hb-set.h
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-static.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.hh
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-private.hh
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.h
    trunk/Build/source/libs/harfbuzz/version.ac

Modified: trunk/Build/source/libs/README
===================================================================
--- trunk/Build/source/libs/README	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/README	2018-06-15 04:38:41 UTC (rev 48018)
@@ -24,7 +24,7 @@
 graphite2 1.3.11 - checked 05mar18
   http://sourceforge.net/projects/silgraphite/files/graphite2/
 
-harfbuzz 1.8.0 - checked 06jun18
+harfbuzz 1.8.1 - checked 15jun18
   http://www.freedesktop.org/software/harfbuzz/release/
 
 icu 61.1 - checked 29mar18

Modified: trunk/Build/source/libs/harfbuzz/ChangeLog
===================================================================
--- trunk/Build/source/libs/harfbuzz/ChangeLog	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/ChangeLog	2018-06-15 04:38:41 UTC (rev 48018)
@@ -1,3 +1,7 @@
+2018-06-15  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
+
+	Import harfbuzz-1.8.1.
+
 2018-06-06  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
 
 	Import harfbuzz-1.8.0.

Modified: trunk/Build/source/libs/harfbuzz/TLpatches/ChangeLog
===================================================================
--- trunk/Build/source/libs/harfbuzz/TLpatches/ChangeLog	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/TLpatches/ChangeLog	2018-06-15 04:38:41 UTC (rev 48018)
@@ -1,3 +1,8 @@
+2018-06-15  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
+
+	Imported harfbuzz-1.8.1 source tree from:
+	  http://www.freedesktop.org/software/harfbuzz/release/
+
 2018-06-06  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
 
 	Imported harfbuzz-1.8.0 source tree from:

Modified: trunk/Build/source/libs/harfbuzz/TLpatches/TL-Changes
===================================================================
--- trunk/Build/source/libs/harfbuzz/TLpatches/TL-Changes	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/TLpatches/TL-Changes	2018-06-15 04:38:41 UTC (rev 48018)
@@ -1,4 +1,4 @@
-Changes applied to the harfbuzz-1.8.0/ tree as obtained from:
+Changes applied to the harfbuzz-1.8.1/ 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	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/configure	2018-06-15 04:38:41 UTC (rev 48018)
@@ -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.8.0.
+# Generated by GNU Autoconf 2.69 for harfbuzz (TeX Live) 1.8.1.
 #
 # 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.8.0'
-PACKAGE_STRING='harfbuzz (TeX Live) 1.8.0'
+PACKAGE_VERSION='1.8.1'
+PACKAGE_STRING='harfbuzz (TeX Live) 1.8.1'
 PACKAGE_BUGREPORT='tex-k at tug.org'
 PACKAGE_URL=''
 
@@ -1317,7 +1317,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.8.0 to adapt to many kinds of systems.
+\`configure' configures harfbuzz (TeX Live) 1.8.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1388,7 +1388,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of harfbuzz (TeX Live) 1.8.0:";;
+     short | recursive ) echo "Configuration of harfbuzz (TeX Live) 1.8.1:";;
    esac
   cat <<\_ACEOF
 
@@ -1495,7 +1495,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-harfbuzz (TeX Live) configure 1.8.0
+harfbuzz (TeX Live) configure 1.8.1
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2131,7 +2131,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.8.0, which was
+It was created by harfbuzz (TeX Live) $as_me 1.8.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -4054,7 +4054,7 @@
 
 # Define the identity of the package.
  PACKAGE='harfbuzz--tex-live-'
- VERSION='1.8.0'
+ VERSION='1.8.1'
 
 
 # Some tools Automake needs.
@@ -4248,8 +4248,8 @@
 
 HB_VERSION_MAJOR=1
 HB_VERSION_MINOR=8
-HB_VERSION_MICRO=0
-HB_VERSION=1.8.0
+HB_VERSION_MICRO=1
+HB_VERSION=1.8.1
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -8140,7 +8140,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.8.0, which was
+This file was extended by harfbuzz (TeX Live) $as_me 1.8.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -8206,7 +8206,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.8.0
+harfbuzz (TeX Live) config.status 1.8.1
 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	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog	2018-06-15 04:38:41 UTC (rev 48018)
@@ -1,3 +1,309 @@
+commit f3e58ab8a957cdf36bddef793c473664744885a7
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Tue Jun 12 19:32:04 2018 -0400
+
+    [docs] Enlist misc new symbols
+
+ RELEASING.md               |  3 ++-
+ docs/harfbuzz-sections.txt | 24 +++++++++++++++++++++++-
+ 2 files changed, 25 insertions(+), 2 deletions(-)
+
+commit f6893ef82c51a35dd075973b2041b1b19f81faff
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Tue Jun 12 19:20:20 2018 -0400
+
+    Move hb-version.h generation to Makefile
+
+    Fixes https://github.com/harfbuzz/harfbuzz/issues/864
+
+    Unfortunately 1.7.7 and 1.8.0 went out with the wrong hb-version.h
+    contents.
+
+ configure.ac     |  1 -
+ src/Makefile.am  | 21 ++++++++++++++++-----
+ src/hb-version.h |  6 +++---
+ 3 files changed, 19 insertions(+), 9 deletions(-)
+
+commit cc0b04f48f261c1deb8f4142e7ae0222fbec67fb
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Tue Jun 12 18:24:54 2018 -0400
+
+    [subset] Remove HB_SUBSET_BUILTIN
+
+    Just include hb-static.cc in libharfbuzz-subset.so source list as
+    well.  Those building it built-in will include hb-static.cc once
+    already.  No need for any gymnastics.
+
+ src/Makefile.sources | 1 +
+ src/hb-subset.cc     | 5 -----
+ 2 files changed, 1 insertion(+), 5 deletions(-)
+
+commit ba0ea56efab9caa942d59bf51c78e490969cab87
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Mon Jun 11 23:24:41 2018 -0400
+
+    [substitute-closure] Rename function for clarity
+
+ src/hb-ot-layout-gsub-table.hh       | 4 ++--
+ src/hb-ot-layout-gsubgpos-private.hh | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 7b5ce416383101cb9d72a775a32d0088984e6817
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Mon Jun 11 23:23:40 2018 -0400
+
+    Whitespace
+
+ src/hb-ot-layout-gsub-table.hh | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+commit c4d0d11c55f018026fc9c1db75fe7a4f8a38f81f
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Mon Jun 11 22:11:45 2018 -0400
+
+    [vector] Always 0-fill new items
+
+ src/hb-private.hh | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit a7e1b4a3b2d7b853ca244156571dd83321739bb1
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Mon Jun 11 22:05:08 2018 -0400
+
+    Fix compiler warning re reordering of initializations
+
+ src/hb-ot-layout-gsubgpos-private.hh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit f56cd9df10824fbbef52172470d07ff673d460cc
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Mon Jun 11 22:02:38 2018 -0400
+
+    Style
+
+ src/hb-ot-layout.cc | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+commit a95cde15af4aa34e76c4394dfdf17e7d25164d5b
+Author: Jonathan Kew <jfkthame at gmail.com>
+Date:   Mon Jun 11 18:09:35 2018 -0700
+
+    [hb-set] Additional testcase for hb-set-intersect.
+
+ test/api/test-set.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+commit 82484b05ca7a51dec6f3f9e9b0d7967823d7657f
+Author: Jonathan Kew <jfkthame at gmail.com>
+Date:   Mon Jun 11 20:55:14 2018 -0700
+
+    [hb-set] Don't shrink vectors until after processing their contents.
+
+    Fixes #1054.
+
+ src/hb-set-private.hh | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+commit eb585033cae33ca069bbcdaa21e4074678b6a6e9
+Author: Ebrahim Byagowi <ebrahim at gnu.org>
+Date:   Mon Jun 11 03:47:43 2018 +0430
+
+    Fetch the updated dwrite_1.h header from a better place
+
+    Following to
+    https://ci.appveyor.com/project/harfbuzz/harfbuzz/build/1.0.1693/job/mfkjdhcdykjuqdfc
+
+ appveyor.yml | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit b8e406f0c7c381d46e2d2bbe35a6107d560f2122
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Sun Jun 10 17:22:38 2018 -0400
+
+    More fixes for SunStudio 12.6 build
+
+    Followup to https://github.com/harfbuzz/harfbuzz/pull/1053
+
+ src/hb-ft.cc     | 8 ++++----
+ src/hb-subset.cc | 2 +-
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 498e4373dc2eb98fa9b18a0824c7912ed84a4c80
+Author: prrace <philip.race at oracle.com>
+Date:   Sat Jun 9 16:04:28 2018 -0700
+
+    Fix SunStudio 12.6 build (#1053)
+
+ src/hb-face.cc    | 2 +-
+ src/hb-private.hh | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 46f7e7760f4c9b1b2886a27eff3c0fabdab45dbe
+Author: Garret Rieger <grieger at google.com>
+Date:   Thu Jun 7 15:55:45 2018 -0700
+
+    [subset] Use REPLACEME instead of version.
+
+ src/hb-subset-input.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit fc246ec985890f8256f6e03cdf74c86b9b51ff2a
+Author: Garret Rieger <grieger at google.com>
+Date:   Thu Jun 7 15:54:19 2018 -0700
+
+    [subset] Move variable declaration out of loop.
+
+ test/api/test-subset-glyf.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 197cb18b22ce11f32f5f2c68c13f7068fb5cc338
+Author: Garret Rieger <grieger at google.com>
+Date:   Thu Jun 7 15:32:52 2018 -0700
+
+    [subset] Add test cases for gsub closure in subsetting.
+
+ test/api/fonts/Roboto-Regular.gsub.fi.ttf   | Bin 0 -> 2652 bytes
+ test/api/fonts/Roboto-Regular.gsub.fil.ttf  | Bin 0 -> 3228 bytes
+ test/api/fonts/Roboto-Regular.nogsub.fi.ttf | Bin 0 -> 1856 bytes
+ test/api/test-subset-glyf.c                 |  52
+ ++++++++++++++++++++++++++++
+ 4 files changed, 52 insertions(+)
+
+commit 37eab27be3b88079614f66e484c700bb2d40af10
+Author: Garret Rieger <grieger at google.com>
+Date:   Thu Jun 7 14:39:03 2018 -0700
+
+    [subset] Add fuzzing of gsub closure to hb-subset-fuzzer.
+
+ test/fuzzing/hb-subset-fuzzer.cc | 27 ++++++++++++++++++++-------
+ 1 file changed, 20 insertions(+), 7 deletions(-)
+
+commit feb23892a36a7c855306db6d21521d5e8362bdf7
+Author: Garret Rieger <grieger at google.com>
+Date:   Thu Jun 7 14:32:34 2018 -0700
+
+    [subset] Use gsub closure if ot layout is not being dropped.
+
+ src/hb-ot-layout.cc   | 10 ++++++++--
+ src/hb-subset-plan.cc | 20 ++++++++++++++++++--
+ 2 files changed, 26 insertions(+), 4 deletions(-)
+
+commit a5673da9be70f2ba0ff79aab4bd9a4480cb0223e
+Author: Garret Rieger <grieger at google.com>
+Date:   Thu Jun 7 14:23:03 2018 -0700
+
+    [subset] Add drop_ot_layout setting to subset input.
+
+ src/hb-subset-input.cc   | 17 +++++++++++++++++
+ src/hb-subset-plan.cc    |  1 +
+ src/hb-subset-plan.hh    |  1 +
+ src/hb-subset-private.hh |  1 +
+ src/hb-subset.cc         |  3 ++-
+ src/hb-subset.h          |  3 +++
+ 6 files changed, 25 insertions(+), 1 deletion(-)
+
+commit 57badadb769d0bcdbee00afce3af4972bc5c6bf1
+Author: Garret Rieger <grieger at google.com>
+Date:   Wed Jun 6 16:02:51 2018 -0700
+
+    [subset] add a new closure call to hb-ot-layout that can compute
+    the closure over multiple lookups.
+
+ src/hb-ot-layout.cc | 26 ++++++++++++++++++++++++++
+ src/hb-ot-layout.h  |  6 ++++++
+ src/hb-ot-shape.cc  | 10 +---------
+ 3 files changed, 33 insertions(+), 9 deletions(-)
+
+commit 11f1f4131b722f0e0338bee222a78110806f5a3d
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Wed Jun 6 16:46:50 2018 -0700
+
+    [set] Add is_subset
+
+    New API:
+    +hb_set_is_subset()
+
+ src/hb-set-private.hh       | 13 +++++++++++++
+ src/hb-set.cc               | 22 ++++++++++++++++++++--
+ src/hb-set.h                |  4 ++++
+ test/api/test-set.c         |  4 ++++
+ test/api/test-subset-glyf.c | 11 +++++------
+ 5 files changed, 46 insertions(+), 8 deletions(-)
+
+commit 45186b9b8cbffa7b5c8509624fb431a0f79f5130
+Author: Garret Rieger <grieger at google.com>
+Date:   Tue Jun 5 17:14:42 2018 -0700
+
+    [subset] Add memoization of GSUB lookup closures.
+
+ src/hb-ot-layout-gsub-table.hh       | 15 +++++++++++++--
+ src/hb-ot-layout-gsubgpos-private.hh | 20 ++++++++++++++++++++
+ src/hb-ot-layout.cc                  |  6 ++++--
+ 3 files changed, 37 insertions(+), 4 deletions(-)
+
+commit 78d92e0f27e8b688efac014526ef5c4f1f53a58f
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Wed Jun 6 15:24:43 2018 -0700
+
+    Minorish
+
+ src/hb-private.hh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 676b19f0d1d21629b654e69f220bf53965735940
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Wed Jun 6 15:23:35 2018 -0700
+
+    Compiler gymnastics
+
+    Part of https://github.com/harfbuzz/harfbuzz/issues/630
+
+ src/hb-private.hh | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit 0a5952e8ddb3ec955496d582ef5a559a27684a0c
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Wed Jun 6 14:55:30 2018 -0700
+
+    Move prime_for back into map
+
+    This was causing problem on systems without visibility when map
+    was used
+    from both libharfbuzz and libharfbuzz-subset. Sigh.
+
+    https://ci.appveyor.com/project/harfbuzz/harfbuzz/build/1.0.1669/job/dey47nmff0770vp3
+
+ src/hb-map-private.hh | 53
+ ++++++++++++++++++++++++++++++++++++++++++++++++++-
+ src/hb-private.hh     |  3 ---
+ src/hb-static.cc      | 51
+ -------------------------------------------------
+ 3 files changed, 52 insertions(+), 55 deletions(-)
+
+commit a2a1484ef93d5b5c3748b15219eca669d866b0a9
+Author: David Corbett <corbett.dav at husky.neu.edu>
+Date:   Wed Jun 6 12:57:28 2018 -0400
+
+    Convert Consonant_Initial_Postfixed to CONS_FINAL
+
+    Consonant_Initial_Postfixed was split off of
+    Consonant_Succeeding_Repha,
+    so it should correspond to the same USE class, CONS_FINAL.
+
+ src/gen-use-table.py                 | 5 +++--
+ src/hb-ot-shape-complex-use-table.cc | 2 +-
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+commit 37986aa9b7ac44b1c4c50ebba9902d06cc8a45e0
+Author: Behdad Esfahbod <behdad at behdad.org>
+Date:   Tue Jun 5 18:04:40 2018 -0700
+
+    1.8.0
+
+ NEWS         | 5 +++++
+ configure.ac | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
 commit 9d3cd13c30d8df41a2f7ff6c4208a1b2d75ddd64
 Author: Behdad Esfahbod <behdad at behdad.org>
 Date:   Tue Jun 5 17:59:31 2018 -0700

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/NEWS
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/NEWS	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/NEWS	2018-06-15 04:38:41 UTC (rev 48018)
@@ -1,8 +1,16 @@
+Overview of changes leading to 1.8.1
+Tuesday, June 12, 2018
+====================================
+- Fix hb-version.h file generation; last two releases went out with wrong ones.
+- Add correctness bug in hb_set_t operations, introduced in 1.7.7.
+- Remove HB_SUBSET_BUILTIN build option.  Not necessary.
+
 Overview of changes leading to 1.8.0
 Tuesday, June 5, 2018
 ====================================
 - Update to Unicode 11.0.0.
 
+
 Overview of changes leading to 1.7.7
 Tuesday, June 5, 2018
 ====================================

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/RELEASING.md
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/RELEASING.md	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/RELEASING.md	2018-06-15 04:38:41 UTC (rev 48018)
@@ -7,7 +7,8 @@
 
      Document them in NEWS.  All API and API semantic changes should be clearly
      marked as API additions, API changes, or API deletions.  Document
-     deprecations.
+     deprecations.  Ensure all new API / deprecations are in listed correctly in
+     docs/harfbuzz-sections.txt
 
      If there's a backward-incompatible API change (including deletions for API
      used anywhere), that's a release blocker.  Do NOT release.

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac	2018-06-15 04:38:41 UTC (rev 48018)
@@ -1,6 +1,6 @@
 AC_PREREQ([2.64])
 AC_INIT([HarfBuzz],
-        [1.8.0],
+        [1.8.1],
         [https://github.com/harfbuzz/harfbuzz/issues/new],
         [harfbuzz],
         [http://harfbuzz.org/])
@@ -506,7 +506,6 @@
 AC_CONFIG_FILES([
 Makefile
 src/Makefile
-src/hb-version.h
 src/harfbuzz-config.cmake
 src/hb-ucdn/Makefile
 util/Makefile

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am	2018-06-15 04:38:41 UTC (rev 48018)
@@ -105,6 +105,17 @@
 DIST_SUBDIRS += hb-ucdn
 
 
+BUILT_SOURCES += \
+	hb-version.h
+
+$(srcdir)/hb-version.h: hb-version.h.in $(top_srcdir)/configure.ac
+	$(AM_V_GEN) $(SED) \
+		-e 's/[@]HB_VERSION_MAJOR@/$(HB_VERSION_MAJOR)/' \
+		-e 's/[@]HB_VERSION_MINOR@/$(HB_VERSION_MINOR)/' \
+		-e 's/[@]HB_VERSION_MICRO@/$(HB_VERSION_MICRO)/' \
+		-e 's/[@]HB_VERSION@/$(HB_VERSION)/' \
+		"$<" > "$@" || ($(RM) "$@"; false)
+
 # Put the library together
 
 HBLIBS += $(HBNONPCLIBS)
@@ -147,7 +158,7 @@
 pkgconfig_DATA = harfbuzz.pc
 cmakedir = $(libdir)/cmake/harfbuzz
 cmake_DATA = harfbuzz-config.cmake
-EXTRA_DIST += harfbuzz.pc.in harfbuzz-config.cmake.in
+EXTRA_DIST += hb-version.h.in harfbuzz.pc.in harfbuzz-config.cmake.in
 
 lib_LTLIBRARIES += libharfbuzz-subset.la
 libharfbuzz_subset_la_SOURCES = $(HB_SUBSET_sources)
@@ -266,13 +277,13 @@
 check: $(DEF_FILES) # For check-symbols.sh
 CLEANFILES += $(DEF_FILES)
 harfbuzz.def: $(HBHEADERS) $(HBNODISTHEADERS)
-	$(AM_V_GEN) headers="$^" $(srcdir)/gen-def.py $@
+	$(AM_V_GEN) headers="$^" $(srcdir)/gen-def.py "$@"
 harfbuzz-subset.def: $(HB_SUBSET_headers)
-	$(AM_V_GEN) headers="$^" $(srcdir)/gen-def.py $@
+	$(AM_V_GEN) headers="$^" $(srcdir)/gen-def.py "$@"
 harfbuzz-icu.def: $(HB_ICU_headers)
-	$(AM_V_GEN) headers="$^" $(srcdir)/gen-def.py $@
+	$(AM_V_GEN) headers="$^" $(srcdir)/gen-def.py "$@"
 harfbuzz-gobject.def: $(HB_GOBJECT_headers)
-	$(AM_V_GEN) headers="$^" $(srcdir)/gen-def.py $@
+	$(AM_V_GEN) headers="$^" $(srcdir)/gen-def.py "$@"
 
 
 GENERATORS = \

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources	2018-06-15 04:38:41 UTC (rev 48018)
@@ -203,6 +203,7 @@
 
 # Sources for libharfbuzz-subset
 HB_SUBSET_sources = \
+	hb-static.cc \
 	hb-subset.cc \
 	hb-subset-glyf.cc \
 	hb-subset-input.cc \

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py	2018-06-15 04:38:41 UTC (rev 48018)
@@ -155,8 +155,7 @@
 
 
 def is_BASE(U, UISC, UGC):
-	# Consonant_Initial_Postfixed is new in Unicode 11; not in the spec.
-	return (UISC in [Number, Consonant, Consonant_Initial_Postfixed, Consonant_Head_Letter,
+	return (UISC in [Number, Consonant, Consonant_Head_Letter,
 			#SPEC-DRAFT Consonant_Placeholder,
 			Tone_Letter,
 			Vowel_Independent #SPEC-DRAFT
@@ -178,7 +177,9 @@
 def is_CGJ(U, UISC, UGC):
 	return U == 0x034F
 def is_CONS_FINAL(U, UISC, UGC):
+	# Consonant_Initial_Postfixed is new in Unicode 11; not in the spec.
 	return ((UISC == Consonant_Final and UGC != Lo) or
+		UISC == Consonant_Initial_Postfixed or
 		UISC == Consonant_Succeeding_Repha)
 def is_CONS_FINAL_MOD(U, UISC, UGC):
 	#SPEC-DRAFT return  UISC in [Consonant_Final_Modifier, Syllable_Modifier]

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc	2018-06-15 04:38:41 UTC (rev 48018)
@@ -514,7 +514,7 @@
 			unsigned int *table_count, /* IN/OUT */
 			hb_tag_t     *table_tags /* OUT */)
 {
-  if (face->destroy != _hb_face_for_data_closure_destroy)
+  if (face->destroy != (hb_destroy_func_t) _hb_face_for_data_closure_destroy)
   {
     if (table_count)
       *table_count = 0;

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc	2018-06-15 04:38:41 UTC (rev 48018)
@@ -119,7 +119,7 @@
   if (font->immutable)
     return;
 
-  if (font->destroy != _hb_ft_font_destroy)
+  if (font->destroy != (hb_destroy_func_t) _hb_ft_font_destroy)
     return;
 
   hb_ft_font_t *ft_font = (hb_ft_font_t *) font->user_data;
@@ -139,7 +139,7 @@
 int
 hb_ft_font_get_load_flags (hb_font_t *font)
 {
-  if (font->destroy != _hb_ft_font_destroy)
+  if (font->destroy != (hb_destroy_func_t) _hb_ft_font_destroy)
     return 0;
 
   const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font->user_data;
@@ -150,7 +150,7 @@
 FT_Face
 hb_ft_font_get_face (hb_font_t *font)
 {
-  if (font->destroy != _hb_ft_font_destroy)
+  if (font->destroy != (hb_destroy_func_t) _hb_ft_font_destroy)
     return nullptr;
 
   const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font->user_data;
@@ -615,7 +615,7 @@
 void
 hb_ft_font_changed (hb_font_t *font)
 {
-  if (font->destroy != _hb_ft_font_destroy)
+  if (font->destroy != (hb_destroy_func_t) _hb_ft_font_destroy)
     return;
 
   hb_ft_font_t *ft_font = (hb_ft_font_t *) font->user_data;

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-map-private.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-map-private.hh	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-map-private.hh	2018-06-15 04:38:41 UTC (rev 48018)
@@ -105,7 +105,7 @@
     /* Switch to new, empty, array. */
     population = occupancy = 0;
     mask = new_size - 1;
-    prime = _hb_prime_for (power);
+    prime = prime_for (power);
     items = new_items;
 
     /* Insert back old items. */
@@ -198,6 +198,57 @@
     }
     return tombstone == INVALID ? i : tombstone;
   }
+
+  static inline unsigned int prime_for (unsigned int shift)
+  {
+    /* Following comment and table copied from glib. */
+    /* Each table size has an associated prime modulo (the first prime
+     * lower than the table size) used to find the initial bucket. Probing
+     * then works modulo 2^n. The prime modulo is necessary to get a
+     * good distribution with poor hash functions.
+     */
+    /* Not declaring static to make all kinds of compilers happy... */
+    /*static*/ const unsigned int prime_mod [32] =
+    {
+      1,          /* For 1 << 0 */
+      2,
+      3,
+      7,
+      13,
+      31,
+      61,
+      127,
+      251,
+      509,
+      1021,
+      2039,
+      4093,
+      8191,
+      16381,
+      32749,
+      65521,      /* For 1 << 16 */
+      131071,
+      262139,
+      524287,
+      1048573,
+      2097143,
+      4194301,
+      8388593,
+      16777213,
+      33554393,
+      67108859,
+      134217689,
+      268435399,
+      536870909,
+      1073741789,
+      2147483647  /* For 1 << 31 */
+    };
+
+    if (unlikely (shift >= ARRAY_LENGTH (prime_mod)))
+      return prime_mod[ARRAY_LENGTH (prime_mod) - 1];
+
+    return prime_mod[shift];
+  }
 };
 
 

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	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsub-table.hh	2018-06-15 04:38:41 UTC (rev 48018)
@@ -1156,10 +1156,13 @@
     return_trace (dispatch (c));
   }
 
-  inline hb_closure_context_t::return_t closure (hb_closure_context_t *c) const
+  inline hb_closure_context_t::return_t closure (hb_closure_context_t *c, unsigned int this_index) const
   {
     TRACE_CLOSURE (this);
-    c->set_recurse_func (dispatch_recurse_func<hb_closure_context_t>);
+    if (!c->should_visit_lookup (this_index))
+      return_trace (HB_VOID);
+
+    c->set_recurse_func (dispatch_closure_recurse_func);
     return_trace (dispatch (c));
   }
 
@@ -1258,6 +1261,13 @@
   template <typename context_t>
   static inline typename context_t::return_t dispatch_recurse_func (context_t *c, unsigned int lookup_index);
 
+  static inline hb_closure_context_t::return_t dispatch_closure_recurse_func (hb_closure_context_t *c, unsigned int lookup_index)
+  {
+    if (!c->should_visit_lookup (lookup_index))
+      return HB_VOID;
+    return dispatch_recurse_func (c, lookup_index);
+  }
+
   template <typename context_t>
   inline typename context_t::return_t dispatch (context_t *c) const
   { return Lookup::dispatch<SubstLookupSubTable> (c); }

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	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh	2018-06-15 04:38:41 UTC (rev 48018)
@@ -32,6 +32,7 @@
 #include "hb-private.hh"
 #include "hb-debug.hh"
 #include "hb-buffer-private.hh"
+#include "hb-map-private.hh"
 #include "hb-ot-layout-gdef-table.hh"
 #include "hb-set-private.hh"
 
@@ -59,6 +60,20 @@
     return HB_VOID;
   }
 
+  bool should_visit_lookup (unsigned int lookup_index)
+  {
+    if (is_lookup_done (lookup_index))
+      return false;
+    done_lookups->set (lookup_index, glyphs->get_population ());
+    return true;
+  }
+
+  bool is_lookup_done (unsigned int lookup_index)
+  {
+    // Have we visited this lookup with the current set of glyphs?
+    return done_lookups->get (lookup_index) == glyphs->get_population ();
+  }
+
   hb_face_t *face;
   hb_set_t *glyphs;
   recurse_func_t recurse_func;
@@ -67,14 +82,19 @@
 
   hb_closure_context_t (hb_face_t *face_,
 			hb_set_t *glyphs_,
+                        hb_map_t *done_lookups_,
 		        unsigned int nesting_level_left_ = HB_MAX_NESTING_LEVEL) :
 			  face (face_),
 			  glyphs (glyphs_),
 			  recurse_func (nullptr),
 			  nesting_level_left (nesting_level_left_),
-			  debug_depth (0) {}
+			  debug_depth (0),
+                          done_lookups (done_lookups_) {}
 
   void set_recurse_func (recurse_func_t func) { recurse_func = func; }
+
+  private:
+  hb_map_t *done_lookups;
 };
 
 

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc	2018-06-15 04:38:41 UTC (rev 48018)
@@ -44,6 +44,7 @@
 #include "hb-ot-color-sbix-table.hh"
 #include "hb-ot-color-svg-table.hh"
 #include "hb-ot-name-table.hh"
+#include "hb-map-private.hh"
 
 
 hb_ot_layout_t *
@@ -943,13 +944,48 @@
 				        unsigned int  lookup_index,
 				        hb_set_t     *glyphs)
 {
-  OT::hb_closure_context_t c (face, glyphs);
+  hb_auto_t<hb_map_t> done_lookups;
+  OT::hb_closure_context_t c (face, glyphs, &done_lookups);
 
   const OT::SubstLookup& l = _get_gsub (face).get_lookup (lookup_index);
 
-  l.closure (&c);
+  l.closure (&c, lookup_index);
 }
 
+/**
+ * hb_ot_layout_lookups_substitute_closure:
+ *
+ * Compute the transitive closure of glyphs needed for all of the
+ * provided lookups.
+ *
+ * Since: 1.8.1
+ **/
+void
+hb_ot_layout_lookups_substitute_closure (hb_face_t      *face,
+                                         const hb_set_t *lookups,
+                                         hb_set_t       *glyphs)
+{
+  hb_auto_t<hb_map_t> done_lookups;
+  OT::hb_closure_context_t c (face, glyphs, &done_lookups);
+  const OT::GSUB& gsub = _get_gsub (face);
+
+  unsigned int glyphs_length;
+  do
+  {
+    glyphs_length = glyphs->get_population ();
+    if (lookups != nullptr)
+    {
+      for (hb_codepoint_t lookup_index = HB_SET_VALUE_INVALID; hb_set_next (lookups, &lookup_index);)
+        gsub.get_lookup (lookup_index).closure (&c, lookup_index);
+    }
+    else
+    {
+      for (unsigned int i = 0; i < gsub.get_lookup_count (); i++)
+        gsub.get_lookup (i).closure (&c, i);
+    }
+  } while (glyphs_length != glyphs->get_population ());
+}
+
 /*
  * OT::GPOS
  */

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.h
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.h	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.h	2018-06-15 04:38:41 UTC (rev 48018)
@@ -277,6 +277,12 @@
 				        hb_set_t     *glyphs
 					/*TODO , hb_bool_t  inclusive */);
 
+HB_EXTERN void
+hb_ot_layout_lookups_substitute_closure (hb_face_t      *face,
+                                         const hb_set_t *lookups,
+                                         hb_set_t       *glyphs);
+
+
 #ifdef HB_NOT_IMPLEMENTED
 /* Note: You better have GDEF when using this API, or marks won't do much. */
 HB_EXTERN hb_bool_t

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-table.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-table.cc	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-table.cc	2018-06-15 04:38:41 UTC (rev 48018)
@@ -281,7 +281,7 @@
   /* 1A20 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
   /* 1A30 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
   /* 1A40 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
-  /* 1A50 */     B,     B,     B,     B,     B,  MPre,  MBlw,   SUB,  FAbv,  FAbv,     B,   SUB,   SUB,   SUB,   SUB,     O,
+  /* 1A50 */     B,     B,     B,     B,     B,  MPre,  MBlw,   SUB,  FAbv,  FAbv,  FAbv,   SUB,   SUB,   SUB,   SUB,     O,
   /* 1A60 */     H,  VPst,  VAbv,  VPst,  VPst,  VAbv,  VAbv,  VAbv,  VAbv,  VBlw,  VBlw,  VAbv,  VBlw,  VPst,  VPre,  VPre,
   /* 1A70 */  VPre,  VPre,  VPre,  VAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv,  VAbv,    FM,    FM,     O,     O,  FBlw,
   /* 1A80 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     O,     O,     O,

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	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc	2018-06-15 04:38:41 UTC (rev 48018)
@@ -957,16 +957,8 @@
 
   hb_set_t *lookups = hb_set_create ();
   hb_ot_shape_plan_collect_lookups (shape_plan, HB_OT_TAG_GSUB, lookups);
+  hb_ot_layout_lookups_substitute_closure (font->face, lookups, glyphs);
 
-  /* And find transitive closure. */
-  hb_set_t *copy = hb_set_create ();
-  do {
-    copy->set (glyphs);
-    for (hb_codepoint_t lookup_index = HB_SET_VALUE_INVALID; hb_set_next (lookups, &lookup_index);)
-      hb_ot_layout_lookup_substitute_closure (font->face, lookup_index, glyphs);
-  } while (!copy->is_equal (glyphs));
-  hb_set_destroy (copy);
-
   hb_set_destroy (lookups);
 
   hb_shape_plan_destroy (shape_plan);

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh	2018-06-15 04:38:41 UTC (rev 48018)
@@ -147,7 +147,7 @@
 #define HB_FUNC __func__
 #endif
 
-#ifdef __SUNPRO_CC
+#if defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x5140)
 /* https://github.com/harfbuzz/harfbuzz/issues/630 */
 #define __restrict
 #endif
@@ -369,6 +369,7 @@
   }
 
   assert (0);
+  return 0; /* Shut up stupid compiler. */
 }
 
 /* Returns the number of bits needed to store number */
@@ -437,11 +438,12 @@
   if (sizeof (T) == 16)
   {
     unsigned int shift = 64;
-    return (v >> shift) ? _hb_bit_storage<uint64_t> ((uint64_t) v >> shift) + shift :
+    return (v >> shift) ? _hb_bit_storage<uint64_t> ((uint64_t) (v >> shift)) + shift :
 			  _hb_bit_storage<uint64_t> ((uint64_t) v);
   }
 
   assert (0);
+  return 0; /* Shut up stupid compiler. */
 }
 
 /* Returns the number of zero bits in the least significant side of v */
@@ -514,6 +516,7 @@
   }
 
   assert (0);
+  return 0; /* Shut up stupid compiler. */
 }
 
 static inline bool
@@ -713,6 +716,9 @@
     if (!alloc (size))
       return false;
 
+    if (size > len)
+      memset (arrayZ + len, 0, (size - len) * sizeof (*arrayZ));
+
     len = size;
     return true;
   }
@@ -1232,7 +1238,4 @@
 #endif
 
 
-HB_INTERNAL unsigned int _hb_prime_for (unsigned int shift);
-
-
 #endif /* HB_PRIVATE_HH */

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	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-private.hh	2018-06-15 04:38:41 UTC (rev 48018)
@@ -400,6 +400,19 @@
     return true;
   }
 
+  inline bool is_subset (const hb_set_t *larger_set) const
+  {
+    if (get_population () > larger_set->get_population ())
+      return false;
+
+    hb_codepoint_t c = INVALID;
+    while (next (&c))
+      if (!larger_set->has (c))
+        return false;
+
+    return true;
+  }
+
   template <class Op>
   inline void process (const hb_set_t *other)
   {
@@ -411,7 +424,7 @@
     unsigned int nb = other->pages.len;
     unsigned int next_page = na;
 
-    unsigned int count = 0;
+    unsigned int count = 0, newCount = 0;
     unsigned int a = 0, b = 0;
     for (; a < na && b < nb; )
     {
@@ -439,8 +452,10 @@
     if (Op::passthru_right)
       count += nb - b;
 
-    if (!resize (count))
-      return;
+    if (count > pages.len)
+      if (!resize (count))
+        return;
+    newCount = count;
 
     /* Process in-place backward. */
     a = na;
@@ -493,6 +508,8 @@
 	page_at (count).v = other->page_at (b).v;
       }
     assert (!count);
+    if (pages.len > newCount)
+      resize (newCount);
   }
 
   inline void union_ (const hb_set_t *other)

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc	2018-06-15 04:38:41 UTC (rev 48018)
@@ -267,11 +267,11 @@
 /**
  * hb_set_is_equal:
  * @set: a set.
- * @other: 
+ * @other: other set.
  *
  * 
  *
- * Return value: 
+ * Return value: %TRUE if the two sets are equal, %FALSE otherwise.
  *
  * Since: 0.9.7
  **/
@@ -283,6 +283,24 @@
 }
 
 /**
+ * hb_set_is_subset:
+ * @set: a set.
+ * @larger_set: other set.
+ *
+ *
+ *
+ * Return value: %TRUE if the @set is a subset of (or equal to) @larger_set, %FALSE otherwise.
+ *
+ * Since: 1.8.1
+ **/
+hb_bool_t
+hb_set_is_subset (const hb_set_t *set,
+		  const hb_set_t *larger_set)
+{
+  return set->is_subset (larger_set);
+}
+
+/**
  * hb_set_set:
  * @set: a set.
  * @other: 

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.h
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.h	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.h	2018-06-15 04:38:41 UTC (rev 48018)
@@ -104,6 +104,10 @@
 hb_set_is_equal (const hb_set_t *set,
 		 const hb_set_t *other);
 
+HB_EXTERN hb_bool_t
+hb_set_is_subset (const hb_set_t *set,
+		  const hb_set_t *larger_set);
+
 HB_EXTERN void
 hb_set_set (hb_set_t       *set,
 	    const hb_set_t *other);

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-static.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-static.cc	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-static.cc	2018-06-15 04:38:41 UTC (rev 48018)
@@ -30,54 +30,3 @@
 void * const _hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
 /*thread_local*/ void * _hb_CrapPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
 #endif
-
-
-/* Following comment and table copied from glib. */
-/* Each table size has an associated prime modulo (the first prime
- * lower than the table size) used to find the initial bucket. Probing
- * then works modulo 2^n. The prime modulo is necessary to get a
- * good distribution with poor hash functions.
- */
-static const unsigned int prime_mod [] =
-{
-  1,          /* For 1 << 0 */
-  2,
-  3,
-  7,
-  13,
-  31,
-  61,
-  127,
-  251,
-  509,
-  1021,
-  2039,
-  4093,
-  8191,
-  16381,
-  32749,
-  65521,      /* For 1 << 16 */
-  131071,
-  262139,
-  524287,
-  1048573,
-  2097143,
-  4194301,
-  8388593,
-  16777213,
-  33554393,
-  67108859,
-  134217689,
-  268435399,
-  536870909,
-  1073741789,
-  2147483647  /* For 1 << 31 */
-};
-
-unsigned int _hb_prime_for (unsigned int shift)
-{
-  if (unlikely (shift >= ARRAY_LENGTH (prime_mod)))
-    return prime_mod[ARRAY_LENGTH (prime_mod) - 1];
-
-  return prime_mod[shift];
-}

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.cc	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.cc	2018-06-15 04:38:41 UTC (rev 48018)
@@ -45,6 +45,7 @@
 
   input->unicodes = hb_set_create ();
   input->glyphs = hb_set_create ();
+  input->drop_ot_layout = true;
 
   return input;
 }
@@ -117,3 +118,19 @@
 {
   return &subset_input->drop_hints;
 }
+
+/**
+ * hb_subset_input_drop_ot_layout:
+ * @subset_input: a subset_input.
+ *
+ * If enabled ot layout tables will be dropped as part of
+ * the subsetting operation. Currently this defaults to
+ * true.
+ *
+ * Since: REPLACEME
+ **/
+HB_EXTERN hb_bool_t *
+hb_subset_input_drop_ot_layout (hb_subset_input_t *subset_input)
+{
+  return &subset_input->drop_ot_layout;
+}

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc	2018-06-15 04:38:41 UTC (rev 48018)
@@ -54,8 +54,21 @@
 }
 
 static void
+_gsub_closure (hb_face_t *face, hb_set_t *gids_to_retain)
+{
+  // TODO(grieger): This uses all lookups, instead collect
+  //                the set of lookups that are relevant.
+  //                See fontTools implementation.
+  hb_ot_layout_lookups_substitute_closure (face,
+                                           nullptr,
+                                           gids_to_retain);
+}
+
+
+static void
 _populate_gids_to_retain (hb_face_t *face,
                           const hb_set_t *unicodes,
+                          bool close_over_gsub,
                           hb_set_t *unicodes_to_retain,
                           hb_map_t *codepoint_to_glyph,
                           hb_vector_t<hb_codepoint_t> *glyphs)
@@ -82,10 +95,12 @@
     initial_gids_to_retain->add (gid);
   }
 
+  if (close_over_gsub)
+    // Add all glyphs needed for GSUB substitutions.
+    _gsub_closure (face, initial_gids_to_retain);
+
   // Populate a full set of glyphs to retain by adding all referenced
   // composite glyphs.
-  // TODO expand with glyphs reached by G*
-
   hb_codepoint_t gid = HB_SET_VALUE_INVALID;
   hb_set_t *all_gids_to_retain = hb_set_create ();
   while (initial_gids_to_retain->next (&gid))
@@ -131,6 +146,7 @@
   hb_subset_plan_t *plan = hb_object_create<hb_subset_plan_t> ();
 
   plan->drop_hints = input->drop_hints;
+  plan->drop_ot_layout = input->drop_ot_layout;
   plan->unicodes = hb_set_create();
   plan->glyphs.init();
   plan->source = hb_face_reference (face);
@@ -140,6 +156,7 @@
 
   _populate_gids_to_retain (face,
                             input->unicodes,
+                            !plan->drop_ot_layout,
                             plan->unicodes,
                             plan->codepoint_to_glyph,
                             &plan->glyphs);

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.hh	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.hh	2018-06-15 04:38:41 UTC (rev 48018)
@@ -41,6 +41,7 @@
   ASSERT_POD ();
 
   hb_bool_t drop_hints;
+  hb_bool_t drop_ot_layout;
 
   // For each cp that we'd like to retain maps to the corresponding gid.
   hb_set_t *unicodes;

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-private.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-private.hh	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-private.hh	2018-06-15 04:38:41 UTC (rev 48018)
@@ -44,6 +44,7 @@
   hb_set_t *glyphs;
 
   hb_bool_t drop_hints;
+  hb_bool_t drop_ot_layout;
   /* TODO
    *
    * features

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.cc	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.cc	2018-06-15 04:38:41 UTC (rev 48018)
@@ -44,11 +44,6 @@
 #include "hb-ot-post-table.hh"
 
 
-#if !defined(HB_SUBSET_BUILTIN)
-#include "hb-static.cc"
-#endif
-
-
 struct hb_subset_profile_t {
   hb_object_header_t header;
   ASSERT_POD ();
@@ -221,7 +216,7 @@
 hb_bool_t
 hb_subset_face_add_table (hb_face_t *face, hb_tag_t tag, hb_blob_t *blob)
 {
-  if (unlikely (face->destroy != _hb_subset_face_data_destroy))
+  if (unlikely (face->destroy != (hb_destroy_func_t) _hb_subset_face_data_destroy))
     return false;
 
   hb_subset_face_data_t *data = (hb_subset_face_data_t *) face->user_data;
@@ -302,10 +297,11 @@
     case HB_TAG ('h', 'd', 'm', 'x'): /* hint table, fallthrough */
     case HB_TAG ('V', 'D', 'M', 'X'): /* hint table, fallthrough */
       return plan->drop_hints;
-    // Drop Layout Tables until subsetting is supported.
+    // Drop Layout Tables if requested.
     case HB_TAG ('G', 'D', 'E', 'F'): /* temporary */
     case HB_TAG ('G', 'P', 'O', 'S'): /* temporary */
     case HB_TAG ('G', 'S', 'U', 'B'): /* temporary */
+      return plan->drop_ot_layout;
     // Drop these tables below by default, list pulled
     // from fontTools:
     case HB_TAG ('B', 'A', 'S', 'E'):

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.h
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.h	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.h	2018-06-15 04:38:41 UTC (rev 48018)
@@ -71,6 +71,9 @@
 HB_EXTERN hb_bool_t *
 hb_subset_input_drop_hints (hb_subset_input_t *subset_input);
 
+HB_EXTERN hb_bool_t *
+hb_subset_input_drop_ot_layout (hb_subset_input_t *subset_input);
+
 /* hb_subset() */
 HB_EXTERN hb_face_t *
 hb_subset (hb_face_t *source,

Modified: trunk/Build/source/libs/harfbuzz/version.ac
===================================================================
--- trunk/Build/source/libs/harfbuzz/version.ac	2018-06-15 00:23:39 UTC (rev 48017)
+++ trunk/Build/source/libs/harfbuzz/version.ac	2018-06-15 04:38:41 UTC (rev 48018)
@@ -8,4 +8,4 @@
 dnl --------------------------------------------------------
 dnl
 dnl  m4-include this file to define the current harfbuzz version
-m4_define([harfbuzz_version], [1.8.0])
+m4_define([harfbuzz_version], [1.8.1])



More information about the tex-live-commits mailing list