summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/source/libs/README2
-rw-r--r--Build/source/libs/harfbuzz/ChangeLog4
-rw-r--r--Build/source/libs/harfbuzz/TLpatches/ChangeLog5
-rw-r--r--Build/source/libs/harfbuzz/TLpatches/TL-Changes2
-rwxr-xr-xBuild/source/libs/harfbuzz/configure24
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog306
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/NEWS8
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/RELEASING.md3
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/configure.ac3
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am21
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources1
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py5
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc8
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-map-private.hh53
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsub-table.hh14
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh22
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc40
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.h6
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-table.cc2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc10
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh13
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-private.hh23
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc22
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.h4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-static.cc51
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.cc17
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc21
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.hh1
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-private.hh1
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.cc10
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.h3
-rw-r--r--Build/source/libs/harfbuzz/version.ac2
33 files changed, 593 insertions, 116 deletions
diff --git a/Build/source/libs/README b/Build/source/libs/README
index 57cb03d31cb..7f4cffc658c 100644
--- a/Build/source/libs/README
+++ b/Build/source/libs/README
@@ -24,7 +24,7 @@ gmp 6.1.2 - checked 16dec16
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
diff --git a/Build/source/libs/harfbuzz/ChangeLog b/Build/source/libs/harfbuzz/ChangeLog
index 4b99b0114f7..f583190c11e 100644
--- a/Build/source/libs/harfbuzz/ChangeLog
+++ b/Build/source/libs/harfbuzz/ChangeLog
@@ -1,3 +1,7 @@
+2018-06-15 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ Import harfbuzz-1.8.1.
+
2018-06-06 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
Import harfbuzz-1.8.0.
diff --git a/Build/source/libs/harfbuzz/TLpatches/ChangeLog b/Build/source/libs/harfbuzz/TLpatches/ChangeLog
index 7e8dd275f5a..da8b2044137 100644
--- a/Build/source/libs/harfbuzz/TLpatches/ChangeLog
+++ b/Build/source/libs/harfbuzz/TLpatches/ChangeLog
@@ -1,3 +1,8 @@
+2018-06-15 Akira Kakuto <kakuto@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@fuk.kindai.ac.jp>
Imported harfbuzz-1.8.0 source tree from:
diff --git a/Build/source/libs/harfbuzz/TLpatches/TL-Changes b/Build/source/libs/harfbuzz/TLpatches/TL-Changes
index 1d1d45d4165..283523019f8 100644
--- a/Build/source/libs/harfbuzz/TLpatches/TL-Changes
+++ b/Build/source/libs/harfbuzz/TLpatches/TL-Changes
@@ -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:
diff --git a/Build/source/libs/harfbuzz/configure b/Build/source/libs/harfbuzz/configure
index 91ac2867d2a..daf40de927f 100755
--- a/Build/source/libs/harfbuzz/configure
+++ b/Build/source/libs/harfbuzz/configure
@@ -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@tug.org>.
#
@@ -580,8 +580,8 @@ MAKEFLAGS=
# 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@tug.org'
PACKAGE_URL=''
@@ -1317,7 +1317,7 @@ if test "$ac_init_help" = "long"; then
# 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 @@ fi
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 @@ fi
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 @@ cat >config.log <<_ACEOF
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 @@ fi
# 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 @@ WARNING_CFLAGS=$kpse_cv_warning_cflags
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 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# 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 @@ _ACEOF
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\\"
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog b/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog
index 718abbaa07a..73314711964 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog
@@ -1,3 +1,309 @@
+commit f3e58ab8a957cdf36bddef793c473664744885a7
+Author: Behdad Esfahbod <behdad@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@behdad.org>
Date: Tue Jun 5 17:59:31 2018 -0700
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/NEWS b/Build/source/libs/harfbuzz/harfbuzz-src/NEWS
index 3b63ff320ff..12010bdd9ef 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/NEWS
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/NEWS
@@ -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
====================================
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/RELEASING.md b/Build/source/libs/harfbuzz/harfbuzz-src/RELEASING.md
index b15e2980b36..0aef610b6bf 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/RELEASING.md
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/RELEASING.md
@@ -7,7 +7,8 @@ HarfBuzz release walk-through checklist:
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.
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac b/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac
index 0061403c9d9..13cd1ce0d18 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac
@@ -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 @@ dnl ===========================================================================
AC_CONFIG_FILES([
Makefile
src/Makefile
-src/hb-version.h
src/harfbuzz-config.cmake
src/hb-ucdn/Makefile
util/Makefile
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am b/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am
index be9cd73ca4e..9d5662e4a35 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am
@@ -105,6 +105,17 @@ endif
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 @@ pkgconfigdir = $(libdir)/pkgconfig
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 @@ endif
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 = \
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources b/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources
index 299af983157..0bc9e589eef 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources
@@ -203,6 +203,7 @@ HB_ICU_headers = hb-icu.h
# Sources for libharfbuzz-subset
HB_SUBSET_sources = \
+ hb-static.cc \
hb-subset.cc \
hb-subset-glyf.cc \
hb-subset-input.cc \
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py
index 413ce11d648..6aa5f881c73 100755
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py
@@ -155,8 +155,7 @@ globals().update(property_values)
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_BASE_OTHER(U, UISC, UGC):
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]
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc
index b8d7e84d7c7..2fef09d03d3 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc
@@ -514,7 +514,7 @@ hb_face_get_table_tags (hb_face_t *face,
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;
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc
index 69132386470..7caafba839f 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc
@@ -119,7 +119,7 @@ hb_ft_font_set_load_flags (hb_font_t *font, int load_flags)
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 @@ hb_ft_font_set_load_flags (hb_font_t *font, int load_flags)
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 @@ hb_ft_font_get_load_flags (hb_font_t *font)
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 @@ hb_ft_font_create (FT_Face ft_face,
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;
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-map-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-map-private.hh
index 76c40877383..d3d4ddeda70 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-map-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-map-private.hh
@@ -105,7 +105,7 @@ struct hb_map_t
/* 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 @@ struct hb_map_t
}
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];
+ }
};
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsub-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsub-table.hh
index 6e57195b3f4..bd72fe6bf6c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsub-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsub-table.hh
@@ -1156,10 +1156,13 @@ struct SubstLookup : Lookup
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 @@ struct SubstLookup : Lookup
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); }
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh
index 3cf9d578205..661085d515b 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh
@@ -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 @@ struct hb_closure_context_t :
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 @@ struct hb_closure_context_t :
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;
};
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc
index 8d1471a332b..655c36c1c28 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc
@@ -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,11 +944,46 @@ hb_ot_layout_lookup_substitute_closure (hb_face_t *face,
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 ());
}
/*
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.h
index d82dc022614..0278796221d 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.h
@@ -277,6 +277,12 @@ hb_ot_layout_lookup_substitute_closure (hb_face_t *face,
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
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-table.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-table.cc
index 9cc7d33de57..14315338cf2 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-table.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-table.cc
@@ -281,7 +281,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
/* 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,
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc
index c20b110e216..36e0bf9c3cf 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc
@@ -957,15 +957,7 @@ hb_ot_shape_glyphs_closure (hb_font_t *font,
hb_set_t *lookups = hb_set_create ();
hb_ot_shape_plan_collect_lookups (shape_plan, HB_OT_TAG_GSUB, lookups);
-
- /* 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_ot_layout_lookups_substitute_closure (font->face, lookups, glyphs);
hb_set_destroy (lookups);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh
index 429bab0035a..32e335495cf 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh
@@ -147,7 +147,7 @@ extern "C" void hb_free_impl(void *ptr);
#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 @@ _hb_popcount (T v)
}
assert (0);
+ return 0; /* Shut up stupid compiler. */
}
/* Returns the number of bits needed to store number */
@@ -437,11 +438,12 @@ _hb_bit_storage (T v)
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 @@ _hb_ctz (T v)
}
assert (0);
+ return 0; /* Shut up stupid compiler. */
}
static inline bool
@@ -713,6 +716,9 @@ struct hb_vector_t
if (!alloc (size))
return false;
+ if (size > len)
+ memset (arrayZ + len, 0, (size - len) * sizeof (*arrayZ));
+
len = size;
return true;
}
@@ -1232,7 +1238,4 @@ round (double x)
#endif
-HB_INTERNAL unsigned int _hb_prime_for (unsigned int shift);
-
-
#endif /* HB_PRIVATE_HH */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-private.hh
index 50be93b84f5..ccd4d8df5f7 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-private.hh
@@ -400,6 +400,19 @@ struct hb_set_t
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 @@ struct hb_set_t
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 @@ struct hb_set_t
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 @@ struct hb_set_t
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)
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc
index b5753222602..25027e6c216 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc
@@ -267,11 +267,11 @@ hb_set_del_range (hb_set_t *set,
/**
* 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_equal (const hb_set_t *set,
}
/**
+ * 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:
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.h
index 764d4eba832..ed0e05db2e4 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.h
@@ -104,6 +104,10 @@ HB_EXTERN hb_bool_t
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);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-static.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-static.cc
index aa0871d5b1e..e26e5c80154 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-static.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-static.cc
@@ -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];
-}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.cc
index c4003dd3ad1..39c5ac4f297 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.cc
@@ -45,6 +45,7 @@ hb_subset_input_create_or_fail (void)
input->unicodes = hb_set_create ();
input->glyphs = hb_set_create ();
+ input->drop_ot_layout = true;
return input;
}
@@ -117,3 +118,19 @@ hb_subset_input_drop_hints (hb_subset_input_t *subset_input)
{
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;
+}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc
index 7100efc87c8..55c4e3f6193 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc
@@ -54,8 +54,21 @@ _add_gid_and_children (const OT::glyf::accelerator_t &glyf,
}
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 @@ _populate_gids_to_retain (hb_face_t *face,
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_create (hb_face_t *face,
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 @@ hb_subset_plan_create (hb_face_t *face,
_populate_gids_to_retain (face,
input->unicodes,
+ !plan->drop_ot_layout,
plan->unicodes,
plan->codepoint_to_glyph,
&plan->glyphs);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.hh
index c9904af8e40..f4b261df0d0 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.hh
@@ -41,6 +41,7 @@ struct hb_subset_plan_t
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;
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-private.hh
index 5fa72527671..6b2b207fff6 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-private.hh
@@ -44,6 +44,7 @@ struct hb_subset_input_t {
hb_set_t *glyphs;
hb_bool_t drop_hints;
+ hb_bool_t drop_ot_layout;
/* TODO
*
* features
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.cc
index 6d388e29a26..b97c7633eb8 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.cc
@@ -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_subset_face_create (void)
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 @@ _should_drop_table(hb_subset_plan_t *plan, hb_tag_t tag)
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'):
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.h
index 409581c76f6..f6d2ae0a01b 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.h
@@ -71,6 +71,9 @@ hb_subset_input_glyph_set (hb_subset_input_t *subset_input);
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,
diff --git a/Build/source/libs/harfbuzz/version.ac b/Build/source/libs/harfbuzz/version.ac
index c8fe8b6285f..34a7918a32a 100644
--- a/Build/source/libs/harfbuzz/version.ac
+++ b/Build/source/libs/harfbuzz/version.ac
@@ -8,4 +8,4 @@ dnl
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])