summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2022-10-19 21:15:26 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2022-10-19 21:15:26 +0000
commit327c30d503529cadd0f3ed08be8f38eb05e0e03c (patch)
treefb81e4ace37e5bfd156b6beb18b34dc003eb64ab /Build
parent528926adf8e2f1c77a83d1aee00087e98881a474 (diff)
harfbuzz 5.3.1
git-svn-id: svn://tug.org/texlive/trunk@64756 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/libs/README4
-rw-r--r--Build/source/libs/harfbuzz/ChangeLog5
-rw-r--r--Build/source/libs/harfbuzz/Makefile.am1
-rw-r--r--Build/source/libs/harfbuzz/Makefile.in1
-rw-r--r--Build/source/libs/harfbuzz/TLpatches/ChangeLog5
-rw-r--r--Build/source/libs/harfbuzz/TLpatches/TL-Changes4
-rwxr-xr-xBuild/source/libs/harfbuzz/configure24
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog270
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/NEWS8
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/configure.ac2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/meson.build2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources1
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/Ligature.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/Sequence.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/Glyph.hh10
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/gen-def.py4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/graph/pairpos-graph.hh7
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-just-table.hh20
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-trak-table.hh8
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type.hh29
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colr-table.hh14
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc8
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-stat-table.hh14
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-fvar-table.hh20
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-accelerator.hh76
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.cc54
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.hh1
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc80
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.hh4
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.cc26
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.h17
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/meson.build1
-rw-r--r--Build/source/libs/harfbuzz/version.ac2
35 files changed, 619 insertions, 111 deletions
diff --git a/Build/source/libs/README b/Build/source/libs/README
index 50a3273d606..9ac60ea43a5 100644
--- a/Build/source/libs/README
+++ b/Build/source/libs/README
@@ -25,8 +25,8 @@ graphite2 1.3.14 - checked 10apr20
http://sourceforge.net/projects/silgraphite/files/graphite2/
(requires C++11)
-harfbuzz 5.3.0 - checked 09oct22
- https://github.com/harfbuzz/harfbuzz/releases/tag/5.3.0
+harfbuzz 5.3.1 - checked 20oct22
+ https://github.com/harfbuzz/harfbuzz/releases/tag/5.3.1
icu 70.1 - checked 16jan22
https://github.com/unicode-org/icu/releases/
diff --git a/Build/source/libs/harfbuzz/ChangeLog b/Build/source/libs/harfbuzz/ChangeLog
index 837eb794d69..674c1433af7 100644
--- a/Build/source/libs/harfbuzz/ChangeLog
+++ b/Build/source/libs/harfbuzz/ChangeLog
@@ -1,3 +1,8 @@
+2022-10-20 Akira Kakuto <kakuto@jcom.zaq.ne.jp>
+
+ Import harfbuzz-5.3.1.
+ * version.ac, Makefile.am: Adjusted.
+
2022-10-09 Akira Kakuto <kakuto@jcom.zaq.ne.jp>
Import harfbuzz-5.3.0.
diff --git a/Build/source/libs/harfbuzz/Makefile.am b/Build/source/libs/harfbuzz/Makefile.am
index 936fc72dd2f..5e59c5aedc6 100644
--- a/Build/source/libs/harfbuzz/Makefile.am
+++ b/Build/source/libs/harfbuzz/Makefile.am
@@ -127,6 +127,7 @@ libharfbuzz_a_SOURCES = \
@HARFBUZZ_TREE@/src/hb-static.cc \
@HARFBUZZ_TREE@/src/hb-string-array.hh \
@HARFBUZZ_TREE@/src/hb-style.cc \
+ @HARFBUZZ_TREE@/src/hb-subset-accelerator.hh \
@HARFBUZZ_TREE@/src/hb-subset-cff-common.cc \
@HARFBUZZ_TREE@/src/hb-subset-cff-common.hh \
@HARFBUZZ_TREE@/src/hb-subset-cff1.cc \
diff --git a/Build/source/libs/harfbuzz/Makefile.in b/Build/source/libs/harfbuzz/Makefile.in
index 5481b1d2443..d2f9f935711 100644
--- a/Build/source/libs/harfbuzz/Makefile.in
+++ b/Build/source/libs/harfbuzz/Makefile.in
@@ -801,6 +801,7 @@ libharfbuzz_a_SOURCES = @HARFBUZZ_TREE@/src/hb-algs.hh \
@HARFBUZZ_TREE@/src/hb-static.cc \
@HARFBUZZ_TREE@/src/hb-string-array.hh \
@HARFBUZZ_TREE@/src/hb-style.cc \
+ @HARFBUZZ_TREE@/src/hb-subset-accelerator.hh \
@HARFBUZZ_TREE@/src/hb-subset-cff-common.cc \
@HARFBUZZ_TREE@/src/hb-subset-cff-common.hh \
@HARFBUZZ_TREE@/src/hb-subset-cff1.cc \
diff --git a/Build/source/libs/harfbuzz/TLpatches/ChangeLog b/Build/source/libs/harfbuzz/TLpatches/ChangeLog
index 86732981b79..ffda25586d4 100644
--- a/Build/source/libs/harfbuzz/TLpatches/ChangeLog
+++ b/Build/source/libs/harfbuzz/TLpatches/ChangeLog
@@ -1,3 +1,8 @@
+2022-10-20 Akira Kakuto <kakuto@jcom.zaq.ne.jp>
+
+ Imported harfbuzz-5.3.1 source tree from:
+ https://github.com/harfbuzz/harfbuzz/releases/download/5.3.1/
+
2022-10-09 Akira Kakuto <kakuto@jcom.zaq.ne.jp>
Imported harfbuzz-5.3.0 source tree from:
diff --git a/Build/source/libs/harfbuzz/TLpatches/TL-Changes b/Build/source/libs/harfbuzz/TLpatches/TL-Changes
index 72ffd83eccf..8bea55225aa 100644
--- a/Build/source/libs/harfbuzz/TLpatches/TL-Changes
+++ b/Build/source/libs/harfbuzz/TLpatches/TL-Changes
@@ -1,5 +1,5 @@
-Changes applied to the harfbuzz-5.3.0/ tree as obtained from:
- https://github.com/harfbuzz/harfbuzz/releases/download/5.3.0/
+Changes applied to the harfbuzz-5.3.1/ tree as obtained from:
+ https://github.com/harfbuzz/harfbuzz/releases/download/5.3.1/
Removed:
COPYING
diff --git a/Build/source/libs/harfbuzz/configure b/Build/source/libs/harfbuzz/configure
index fb27430e728..505fa2f6514 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.71 for harfbuzz (TeX Live) 5.3.0.
+# Generated by GNU Autoconf 2.71 for harfbuzz (TeX Live) 5.3.1.
#
# Report bugs to <tex-k@tug.org>.
#
@@ -611,8 +611,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='harfbuzz (TeX Live)'
PACKAGE_TARNAME='harfbuzz--tex-live-'
-PACKAGE_VERSION='5.3.0'
-PACKAGE_STRING='harfbuzz (TeX Live) 5.3.0'
+PACKAGE_VERSION='5.3.1'
+PACKAGE_STRING='harfbuzz (TeX Live) 5.3.1'
PACKAGE_BUGREPORT='tex-k@tug.org'
PACKAGE_URL=''
@@ -1346,7 +1346,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) 5.3.0 to adapt to many kinds of systems.
+\`configure' configures harfbuzz (TeX Live) 5.3.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1418,7 +1418,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of harfbuzz (TeX Live) 5.3.0:";;
+ short | recursive ) echo "Configuration of harfbuzz (TeX Live) 5.3.1:";;
esac
cat <<\_ACEOF
@@ -1523,7 +1523,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-harfbuzz (TeX Live) configure 5.3.0
+harfbuzz (TeX Live) configure 5.3.1
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2064,7 +2064,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 5.3.0, which was
+It was created by harfbuzz (TeX Live) $as_me 5.3.1, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
@@ -4823,7 +4823,7 @@ fi
# Define the identity of the package.
PACKAGE='harfbuzz--tex-live-'
- VERSION='5.3.0'
+ VERSION='5.3.1'
# Some tools Automake needs.
@@ -5035,8 +5035,8 @@ WARNING_CFLAGS=$kpse_cv_warning_cflags
HB_VERSION_MAJOR=5
HB_VERSION_MINOR=3
-HB_VERSION_MICRO=0
-HB_VERSION=5.3.0
+HB_VERSION_MICRO=1
+HB_VERSION=5.3.1
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -8817,7 +8817,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 5.3.0, which was
+This file was extended by harfbuzz (TeX Live) $as_me 5.3.1, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -8885,7 +8885,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-harfbuzz (TeX Live) config.status 5.3.0
+harfbuzz (TeX Live) config.status 5.3.1
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog b/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog
index 9bc4ccdcb87..1f1c94db61e 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog
@@ -1,3 +1,273 @@
+commit 970321db7bddbe8c579b73751fc655a924ea3ce6
+Author: Khaled Hosny <khaled@aliftype.com>
+Date: Wed Oct 19 22:06:46 2022 +0200
+
+ 5.3.1
+
+ NEWS | 8 ++++++++
+ configure.ac | 2 +-
+ meson.build | 2 +-
+ src/hb-version.h | 4 ++--
+ 4 files changed, 12 insertions(+), 4 deletions(-)
+
+commit 7c8be866c981b0fcadc9603c1aac7feefc6c9747
+Author: Khaled Hosny <khaled@aliftype.com>
+Date: Wed Oct 19 22:04:31 2022 +0200
+
+ [doc] Hide another experimental symbol
+
+ docs/harfbuzz-sections.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit d1bf6c0c26aa4bb28f107548fcda262b057dfbee
+Author: Garret Rieger <grieger@google.com>
+Date: Mon Oct 17 20:14:02 2022 +0000
+
+ [subset] only preprocess in benchmark when experimental api is enabled.
+
+ perf/benchmark-subset.cc | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit db22bfb3ccc36643d00cc5d6e0cc367a0136ef35
+Author: Garret Rieger <grieger@google.com>
+Date: Mon Oct 17 18:37:07 2022 +0000
+
+ [subset] Remove Franklin from the tests which is not an open source font.
+
+ test/subset/data/Makefile.am | 1 -
+ test/subset/data/Makefile.sources | 1 -
+ .../FranklinGothic-Regular.default.61,63,68,69.ttf | Bin 6856 -> 0 bytes
+ ...nklinGothic-Regular.default.retain-all-codepoint.ttf | Bin 44544 -> 0 bytes
+ .../FranklinGothic-Regular.layout-test.61,63,68,69.ttf | Bin 7928 -> 0 bytes
+ ...nGothic-Regular.layout-test.retain-all-codepoint.ttf | Bin 46524 -> 0 bytes
+ .../FranklinGothic-Regular.retain-gids.61,63,68,69.ttf | Bin 7288 -> 0 bytes
+ ...nGothic-Regular.retain-gids.retain-all-codepoint.ttf | Bin 44552 -> 0 bytes
+ test/subset/data/fonts/FranklinGothic-Regular.ttf | Bin 71856 -> 0 bytes
+ test/subset/data/tests/layout.default_features.tests | 11 -----------
+ test/subset/meson.build | 1 -
+ 11 files changed, 14 deletions(-)
+
+commit a73137d101e5ce03d6691908bb1bb09c1e440cd4
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon Oct 17 12:18:16 2022 -0600
+
+ [face] Fix annotation
+
+ src/hb-face.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit d65af60213e46c2d213d797af48d92b352ee4f55
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Sat Oct 15 14:26:02 2022 -0600
+
+ [shape] Adjust Grapheme clusters for Katakana voiced sound marks
+
+ Fixes https://github.com/harfbuzz/harfbuzz/issues/3844
+
+ src/hb-ot-shape.cc | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+commit bda42fc34a34c0c320784e4f8cba541ddc4573ca
+Merge: a756bd194 f53ebf558
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri Oct 14 15:08:22 2022 -0600
+
+ Merge pull request #3842 from harfbuzz/patch_mode
+
+ [subset] Begin implementing a subset accelerator
+
+commit f53ebf55849bccd9cb8c3f49fa0af6d5eff0570f
+Author: Garret Rieger <grieger@google.com>
+Date: Fri Oct 14 19:38:19 2022 +0000
+
+ [subset] Add hb_subset_preprocess to experimental symbol list for check-symbols.
+
+ src/gen-def.py | 4 +++-
+ src/hb-subset-input.cc | 8 ++++----
+ src/hb-subset.h | 3 +++
+ 3 files changed, 10 insertions(+), 5 deletions(-)
+
+commit fdb98ed88e9e3d865736eb27894a2018db236eb8
+Author: Garret Rieger <grieger@google.com>
+Date: Fri Oct 14 18:30:39 2022 +0000
+
+ [subset] add missing HB_EXTERN.
+
+ src/hb-subset-input.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 515863e57c1d682e1a06373cf3dcd053602ed3b0
+Author: Garret Rieger <grieger@google.com>
+Date: Thu Oct 13 23:42:00 2022 +0000
+
+ [subset] Remove add accelerator flag, replace with new api method.
+
+ Adds hb_subset_preprocess() which preprocesses the face and attaches accelerator data.
+
+ perf/benchmark-subset.cc | 34 +++-----------------------------
+ src/hb-subset-input.cc | 50 +++++++++++++++++++++++++++++++++++++++++++++++-
+ src/hb-subset-input.hh | 1 +
+ src/hb-subset-plan.cc | 2 ++
+ src/hb-subset-plan.hh | 1 +
+ src/hb-subset.cc | 2 +-
+ src/hb-subset.h | 12 ++++++------
+ util/hb-subset.cc | 35 +++++----------------------------
+ 8 files changed, 68 insertions(+), 69 deletions(-)
+
+commit 573640c99fbff98fe7bb4b672a99eb397165a7cc
+Author: Garret Rieger <grieger@google.com>
+Date: Thu Oct 13 23:21:35 2022 +0000
+
+ [subset] Add hb-subset-accelerator.hh to Make soure list.
+
+ src/Makefile.sources | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit a756bd1944404da6e53173c4061a2aef262e60f3
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Oct 13 17:18:19 2022 -0600
+
+ [glyf] Use component phantom points after transformation
+
+ src/OT/glyf/Glyph.hh | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+commit 82d19c08fc5f2b083d3769d2e6bd818368d6ac40
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Oct 13 17:17:03 2022 -0600
+
+ Revert "[glyf/Composite] Remove phantom points when not needed anymore"
+
+ This reverts commit 527e63a3bd8487d21e423a8a358eee30672eddb6.
+
+ src/OT/glyf/Glyph.hh | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+commit 527e63a3bd8487d21e423a8a358eee30672eddb6
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Oct 13 17:13:40 2022 -0600
+
+ [glyf/Composite] Remove phantom points when not needed anymore
+
+ src/OT/glyf/Glyph.hh | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+commit 3394ec7048ce7c61e39e7d1f176e5d260e3273d1
+Author: Garret Rieger <grieger@google.com>
+Date: Thu Oct 13 23:02:54 2022 +0000
+
+ [subset] use subset accelerator in tests.
+
+ This ensures it produces equivalent subsets as without the accelerator.
+
+ perf/benchmark-subset.cc | 3 +++
+ test/subset/run-tests.py | 1 +
+ util/hb-subset.cc | 45 ++++++++++++++++++++++++++++++++++++++++++++-
+ 3 files changed, 48 insertions(+), 1 deletion(-)
+
+commit f4903defc4ed3575f6671087dcecf24c8a37b5f2
+Author: Garret Rieger <grieger@google.com>
+Date: Thu Oct 13 21:38:54 2022 +0000
+
+ [subset] use the accelerator in the subsetting benchmark.
+
+ perf/benchmark-subset.cc | 36 ++++++++++++++++++++++++++++++++++++
+ src/hb-subset.h | 4 ++--
+ 2 files changed, 38 insertions(+), 2 deletions(-)
+
+commit 01481db5822a7990d60ceba383123040d3009b7b
+Author: Garret Rieger <grieger@google.com>
+Date: Thu Oct 13 21:12:22 2022 +0000
+
+ [subset] use accelerator unicode to gid map if available.
+
+ src/hb-subset-accelerator.hh | 5 +--
+ src/hb-subset-plan.cc | 78 ++++++++++++++++++++++++++++++++------------
+ src/hb-subset-plan.hh | 3 ++
+ src/hb-subset.cc | 2 +-
+ 4 files changed, 65 insertions(+), 23 deletions(-)
+
+commit 4ec5eb955f466a7d4f4a167c7f84e66210ea4851
+Author: Garret Rieger <grieger@google.com>
+Date: Thu Oct 13 19:40:31 2022 +0000
+
+ [subset] add a subset accelerator.
+
+ Can be optionally attached to the face during subsetting. Contains data which can accelerate future subsets.
+
+ src/hb-subset-accelerator.hh | 75 ++++++++++++++++++++++++++++++++++++++++++++
+ src/hb-subset.cc | 26 +++++++++++++++
+ src/meson.build | 1 +
+ 3 files changed, 102 insertions(+)
+
+commit f105c28749b94b5f5a093f2278fe9fc0cb5c73dd
+Author: Garret Rieger <grieger@google.com>
+Date: Thu Oct 13 18:53:41 2022 +0000
+
+ [subset] Suggested flags to enable more performant subset production for use in incxfer.
+
+ src/hb-subset.h | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+commit 5769d422c5d824386d19ddc6bb2d85b96233c357
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Oct 13 12:12:24 2022 -0600
+
+ [type] Add HBFixed template
+
+ src/hb-open-type.hh | 29 +++++++++++++----------------
+ 1 file changed, 13 insertions(+), 16 deletions(-)
+
+commit 8c29dcaee4393e6e52dbe7081bc01ca83512bb7e
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Oct 13 12:04:32 2022 -0600
+
+ s/HBFixed/F16DOT16/g
+
+ src/hb-aat-layout-just-table.hh | 20 ++++++++++----------
+ src/hb-aat-layout-trak-table.hh | 8 ++++----
+ src/hb-open-type.hh | 4 ++--
+ src/hb-ot-color-colr-table.hh | 14 +++++++-------
+ src/hb-ot-post-table.hh | 2 +-
+ src/hb-ot-stat-table.hh | 14 +++++++-------
+ src/hb-ot-var-fvar-table.hh | 20 ++++++++++----------
+ 7 files changed, 41 insertions(+), 41 deletions(-)
+
+commit 294b1c9f6eda839d22c1509199887e9650b377fe
+Author: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu Oct 13 11:30:02 2022 -0600
+
+ Use snprintf instead of sprintf
+
+ src/OT/Layout/GSUB/Ligature.hh | 2 +-
+ src/OT/Layout/GSUB/Sequence.hh | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 9559d3c1c16812ed202852977ab11f10e3ebe804
+Author: Garret Rieger <grieger@google.com>
+Date: Tue Oct 11 19:49:01 2022 +0000
+
+ [repacker] fix incorrect coverage table size estimation.
+
+ During splitting of PairPosFormat2 the code was assuming the maximum size of the generated coverage table would be equal too the current size. This is incorrect size the new coverage table may not preserve the ranges found in the original coverage table (since we are splitting based on class, not coverage) and in the worst case may convert from format2 to format1. So use the size of a format1 table as the max size.
+
+ src/graph/pairpos-graph.hh | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+commit dcd8fe2c3b2b76588ce692e44afd290f054451de
+Author: Khaled Hosny <khaled@aliftype.com>
+Date: Sat Oct 8 19:33:38 2022 +0200
+
+ Revert "[ci] Mark automatic releases as draft"
+
+ This reverts commit 9a28df411e75a39c2e4973a589ad0db99f2c5306.
+
+ It creates a new draft release for each upload, which is not what we are
+ after.
+
+ .ci/publish_release_artifact.sh | 1 -
+ 1 file changed, 1 deletion(-)
+
commit 3ce4b8f5c94fe351165243b209ccb9759917f5cb
Author: Khaled Hosny <khaled@aliftype.com>
Date: Sat Oct 8 19:10:07 2022 +0200
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/NEWS b/Build/source/libs/harfbuzz/harfbuzz-src/NEWS
index 5ba8e5af851..8d4389fc67b 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/NEWS
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/NEWS
@@ -1,3 +1,11 @@
+Overview of changes leading to 5.3.1
+Wednesday, October 19, 2022
+====================================
+- Subsetter repacker fixes. (Garret Rieger)
+- Adjust Grapheme clusters for Katakana voiced sound marks. (Behdad Esfahbod)
+- New “hb-subset” option “--preprocess-face”. (Garret Rieger)
+
+
Overview of changes leading to 5.3.0
Saturday, October 8, 2022
"Women, Life, Freedom" #MahsaAmini
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac b/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac
index 7b4a2f3be5f..f2480c349d3 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],
- [5.3.0],
+ [5.3.1],
[https://github.com/harfbuzz/harfbuzz/issues/new],
[harfbuzz],
[http://harfbuzz.org/])
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/meson.build b/Build/source/libs/harfbuzz/harfbuzz-src/meson.build
index 7a5c7fd58fe..b80679d3aa1 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/meson.build
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/meson.build
@@ -1,6 +1,6 @@
project('harfbuzz', 'c', 'cpp',
meson_version: '>= 0.55.0',
- version: '5.3.0',
+ version: '5.3.1',
default_options: [
'cpp_rtti=false', # Just to support msvc, we are passing -fno-exceptions also anyway
'cpp_std=c++11',
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources b/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources
index 37c83dc9fae..6c891eac577 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources
@@ -341,6 +341,7 @@ HB_SUBSET_sources = \
hb-subset-cff2.hh \
hb-subset-input.cc \
hb-subset-input.hh \
+ hb-subset-accelerator.hh \
hb-subset-plan.cc \
hb-subset-plan.hh \
hb-subset-repacker.cc \
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/Ligature.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/Ligature.hh
index f373d921b5a..6caa80e056c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/Ligature.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/Ligature.hh
@@ -118,7 +118,7 @@ struct Ligature
match_positions[i] += delta;
if (i)
*p++ = ',';
- sprintf (p, "%u", match_positions[i]);
+ snprintf (p, sizeof(buf), "%u", match_positions[i]);
p += strlen(p);
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/Sequence.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/Sequence.hh
index 3d84a5e6ea8..abf1c643ff7 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/Sequence.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/Sequence.hh
@@ -117,7 +117,7 @@ struct Sequence
{
if (buf < p)
*p++ = ',';
- sprintf (p, "%u", i);
+ snprintf (p, sizeof(buf), "%u", i);
p += strlen(p);
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/Glyph.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/Glyph.hh
index 50311227023..0b25659acca 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/Glyph.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/Glyph.hh
@@ -288,11 +288,6 @@ struct Glyph
deltas, shift_points_hori, use_my_metrics, phantom_only, depth + 1)))
return false;
- /* Copy phantom points from component if USE_MY_METRICS flag set */
- if (use_my_metrics && item.is_use_my_metrics ())
- for (unsigned int i = 0; i < PHANTOM_COUNT; i++)
- phantoms[i] = comp_points[comp_points.length - PHANTOM_COUNT + i];
-
/* Apply component transformation & translation */
item.transform_points (comp_points);
@@ -313,6 +308,11 @@ struct Glyph
}
}
+ /* Copy phantom points from component if USE_MY_METRICS flag set */
+ if (use_my_metrics && item.is_use_my_metrics ())
+ for (unsigned int i = 0; i < PHANTOM_COUNT; i++)
+ phantoms[i] = comp_points[comp_points.length - PHANTOM_COUNT + i];
+
all_points.extend (comp_points.sub_array (0, comp_points.length - PHANTOM_COUNT));
comp_index++;
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-def.py b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-def.py
index 47b7b479df4..e751f524e47 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-def.py
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-def.py
@@ -21,7 +21,9 @@ if '--experimental-api' not in sys.argv:
experimental_symbols = \
"""hb_subset_repack_or_fail
hb_subset_input_pin_axis_location
-hb_subset_input_pin_axis_to_default""".splitlines ()
+hb_subset_input_pin_axis_to_default
+hb_subset_preprocess
+""".splitlines ()
symbols = [x for x in symbols if x not in experimental_symbols]
symbols = "\n".join (symbols)
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/pairpos-graph.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/pairpos-graph.hh
index c3aa47171f2..8040778ea30 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/pairpos-graph.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/pairpos-graph.hh
@@ -526,10 +526,13 @@ struct PairPosFormat2 : public OT::Layout::GPOS_impl::PairPosFormat2_4<SmallType
}, hb_second)
;
+ auto new_coverage = + klass_map | hb_map_retains_sorting (hb_first);
if (!Coverage::make_coverage (split_context.c,
- + klass_map | hb_map_retains_sorting (hb_first),
+ + new_coverage,
coverage.index,
- coverage.vertex->table_size ()))
+ // existing ranges my not be kept, worst case size is a format 1
+ // coverage table.
+ 4 + new_coverage.len() * 2))
return false;
return ClassDef::make_class_def (split_context.c,
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-just-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-just-table.hh
index 57c105967de..8fd3990f887 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-just-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-just-table.hh
@@ -70,9 +70,9 @@ struct DecompositionAction
ActionSubrecordHeader
header;
- HBFixed lowerLimit; /* If the distance factor is less than this value,
+ F16DOT16 lowerLimit; /* If the distance factor is less than this value,
* then the ligature is decomposed. */
- HBFixed upperLimit; /* If the distance factor is greater than this value,
+ F16DOT16 upperLimit; /* If the distance factor is greater than this value,
* then the ligature is decomposed. */
HBUINT16 order; /* Numerical order in which this ligature will
* be decomposed; you may want infrequent ligatures
@@ -118,7 +118,7 @@ struct ConditionalAddGlyphAction
protected:
ActionSubrecordHeader
header;
- HBFixed substThreshold; /* Distance growth factor (in ems) at which
+ F16DOT16 substThreshold; /* Distance growth factor (in ems) at which
* this glyph is replaced and the growth factor
* recalculated. */
HBGlyphID16 addGlyph; /* Glyph to be added as kashida. If this value is
@@ -146,13 +146,13 @@ struct DuctileGlyphAction
HBUINT32 variationAxis; /* The 4-byte tag identifying the ductile axis.
* This would normally be 0x64756374 ('duct'),
* but you may use any axis the font contains. */
- HBFixed minimumLimit; /* The lowest value for the ductility axis that
+ F16DOT16 minimumLimit; /* The lowest value for the ductility axis that
* still yields an acceptable appearance. Normally
* this will be 1.0. */
- HBFixed noStretchValue; /* This is the default value that corresponds to
+ F16DOT16 noStretchValue; /* This is the default value that corresponds to
* no change in appearance. Normally, this will
* be 1.0. */
- HBFixed maximumLimit; /* The highest value for the ductility axis that
+ F16DOT16 maximumLimit; /* The highest value for the ductility axis that
* still yields an acceptable appearance. */
public:
DEFINE_SIZE_STATIC (22);
@@ -271,14 +271,14 @@ struct JustWidthDeltaEntry
};
protected:
- HBFixed beforeGrowLimit;/* The ratio by which the advance width of the
+ F16DOT16 beforeGrowLimit;/* The ratio by which the advance width of the
* glyph is permitted to grow on the left or top side. */
- HBFixed beforeShrinkLimit;
+ F16DOT16 beforeShrinkLimit;
/* The ratio by which the advance width of the
* glyph is permitted to shrink on the left or top side. */
- HBFixed afterGrowLimit; /* The ratio by which the advance width of the glyph
+ F16DOT16 afterGrowLimit; /* The ratio by which the advance width of the glyph
* is permitted to shrink on the left or top side. */
- HBFixed afterShrinkLimit;
+ F16DOT16 afterShrinkLimit;
/* The ratio by which the advance width of the glyph
* is at most permitted to shrink on the right or
* bottom side. */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-trak-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-trak-table.hh
index 68bcb2396f5..2ba9355b06b 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-trak-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-trak-table.hh
@@ -62,7 +62,7 @@ struct TrackTableEntry
}
protected:
- HBFixed track; /* Track value for this record. */
+ F16DOT16 track; /* Track value for this record. */
NameID trackNameID; /* The 'name' table index for this track.
* (a short word or phrase like "loose"
* or "very tight") */
@@ -82,7 +82,7 @@ struct TrackData
const void *base) const
{
unsigned int sizes = nSizes;
- hb_array_t<const HBFixed> size_table ((base+sizeTable).arrayZ, sizes);
+ hb_array_t<const F16DOT16> size_table ((base+sizeTable).arrayZ, sizes);
float s0 = size_table[idx].to_float ();
float s1 = size_table[idx + 1].to_float ();
@@ -120,7 +120,7 @@ struct TrackData
if (!sizes) return 0.;
if (sizes == 1) return trackTableEntry->get_value (base, 0, sizes);
- hb_array_t<const HBFixed> size_table ((base+sizeTable).arrayZ, sizes);
+ hb_array_t<const F16DOT16> size_table ((base+sizeTable).arrayZ, sizes);
unsigned int size_index;
for (size_index = 0; size_index < sizes - 1; size_index++)
if (size_table[size_index].to_float () >= ptem)
@@ -141,7 +141,7 @@ struct TrackData
protected:
HBUINT16 nTracks; /* Number of separate tracks included in this table. */
HBUINT16 nSizes; /* Number of point sizes included in this table. */
- NNOffset32To<UnsizedArrayOf<HBFixed>>
+ NNOffset32To<UnsizedArrayOf<F16DOT16>>
sizeTable; /* Offset from start of the tracking table to
* Array[nSizes] of size values.. */
UnsizedArrayOf<TrackTableEntry>
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 78d6aa16cb6..e7deb31dd83 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc
@@ -806,7 +806,7 @@ hb_face_builder_add_table (hb_face_t *face, hb_tag_t tag, hb_blob_t *blob)
/**
* hb_face_builder_sort_tables:
* @face: A face object created with hb_face_builder_create()
- * @tags: (array zero-terminated=1) ordered list of table tags terminated by
+ * @tags: (array zero-terminated=1): ordered list of table tags terminated by
* %HB_TAG_NONE
*
* Set the ordering of tables for serialization. Any tables not
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type.hh
index d0d01a68c52..e66f4518207 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type.hh
@@ -141,27 +141,24 @@ typedef HBINT32 FWORD32;
/* 16-bit unsigned integer (HBUINT16) that describes a quantity in FUnits. */
typedef HBUINT16 UFWORD;
-/* 16-bit signed fixed number with the low 14 bits of fraction (2.14). */
-struct F2DOT14 : HBINT16
+template <typename Type, unsigned fraction_bits>
+struct HBFixed : Type
{
- F2DOT14& operator = (uint16_t i ) { HBINT16::operator= (i); return *this; }
- // 16384 means 1<<14
- float to_float () const { return ((int32_t) v) / 16384.f; }
- void set_float (float f) { v = roundf (f * 16384.f); }
+ static constexpr float shift = (float) (1 << fraction_bits);
+ static_assert (Type::static_size * 8 > fraction_bits, "");
+
+ HBFixed& operator = (typename Type::type i ) { Type::operator= (i); return *this; }
+ float to_float () const { return ((int32_t) Type::v) / shift; }
+ void set_float (float f) { Type::v = roundf (f * shift); }
public:
- DEFINE_SIZE_STATIC (2);
+ DEFINE_SIZE_STATIC (Type::static_size);
};
+/* 16-bit signed fixed number with the low 14 bits of fraction (2.14). */
+using F2DOT14 = HBFixed<HBINT16, 14>;
+
/* 32-bit signed fixed-point number (16.16). */
-struct HBFixed : HBINT32
-{
- HBFixed& operator = (uint32_t i) { HBINT32::operator= (i); return *this; }
- // 65536 means 1<<16
- float to_float () const { return ((int32_t) v) / 65536.f; }
- void set_float (float f) { v = roundf (f * 65536.f); }
- public:
- DEFINE_SIZE_STATIC (4);
-};
+using F16DOT16 = HBFixed<HBINT32, 16>;
/* Date represented in number of seconds since 12:00 midnight, January 1,
* 1904. The value is represented as a signed 64-bit integer. */
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colr-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colr-table.hh
index f01d383bdcd..908bf550f0d 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colr-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colr-table.hh
@@ -358,14 +358,14 @@ struct Affine2x3
return_trace (c->check_struct (this));
}
- HBFixed xx;
- HBFixed yx;
- HBFixed xy;
- HBFixed yy;
- HBFixed dx;
- HBFixed dy;
+ F16DOT16 xx;
+ F16DOT16 yx;
+ F16DOT16 xy;
+ F16DOT16 yy;
+ F16DOT16 dx;
+ F16DOT16 dy;
public:
- DEFINE_SIZE_STATIC (6 * HBFixed::static_size);
+ DEFINE_SIZE_STATIC (6 * F16DOT16::static_size);
};
struct PaintColrLayers
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh
index 80d02ffba7d..59c1de37846 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh
@@ -282,7 +282,7 @@ struct post
* 0x00020000 for version 2.0
* 0x00025000 for version 2.5 (deprecated)
* 0x00030000 for version 3.0 */
- HBFixed italicAngle; /* Italic angle in counter-clockwise degrees
+ F16DOT16 italicAngle; /* Italic angle in counter-clockwise degrees
* from the vertical. Zero for upright text,
* negative for text that leans to the right
* (forward). */
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 7f679cfd392..249b5a864ce 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
@@ -527,18 +527,20 @@ hb_set_unicode_props (hb_buffer_t *buffer)
}
#endif
/* Or part of the Other_Grapheme_Extend that is not marks.
- * As of Unicode 11 that is just:
+ * As of Unicode 15 that is just:
*
* 200C ; Other_Grapheme_Extend # Cf ZERO WIDTH NON-JOINER
* FF9E..FF9F ; Other_Grapheme_Extend # Lm [2] HALFWIDTH KATAKANA VOICED SOUND MARK..HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK
* E0020..E007F ; Other_Grapheme_Extend # Cf [96] TAG SPACE..CANCEL TAG
*
* ZWNJ is special, we don't want to merge it as there's no need, and keeping
- * it separate results in more granular clusters. Ignore Katakana for now.
+ * it separate results in more granular clusters.
* Tags are used for Emoji sub-region flag sequences:
* https://github.com/harfbuzz/harfbuzz/issues/1556
+ * Katakana ones were requested:
+ * https://github.com/harfbuzz/harfbuzz/issues/3844
*/
- else if (unlikely (hb_in_range<hb_codepoint_t> (info[i].codepoint, 0xE0020u, 0xE007Fu)))
+ else if (unlikely (hb_in_ranges<hb_codepoint_t> (info[i].codepoint, 0xFF9Eu, 0xFF9Fu, 0xE0020u, 0xE007Fu)))
_hb_glyph_info_set_continuation (&info[i]);
}
}
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-stat-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-stat-table.hh
index d83bf142194..af6d550c0e2 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-stat-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-stat-table.hh
@@ -136,7 +136,7 @@ struct AxisValueFormat1
NameID valueNameID; /* The name ID for entries in the 'name' table
* that provide a display string for this
* attribute value. */
- HBFixed value; /* A numeric value for this attribute value. */
+ F16DOT16 value; /* A numeric value for this attribute value. */
public:
DEFINE_SIZE_STATIC (12);
};
@@ -195,10 +195,10 @@ struct AxisValueFormat2
NameID valueNameID; /* The name ID for entries in the 'name' table
* that provide a display string for this
* attribute value. */
- HBFixed nominalValue; /* A numeric value for this attribute value. */
- HBFixed rangeMinValue; /* The minimum value for a range associated
+ F16DOT16 nominalValue; /* A numeric value for this attribute value. */
+ F16DOT16 rangeMinValue; /* The minimum value for a range associated
* with the specified name ID. */
- HBFixed rangeMaxValue; /* The maximum value for a range associated
+ F16DOT16 rangeMaxValue; /* The maximum value for a range associated
* with the specified name ID. */
public:
DEFINE_SIZE_STATIC (20);
@@ -258,8 +258,8 @@ struct AxisValueFormat3
NameID valueNameID; /* The name ID for entries in the 'name' table
* that provide a display string for this
* attribute value. */
- HBFixed value; /* A numeric value for this attribute value. */
- HBFixed linkedValue; /* The numeric value for a style-linked mapping
+ F16DOT16 value; /* A numeric value for this attribute value. */
+ F16DOT16 linkedValue; /* The numeric value for a style-linked mapping
* from this value. */
public:
DEFINE_SIZE_STATIC (16);
@@ -280,7 +280,7 @@ struct AxisValueRecord
HBUINT16 axisIndex; /* Zero-base index into the axis record array
* identifying the axis to which this value
* applies. Must be less than designAxisCount. */
- HBFixed value; /* A numeric value for this attribute value. */
+ F16DOT16 value; /* A numeric value for this attribute value. */
public:
DEFINE_SIZE_STATIC (6);
};
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-fvar-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-fvar-table.hh
index c65db02c9c6..af238628705 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-fvar-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-fvar-table.hh
@@ -44,7 +44,7 @@ struct InstanceRecord
{
friend struct fvar;
- hb_array_t<const HBFixed> get_coordinates (unsigned int axis_count) const
+ hb_array_t<const F16DOT16> get_coordinates (unsigned int axis_count) const
{ return coordinatesZ.as_array (axis_count); }
bool subset (hb_subset_context_t *c,
@@ -55,7 +55,7 @@ struct InstanceRecord
if (unlikely (!c->serializer->embed (subfamilyNameID))) return_trace (false);
if (unlikely (!c->serializer->embed (flags))) return_trace (false);
- const hb_array_t<const HBFixed> coords = get_coordinates (axis_count);
+ const hb_array_t<const F16DOT16> coords = get_coordinates (axis_count);
const hb_hashmap_t<hb_tag_t, float> *axes_location = c->plan->user_axes_location;
for (unsigned i = 0 ; i < axis_count; i++)
{
@@ -96,7 +96,7 @@ struct InstanceRecord
NameID subfamilyNameID;/* The name ID for entries in the 'name' table
* that provide subfamily names for this instance. */
HBUINT16 flags; /* Reserved for future use — set to 0. */
- UnsizedArrayOf<HBFixed>
+ UnsizedArrayOf<F16DOT16>
coordinatesZ; /* The coordinates array for this instance. */
//NameID postScriptNameIDX;/*Optional. The name ID for entries in the 'name'
// * table that provide PostScript names for this
@@ -189,9 +189,9 @@ struct AxisRecord
public:
Tag axisTag; /* Tag identifying the design variation for the axis. */
protected:
- HBFixed minValue; /* The minimum coordinate value for the axis. */
- HBFixed defaultValue; /* The default coordinate value for the axis. */
- HBFixed maxValue; /* The maximum coordinate value for the axis. */
+ F16DOT16 minValue; /* The minimum coordinate value for the axis. */
+ F16DOT16 defaultValue; /* The default coordinate value for the axis. */
+ F16DOT16 maxValue; /* The maximum coordinate value for the axis. */
public:
HBUINT16 flags; /* Axis flags. */
NameID axisNameID; /* The name ID for entries in the 'name' table that
@@ -306,7 +306,7 @@ struct fvar
if (coords_length && *coords_length)
{
- hb_array_t<const HBFixed> instanceCoords = instance->get_coordinates (axisCount)
+ hb_array_t<const F16DOT16> instanceCoords = instance->get_coordinates (axisCount)
.sub_array (0, coords_length);
for (unsigned int i = 0; i < instanceCoords.length; i++)
coords[i] = instanceCoords.arrayZ[i].to_float ();
@@ -339,7 +339,7 @@ struct fvar
if (hb_any (+ hb_zip (instance->get_coordinates (axisCount), hb_range ((unsigned)axisCount))
| hb_filter (pinned_axes, hb_second)
- | hb_map ([&] (const hb_pair_t<const HBFixed&, unsigned>& _)
+ | hb_map ([&] (const hb_pair_t<const F16DOT16&, unsigned>& _)
{
hb_tag_t axis_tag = pinned_axes.get (_.second);
float location = user_axes_location->get (axis_tag);
@@ -426,8 +426,8 @@ struct fvar
HBUINT16 instanceCount; /* The number of named instances defined in the font
* (the number of records in the instances array). */
HBUINT16 instanceSize; /* The size in bytes of each InstanceRecord — set
- * to either axisCount * sizeof(HBFixed) + 4, or to
- * axisCount * sizeof(HBFixed) + 6. */
+ * to either axisCount * sizeof(F16DOT16) + 4, or to
+ * axisCount * sizeof(F16DOT16) + 6. */
public:
DEFINE_SIZE_STATIC (16);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-accelerator.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-accelerator.hh
new file mode 100644
index 00000000000..34bd0534fb6
--- /dev/null
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-accelerator.hh
@@ -0,0 +1,76 @@
+/*
+ * Copyright © 2022 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Garret Rieger
+ */
+
+#ifndef HB_SUBSET_ACCELERATOR_HH
+#define HB_SUBSET_ACCELERATOR_HH
+
+
+#include "hb.hh"
+
+#include "hb-map.hh"
+#include "hb-set.hh"
+
+struct hb_subset_accelerator_t
+{
+ static hb_user_data_key_t* user_data_key()
+ {
+ static hb_user_data_key_t key;
+ return &key;
+ }
+
+ static hb_subset_accelerator_t* create(const hb_map_t& unicode_to_gid_,
+ const hb_set_t& unicodes_) {
+ hb_subset_accelerator_t* accel =
+ (hb_subset_accelerator_t*) hb_malloc (sizeof(hb_subset_accelerator_t));
+ new (accel) hb_subset_accelerator_t (unicode_to_gid_, unicodes_);
+ return accel;
+ }
+
+ static void destroy(void* value) {
+ if (!value) return;
+
+ hb_subset_accelerator_t* accel = (hb_subset_accelerator_t*) value;
+ accel->~hb_subset_accelerator_t ();
+ hb_free (accel);
+ }
+
+ hb_subset_accelerator_t(const hb_map_t& unicode_to_gid_,
+ const hb_set_t& unicodes_)
+ : unicode_to_gid(unicode_to_gid_), unicodes(unicodes_) {}
+
+ const hb_map_t unicode_to_gid;
+ const hb_set_t unicodes;
+ // TODO(garretrieger): cumulative glyf checksum map
+ // TODO(garretrieger): sanitized table cache.
+
+ bool in_error () const
+ {
+ return unicode_to_gid.in_error() || unicodes.in_error ();
+ }
+};
+
+
+#endif /* HB_SUBSET_ACCELERATOR_HH */
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 2c5e6daf1dc..fd250104bb3 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
@@ -49,7 +49,7 @@ hb_subset_input_create_or_fail (void)
set = hb_set_create ();
input->axes_location = hb_hashmap_create<hb_tag_t, float> ();
-
+
if (!input->axes_location || input->in_error ())
{
hb_subset_input_destroy (input);
@@ -392,7 +392,7 @@ hb_subset_input_get_user_data (const hb_subset_input_t *input,
*
* Since: EXPERIMENTAL
**/
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_subset_input_pin_axis_to_default (hb_subset_input_t *input,
hb_face_t *face,
hb_tag_t axis_tag)
@@ -416,7 +416,7 @@ hb_subset_input_pin_axis_to_default (hb_subset_input_t *input,
*
* Since: EXPERIMENTAL
**/
-hb_bool_t
+HB_EXTERN hb_bool_t
hb_subset_input_pin_axis_location (hb_subset_input_t *input,
hb_face_t *face,
hb_tag_t axis_tag,
@@ -431,3 +431,51 @@ hb_subset_input_pin_axis_location (hb_subset_input_t *input,
}
#endif
#endif
+
+#ifdef HB_EXPERIMENTAL_API
+/**
+ * hb_subset_preprocess
+ * @input: a #hb_face_t object.
+ *
+ * Preprocesses the face and attaches data that will be needed by the
+ * subsetter. Future subsetting operations can then use the precomputed data
+ * to speed up the subsetting operation.
+ *
+ * Since: EXPERIMENTAL
+ **/
+
+HB_EXTERN hb_face_t *
+hb_subset_preprocess (hb_face_t *source)
+{
+ hb_subset_input_t* input = hb_subset_input_create_or_fail ();
+
+ hb_set_clear (hb_subset_input_set(input, HB_SUBSET_SETS_UNICODE));
+ hb_set_invert (hb_subset_input_set(input, HB_SUBSET_SETS_UNICODE));
+
+ hb_set_clear (hb_subset_input_set(input,
+ HB_SUBSET_SETS_LAYOUT_FEATURE_TAG));
+ hb_set_invert (hb_subset_input_set(input,
+ HB_SUBSET_SETS_LAYOUT_FEATURE_TAG));
+
+ hb_set_clear (hb_subset_input_set(input,
+ HB_SUBSET_SETS_LAYOUT_SCRIPT_TAG));
+ hb_set_invert (hb_subset_input_set(input,
+ HB_SUBSET_SETS_LAYOUT_SCRIPT_TAG));
+
+ hb_set_clear (hb_subset_input_set(input,
+ HB_SUBSET_SETS_NAME_ID));
+ hb_set_invert (hb_subset_input_set(input,
+ HB_SUBSET_SETS_NAME_ID));
+
+ hb_subset_input_set_flags(input,
+ HB_SUBSET_FLAGS_NOTDEF_OUTLINE |
+ HB_SUBSET_FLAGS_GLYPH_NAMES |
+ HB_SUBSET_FLAGS_RETAIN_GIDS);
+ input->attach_accelerator_data = true;
+
+ hb_face_t* new_source = hb_subset_or_fail (source, input);
+ hb_subset_input_destroy (input);
+
+ return new_source;
+}
+#endif
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.hh
index 2335f0634f0..dabb4918fe6 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.hh
@@ -59,6 +59,7 @@ struct hb_subset_input_t
};
unsigned flags;
+ bool attach_accelerator_data = false;
hb_hashmap_t<hb_tag_t, float> *axes_location;
inline unsigned num_sets () const
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 53233626801..9cf7c9e4316 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
@@ -25,6 +25,7 @@
*/
#include "hb-subset-plan.hh"
+#include "hb-subset-accelerator.hh"
#include "hb-map.hh"
#include "hb-set.hh"
@@ -456,41 +457,73 @@ _populate_unicodes_to_retain (const hb_set_t *unicodes,
hb_subset_plan_t *plan)
{
OT::cmap::accelerator_t cmap (plan->source);
-
unsigned size_threshold = plan->source->get_num_glyphs ();
if (glyphs->is_empty () && unicodes->get_population () < size_threshold)
{
+
+ const hb_map_t* unicode_to_gid = nullptr;
+ if (plan->accelerator)
+ unicode_to_gid = &plan->accelerator->unicode_to_gid;
+
// This is approach to collection is faster, but can only be used if glyphs
// are not being explicitly added to the subset and the input unicodes set is
// not excessively large (eg. an inverted set).
plan->unicode_to_new_gid_list.alloc (unicodes->get_population ());
- for (hb_codepoint_t cp : *unicodes)
- {
- hb_codepoint_t gid;
- if (!cmap.get_nominal_glyph (cp, &gid))
+ if (!unicode_to_gid) {
+ for (hb_codepoint_t cp : *unicodes)
{
- DEBUG_MSG(SUBSET, nullptr, "Drop U+%04X; no gid", cp);
- continue;
+ hb_codepoint_t gid;
+ if (!cmap.get_nominal_glyph (cp, &gid))
+ {
+ DEBUG_MSG(SUBSET, nullptr, "Drop U+%04X; no gid", cp);
+ continue;
+ }
+
+ plan->codepoint_to_glyph->set (cp, gid);
+ plan->unicode_to_new_gid_list.push (hb_pair (cp, gid));
+ }
+ } else {
+ // Use in memory unicode to gid map it's faster then looking up from
+ // the map. This code is mostly duplicated from above to avoid doing
+ // conditionals on the presence of the unicode_to_gid map each
+ // iteration.
+ for (hb_codepoint_t cp : *unicodes)
+ {
+ hb_codepoint_t gid = unicode_to_gid->get (cp);
+ if (gid == HB_MAP_VALUE_INVALID)
+ {
+ DEBUG_MSG(SUBSET, nullptr, "Drop U+%04X; no gid", cp);
+ continue;
+ }
+
+ plan->codepoint_to_glyph->set (cp, gid);
+ plan->unicode_to_new_gid_list.push (hb_pair (cp, gid));
}
-
- plan->codepoint_to_glyph->set (cp, gid);
- plan->unicode_to_new_gid_list.push (hb_pair (cp, gid));
}
}
else
{
// This approach is slower, but can handle adding in glyphs to the subset and will match
// them with cmap entries.
- hb_map_t unicode_glyphid_map;
- hb_set_t cmap_unicodes;
- cmap.collect_mapping (&cmap_unicodes, &unicode_glyphid_map);
- plan->unicode_to_new_gid_list.alloc (hb_min(unicodes->get_population ()
- + glyphs->get_population (),
- cmap_unicodes.get_population ()));
-
- for (hb_codepoint_t cp : cmap_unicodes)
+
+ hb_map_t unicode_glyphid_map_storage;
+ hb_set_t cmap_unicodes_storage;
+ const hb_map_t* unicode_glyphid_map = &unicode_glyphid_map_storage;
+ const hb_set_t* cmap_unicodes = &cmap_unicodes_storage;
+
+ if (!plan->accelerator) {
+ cmap.collect_mapping (&cmap_unicodes_storage, &unicode_glyphid_map_storage);
+ plan->unicode_to_new_gid_list.alloc (hb_min(unicodes->get_population ()
+ + glyphs->get_population (),
+ cmap_unicodes->get_population ()));
+ } else {
+ unicode_glyphid_map = &plan->accelerator->unicode_to_gid;
+ cmap_unicodes = &plan->accelerator->unicodes;
+ }
+
+ for (hb_codepoint_t cp : *cmap_unicodes)
{
- hb_codepoint_t gid = unicode_glyphid_map[cp];
+ hb_codepoint_t gid = (*unicode_glyphid_map)[cp];
if (!unicodes->has (cp) && !glyphs->has (gid))
continue;
@@ -729,7 +762,7 @@ _normalize_axes_location (hb_face_t *face, hb_subset_plan_t *plan)
}
if (has_avar)
seg_maps = &StructAfter<OT::SegmentMaps> (*seg_maps);
-
+
old_axis_idx++;
}
plan->all_axes_pinned = !axis_not_pinned;
@@ -815,6 +848,13 @@ hb_subset_plan_create_or_fail (hb_face_t *face,
plan->check_success (plan->vmtx_map = hb_hashmap_create<unsigned, hb_pair_t<unsigned, int>> ());
plan->check_success (plan->hmtx_map = hb_hashmap_create<unsigned, hb_pair_t<unsigned, int>> ());
+ void* accel = hb_face_get_user_data(face, hb_subset_accelerator_t::user_data_key());
+
+ plan->attach_accelerator_data = input->attach_accelerator_data;
+ if (accel)
+ plan->accelerator = (hb_subset_accelerator_t*) accel;
+
+
if (unlikely (plan->in_error ())) {
hb_subset_plan_destroy (plan);
return nullptr;
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 1172cb55f3e..15fabba9c3e 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
@@ -31,6 +31,7 @@
#include "hb-subset.h"
#include "hb-subset-input.hh"
+#include "hb-subset-accelerator.hh"
#include "hb-map.hh"
#include "hb-bimap.hh"
@@ -97,6 +98,7 @@ struct hb_subset_plan_t
bool successful;
unsigned flags;
+ bool attach_accelerator_data = false;
// For each cp that we'd like to retain maps to the corresponding gid.
hb_set_t *unicodes;
@@ -189,6 +191,8 @@ struct hb_subset_plan_t
//vmtx metrics map: new gid->(advance, lsb)
hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> *vmtx_map;
+ const hb_subset_accelerator_t* accelerator;
+
public:
template<typename T>
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 5e116be072e..6026aa6eff3 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.cc
@@ -56,6 +56,7 @@
#include "hb-ot-math-table.hh"
#include "hb-ot-stat-table.hh"
#include "hb-repacker.hh"
+#include "hb-subset-accelerator.hh"
using OT::Layout::GSUB;
using OT::Layout::GPOS;
@@ -494,6 +495,27 @@ _subset_table (hb_subset_plan_t *plan,
}
}
+static void _attach_accelerator_data (const hb_subset_plan_t* plan,
+ hb_face_t* face /* IN/OUT */)
+{
+ hb_subset_accelerator_t* accel =
+ hb_subset_accelerator_t::create (*plan->codepoint_to_glyph,
+ *plan->unicodes);
+
+ if (accel->in_error ())
+ {
+ hb_subset_accelerator_t::destroy (accel);
+ return;
+ }
+
+ if (!hb_face_set_user_data(face,
+ hb_subset_accelerator_t::user_data_key(),
+ accel,
+ hb_subset_accelerator_t::destroy,
+ true))
+ hb_subset_accelerator_t::destroy (accel);
+}
+
/**
* hb_subset_or_fail:
* @source: font face data to be subset.
@@ -576,6 +598,10 @@ hb_subset_plan_execute_or_fail (hb_subset_plan_t *plan)
offset += num_tables;
}
+ if (success && plan->attach_accelerator_data) {
+ _attach_accelerator_data (plan, plan->dest);
+ }
+
end:
return success ? hb_face_reference (plan->dest) : nullptr;
}
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 08e52dbd2d1..6a2c5f61148 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.h
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.h
@@ -70,6 +70,14 @@ typedef struct hb_subset_plan_t hb_subset_plan_t;
* in the final subset.
* @HB_SUBSET_FLAGS_NO_PRUNE_UNICODE_RANGES: If set then the unicode ranges in
* OS/2 will not be recalculated.
+ * @HB_SUBSET_FLAGS_PATCH_MODE: If set the subsetter behaviour will be modified
+ * to produce a subset that is better suited to patching. For example cmap
+ * subtable format will be kept stable.
+ * @HB_SUBSET_FLAGS_OMIT_GLYF: If set the subsetter won't actually produce the final
+ * glyf table bytes. The table directory will include and entry as if the table was
+ * there but the actual final font blob will be truncated prior to the glyf data. This
+ * is a useful performance optimization when a font aware binary patching algorithm
+ * is being used to diff two subsets.
*
* List of boolean properties that can be configured on the subset input.
*
@@ -86,6 +94,8 @@ typedef enum { /*< flags >*/
HB_SUBSET_FLAGS_NOTDEF_OUTLINE = 0x00000040u,
HB_SUBSET_FLAGS_GLYPH_NAMES = 0x00000080u,
HB_SUBSET_FLAGS_NO_PRUNE_UNICODE_RANGES = 0x00000100u,
+ // Not supported yet: HB_SUBSET_FLAGS_PATCH_MODE = 0x00000200u,
+ // Not supported yet: HB_SUBSET_FLAGS_OMIT_GLYF = 0x00000400u,
} hb_subset_flags_t;
/**
@@ -169,6 +179,13 @@ hb_subset_input_pin_axis_location (hb_subset_input_t *input,
#endif
#endif
+#ifdef HB_EXPERIMENTAL_API
+
+HB_EXTERN hb_face_t *
+hb_subset_preprocess (hb_face_t *source);
+
+#endif
+
HB_EXTERN hb_face_t *
hb_subset_or_fail (hb_face_t *source, const hb_subset_input_t *input);
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/meson.build b/Build/source/libs/harfbuzz/harfbuzz-src/src/meson.build
index 4cf3451e9f4..ba3470fffab 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/meson.build
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/meson.build
@@ -334,6 +334,7 @@ hb_subset_sources = files(
'hb-ot-cff1-table.cc',
'hb-ot-cff2-table.cc',
'hb-static.cc',
+ 'hb-subset-accelerator.hh',
'hb-subset-cff-common.cc',
'hb-subset-cff-common.hh',
'hb-subset-cff1.cc',
diff --git a/Build/source/libs/harfbuzz/version.ac b/Build/source/libs/harfbuzz/version.ac
index d7b8ad1d35a..1eee16921db 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], [5.3.0])
+m4_define([harfbuzz_version], [5.3.1])