texlive[64756] Build/source/libs: harfbuzz 5.3.1

commits+kakuto at tug.org commits+kakuto at tug.org
Wed Oct 19 23:15:26 CEST 2022


Revision: 64756
          http://tug.org/svn/texlive?view=revision&revision=64756
Author:   kakuto
Date:     2022-10-19 23:15:26 +0200 (Wed, 19 Oct 2022)
Log Message:
-----------
harfbuzz 5.3.1

Modified Paths:
--------------
    trunk/Build/source/libs/README
    trunk/Build/source/libs/harfbuzz/ChangeLog
    trunk/Build/source/libs/harfbuzz/Makefile.am
    trunk/Build/source/libs/harfbuzz/Makefile.in
    trunk/Build/source/libs/harfbuzz/TLpatches/ChangeLog
    trunk/Build/source/libs/harfbuzz/TLpatches/TL-Changes
    trunk/Build/source/libs/harfbuzz/configure
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/NEWS
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/meson.build
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/Ligature.hh
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/Sequence.hh
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/Glyph.hh
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-def.py
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/pairpos-graph.hh
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-just-table.hh
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-trak-table.hh
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type.hh
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colr-table.hh
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-stat-table.hh
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-fvar-table.hh
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.hh
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.hh
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.cc
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.h
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/meson.build
    trunk/Build/source/libs/harfbuzz/version.ac

Added Paths:
-----------
    trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-accelerator.hh

Modified: trunk/Build/source/libs/README
===================================================================
--- trunk/Build/source/libs/README	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/README	2022-10-19 21:15:26 UTC (rev 64756)
@@ -25,8 +25,8 @@
   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/

Modified: trunk/Build/source/libs/harfbuzz/ChangeLog
===================================================================
--- trunk/Build/source/libs/harfbuzz/ChangeLog	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/ChangeLog	2022-10-19 21:15:26 UTC (rev 64756)
@@ -1,3 +1,8 @@
+2022-10-20  Akira Kakuto  <kakuto at jcom.zaq.ne.jp>
+
+	Import harfbuzz-5.3.1.
+	* version.ac, Makefile.am: Adjusted.
+
 2022-10-09  Akira Kakuto  <kakuto at jcom.zaq.ne.jp>
 
 	Import harfbuzz-5.3.0.

Modified: trunk/Build/source/libs/harfbuzz/Makefile.am
===================================================================
--- trunk/Build/source/libs/harfbuzz/Makefile.am	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/Makefile.am	2022-10-19 21:15:26 UTC (rev 64756)
@@ -127,6 +127,7 @@
 	@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 \

Modified: trunk/Build/source/libs/harfbuzz/Makefile.in
===================================================================
--- trunk/Build/source/libs/harfbuzz/Makefile.in	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/Makefile.in	2022-10-19 21:15:26 UTC (rev 64756)
@@ -801,6 +801,7 @@
 	@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 \

Modified: trunk/Build/source/libs/harfbuzz/TLpatches/ChangeLog
===================================================================
--- trunk/Build/source/libs/harfbuzz/TLpatches/ChangeLog	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/TLpatches/ChangeLog	2022-10-19 21:15:26 UTC (rev 64756)
@@ -1,3 +1,8 @@
+2022-10-20  Akira Kakuto  <kakuto at 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 at jcom.zaq.ne.jp>
 
 	Imported harfbuzz-5.3.0 source tree from:

Modified: trunk/Build/source/libs/harfbuzz/TLpatches/TL-Changes
===================================================================
--- trunk/Build/source/libs/harfbuzz/TLpatches/TL-Changes	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/TLpatches/TL-Changes	2022-10-19 21:15:26 UTC (rev 64756)
@@ -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

Modified: trunk/Build/source/libs/harfbuzz/configure
===================================================================
--- trunk/Build/source/libs/harfbuzz/configure	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/configure	2022-10-19 21:15:26 UTC (rev 64756)
@@ -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 at tug.org>.
 #
@@ -611,8 +611,8 @@
 # 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 at tug.org'
 PACKAGE_URL=''
 
@@ -1346,7 +1346,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures harfbuzz (TeX Live) 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 @@
 
 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 @@
 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 @@
 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 @@
 
 # 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 @@
 
 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 @@
 # 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 @@
 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\\"
 

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog	2022-10-19 21:15:26 UTC (rev 64756)
@@ -1,3 +1,273 @@
+commit 970321db7bddbe8c579b73751fc655a924ea3ce6
+Author: Khaled Hosny <khaled at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at aliftype.com>
 Date:   Sat Oct 8 19:10:07 2022 +0200

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/NEWS
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/NEWS	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/NEWS	2022-10-19 21:15:26 UTC (rev 64756)
@@ -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

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac	2022-10-19 21:15:26 UTC (rev 64756)
@@ -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/])

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/meson.build
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/meson.build	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/meson.build	2022-10-19 21:15:26 UTC (rev 64756)
@@ -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',

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources	2022-10-19 21:15:26 UTC (rev 64756)
@@ -341,6 +341,7 @@
 	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 \

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/Ligature.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/Ligature.hh	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/Ligature.hh	2022-10-19 21:15:26 UTC (rev 64756)
@@ -118,7 +118,7 @@
 	match_positions[i] += delta;
 	if (i)
 	  *p++ = ',';
-	sprintf (p, "%u", match_positions[i]);
+	snprintf (p, sizeof(buf), "%u", match_positions[i]);
 	p += strlen(p);
       }
 

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/Sequence.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/Sequence.hh	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/Sequence.hh	2022-10-19 21:15:26 UTC (rev 64756)
@@ -117,7 +117,7 @@
       {
 	if (buf < p)
 	  *p++ = ',';
-	sprintf (p, "%u", i);
+	snprintf (p, sizeof(buf), "%u", i);
 	p += strlen(p);
       }
 

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/Glyph.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/Glyph.hh	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/Glyph.hh	2022-10-19 21:15:26 UTC (rev 64756)
@@ -288,11 +288,6 @@
 						    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 @@
 	  }
 	}
 
+	/* 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++;

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-def.py
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-def.py	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-def.py	2022-10-19 21:15:26 UTC (rev 64756)
@@ -21,7 +21,9 @@
 	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)
 

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/pairpos-graph.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/pairpos-graph.hh	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/pairpos-graph.hh	2022-10-19 21:15:26 UTC (rev 64756)
@@ -526,10 +526,13 @@
     }, 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,

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-just-table.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-just-table.hh	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-just-table.hh	2022-10-19 21:15:26 UTC (rev 64756)
@@ -70,9 +70,9 @@
 
   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 @@
   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 @@
   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 @@
   };
 
   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. */

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-trak-table.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-trak-table.hh	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-trak-table.hh	2022-10-19 21:15:26 UTC (rev 64756)
@@ -62,7 +62,7 @@
   }
 
   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 @@
 			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 @@
     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 @@
   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>

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc	2022-10-19 21:15:26 UTC (rev 64756)
@@ -806,7 +806,7 @@
 /**
  * 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

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type.hh	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type.hh	2022-10-19 21:15:26 UTC (rev 64756)
@@ -141,27 +141,24 @@
 /* 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. */

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colr-table.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colr-table.hh	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colr-table.hh	2022-10-19 21:15:26 UTC (rev 64756)
@@ -358,14 +358,14 @@
     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

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh	2022-10-19 21:15:26 UTC (rev 64756)
@@ -282,7 +282,7 @@
 					 * 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). */

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc	2022-10-19 21:15:26 UTC (rev 64756)
@@ -527,7 +527,7 @@
     }
 #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
@@ -534,11 +534,13 @@
      * 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]);
   }
 }

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-stat-table.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-stat-table.hh	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-stat-table.hh	2022-10-19 21:15:26 UTC (rev 64756)
@@ -136,7 +136,7 @@
   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 @@
   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 @@
   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 @@
   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);
 };

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-fvar-table.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-fvar-table.hh	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-fvar-table.hh	2022-10-19 21:15:26 UTC (rev 64756)
@@ -44,7 +44,7 @@
 {
   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 @@
     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 @@
   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 @@
   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 @@
 
     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 @@
 
       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 @@
   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);

Added: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-accelerator.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-accelerator.hh	                        (rev 0)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-accelerator.hh	2022-10-19 21:15:26 UTC (rev 64756)
@@ -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 */

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.cc	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.cc	2022-10-19 21:15:26 UTC (rev 64756)
@@ -49,7 +49,7 @@
     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 @@
  *
  * 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 @@
  *
  * 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 @@
 }
 #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

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.hh	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.hh	2022-10-19 21:15:26 UTC (rev 64756)
@@ -59,6 +59,7 @@
   };
 
   unsigned flags;
+  bool attach_accelerator_data = false;
   hb_hashmap_t<hb_tag_t, float> *axes_location;
 
   inline unsigned num_sets () const

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc	2022-10-19 21:15:26 UTC (rev 64756)
@@ -25,6 +25,7 @@
  */
 
 #include "hb-subset-plan.hh"
+#include "hb-subset-accelerator.hh"
 #include "hb-map.hh"
 #include "hb-set.hh"
 
@@ -456,25 +457,48 @@
                               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
@@ -481,16 +505,25 @@
   {
     // 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 @@
     }
     if (has_avar)
       seg_maps = &StructAfter<OT::SegmentMaps> (*seg_maps);
-    
+
     old_axis_idx++;
   }
   plan->all_axes_pinned = !axis_not_pinned;
@@ -815,6 +848,13 @@
   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;

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.hh
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.hh	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.hh	2022-10-19 21:15:26 UTC (rev 64756)
@@ -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 @@
 
   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 @@
   //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>

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.cc
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.cc	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.cc	2022-10-19 21:15:26 UTC (rev 64756)
@@ -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 @@
   }
 }
 
+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 @@
     offset += num_tables;
   }
 
+  if (success && plan->attach_accelerator_data) {
+    _attach_accelerator_data (plan, plan->dest);
+  }
+
 end:
   return success ? hb_face_reference (plan->dest) : nullptr;
 }

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.h
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.h	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.h	2022-10-19 21:15:26 UTC (rev 64756)
@@ -70,6 +70,14 @@
  * 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 @@
   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,7 +179,14 @@
 #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);
 
 HB_EXTERN hb_face_t *

Modified: trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/meson.build
===================================================================
--- trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/meson.build	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/harfbuzz-src/src/meson.build	2022-10-19 21:15:26 UTC (rev 64756)
@@ -334,6 +334,7 @@
   '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',

Modified: trunk/Build/source/libs/harfbuzz/version.ac
===================================================================
--- trunk/Build/source/libs/harfbuzz/version.ac	2022-10-19 21:01:17 UTC (rev 64755)
+++ trunk/Build/source/libs/harfbuzz/version.ac	2022-10-19 21:15:26 UTC (rev 64756)
@@ -8,4 +8,4 @@
 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])



More information about the tex-live-commits mailing list.