From 15fd49016b83fdcf3b522a15f12dd3ea057b6ccc Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Sat, 11 Nov 2023 22:43:59 +0000 Subject: harfbuzz 8.3.0 git-svn-id: svn://tug.org/texlive/trunk@68817 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/libs/README | 4 +- Build/source/libs/harfbuzz/ChangeLog | 5 + Build/source/libs/harfbuzz/TLpatches/ChangeLog | 5 + Build/source/libs/harfbuzz/TLpatches/TL-Changes | 4 +- Build/source/libs/harfbuzz/configure | 26 +- Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog | 1826 ++++++++++++++++++++ Build/source/libs/harfbuzz/harfbuzz-src/INSTALL | 6 +- .../source/libs/harfbuzz/harfbuzz-src/Makefile.am | 1 + Build/source/libs/harfbuzz/harfbuzz-src/NEWS | 15 + Build/source/libs/harfbuzz/harfbuzz-src/README | 6 +- Build/source/libs/harfbuzz/harfbuzz-src/README.md | 6 +- .../source/libs/harfbuzz/harfbuzz-src/config.h.in | 15 +- .../source/libs/harfbuzz/harfbuzz-src/configure.ac | 2 +- .../source/libs/harfbuzz/harfbuzz-src/meson.build | 2 +- .../harfbuzz-src/src/OT/Color/CBDT/CBDT.hh | 6 + .../harfbuzz-src/src/OT/Color/COLR/COLR.hh | 17 +- .../harfbuzz-src/src/OT/Color/CPAL/CPAL.hh | 8 + .../harfbuzz-src/src/OT/Color/sbix/sbix.hh | 1 + .../harfbuzz/harfbuzz-src/src/OT/Color/svg/svg.hh | 1 + .../harfbuzz-src/src/OT/Layout/Common/Coverage.hh | 1 + .../harfbuzz-src/src/OT/Layout/GDEF/GDEF.hh | 59 +- .../harfbuzz-src/src/OT/Layout/GPOS/Anchor.hh | 1 + .../src/OT/Layout/GPOS/AnchorFormat3.hh | 6 + .../src/OT/Layout/GPOS/AnchorMatrix.hh | 10 +- .../harfbuzz-src/src/OT/Layout/GPOS/Common.hh | 2 +- .../src/OT/Layout/GPOS/CursivePosFormat1.hh | 14 +- .../src/OT/Layout/GPOS/MarkMarkPosFormat1.hh | 1 + .../src/OT/Layout/GPOS/PairPosFormat1.hh | 42 +- .../src/OT/Layout/GPOS/PairPosFormat2.hh | 39 +- .../harfbuzz-src/src/OT/Layout/GPOS/PairSet.hh | 8 +- .../src/OT/Layout/GPOS/PairValueRecord.hh | 4 +- .../harfbuzz-src/src/OT/Layout/GPOS/SinglePos.hh | 12 +- .../src/OT/Layout/GPOS/SinglePosFormat1.hh | 29 +- .../src/OT/Layout/GPOS/SinglePosFormat2.hh | 40 +- .../harfbuzz-src/src/OT/Layout/GPOS/ValueFormat.hh | 83 +- .../Layout/GSUB/ReverseChainSingleSubstFormat1.hh | 8 +- .../harfbuzz/harfbuzz-src/src/OT/Layout/types.hh | 8 +- .../libs/harfbuzz/harfbuzz-src/src/OT/name/name.hh | 5 +- .../harfbuzz/harfbuzz-src/src/gen-use-table.py | 7 +- .../harfbuzz-src/src/graph/classdef-graph.hh | 3 + .../harfbuzz-src/src/graph/coverage-graph.hh | 3 + .../libs/harfbuzz/harfbuzz-src/src/graph/graph.hh | 2 + .../harfbuzz-src/src/graph/gsubgpos-graph.hh | 4 + .../harfbuzz-src/src/graph/markbasepos-graph.hh | 3 + .../harfbuzz-src/src/graph/pairpos-graph.hh | 3 + .../harfbuzz-src/src/hb-aat-layout-ankr-table.hh | 1 + .../harfbuzz-src/src/hb-aat-layout-bsln-table.hh | 1 + .../harfbuzz-src/src/hb-aat-layout-common.hh | 6 + .../harfbuzz-src/src/hb-aat-layout-feat-table.hh | 2 + .../harfbuzz-src/src/hb-aat-layout-just-table.hh | 3 + .../harfbuzz-src/src/hb-aat-layout-kerx-table.hh | 25 +- .../harfbuzz-src/src/hb-aat-layout-morx-table.hh | 41 +- .../harfbuzz-src/src/hb-aat-layout-opbd-table.hh | 1 + .../harfbuzz-src/src/hb-aat-layout-trak-table.hh | 2 + .../libs/harfbuzz/harfbuzz-src/src/hb-aat-layout.h | 4 +- .../harfbuzz/harfbuzz-src/src/hb-aat-ltag-table.hh | 5 +- .../libs/harfbuzz/harfbuzz-src/src/hb-array.hh | 2 + .../libs/harfbuzz/harfbuzz-src/src/hb-atomic.hh | 10 +- .../harfbuzz-src/src/hb-bit-set-invertible.hh | 4 +- .../libs/harfbuzz/harfbuzz-src/src/hb-deprecated.h | 11 +- .../source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc | 4 +- .../libs/harfbuzz/harfbuzz-src/src/hb-map.hh | 31 +- .../libs/harfbuzz/harfbuzz-src/src/hb-open-file.hh | 6 + .../libs/harfbuzz/harfbuzz-src/src/hb-open-type.hh | 60 +- .../harfbuzz/harfbuzz-src/src/hb-ot-cff-common.hh | 31 +- .../harfbuzz/harfbuzz-src/src/hb-ot-cff1-table.hh | 23 +- .../harfbuzz/harfbuzz-src/src/hb-ot-cff2-table.hh | 12 +- .../harfbuzz/harfbuzz-src/src/hb-ot-cmap-table.hh | 14 +- .../harfbuzz/harfbuzz-src/src/hb-ot-hdmx-table.hh | 2 + .../harfbuzz/harfbuzz-src/src/hb-ot-head-table.hh | 1 + .../harfbuzz/harfbuzz-src/src/hb-ot-hhea-table.hh | 4 +- .../harfbuzz/harfbuzz-src/src/hb-ot-kern-table.hh | 9 +- .../harfbuzz-src/src/hb-ot-layout-base-table.hh | 2 + .../harfbuzz-src/src/hb-ot-layout-common.hh | 155 +- .../harfbuzz-src/src/hb-ot-layout-gsubgpos.hh | 21 +- .../harfbuzz-src/src/hb-ot-layout-jstf-table.hh | 1 + .../harfbuzz/harfbuzz-src/src/hb-ot-math-table.hh | 3 + .../harfbuzz/harfbuzz-src/src/hb-ot-maxp-table.hh | 3 +- .../harfbuzz/harfbuzz-src/src/hb-ot-meta-table.hh | 2 + .../harfbuzz/harfbuzz-src/src/hb-ot-os2-table.hh | 24 + .../harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh | 18 +- .../harfbuzz/harfbuzz-src/src/hb-ot-stat-table.hh | 3 + .../harfbuzz-src/src/hb-ot-var-avar-table.hh | 3 + .../harfbuzz/harfbuzz-src/src/hb-ot-var-common.hh | 77 +- .../harfbuzz-src/src/hb-ot-var-cvar-table.hh | 3 +- .../harfbuzz-src/src/hb-ot-var-fvar-table.hh | 3 + .../harfbuzz-src/src/hb-ot-var-gvar-table.hh | 11 +- .../harfbuzz-src/src/hb-ot-var-hvar-table.hh | 1 + .../harfbuzz-src/src/hb-ot-var-mvar-table.hh | 2 + .../harfbuzz/harfbuzz-src/src/hb-ot-vorg-table.hh | 1 + .../harfbuzz/harfbuzz-src/src/hb-priority-queue.hh | 3 + .../libs/harfbuzz/harfbuzz-src/src/hb-sanitize.hh | 5 +- .../libs/harfbuzz/harfbuzz-src/src/hb-set.hh | 2 + .../harfbuzz/harfbuzz-src/src/hb-subset-cff1.cc | 55 +- .../harfbuzz/harfbuzz-src/src/hb-subset-cff2.cc | 56 +- .../harfbuzz/harfbuzz-src/src/hb-subset-input.cc | 6 + .../harfbuzz-src/src/hb-subset-instancer-solver.cc | 8 +- .../harfbuzz-src/src/hb-subset-plan-member-list.hh | 12 + .../harfbuzz/harfbuzz-src/src/hb-subset-plan.cc | 91 +- .../harfbuzz/harfbuzz-src/src/hb-subset-plan.hh | 3 + .../libs/harfbuzz/harfbuzz-src/src/hb-subset.cc | 3 +- .../libs/harfbuzz/harfbuzz-src/src/hb-subset.h | 6 + .../libs/harfbuzz/harfbuzz-src/src/hb-vector.hh | 7 +- .../libs/harfbuzz/harfbuzz-src/src/meson.build | 30 +- .../libs/harfbuzz/harfbuzz-src/src/relative_to.py | 2 +- .../src/test-subset-instancer-solver.cc | 10 + Build/source/libs/harfbuzz/harfbuzz-src/xkcd.png | Bin 0 -> 52751 bytes Build/source/libs/harfbuzz/version.ac | 2 +- 108 files changed, 2927 insertions(+), 375 deletions(-) create mode 100644 Build/source/libs/harfbuzz/harfbuzz-src/xkcd.png (limited to 'Build/source') diff --git a/Build/source/libs/README b/Build/source/libs/README index 3945cbf1ed0..368fee3f3d3 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 8.2.2 - checked 18oct23 - https://github.com/harfbuzz/harfbuzz/releases/tag/8.2.2 +harfbuzz 8.3.0 - checked 12nov23 + https://github.com/harfbuzz/harfbuzz/releases/tag/8.3.0 icu 72.1 - checked 07jan23 https://github.com/unicode-org/icu/releases/ diff --git a/Build/source/libs/harfbuzz/ChangeLog b/Build/source/libs/harfbuzz/ChangeLog index d025a8ea842..99f46424789 100644 --- a/Build/source/libs/harfbuzz/ChangeLog +++ b/Build/source/libs/harfbuzz/ChangeLog @@ -1,3 +1,8 @@ +2023-11-12 Akira Kakuto + + Import harfbuzz-8.3.0. + * version.ac: Adjusted. + 2023-10-18 Akira Kakuto Import harfbuzz-8.2.2. diff --git a/Build/source/libs/harfbuzz/TLpatches/ChangeLog b/Build/source/libs/harfbuzz/TLpatches/ChangeLog index 9838a32c7e0..a376f3f60f0 100644 --- a/Build/source/libs/harfbuzz/TLpatches/ChangeLog +++ b/Build/source/libs/harfbuzz/TLpatches/ChangeLog @@ -1,3 +1,8 @@ +2023-11-12 Akira Kakuto + + Imported harfbuzz-8.3.0 source tree from: + https://github.com/harfbuzz/harfbuzz/releases/download/8.3.0/ + 2023-10-18 Akira Kakuto Imported harfbuzz-8.2.2 source tree from: diff --git a/Build/source/libs/harfbuzz/TLpatches/TL-Changes b/Build/source/libs/harfbuzz/TLpatches/TL-Changes index 2986c6c1b6c..2d17db9dbe0 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-8.2.2/ tree as obtained from: - https://github.com/harfbuzz/harfbuzz/releases/download/8.2.2/ +Changes applied to the harfbuzz-8.3.0/ tree as obtained from: + https://github.com/harfbuzz/harfbuzz/releases/download/8.3.0/ Removed: COPYING diff --git a/Build/source/libs/harfbuzz/configure b/Build/source/libs/harfbuzz/configure index 028acf74833..592be119325 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) 8.2.2. +# Generated by GNU Autoconf 2.71 for harfbuzz (TeX Live) 8.3.0. # # Report bugs to . # @@ -611,8 +611,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='harfbuzz (TeX Live)' PACKAGE_TARNAME='harfbuzz--tex-live-' -PACKAGE_VERSION='8.2.2' -PACKAGE_STRING='harfbuzz (TeX Live) 8.2.2' +PACKAGE_VERSION='8.3.0' +PACKAGE_STRING='harfbuzz (TeX Live) 8.3.0' 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) 8.2.2 to adapt to many kinds of systems. +\`configure' configures harfbuzz (TeX Live) 8.3.0 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) 8.2.2:";; + short | recursive ) echo "Configuration of harfbuzz (TeX Live) 8.3.0:";; 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 8.2.2 +harfbuzz (TeX Live) configure 8.3.0 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 8.2.2, which was +It was created by harfbuzz (TeX Live) $as_me 8.3.0, 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='8.2.2' + VERSION='8.3.0' # Some tools Automake needs. @@ -5034,9 +5034,9 @@ WARNING_CFLAGS=$kpse_cv_warning_cflags HB_VERSION_MAJOR=8 -HB_VERSION_MINOR=2 -HB_VERSION_MICRO=2 -HB_VERSION=8.2.2 +HB_VERSION_MINOR=3 +HB_VERSION_MICRO=0 +HB_VERSION=8.3.0 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 8.2.2, which was +This file was extended by harfbuzz (TeX Live) $as_me 8.3.0, 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 8.2.2 +harfbuzz (TeX Live) config.status 8.3.0 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 5a1e01a0ae6..ed4e3cb9c37 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog +++ b/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog @@ -1,3 +1,1829 @@ +commit 894a1f72ee93a1fd8dc1d9218cb3fd8f048be29a +Author: Khaled Hosny +Date: Sat Nov 11 15:57:54 2023 +0200 + + 8.3.0 + + NEWS | 15 +++++++++++++++ + configure.ac | 2 +- + meson.build | 2 +- + src/hb-deprecated.h | 2 +- + src/hb-version.h | 6 +++--- + 5 files changed, 21 insertions(+), 6 deletions(-) + +commit 2b5af6f42e6ba4b6eb67f807267fd5821744c519 +Author: Behdad Esfahbod +Date: Fri Nov 10 15:23:27 2023 -0700 + + [subset-plan] Micro-optimize set iteration + + Getting ranges is faster even with the current trivial implementation. + + src/hb-subset-plan.cc | 16 ++++++++++------ + 1 file changed, 10 insertions(+), 6 deletions(-) + +commit 90fc809f15b5b7e46f1b17dfa64141936679125d +Author: Behdad Esfahbod +Date: Fri Nov 10 15:05:08 2023 -0700 + + [set] Minor likely and __prev__ + + src/hb-bit-set-invertible.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 6d3b7931fdcae3e266b3b58e39ad7085783c0e0e +Author: Behdad Esfahbod +Date: Fri Nov 10 14:51:34 2023 -0700 + + [subset-plan] Add a couple of allocs + + src/hb-subset-plan.cc | 2 ++ + 1 file changed, 2 insertions(+) + +commit d46cd93b6a03f6614a91803fa7d027fc6b917bc1 +Author: Behdad Esfahbod +Date: Fri Nov 10 14:36:37 2023 -0700 + + [map] Speed up copy-constructor + + src/hb-map.hh | 24 +++++++++++++++++++++++- + 1 file changed, 23 insertions(+), 1 deletion(-) + +commit e7879d6c554d1edaf02a211d6ba9de4fe2b3fbf4 +Author: Behdad Esfahbod +Date: Fri Nov 10 14:13:20 2023 -0700 + + [map] Micro-optimize destruction + + src/hb-map.hh | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +commit d9357a1a67cef1f328f1acc436d78f0852b05970 +Author: Behdad Esfahbod +Date: Fri Nov 10 14:08:03 2023 -0700 + + [cmap] Speed up Format12/13 collect_mapping + + src/hb-ot-cmap-table.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit ae6ea6f4b7ed2e05e76e36c56eac86c3cc9ccbd7 +Author: Behdad Esfahbod +Date: Fri Nov 10 13:52:34 2023 -0700 + + [cmap] Micro-optimize + + src/hb-ot-cmap-table.hh | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +commit 330c32f90256e6a38488faab4c0f692f18d52d42 +Author: Behdad Esfahbod +Date: Fri Nov 10 12:27:48 2023 -0700 + + [graph] Another preallocation + + src/graph/graph.hh | 1 + + 1 file changed, 1 insertion(+) + +commit 9c4d3c3c70d1f4f33294da7ab409c64bdbc12be7 +Author: Behdad Esfahbod +Date: Fri Nov 10 12:24:26 2023 -0700 + + [graph] Pre-alloc priority-heap array + + src/graph/graph.hh | 1 + + src/hb-priority-queue.hh | 3 +++ + 2 files changed, 4 insertions(+) + +commit 29f8d9f795426da68c8526312c61f727f4f124b5 +Author: Behdad Esfahbod +Date: Thu Nov 9 09:29:02 2023 -0700 + + [gen-use-table] Fix __doc__ + + src/gen-use-table.py | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +commit aaf632581a9ba01f4534501f7a0cd715ea5bd4f0 +Merge: 2d001a0ad 32ee89dd4 +Author: خالد حسني (Khaled Hosny) +Date: Fri Nov 10 17:28:48 2023 +0200 + + Merge pull request #4492 from dalboris/fix-cmake-darwin-library-location + + [cmake] Fix double dots in CMake library location on macOS + +commit 32ee89dd480ed15903a70c2bfaeda69f348af5e1 +Author: Boris Dalstein +Date: Fri Nov 10 13:48:24 2023 +0100 + + [cmake] Fix double dots in CMake library location on macOS + + src/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 2d001a0adc996dee2d8562b218ac9cc3d96816aa +Author: Qunxin Liu +Date: Wed Nov 8 11:11:51 2023 -0800 + + [subset] OTS doesn't allow ligature attachment offset to be 0 + + src/OT/Layout/GPOS/AnchorMatrix.hh | 5 ++--- + test/subset/data/Makefile.am | 1 + + test/subset/data/Makefile.sources | 1 + + ...Bangla-latin-subset.default.retain-all-codepoint.ttf | Bin 0 -> 40128 bytes + test/subset/data/fonts/AnekBangla-latin-subset.ttf | Bin 0 -> 40128 bytes + .../data/tests/layout.empty_ligature_offset.tests | 8 ++++++++ + test/subset/meson.build | 1 + + 7 files changed, 13 insertions(+), 3 deletions(-) + +commit 0cbbed57e3a63476d9924eae197ddc07999d79ef +Author: Behdad Esfahbod +Date: Tue Nov 7 09:51:46 2023 -0700 + + [README] Add Godot Engine + + README.md | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 9701b0024e43d356cf23fccca5c59409b0928dc9 +Author: Garret Rieger +Date: Mon Nov 6 22:14:31 2023 +0000 + + [subset] Always place CFF1/2 char strings at the end of the packed table. + + Makes the behaviour from HB_SUBSET_FLAGS_IFTB_REQUIREMENTS the default. + + src/hb-subset-cff1.cc | 18 ++++++------------ + src/hb-subset-cff2.cc | 18 ++++++------------ + test/api/fonts/AdobeVFPrototype.abc.otf | Bin 5164 -> 5160 bytes + test/api/fonts/AdobeVFPrototype.abc.static.otf | Bin 2576 -> 2576 bytes + test/api/fonts/AdobeVFPrototype.ac.nohints.otf | Bin 4384 -> 4384 bytes + test/api/fonts/AdobeVFPrototype.ac.nosubrs.otf | Bin 4464 -> 4464 bytes + test/api/fonts/AdobeVFPrototype.ac.otf | Bin 4584 -> 4580 bytes + test/api/fonts/AdobeVFPrototype.ac.retaingids.otf | Bin 4584 -> 4584 bytes + .../SourceHanSans-Regular.41,4C2E.nohints.otf | Bin 2376 -> 2328 bytes + ...urceHanSans-Regular.41,4C2E.nosubrs.nohints.otf | Bin 2360 -> 2312 bytes + .../SourceHanSans-Regular.41,4C2E.nosubrs.otf | Bin 2548 -> 2500 bytes + test/api/fonts/SourceHanSans-Regular.41,4C2E.otf | Bin 2572 -> 2524 bytes + .../SourceHanSans-Regular.41,4C2E.retaingids.otf | Bin 2664 -> 2608 bytes + test/api/fonts/SourceSansPro-Regular.abc.otf | Bin 1808 -> 1772 bytes + .../api/fonts/SourceSansPro-Regular.ac.nohints.otf | Bin 1592 -> 1544 bytes + .../SourceSansPro-Regular.ac.nosubrs.nohints.otf | Bin 1540 -> 1492 bytes + .../api/fonts/SourceSansPro-Regular.ac.nosubrs.otf | Bin 1632 -> 1584 bytes + test/api/fonts/SourceSansPro-Regular.ac.otf | Bin 1704 -> 1656 bytes + .../fonts/SourceSansPro-Regular.ac.retaingids.otf | Bin 1708 -> 1660 bytes + test/api/fonts/cff1_dotsect.nohints.otf | Bin 3132 -> 2892 bytes + test/api/fonts/cff1_expert.2D,F6E9,FB00.otf | Bin 1412 -> 1412 bytes + test/api/fonts/cff1_seac.C0.otf | Bin 1600 -> 1564 bytes + ...tore.notdef-outline-retain-gids.61,62,63,64.otf | Bin 5676 -> 5676 bytes + ..._var_store.notdef-outline-retain-gids.61,62.otf | Bin 4776 -> 4776 bytes + ..._var_store.notdef-outline-retain-gids.61,63.otf | Bin 4588 -> 4588 bytes + ..._var_store.notdef-outline-retain-gids.61,64.otf | Bin 4764 -> 4764 bytes + ...bit_var_store.notdef-outline-retain-gids.61.otf | Bin 4128 -> 4128 bytes + ...bit_var_store.notdef-outline-retain-gids.62.otf | Bin 3904 -> 3904 bytes + ...bit_var_store.notdef-outline-retain-gids.63.otf | Bin 3828 -> 3828 bytes + ...bit_var_store.notdef-outline-retain-gids.64.otf | Bin 3800 -> 3800 bytes + .../32bit_var_store.notdef-outline.61,62,63,64.otf | Bin 5676 -> 5676 bytes + .../32bit_var_store.notdef-outline.61,62.otf | Bin 4776 -> 4776 bytes + .../32bit_var_store.notdef-outline.61,63.otf | Bin 4584 -> 4584 bytes + .../32bit_var_store.notdef-outline.61,64.otf | Bin 4744 -> 4744 bytes + .../32bit_var_store.notdef-outline.61.otf | Bin 4128 -> 4128 bytes + .../32bit_var_store.notdef-outline.62.otf | Bin 3892 -> 3892 bytes + .../32bit_var_store.notdef-outline.63.otf | Bin 3812 -> 3812 bytes + .../32bit_var_store.notdef-outline.64.otf | Bin 3780 -> 3780 bytes + ...subroutinize-retain-gids.1FC,21,41,20,62,63.otf | Bin 20128 -> 20128 bytes + ...outline-desubroutinize-retain-gids.61,62,63.otf | Bin 2280 -> 2280 bytes + ...e-desubroutinize-retain-gids.D7,D8,D9,DA,DE.otf | Bin 30448 -> 30448 bytes + ...f-outline-desubroutinize.1FC,21,41,20,62,63.otf | Bin 2356 -> 2356 bytes + ...ular.notdef-outline-desubroutinize.61,62,63.otf | Bin 2084 -> 2084 bytes + ...otdef-outline-desubroutinize.D7,D8,D9,DA,DE.otf | Bin 2252 -> 2252 bytes + ...subroutinize-retain-gids.1FC,21,41,20,62,63.otf | Bin 19960 -> 19960 bytes + ...p-hints-desubroutinize-retain-gids.61,62,63.otf | Bin 2156 -> 2156 bytes + ...s-desubroutinize-retain-gids.D7,D8,D9,DA,DE.otf | Bin 30280 -> 30280 bytes + ...rop-hints-desubroutinize.1FC,21,41,20,62,63.otf | Bin 2184 -> 2184 bytes + ...-outline-drop-hints-desubroutinize.61,62,63.otf | Bin 1960 -> 1960 bytes + ...ne-drop-hints-desubroutinize.D7,D8,D9,DA,DE.otf | Bin 2088 -> 2088 bytes + ...e-drop-hints-retain-gids.1FC,21,41,20,62,63.otf | Bin 20052 -> 20052 bytes + ...def-outline-drop-hints-retain-gids.61,62,63.otf | Bin 2196 -> 2196 bytes + ...tline-drop-hints-retain-gids.D7,D8,D9,DA,DE.otf | Bin 30296 -> 30296 bytes + ...otdef-outline-drop-hints.1FC,21,41,20,62,63.otf | Bin 2268 -> 2268 bytes + ...-Regular.notdef-outline-drop-hints.61,62,63.otf | Bin 2028 -> 2028 bytes + ...ar.notdef-outline-drop-hints.D7,D8,D9,DA,DE.otf | Bin 2104 -> 2104 bytes + ...tdef-outline-retain-gids.1FC,21,41,20,62,63.otf | Bin 20284 -> 20284 bytes + ...Regular.notdef-outline-retain-gids.61,62,63.otf | Bin 2348 -> 2348 bytes + ...r.notdef-outline-retain-gids.D7,D8,D9,DA,DE.otf | Bin 30464 -> 30464 bytes + ...o-Regular.notdef-outline.1FC,21,41,20,62,63.otf | Bin 2500 -> 2500 bytes + ...urceSansPro-Regular.notdef-outline.61,62,63.otf | Bin 2180 -> 2180 bytes + ...nsPro-Regular.notdef-outline.D7,D8,D9,DA,DE.otf | Bin 2272 -> 2272 bytes + ...ubset.default.3042,3044,3046,3048,304A,304B.otf | Bin 4820 -> 4820 bytes + ...ubset.default.3042,3044,3046,73E0,5EA6,8F38.otf | Bin 6196 -> 6196 bytes + ...eHanSans-Regular_subset.default.61,63,65,6B.otf | Bin 2540 -> 2540 bytes + ...ubset.default.660E,6975,73E0,5EA6,8F38,6E05.otf | Bin 6640 -> 6640 bytes + .../SourceHanSans-Regular_subset.default.660E.otf | Bin 2444 -> 2444 bytes + ...e-retain-gids.3042,3044,3046,3048,304A,304B.otf | Bin 129820 -> 129820 bytes + ...e-retain-gids.3042,3044,3046,73E0,5EA6,8F38.otf | Bin 130840 -> 130840 bytes + ...bset.desubroutinize-retain-gids.61,63,65,6B.otf | Bin 3364 -> 3364 bytes + ...e-retain-gids.660E,6975,73E0,5EA6,8F38,6E05.otf | Bin 121956 -> 121956 bytes + ...ular_subset.desubroutinize-retain-gids.660E.otf | Bin 50744 -> 50744 bytes + ...esubroutinize.3042,3044,3046,3048,304A,304B.otf | Bin 4656 -> 4656 bytes + ...esubroutinize.3042,3044,3046,73E0,5EA6,8F38.otf | Bin 5840 -> 5840 bytes + ...s-Regular_subset.desubroutinize.61,63,65,6B.otf | Bin 2472 -> 2472 bytes + ...esubroutinize.660E,6975,73E0,5EA6,8F38,6E05.otf | Bin 6132 -> 6132 bytes + ...eHanSans-Regular_subset.desubroutinize.660E.otf | Bin 2428 -> 2428 bytes + ...e-retain-gids.3042,3044,3046,3048,304A,304B.otf | Bin 129376 -> 129376 bytes + ...e-retain-gids.3042,3044,3046,73E0,5EA6,8F38.otf | Bin 130220 -> 130220 bytes + ...ints-desubroutinize-retain-gids.61,63,65,6B.otf | Bin 3244 -> 3244 bytes + ...e-retain-gids.660E,6975,73E0,5EA6,8F38,6E05.otf | Bin 121180 -> 121180 bytes + ....drop-hints-desubroutinize-retain-gids.660E.otf | Bin 50516 -> 50516 bytes + ...esubroutinize.3042,3044,3046,3048,304A,304B.otf | Bin 4348 -> 4348 bytes + ...esubroutinize.3042,3044,3046,73E0,5EA6,8F38.otf | Bin 5324 -> 5324 bytes + ...ubset.drop-hints-desubroutinize.61,63,65,6B.otf | Bin 2368 -> 2368 bytes + ...esubroutinize.660E,6975,73E0,5EA6,8F38,6E05.otf | Bin 5456 -> 5456 bytes + ...gular_subset.drop-hints-desubroutinize.660E.otf | Bin 2292 -> 2292 bytes + ...s-retain-gids.3042,3044,3046,3048,304A,304B.otf | Bin 129516 -> 129516 bytes + ...s-retain-gids.3042,3044,3046,73E0,5EA6,8F38.otf | Bin 130528 -> 130528 bytes + ...r_subset.drop-hints-retain-gids.61,63,65,6B.otf | Bin 3208 -> 3208 bytes + ...s-retain-gids.660E,6975,73E0,5EA6,8F38,6E05.otf | Bin 121680 -> 121680 bytes + ...-Regular_subset.drop-hints-retain-gids.660E.otf | Bin 50532 -> 50532 bytes + ...et.drop-hints.3042,3044,3046,3048,304A,304B.otf | Bin 4484 -> 4484 bytes + ...et.drop-hints.3042,3044,3046,73E0,5EA6,8F38.otf | Bin 5628 -> 5628 bytes + ...nSans-Regular_subset.drop-hints.61,63,65,6B.otf | Bin 2400 -> 2400 bytes + ...et.drop-hints.660E,6975,73E0,5EA6,8F38,6E05.otf | Bin 5952 -> 5952 bytes + ...ourceHanSans-Regular_subset.drop-hints.660E.otf | Bin 2304 -> 2304 bytes + ...t.retain-gids.3042,3044,3046,3048,304A,304B.otf | Bin 129980 -> 129980 bytes + ...t.retain-gids.3042,3044,3046,73E0,5EA6,8F38.otf | Bin 131196 -> 131196 bytes + ...Sans-Regular_subset.retain-gids.61,63,65,6B.otf | Bin 3364 -> 3364 bytes + ...t.retain-gids.660E,6975,73E0,5EA6,8F38,6E05.otf | Bin 122460 -> 122460 bytes + ...urceHanSans-Regular_subset.retain-gids.660E.otf | Bin 50760 -> 50760 bytes + ...otoSerifMyanmar-Regular.notdef-outline.1092.otf | Bin 1392 -> 1392 bytes + ...tline-drop-hints-retain-gids.4E00,4E02,4E03.otf | Bin 1404 -> 1404 bytes + ...ef-outline-drop-hints-retain-gids.4E00,4E03.otf | Bin 1292 -> 1292 bytes + ...tline-drop-hints-retain-gids.4E00,4E05,4E07.otf | Bin 1416 -> 1416 bytes + ...tline-drop-hints-retain-gids.4E02,4E03,4E08.otf | Bin 1736 -> 1736 bytes + ....notdef-outline-drop-hints-retain-gids.4E02.otf | Bin 1048 -> 1048 bytes + ....notdef-outline-drop-hints-retain-gids.4E03.otf | Bin 1140 -> 1140 bytes + ...-drop-hints-retain-gids.4E05,4E07,4E08,4E09.otf | Bin 2000 -> 2000 bytes + ...ef-outline-drop-hints-retain-gids.4E08,4E09.otf | Bin 1888 -> 1888 bytes + ....notdef-outline-drop-hints-retain-gids.4E08.otf | Bin 1560 -> 1560 bytes + ...drop-hints-retain-gids.retain-all-codepoint.otf | Bin 2452 -> 2452 bytes + ...t1.notdef-outline-drop-hints.4E00,4E02,4E03.otf | Bin 1308 -> 1308 bytes + ...4_font1.notdef-outline-drop-hints.4E00,4E03.otf | Bin 1188 -> 1188 bytes + ...t1.notdef-outline-drop-hints.4E00,4E05,4E07.otf | Bin 1280 -> 1280 bytes + ...t1.notdef-outline-drop-hints.4E02,4E03,4E08.otf | Bin 1528 -> 1528 bytes + ...cmap14_font1.notdef-outline-drop-hints.4E02.otf | Bin 944 -> 944 bytes + ...cmap14_font1.notdef-outline-drop-hints.4E03.otf | Bin 1028 -> 1028 bytes + ...tdef-outline-drop-hints.4E05,4E07,4E08,4E09.otf | Bin 1796 -> 1796 bytes + ...4_font1.notdef-outline-drop-hints.4E08,4E09.otf | Bin 1672 -> 1672 bytes + ...cmap14_font1.notdef-outline-drop-hints.4E08.otf | Bin 1336 -> 1336 bytes + ...def-outline-drop-hints.retain-all-codepoint.otf | Bin 2296 -> 2296 bytes + ...14_font1.notdef-outline-gids.4E00,4E02,4E03.otf | Bin 1408 -> 1408 bytes + .../cmap14_font1.notdef-outline-gids.4E00,4E03.otf | Bin 1396 -> 1396 bytes + ...14_font1.notdef-outline-gids.4E00,4E05,4E07.otf | Bin 1640 -> 1640 bytes + ...14_font1.notdef-outline-gids.4E02,4E03,4E08.otf | Bin 1760 -> 1760 bytes + .../cmap14_font1.notdef-outline-gids.4E02.otf | Bin 1332 -> 1332 bytes + .../cmap14_font1.notdef-outline-gids.4E03.otf | Bin 1372 -> 1372 bytes + ...nt1.notdef-outline-gids.4E05,4E07,4E08,4E09.otf | Bin 2184 -> 2184 bytes + .../cmap14_font1.notdef-outline-gids.4E08,4E09.otf | Bin 2056 -> 2056 bytes + .../cmap14_font1.notdef-outline-gids.4E08.otf | Bin 1720 -> 1720 bytes + ...t1.notdef-outline-gids.retain-all-codepoint.otf | Bin 2400 -> 2400 bytes + ...ont1.notdef-outline-name-ids.4E00,4E02,4E03.otf | Bin 1308 -> 1308 bytes + ...p14_font1.notdef-outline-name-ids.4E00,4E03.otf | Bin 1184 -> 1184 bytes + ...ont1.notdef-outline-name-ids.4E00,4E05,4E07.otf | Bin 1280 -> 1280 bytes + ...ont1.notdef-outline-name-ids.4E02,4E03,4E08.otf | Bin 1528 -> 1528 bytes + .../cmap14_font1.notdef-outline-name-ids.4E02.otf | Bin 944 -> 944 bytes + .../cmap14_font1.notdef-outline-name-ids.4E03.otf | Bin 1028 -> 1028 bytes + ...notdef-outline-name-ids.4E05,4E07,4E08,4E09.otf | Bin 1796 -> 1796 bytes + ...p14_font1.notdef-outline-name-ids.4E08,4E09.otf | Bin 1668 -> 1668 bytes + .../cmap14_font1.notdef-outline-name-ids.4E08.otf | Bin 1336 -> 1336 bytes + ...otdef-outline-name-ids.retain-all-codepoint.otf | Bin 2296 -> 2296 bytes + ...1.notdef-outline-retain-gids.4E00,4E02,4E03.otf | Bin 1472 -> 1472 bytes + ..._font1.notdef-outline-retain-gids.4E00,4E03.otf | Bin 1360 -> 1360 bytes + ...1.notdef-outline-retain-gids.4E00,4E05,4E07.otf | Bin 1480 -> 1480 bytes + ...1.notdef-outline-retain-gids.4E02,4E03,4E08.otf | Bin 1804 -> 1804 bytes + ...map14_font1.notdef-outline-retain-gids.4E02.otf | Bin 1116 -> 1116 bytes + ...map14_font1.notdef-outline-retain-gids.4E03.otf | Bin 1208 -> 1208 bytes + ...def-outline-retain-gids.4E05,4E07,4E08,4E09.otf | Bin 2068 -> 2068 bytes + ..._font1.notdef-outline-retain-gids.4E08,4E09.otf | Bin 1956 -> 1956 bytes + ...map14_font1.notdef-outline-retain-gids.4E08.otf | Bin 1628 -> 1628 bytes + ...ef-outline-retain-gids.retain-all-codepoint.otf | Bin 2520 -> 2520 bytes + .../cmap14_font1.notdef-outline.4E00,4E02,4E03.otf | Bin 1376 -> 1376 bytes + .../cmap14_font1.notdef-outline.4E00,4E03.otf | Bin 1252 -> 1252 bytes + .../cmap14_font1.notdef-outline.4E00,4E05,4E07.otf | Bin 1348 -> 1348 bytes + .../cmap14_font1.notdef-outline.4E02,4E03,4E08.otf | Bin 1596 -> 1596 bytes + .../cmap14/cmap14_font1.notdef-outline.4E02.otf | Bin 1012 -> 1012 bytes + .../cmap14/cmap14_font1.notdef-outline.4E03.otf | Bin 1096 -> 1096 bytes + ...14_font1.notdef-outline.4E05,4E07,4E08,4E09.otf | Bin 1864 -> 1864 bytes + .../cmap14_font1.notdef-outline.4E08,4E09.otf | Bin 1736 -> 1736 bytes + .../cmap14/cmap14_font1.notdef-outline.4E08.otf | Bin 1404 -> 1404 bytes + ...4_font1.notdef-outline.retain-all-codepoint.otf | Bin 2364 -> 2364 bytes + ...tline-drop-hints-retain-gids.4E00,4E02,4E03.otf | Bin 1404 -> 1404 bytes + ...ef-outline-drop-hints-retain-gids.4E00,4E03.otf | Bin 1292 -> 1292 bytes + ...tline-drop-hints-retain-gids.4E00,4E05,4E07.otf | Bin 1420 -> 1420 bytes + ...tline-drop-hints-retain-gids.4E02,4E03,4E08.otf | Bin 1736 -> 1736 bytes + ....notdef-outline-drop-hints-retain-gids.4E02.otf | Bin 1044 -> 1044 bytes + ....notdef-outline-drop-hints-retain-gids.4E03.otf | Bin 1136 -> 1136 bytes + ...-drop-hints-retain-gids.4E05,4E07,4E08,4E09.otf | Bin 2000 -> 2000 bytes + ...ef-outline-drop-hints-retain-gids.4E08,4E09.otf | Bin 1884 -> 1884 bytes + ....notdef-outline-drop-hints-retain-gids.4E08.otf | Bin 1556 -> 1556 bytes + ...drop-hints-retain-gids.retain-all-codepoint.otf | Bin 2448 -> 2448 bytes + ...t2.notdef-outline-drop-hints.4E00,4E02,4E03.otf | Bin 1308 -> 1308 bytes + ...4_font2.notdef-outline-drop-hints.4E00,4E03.otf | Bin 1188 -> 1188 bytes + ...t2.notdef-outline-drop-hints.4E00,4E05,4E07.otf | Bin 1284 -> 1284 bytes + ...t2.notdef-outline-drop-hints.4E02,4E03,4E08.otf | Bin 1528 -> 1528 bytes + ...cmap14_font2.notdef-outline-drop-hints.4E02.otf | Bin 940 -> 940 bytes + ...cmap14_font2.notdef-outline-drop-hints.4E03.otf | Bin 1024 -> 1024 bytes + ...tdef-outline-drop-hints.4E05,4E07,4E08,4E09.otf | Bin 1796 -> 1796 bytes + ...4_font2.notdef-outline-drop-hints.4E08,4E09.otf | Bin 1668 -> 1668 bytes + ...cmap14_font2.notdef-outline-drop-hints.4E08.otf | Bin 1332 -> 1332 bytes + ...def-outline-drop-hints.retain-all-codepoint.otf | Bin 2292 -> 2292 bytes + ...14_font2.notdef-outline-gids.4E00,4E02,4E03.otf | Bin 1408 -> 1408 bytes + .../cmap14_font2.notdef-outline-gids.4E00,4E03.otf | Bin 1396 -> 1396 bytes + ...14_font2.notdef-outline-gids.4E00,4E05,4E07.otf | Bin 1644 -> 1644 bytes + ...14_font2.notdef-outline-gids.4E02,4E03,4E08.otf | Bin 1760 -> 1760 bytes + .../cmap14_font2.notdef-outline-gids.4E02.otf | Bin 1328 -> 1328 bytes + .../cmap14_font2.notdef-outline-gids.4E03.otf | Bin 1368 -> 1368 bytes + ...nt2.notdef-outline-gids.4E05,4E07,4E08,4E09.otf | Bin 2184 -> 2184 bytes + .../cmap14_font2.notdef-outline-gids.4E08,4E09.otf | Bin 2052 -> 2052 bytes + .../cmap14_font2.notdef-outline-gids.4E08.otf | Bin 1716 -> 1716 bytes + ...t2.notdef-outline-gids.retain-all-codepoint.otf | Bin 2396 -> 2396 bytes + ...ont2.notdef-outline-name-ids.4E00,4E02,4E03.otf | Bin 1308 -> 1308 bytes + ...p14_font2.notdef-outline-name-ids.4E00,4E03.otf | Bin 1184 -> 1184 bytes + ...ont2.notdef-outline-name-ids.4E00,4E05,4E07.otf | Bin 1284 -> 1284 bytes + ...ont2.notdef-outline-name-ids.4E02,4E03,4E08.otf | Bin 1528 -> 1528 bytes + .../cmap14_font2.notdef-outline-name-ids.4E02.otf | Bin 940 -> 940 bytes + .../cmap14_font2.notdef-outline-name-ids.4E03.otf | Bin 1024 -> 1024 bytes + ...notdef-outline-name-ids.4E05,4E07,4E08,4E09.otf | Bin 1796 -> 1796 bytes + ...p14_font2.notdef-outline-name-ids.4E08,4E09.otf | Bin 1664 -> 1664 bytes + .../cmap14_font2.notdef-outline-name-ids.4E08.otf | Bin 1332 -> 1332 bytes + ...otdef-outline-name-ids.retain-all-codepoint.otf | Bin 2292 -> 2292 bytes + ...2.notdef-outline-retain-gids.4E00,4E02,4E03.otf | Bin 1472 -> 1472 bytes + ..._font2.notdef-outline-retain-gids.4E00,4E03.otf | Bin 1360 -> 1360 bytes + ...2.notdef-outline-retain-gids.4E00,4E05,4E07.otf | Bin 1484 -> 1484 bytes + ...2.notdef-outline-retain-gids.4E02,4E03,4E08.otf | Bin 1804 -> 1804 bytes + ...map14_font2.notdef-outline-retain-gids.4E02.otf | Bin 1112 -> 1112 bytes + ...map14_font2.notdef-outline-retain-gids.4E03.otf | Bin 1204 -> 1204 bytes + ...def-outline-retain-gids.4E05,4E07,4E08,4E09.otf | Bin 2068 -> 2068 bytes + ..._font2.notdef-outline-retain-gids.4E08,4E09.otf | Bin 1952 -> 1952 bytes + ...map14_font2.notdef-outline-retain-gids.4E08.otf | Bin 1624 -> 1624 bytes + ...ef-outline-retain-gids.retain-all-codepoint.otf | Bin 2516 -> 2516 bytes + .../cmap14_font2.notdef-outline.4E00,4E02,4E03.otf | Bin 1376 -> 1376 bytes + .../cmap14_font2.notdef-outline.4E00,4E03.otf | Bin 1252 -> 1252 bytes + .../cmap14_font2.notdef-outline.4E00,4E05,4E07.otf | Bin 1352 -> 1352 bytes + .../cmap14_font2.notdef-outline.4E02,4E03,4E08.otf | Bin 1596 -> 1596 bytes + .../cmap14/cmap14_font2.notdef-outline.4E02.otf | Bin 1008 -> 1008 bytes + .../cmap14/cmap14_font2.notdef-outline.4E03.otf | Bin 1092 -> 1092 bytes + ...14_font2.notdef-outline.4E05,4E07,4E08,4E09.otf | Bin 1864 -> 1864 bytes + .../cmap14_font2.notdef-outline.4E08,4E09.otf | Bin 1732 -> 1732 bytes + .../cmap14/cmap14_font2.notdef-outline.4E08.otf | Bin 1400 -> 1400 bytes + ...4_font2.notdef-outline.retain-all-codepoint.otf | Bin 2360 -> 2360 bytes + ...ep-all-layout-features.retain-all-codepoint.otf | Bin 12796 -> 12796 bytes + .../AdobeVFPrototype.default.61,62,63.otf | Bin 5160 -> 5160 bytes + .../SourceSansPro-Regular.default.61,62,63.otf | Bin 2180 -> 2180 bytes + ...fault.retain-all-codepoint.wght=650,CNTR=50.otf | Bin 41760 -> 41760 bytes + ...F-ABC.default.retain-all-codepoint.wght=800.otf | Bin 1488 -> 1488 bytes + ...C.retain-gids.retain-all-codepoint.wght=800.otf | Bin 1488 -> 1488 bytes + ...ubrules_f1.layout-test-retain-gids.41,42,43.otf | Bin 2132 -> 2132 bytes + ...e_subrules_f1.layout-test-retain-gids.41,42.otf | Bin 2012 -> 2012 bytes + ...e_subrules_f1.layout-test-retain-gids.41,43.otf | Bin 2020 -> 2020 bytes + ...iple_subrules_f1.layout-test-retain-gids.41.otf | Bin 1896 -> 1896 bytes + ...ayout-test-retain-gids.retain-all-codepoint.otf | Bin 3992 -> 3992 bytes + ...1_multiple_subrules_f1.layout-test.41,42,43.otf | Bin 1420 -> 1420 bytes + ...ext1_multiple_subrules_f1.layout-test.41,42.otf | Bin 1304 -> 1304 bytes + ...ext1_multiple_subrules_f1.layout-test.41,43.otf | Bin 1300 -> 1300 bytes + ...ontext1_multiple_subrules_f1.layout-test.41.otf | Bin 1192 -> 1192 bytes + ...ubrules_f1.layout-test.retain-all-codepoint.otf | Bin 3992 -> 3992 bytes + ...ubrules_f1.layout-test-retain-gids.41,42,43.otf | Bin 2148 -> 2148 bytes + ...e_subrules_f1.layout-test-retain-gids.41,42.otf | Bin 2024 -> 2024 bytes + ...e_subrules_f1.layout-test-retain-gids.41,43.otf | Bin 2020 -> 2020 bytes + ...iple_subrules_f1.layout-test-retain-gids.41.otf | Bin 1896 -> 1896 bytes + ...ayout-test-retain-gids.retain-all-codepoint.otf | Bin 4008 -> 4008 bytes + ...2_multiple_subrules_f1.layout-test.41,42,43.otf | Bin 1436 -> 1436 bytes + ...ext2_multiple_subrules_f1.layout-test.41,42.otf | Bin 1316 -> 1316 bytes + ...ext2_multiple_subrules_f1.layout-test.41,43.otf | Bin 1300 -> 1300 bytes + ...ontext2_multiple_subrules_f1.layout-test.41.otf | Bin 1192 -> 1192 bytes + ...ubrules_f1.layout-test.retain-all-codepoint.otf | Bin 4008 -> 4008 bytes + ..._simple_f1.layout-test-retain-gids.41,42,43.otf | Bin 2112 -> 2112 bytes + ...xt3_simple_f1.layout-test-retain-gids.41,42.otf | Bin 1892 -> 1892 bytes + ...xt3_simple_f1.layout-test-retain-gids.41,43.otf | Bin 2000 -> 2000 bytes + ...ntext3_simple_f1.layout-test-retain-gids.41.otf | Bin 1876 -> 1876 bytes + ...ayout-test-retain-gids.retain-all-codepoint.otf | Bin 3972 -> 3972 bytes + ...pos_context3_simple_f1.layout-test.41,42,43.otf | Bin 1400 -> 1400 bytes + .../gpos_context3_simple_f1.layout-test.41,42.otf | Bin 1184 -> 1184 bytes + .../gpos_context3_simple_f1.layout-test.41,43.otf | Bin 1280 -> 1280 bytes + .../gpos_context3_simple_f1.layout-test.41.otf | Bin 1172 -> 1172 bytes + ..._simple_f1.layout-test.retain-all-codepoint.otf | Bin 3972 -> 3972 bytes + ...ototype.layout-test-retain-gids.41,42,43,57.otf | Bin 5920 -> 5920 bytes + ...FPrototype.layout-test-retain-gids.41,42,43.otf | Bin 5208 -> 5208 bytes + ...beVFPrototype.layout-test-retain-gids.41,42.otf | Bin 4728 -> 4728 bytes + ...FPrototype.layout-test-retain-gids.41,56,57.otf | Bin 5044 -> 5044 bytes + ...AdobeVFPrototype.layout-test-retain-gids.41.otf | Bin 3992 -> 3992 bytes + ...beVFPrototype.layout-test-retain-gids.42,57.otf | Bin 5036 -> 5036 bytes + .../AdobeVFPrototype.layout-test.41,42,43,57.otf | Bin 5476 -> 5476 bytes + .../AdobeVFPrototype.layout-test.41,42,43.otf | Bin 4948 -> 4948 bytes + .../AdobeVFPrototype.layout-test.41,42.otf | Bin 4464 -> 4464 bytes + .../AdobeVFPrototype.layout-test.41,56,57.otf | Bin 4616 -> 4616 bytes + .../AdobeVFPrototype.layout-test.41.otf | Bin 3764 -> 3764 bytes + .../AdobeVFPrototype.layout-test.42,57.otf | Bin 4596 -> 4596 bytes + .../gpos1_2_font.layout-test-retain-gids.41,43.otf | Bin 2044 -> 2044 bytes + .../gpos1_2_font.layout-test-retain-gids.41,46.otf | Bin 2204 -> 2204 bytes + .../gpos1_2_font.layout-test-retain-gids.41.otf | Bin 1916 -> 1916 bytes + .../gpos1_2_font.layout-test-retain-gids.42,44.otf | Bin 1964 -> 1964 bytes + .../gpos1_2_font.layout-test-retain-gids.43,46.otf | Bin 2068 -> 2068 bytes + ...ayout-test-retain-gids.retain-all-codepoint.otf | Bin 3848 -> 3848 bytes + .../layout.gpos/gpos1_2_font.layout-test.41,43.otf | Bin 1324 -> 1324 bytes + .../layout.gpos/gpos1_2_font.layout-test.41,46.otf | Bin 1452 -> 1452 bytes + .../layout.gpos/gpos1_2_font.layout-test.41.otf | Bin 1212 -> 1212 bytes + .../layout.gpos/gpos1_2_font.layout-test.42,44.otf | Bin 1232 -> 1232 bytes + .../layout.gpos/gpos1_2_font.layout-test.43,46.otf | Bin 1316 -> 1316 bytes + ...os1_2_font.layout-test.retain-all-codepoint.otf | Bin 3848 -> 3848 bytes + ...s2_1_font7.layout-test-retain-gids.21,23,25.otf | Bin 1728 -> 1728 bytes + ...gpos2_1_font7.layout-test-retain-gids.21,23.otf | Bin 1604 -> 1604 bytes + ...gpos2_1_font7.layout-test-retain-gids.2E,23.otf | Bin 1912 -> 1912 bytes + ...s2_1_font7.layout-test-retain-gids.41,42,43.otf | Bin 1976 -> 1976 bytes + ...ayout-test-retain-gids.retain-all-codepoint.otf | Bin 3868 -> 3868 bytes + .../gpos2_1_font7.layout-test.21,23,25.otf | Bin 1384 -> 1384 bytes + .../gpos2_1_font7.layout-test.21,23.otf | Bin 1276 -> 1276 bytes + .../gpos2_1_font7.layout-test.2E,23.otf | Bin 1476 -> 1476 bytes + .../gpos2_1_font7.layout-test.41,42,43.otf | Bin 1264 -> 1264 bytes + ...s2_1_font7.layout-test.retain-all-codepoint.otf | Bin 3868 -> 3868 bytes + ...s2_2_font5.layout-test-retain-gids.21,23,25.otf | Bin 1780 -> 1780 bytes + ...gpos2_2_font5.layout-test-retain-gids.21,23.otf | Bin 1656 -> 1656 bytes + ...gpos2_2_font5.layout-test-retain-gids.2E,23.otf | Bin 1912 -> 1912 bytes + ...s2_2_font5.layout-test-retain-gids.41,42,43.otf | Bin 1976 -> 1976 bytes + ...ayout-test-retain-gids.retain-all-codepoint.otf | Bin 3904 -> 3904 bytes + .../gpos2_2_font5.layout-test.21,23,25.otf | Bin 1436 -> 1436 bytes + .../gpos2_2_font5.layout-test.21,23.otf | Bin 1328 -> 1328 bytes + .../gpos2_2_font5.layout-test.2E,23.otf | Bin 1476 -> 1476 bytes + .../gpos2_2_font5.layout-test.41,42,43.otf | Bin 1264 -> 1264 bytes + ...s2_2_font5.layout-test.retain-all-codepoint.otf | Bin 3904 -> 3904 bytes + .../gpos3_font3.layout-test-retain-gids.28,29.otf | Bin 1700 -> 1700 bytes + .../gpos3_font3.layout-test-retain-gids.28,2B.otf | Bin 1836 -> 1836 bytes + .../gpos3_font3.layout-test-retain-gids.29,2B.otf | Bin 1744 -> 1744 bytes + ...pos3_font3.layout-test-retain-gids.41,42,43.otf | Bin 1972 -> 1972 bytes + ...ayout-test-retain-gids.retain-all-codepoint.otf | Bin 3908 -> 3908 bytes + .../layout.gpos3/gpos3_font3.layout-test.28,29.otf | Bin 1308 -> 1308 bytes + .../layout.gpos3/gpos3_font3.layout-test.28,2B.otf | Bin 1428 -> 1428 bytes + .../layout.gpos3/gpos3_font3.layout-test.29,2B.otf | Bin 1336 -> 1336 bytes + .../gpos3_font3.layout-test.41,42,43.otf | Bin 1260 -> 1260 bytes + ...pos3_font3.layout-test.retain-all-codepoint.otf | Bin 3908 -> 3908 bytes + ...chors_1.layout-test-retain-gids.41,42,43,44.otf | Bin 2336 -> 2336 bytes + ...chors_1.layout-test-retain-gids.41,42,43,45.otf | Bin 2332 -> 2332 bytes + ..._anchors_1.layout-test-retain-gids.41,42,43.otf | Bin 2096 -> 2096 bytes + ...ple_anchors_1.layout-test-retain-gids.41,42.otf | Bin 1892 -> 1892 bytes + ...rs_1.layout-test-retain-gids.41,43,44,45,46.otf | Bin 2692 -> 2692 bytes + ..._anchors_1.layout-test-retain-gids.41,43,44.otf | Bin 2328 -> 2328 bytes + ..._anchors_1.layout-test-retain-gids.41,43,45.otf | Bin 2328 -> 2328 bytes + ...ple_anchors_1.layout-test-retain-gids.41,43.otf | Bin 2092 -> 2092 bytes + ...ltiple_anchors_1.layout-test-retain-gids.41.otf | Bin 1876 -> 1876 bytes + ...ayout-test-retain-gids.retain-all-codepoint.otf | Bin 3996 -> 3996 bytes + ..._multiple_anchors_1.layout-test.41,42,43,44.otf | Bin 1620 -> 1620 bytes + ..._multiple_anchors_1.layout-test.41,42,43,45.otf | Bin 1600 -> 1600 bytes + ...os4_multiple_anchors_1.layout-test.41,42,43.otf | Bin 1384 -> 1384 bytes + .../gpos4_multiple_anchors_1.layout-test.41,42.otf | Bin 1184 -> 1184 bytes + ...ltiple_anchors_1.layout-test.41,43,44,45,46.otf | Bin 1964 -> 1964 bytes + ...os4_multiple_anchors_1.layout-test.41,43,44.otf | Bin 1604 -> 1604 bytes + ...os4_multiple_anchors_1.layout-test.41,43,45.otf | Bin 1592 -> 1592 bytes + .../gpos4_multiple_anchors_1.layout-test.41,43.otf | Bin 1372 -> 1372 bytes + .../gpos4_multiple_anchors_1.layout-test.41.otf | Bin 1172 -> 1172 bytes + ..._anchors_1.layout-test.retain-all-codepoint.otf | Bin 3996 -> 3996 bytes + ...5_font1.layout-test-retain-gids.41,42,43,44.otf | Bin 2360 -> 2360 bytes + ...5_font1.layout-test-retain-gids.41,42,43,45.otf | Bin 2356 -> 2356 bytes + ...pos5_font1.layout-test-retain-gids.41,42,43.otf | Bin 2120 -> 2120 bytes + ...pos5_font1.layout-test-retain-gids.41,42,44.otf | Bin 2276 -> 2276 bytes + ...pos5_font1.layout-test-retain-gids.41,42,45.otf | Bin 2260 -> 2260 bytes + .../gpos5_font1.layout-test-retain-gids.41,42.otf | Bin 2012 -> 2012 bytes + .../gpos5_font1.layout-test-retain-gids.41,43.otf | Bin 2016 -> 2016 bytes + .../gpos5_font1.layout-test-retain-gids.41.otf | Bin 1892 -> 1892 bytes + .../gpos5_font1.layout-test-retain-gids.42.otf | Bin 1764 -> 1764 bytes + ...ayout-test-retain-gids.retain-all-codepoint.otf | Bin 4064 -> 4064 bytes + .../gpos5_font1.layout-test.41,42,43,44.otf | Bin 1644 -> 1644 bytes + .../gpos5_font1.layout-test.41,42,43,45.otf | Bin 1624 -> 1624 bytes + .../gpos5_font1.layout-test.41,42,43.otf | Bin 1408 -> 1408 bytes + .../gpos5_font1.layout-test.41,42,44.otf | Bin 1552 -> 1552 bytes + .../gpos5_font1.layout-test.41,42,45.otf | Bin 1524 -> 1524 bytes + .../layout.gpos5/gpos5_font1.layout-test.41,42.otf | Bin 1304 -> 1304 bytes + .../layout.gpos5/gpos5_font1.layout-test.41,43.otf | Bin 1296 -> 1296 bytes + .../layout.gpos5/gpos5_font1.layout-test.41.otf | Bin 1188 -> 1188 bytes + .../layout.gpos5/gpos5_font1.layout-test.42.otf | Bin 1048 -> 1048 bytes + ...pos5_font1.layout-test.retain-all-codepoint.otf | Bin 4064 -> 4064 bytes + ...6_font1.layout-test-retain-gids.41,42,43,44.otf | Bin 2312 -> 2312 bytes + ...6_font1.layout-test-retain-gids.41,42,43,45.otf | Bin 2308 -> 2308 bytes + ...pos6_font1.layout-test-retain-gids.41,42,43.otf | Bin 2072 -> 2072 bytes + .../gpos6_font1.layout-test-retain-gids.41,42.otf | Bin 1868 -> 1868 bytes + ...ont1.layout-test-retain-gids.41,43,44,45,46.otf | Bin 2668 -> 2668 bytes + ...pos6_font1.layout-test-retain-gids.41,43,44.otf | Bin 2304 -> 2304 bytes + ...pos6_font1.layout-test-retain-gids.41,43,45.otf | Bin 2304 -> 2304 bytes + .../gpos6_font1.layout-test-retain-gids.41,43.otf | Bin 2068 -> 2068 bytes + .../gpos6_font1.layout-test-retain-gids.41.otf | Bin 1852 -> 1852 bytes + ...ayout-test-retain-gids.retain-all-codepoint.otf | Bin 3972 -> 3972 bytes + .../gpos6_font1.layout-test.41,42,43,44.otf | Bin 1596 -> 1596 bytes + .../gpos6_font1.layout-test.41,42,43,45.otf | Bin 1576 -> 1576 bytes + .../gpos6_font1.layout-test.41,42,43.otf | Bin 1360 -> 1360 bytes + .../layout.gpos6/gpos6_font1.layout-test.41,42.otf | Bin 1160 -> 1160 bytes + .../gpos6_font1.layout-test.41,43,44,45,46.otf | Bin 1940 -> 1940 bytes + .../gpos6_font1.layout-test.41,43,44.otf | Bin 1580 -> 1580 bytes + .../gpos6_font1.layout-test.41,43,45.otf | Bin 1568 -> 1568 bytes + .../layout.gpos6/gpos6_font1.layout-test.41,43.otf | Bin 1348 -> 1348 bytes + .../layout.gpos6/gpos6_font1.layout-test.41.otf | Bin 1148 -> 1148 bytes + ...pos6_font1.layout-test.retain-all-codepoint.otf | Bin 3972 -> 3972 bytes + ...ules_f1.layout-test-retain-gids.30,31,32,33.otf | Bin 2400 -> 2400 bytes + ...ubrules_f1.layout-test-retain-gids.41,42,43.otf | Bin 2020 -> 2020 bytes + ...ayout-test-retain-gids.retain-all-codepoint.otf | Bin 4012 -> 4012 bytes + ...ultiple_subrules_f1.layout-test.30,31,32,33.otf | Bin 1928 -> 1928 bytes + ...1_multiple_subrules_f1.layout-test.41,42,43.otf | Bin 1308 -> 1308 bytes + ...ubrules_f1.layout-test.retain-all-codepoint.otf | Bin 4012 -> 4012 bytes + ...ules_f1.layout-test-retain-gids.30,31,32,33.otf | Bin 2420 -> 2420 bytes + ...ubrules_f1.layout-test-retain-gids.41,42,43.otf | Bin 2020 -> 2020 bytes + ...ayout-test-retain-gids.retain-all-codepoint.otf | Bin 4044 -> 4044 bytes + ...ultiple_subrules_f1.layout-test.30,31,32,33.otf | Bin 1948 -> 1948 bytes + ...2_multiple_subrules_f1.layout-test.41,42,43.otf | Bin 1308 -> 1308 bytes + ...ubrules_f1.layout-test.retain-all-codepoint.otf | Bin 4044 -> 4044 bytes + ...mple_f1.layout-test-retain-gids.30,31,32,33.otf | Bin 2392 -> 2392 bytes + ..._simple_f1.layout-test-retain-gids.41,42,43.otf | Bin 1996 -> 1996 bytes + ...ayout-test-retain-gids.retain-all-codepoint.otf | Bin 3980 -> 3980 bytes + ...chaining3_simple_f1.layout-test.30,31,32,33.otf | Bin 1920 -> 1920 bytes + ...os_chaining3_simple_f1.layout-test.41,42,43.otf | Bin 1284 -> 1284 bytes + ..._simple_f1.layout-test.retain-all-codepoint.otf | Bin 3980 -> 3980 bytes + .../gpos9_font2.layout-test-retain-gids.41,42.otf | Bin 1960 -> 1960 bytes + .../gpos9_font2.layout-test-retain-gids.41.otf | Bin 1920 -> 1920 bytes + .../gpos9_font2.layout-test-retain-gids.42.otf | Bin 1792 -> 1792 bytes + .../layout.gpos9/gpos9_font2.layout-test.41,42.otf | Bin 1252 -> 1252 bytes + .../layout.gpos9/gpos9_font2.layout-test.41.otf | Bin 1216 -> 1216 bytes + .../layout.gpos9/gpos9_font2.layout-test.42.otf | Bin 1076 -> 1076 bytes + ...stitution.layout-test-retain-gids.53A9,53F1.otf | Bin 5076 -> 5076 bytes + ...e_substitution.layout-test-retain-gids.53A9.otf | Bin 4656 -> 4656 bytes + ...e_substitution.layout-test-retain-gids.53F1.otf | Bin 2996 -> 2996 bytes + ...ayout-test-retain-gids.retain-all-codepoint.otf | Bin 6764 -> 6764 bytes + ...lternate_substitution.layout-test.53A9,53F1.otf | Bin 4952 -> 4952 bytes + ...sub_alternate_substitution.layout-test.53A9.otf | Bin 4504 -> 4504 bytes + ...sub_alternate_substitution.layout-test.53F1.otf | Bin 2804 -> 2804 bytes + ...bstitution.layout-test.retain-all-codepoint.otf | Bin 6672 -> 6672 bytes + ...ubrules_f2.layout-test-retain-gids.41,42,43.otf | Bin 2236 -> 2236 bytes + ...e_subrules_f2.layout-test-retain-gids.41,42.otf | Bin 2208 -> 2208 bytes + ...e_subrules_f2.layout-test-retain-gids.41,43.otf | Bin 2032 -> 2032 bytes + ...iple_subrules_f2.layout-test-retain-gids.41.otf | Bin 1908 -> 1908 bytes + ...ayout-test-retain-gids.retain-all-codepoint.otf | Bin 3988 -> 3988 bytes + ...1_multiple_subrules_f2.layout-test.41,42,43.otf | Bin 1440 -> 1440 bytes + ...ext1_multiple_subrules_f2.layout-test.41,42.otf | Bin 1400 -> 1400 bytes + ...ext1_multiple_subrules_f2.layout-test.41,43.otf | Bin 1312 -> 1312 bytes + ...ontext1_multiple_subrules_f2.layout-test.41.otf | Bin 1204 -> 1204 bytes + ...ubrules_f2.layout-test.retain-all-codepoint.otf | Bin 3988 -> 3988 bytes + ...ubrules_f2.layout-test-retain-gids.41,42,43.otf | Bin 2252 -> 2252 bytes + ...e_subrules_f2.layout-test-retain-gids.41,42.otf | Bin 2220 -> 2220 bytes + ...e_subrules_f2.layout-test-retain-gids.41,43.otf | Bin 2032 -> 2032 bytes + ...iple_subrules_f2.layout-test-retain-gids.41.otf | Bin 1908 -> 1908 bytes + ...ayout-test-retain-gids.retain-all-codepoint.otf | Bin 4004 -> 4004 bytes + ...2_multiple_subrules_f2.layout-test.41,42,43.otf | Bin 1456 -> 1456 bytes + ...ext2_multiple_subrules_f2.layout-test.41,42.otf | Bin 1412 -> 1412 bytes + ...ext2_multiple_subrules_f2.layout-test.41,43.otf | Bin 1312 -> 1312 bytes + ...ontext2_multiple_subrules_f2.layout-test.41.otf | Bin 1204 -> 1204 bytes + ...ubrules_f2.layout-test.retain-all-codepoint.otf | Bin 4004 -> 4004 bytes + ...cessive_f1.layout-test-retain-gids.41,42,43.otf | Bin 2016 -> 2016 bytes + ...successive_f1.layout-test-retain-gids.41,42.otf | Bin 1912 -> 1912 bytes + ...successive_f1.layout-test-retain-gids.41,43.otf | Bin 2020 -> 2020 bytes + ...t3_successive_f1.layout-test-retain-gids.41.otf | Bin 1896 -> 1896 bytes + ...ayout-test-retain-gids.retain-all-codepoint.otf | Bin 4008 -> 4008 bytes + ...context3_successive_f1.layout-test.41,42,43.otf | Bin 1304 -> 1304 bytes + ...ub_context3_successive_f1.layout-test.41,42.otf | Bin 1204 -> 1204 bytes + ...ub_context3_successive_f1.layout-test.41,43.otf | Bin 1300 -> 1300 bytes + .../gsub_context3_successive_f1.layout-test.41.otf | Bin 1192 -> 1192 bytes + ...cessive_f1.layout-test.retain-all-codepoint.otf | Bin 4008 -> 4008 bytes + ...ules_f1.layout-test-retain-gids.30,31,32,33.otf | Bin 2372 -> 2372 bytes + ...ubrules_f1.layout-test-retain-gids.41,42,43.otf | Bin 2032 -> 2032 bytes + ...ayout-test-retain-gids.retain-all-codepoint.otf | Bin 3984 -> 3984 bytes + ...ultiple_subrules_f1.layout-test.30,31,32,33.otf | Bin 1900 -> 1900 bytes + ...1_multiple_subrules_f1.layout-test.41,42,43.otf | Bin 1320 -> 1320 bytes + ...ubrules_f1.layout-test.retain-all-codepoint.otf | Bin 3984 -> 3984 bytes + ...ules_f1.layout-test-retain-gids.30,31,32,33.otf | Bin 2400 -> 2400 bytes + ...ubrules_f1.layout-test-retain-gids.41,42,43.otf | Bin 2032 -> 2032 bytes + ...ayout-test-retain-gids.retain-all-codepoint.otf | Bin 4016 -> 4016 bytes + ...ultiple_subrules_f1.layout-test.30,31,32,33.otf | Bin 1928 -> 1928 bytes + ...2_multiple_subrules_f1.layout-test.41,42,43.otf | Bin 1320 -> 1320 bytes + ...ubrules_f1.layout-test.retain-all-codepoint.otf | Bin 4016 -> 4016 bytes + ...mple_f2.layout-test-retain-gids.30,31,32,33.otf | Bin 2360 -> 2360 bytes + ..._simple_f2.layout-test-retain-gids.41,42,43.otf | Bin 2008 -> 2008 bytes + ...ayout-test-retain-gids.retain-all-codepoint.otf | Bin 3952 -> 3952 bytes + ...chaining3_simple_f2.layout-test.30,31,32,33.otf | Bin 1888 -> 1888 bytes + ...ub_chaining3_simple_f2.layout-test.41,42,43.otf | Bin 1296 -> 1296 bytes + ..._simple_f2.layout-test.retain-all-codepoint.otf | Bin 3952 -> 3952 bytes + ...test-retain-gids.41,42,43,44,45,46,47,48,49.otf | Bin 3208 -> 3208 bytes + ...ayout-test-retain-gids.41,42,43,44,45,46,47.otf | Bin 2828 -> 2828 bytes + ...ayout-test-retain-gids.41,42,43,44,45,46,4D.otf | Bin 2896 -> 2896 bytes + ...ayout-test-retain-gids.41,42,43,44,45,46,51.otf | Bin 2900 -> 2900 bytes + ...d.layout-test-retain-gids.41,42,43,44,45,46.otf | Bin 2564 -> 2564 bytes + ...ly_created.layout-test-retain-gids.41,42,43.otf | Bin 2008 -> 2008 bytes + ...manually_created.layout-test-retain-gids.41.otf | Bin 1888 -> 1888 bytes + ...manually_created.layout-test-retain-gids.61.otf | Bin 2608 -> 2608 bytes + ...ayout-test-retain-gids.retain-all-codepoint.otf | Bin 4048 -> 4048 bytes + ...ated.layout-test.41,42,43,44,45,46,47,48,49.otf | Bin 2404 -> 2404 bytes + ...ly_created.layout-test.41,42,43,44,45,46,47.otf | Bin 2012 -> 2012 bytes + ...ly_created.layout-test.41,42,43,44,45,46,4D.otf | Bin 2012 -> 2012 bytes + ...ly_created.layout-test.41,42,43,44,45,46,51.otf | Bin 2060 -> 2060 bytes + ...ually_created.layout-test.41,42,43,44,45,46.otf | Bin 1844 -> 1844 bytes + ...gsub8_manually_created.layout-test.41,42,43.otf | Bin 1296 -> 1296 bytes + .../gsub8_manually_created.layout-test.41.otf | Bin 1184 -> 1184 bytes + .../gsub8_manually_created.layout-test.61.otf | Bin 1556 -> 1556 bytes + ...ly_created.layout-test.retain-all-codepoint.otf | Bin 4048 -> 4048 bytes + 471 files changed, 12 insertions(+), 24 deletions(-) + +commit c6884377ecea2fbd3021dd98f20883b31339ccc1 +Author: Garret Rieger +Date: Mon Nov 6 20:21:46 2023 +0000 + + [subset] Add HB_SUBSET_FLAGS_IFTB_REQUIREMENTS flag. + + When enabled the output subset conforms to the requirements for a base font to be patched by IFTB patches. IFTB is a proposed incremental font transfer patch. This new flag is set as experimental. Currently, setting this flag causes the output subset to also use long offsets for outline data in loca/glyf, gvar, CFF, and CFF2. + + This change is a version of https://github.com/skef/harfbuzz/commit/3ae2fe2084d96f61d8ad1bbe42a6ef4e62ec830a rebased onto head w/ tests added. + + src/hb-ot-cff-common.hh | 12 +++-- + src/hb-ot-var-gvar-table.hh | 7 ++- + src/hb-subset-cff1.cc | 55 ++++++++++++++------ + src/hb-subset-cff2.cc | 56 +++++++++++++++------ + src/hb-subset-plan.cc | 10 ++-- + src/hb-subset.h | 6 +++ + test/api/fonts/AdobeVFPrototype.abc.long_off.otf | Bin 0 -> 5172 bytes + test/api/fonts/Roboto-Variable.abc.long_loca.ttf | Bin 0 -> 11396 bytes + test/api/fonts/Roboto-Variable.abc.ttf | Bin 0 -> 11384 bytes + .../fonts/SourceSansPro-Regular.abc.long_off.otf | Bin 0 -> 1788 bytes + test/api/test-subset-cff1.c | 32 ++++++++++++ + test/api/test-subset-cff2.c | 31 ++++++++++++ + test/api/test-subset-glyf.c | 33 ++++++++++++ + .../AdobeVFPrototype.default.61,62,63.otf | Bin 0 -> 5160 bytes + ...AdobeVFPrototype.iftb_requirements.61,62,63.otf | Bin 0 -> 5172 bytes + .../Roboto-Variable.default.61,62,63.ttf | Bin 0 -> 11384 bytes + .../Roboto-Variable.iftb_requirements.61,62,63.ttf | Bin 0 -> 11396 bytes + .../SourceSansPro-Regular.default.61,62,63.otf | Bin 0 -> 2180 bytes + ...eSansPro-Regular.iftb_requirements.61,62,63.otf | Bin 0 -> 2196 bytes + test/subset/data/profiles/iftb_requirements.txt | 1 + + test/subset/data/tests/iftb_requirements.tests | 14 ++++++ + test/subset/meson.build | 1 + + util/hb-subset.cc | 7 ++- + 23 files changed, 223 insertions(+), 42 deletions(-) + +commit c3c32b0176716ead26f36dd2cc01928898999408 +Author: Behdad Esfahbod +Date: Mon Nov 6 09:57:34 2023 -0700 + + Add xkcd.png + + Makefile.am | 1 + + README.md | 2 ++ + xkcd.png | Bin 0 -> 52751 bytes + 3 files changed, 3 insertions(+) + +commit c2f42fbb146c04ba557ceb31a8eac9bd5f3d65ea +Author: Qunxin Liu +Date: Mon Nov 6 11:49:11 2023 -0800 + + fix meson compiled_tests + + src/meson.build | 28 ++++++++++++++-------------- + src/test-subset-instancer-solver.cc | 2 +- + 2 files changed, 15 insertions(+), 15 deletions(-) + +commit d550e16acc61e8c25dbafd9f19f62b25cd4e79f1 +Author: Qunxin Liu +Date: Mon Nov 6 10:31:05 2023 -0800 + + [instancer] Recalc avgcharwidth after instancing + + src/hb-ot-os2-table.hh | 22 +++++++++++++++++++++ + src/hb-subset.cc | 1 + + ...r-new.default.retain-all-codepoint.wght=300.ttf | Bin 131708 -> 131708 bytes + ...r-new.default.retain-all-codepoint.wght=700.ttf | Bin 131584 -> 131584 bytes + ...i-ABC.default.retain-all-codepoint.wght=300.ttf | Bin 5788 -> 5788 bytes + ...i-ABC.default.retain-all-codepoint.wght=700.ttf | Bin 5784 -> 5784 bytes + ...t.retain-all-codepoint.wght=200-300,opsz=14.ttf | Bin 10136 -> 10136 bytes + ...ain-all-codepoint.wght=400,wdth=100,opsz=14.ttf | Bin 6404 -> 6404 bytes + ...set.default.retain-all-codepoint.wdth=112.5.ttf | Bin 2668 -> 2668 bytes + ...subset.default.retain-all-codepoint.wdth=75.ttf | Bin 3296 -> 3296 bytes + ...ayout-features.retain-all-codepoint.wdth=75.ttf | Bin 4500 -> 4500 bytes + ...fault.retain-all-codepoint.wght=150,wdth=80.ttf | Bin 114196 -> 114196 bytes + ...fault.retain-all-codepoint.wght=300,wdth=90.ttf | Bin 114296 -> 114296 bytes + ...anges.retain-all-codepoint.wght=150,wdth=80.ttf | Bin 114196 -> 114196 bytes + ...anges.retain-all-codepoint.wght=300,wdth=90.ttf | Bin 114296 -> 114296 bytes + ...ubset.default.retain-all-codepoint.wght=300.ttf | Bin 3300 -> 3300 bytes + ...n-all-codepoint.wght=200-300-500,wdth=80-90.ttf | Bin 8708 -> 8708 bytes + ...t.retain-all-codepoint.wght=300-600,wdth=85.ttf | Bin 7592 -> 7592 bytes + ...n-all-codepoint.wght=200-300-500,wdth=80-90.ttf | Bin 7568 -> 7568 bytes + ...t.retain-all-codepoint.wght=300-600,wdth=85.ttf | Bin 6932 -> 6932 bytes + .../MPLUS1-Variable.default.30DD.wght=100.ttf | Bin 1404 -> 1404 bytes + .../MPLUS1-Variable.default.30DD.wght=400.ttf | Bin 1656 -> 1656 bytes + ...retain-all-codepoint.wght=100,ELGR=1,ELSH=2.ttf | Bin 2224 -> 2224 bytes + ...retain-all-codepoint.wght=100,ELGR=1,ELSH=2.ttf | Bin 2676 -> 2676 bytes + ...fault.retain-all-codepoint.wght=650,CNTR=50.otf | Bin 41760 -> 41760 bytes + ...F-ABC.default.retain-all-codepoint.wght=800.otf | Bin 1488 -> 1488 bytes + ...C.retain-gids.retain-all-codepoint.wght=800.otf | Bin 1488 -> 1488 bytes + ...oldit.default.retain-all-codepoint.wght=900.ttf | Bin 2488 -> 2488 bytes + ...fault.retain-all-codepoint.wght=200,wdth=90.ttf | Bin 6736 -> 6736 bytes + ...fault.retain-all-codepoint.wght=650,wdth=85.ttf | Bin 6688 -> 6688 bytes + ...fault.retain-all-codepoint.wght=200,wdth=90.ttf | Bin 6416 -> 6416 bytes + ...fault.retain-all-codepoint.wght=650,wdth=85.ttf | Bin 6368 -> 6368 bytes + ...etain-all-codepoint.wght=150,wdth=80,CTGR=0.ttf | Bin 1396 -> 1396 bytes + ...etain-all-codepoint.wght=300,wdth=90,CTGR=0.ttf | Bin 1432 -> 1432 bytes + ...odepoint.wght=200-600,wdth=80-90,CTGR=20-60.ttf | Bin 4300 -> 4300 bytes + ...c.default.retain-all-codepoint.wght=300-600.ttf | Bin 6808 -> 6808 bytes + ...c.default.retain-all-codepoint.wght=500-800.ttf | Bin 7288 -> 7288 bytes + ...lt.retain-all-codepoint.wght=400,wdth=100.0.ttf | Bin 6780 -> 6780 bytes + ...ult.retain-all-codepoint.wght=drop,wdth=100.ttf | Bin 6780 -> 6780 bytes + ...epoint.wght=400,CASL=0,CRSV=0,MONO=0,slnt=0.ttf | Bin 1884 -> 1884 bytes + ...n.default.retain-all-codepoint.wght=300-600.ttf | Bin 305092 -> 305092 bytes + ...n.default.retain-all-codepoint.wght=500-800.ttf | Bin 250164 -> 250164 bytes + ...ubset.default.retain-all-codepoint.wght=400.ttf | Bin 1848 -> 1848 bytes + ...et.drop-hints.retain-all-codepoint.wght=400.ttf | Bin 1824 -> 1824 bytes + test/subset/generate-expected-outputs.py | 2 +- + 45 files changed, 24 insertions(+), 1 deletion(-) + +commit d053426bb469883bf1a40dd97fa4d57ef6d1ac47 +Author: Behdad Esfahbod +Date: Mon Nov 6 11:44:14 2023 -0700 + + Format + + src/hb-sanitize.hh | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +commit 2f528ce4ed806575be3aba361551568acba354d8 +Author: Behdad Esfahbod +Date: Mon Nov 6 11:40:19 2023 -0700 + + Tweak a couple more barriers + + src/OT/Color/CPAL/CPAL.hh | 4 ++-- + src/hb-aat-layout-morx-table.hh | 10 ++++++---- + 2 files changed, 8 insertions(+), 6 deletions(-) + +commit f31fb431552b2408ffea24a9469720cc99e9c939 +Author: Behdad Esfahbod +Date: Mon Nov 6 11:29:30 2023 -0700 + + Remove a couple unnecessary barriers + + src/hb-ot-os2-table.hh | 6 +++--- + src/hb-ot-post-table.hh | 2 +- + 2 files changed, 4 insertions(+), 4 deletions(-) + +commit d10cc79a6c95b11c6aefab464cfdb66dcc7f5fb5 +Author: Behdad Esfahbod +Date: Mon Nov 6 10:41:30 2023 -0700 + + Move a couple of barriers + + src/OT/Layout/GPOS/AnchorFormat3.hh | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +commit 80cb6b580fbef90e37a2ec8105e18407af912568 +Author: Qunxin Liu +Date: Mon Nov 6 09:00:33 2023 -0800 + + [instancer_solver] port solver fix: where axisDef < lower and upper < axisMax + + Port from https://github.com/fonttools/fonttools/commit/f1e56cd757ed457ffd3b58c262d3f4c2e4586555 + + src/hb-subset-instancer-solver.cc | 8 +++++--- + src/test-subset-instancer-solver.cc | 10 ++++++++++ + 2 files changed, 15 insertions(+), 3 deletions(-) + +commit 64305568d7ed267b98d162026153a93e89ceba5c +Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> +Date: Mon Nov 6 10:39:24 2023 +0000 + + Bump fonttools from 4.43.1 to 4.44.0 in /.ci + + Bumps [fonttools](https://github.com/fonttools/fonttools) from 4.43.1 to 4.44.0. + - [Release notes](https://github.com/fonttools/fonttools/releases) + - [Changelog](https://github.com/fonttools/fonttools/blob/main/NEWS.rst) + - [Commits](https://github.com/fonttools/fonttools/compare/4.43.1...4.44.0) + + --- + updated-dependencies: + - dependency-name: fonttools + dependency-type: direct:production + update-type: version-update:semver-minor + ... + + Signed-off-by: dependabot[bot] + + .ci/requirements-fonttools.txt | 86 ++++++++++++++++++------------------- + .ci/requirements.txt | 96 +++++++++++++++++++++--------------------- + 2 files changed, 91 insertions(+), 91 deletions(-) + +commit 920c40cd43dd7b10b7ecba3d82a46f5fea88536f +Merge: fd5eb10d3 36f5e654a +Author: Behdad Esfahbod +Date: Sun Nov 5 07:05:47 2023 -0700 + + Merge pull request #4480 from harfbuzz/sanitize-barrier-properly + + Sanitize barrier properly + + https://github.com/harfbuzz/harfbuzz/pull/4480 + +commit 36f5e654a641824271f26c814705590bd45ffea0 +Author: Behdad Esfahbod +Date: Sat Nov 4 16:17:32 2023 -0600 + + [circleci] Roll back msan/tsan ubuntu image + + Job gets stuck at compiling with the newer image :(. + + .circleci/config.yml | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 6ff0932722b1455efc6685bab9c0c3f6cba446b5 +Author: Behdad Esfahbod +Date: Sat Nov 4 15:33:32 2023 -0600 + + [circleci] Roll images + + .circleci/config.yml | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +commit 7ee7e2e340be46205dc675a1cb80ff6330a78b53 +Author: Behdad Esfahbod +Date: Sat Nov 4 15:02:28 2023 -0600 + + [sanitize] Add remaining hb_barrier() annotations + + I'm sure I've forgot some. But this is a good start. + + src/hb-ot-cmap-table.hh | 3 +++ + src/hb-ot-hdmx-table.hh | 2 ++ + src/hb-ot-head-table.hh | 1 + + src/hb-ot-hhea-table.hh | 4 +++- + src/hb-ot-kern-table.hh | 9 ++++++--- + src/hb-ot-layout-base-table.hh | 2 ++ + src/hb-ot-layout-common.hh | 17 +++++++++++++++-- + src/hb-ot-layout-gsubgpos.hh | 10 ++++++++++ + src/hb-ot-layout-jstf-table.hh | 1 + + src/hb-ot-math-table.hh | 3 +++ + src/hb-ot-maxp-table.hh | 3 ++- + src/hb-ot-meta-table.hh | 2 ++ + src/hb-ot-os2-table.hh | 8 +++++--- + src/hb-ot-post-table.hh | 20 ++++++++++++++++++-- + src/hb-ot-stat-table.hh | 3 +++ + src/hb-ot-var-avar-table.hh | 3 +++ + src/hb-ot-var-common.hh | 2 ++ + src/hb-ot-var-cvar-table.hh | 3 ++- + src/hb-ot-var-fvar-table.hh | 3 +++ + src/hb-ot-var-gvar-table.hh | 4 +++- + src/hb-ot-var-hvar-table.hh | 1 + + src/hb-ot-var-mvar-table.hh | 2 ++ + src/hb-ot-vorg-table.hh | 1 + + 23 files changed, 93 insertions(+), 14 deletions(-) + +commit 3a9262cc3de4be58804cdd431dd4ae9fa9bfbe7a +Author: Behdad Esfahbod +Date: Sat Nov 4 12:52:46 2023 -0600 + + [sanitize] More hb_barrier() annotations + + src/OT/Color/CPAL/CPAL.hh | 10 ++++++++- + src/OT/Color/sbix/sbix.hh | 1 + + src/OT/Color/svg/svg.hh | 1 + + src/OT/Layout/Common/Coverage.hh | 1 + + src/OT/Layout/GDEF/GDEF.hh | 4 ++++ + src/OT/Layout/GPOS/Anchor.hh | 1 + + src/OT/Layout/GPOS/AnchorMatrix.hh | 2 ++ + src/OT/Layout/GPOS/MarkMarkPosFormat1.hh | 1 + + src/OT/Layout/GPOS/PairPosFormat1.hh | 1 + + src/OT/Layout/GPOS/PairSet.hh | 6 +++-- + src/OT/Layout/GPOS/SinglePosFormat1.hh | 1 + + src/OT/Layout/GPOS/ValueFormat.hh | 1 + + .../Layout/GSUB/ReverseChainSingleSubstFormat1.hh | 2 ++ + src/OT/name/name.hh | 5 ++++- + src/graph/classdef-graph.hh | 3 +++ + src/graph/coverage-graph.hh | 3 +++ + src/graph/gsubgpos-graph.hh | 4 ++++ + src/graph/markbasepos-graph.hh | 3 +++ + src/graph/pairpos-graph.hh | 3 +++ + src/hb-aat-layout-ankr-table.hh | 1 + + src/hb-aat-layout-bsln-table.hh | 1 + + src/hb-aat-layout-common.hh | 6 +++++ + src/hb-aat-layout-feat-table.hh | 2 ++ + src/hb-aat-layout-just-table.hh | 3 +++ + src/hb-aat-layout-kerx-table.hh | 17 +++++++++----- + src/hb-aat-layout-morx-table.hh | 26 ++++++++++++++++------ + src/hb-aat-layout-opbd-table.hh | 1 + + src/hb-aat-layout-trak-table.hh | 2 ++ + src/hb-aat-ltag-table.hh | 5 ++++- + src/hb-open-file.hh | 6 +++++ + src/hb-open-type.hh | 14 +++++++++++- + src/hb-ot-cff-common.hh | 19 ++++++++++++---- + src/hb-ot-cff1-table.hh | 23 ++++++++++++++++--- + src/hb-ot-cff2-table.hh | 12 +++++++++- + 34 files changed, 164 insertions(+), 27 deletions(-) + +commit 30672c7e75097377e08f3cc91ddd7e4c14a76033 +Author: Behdad Esfahbod +Date: Fri Nov 3 18:52:03 2023 -0600 + + Add hb_barrier() + + And annotate some more. + + src/OT/Color/CBDT/CBDT.hh | 6 ++++++ + src/OT/Color/COLR/COLR.hh | 17 +++++++++++++---- + src/OT/Layout/GPOS/AnchorFormat3.hh | 4 ++-- + src/OT/Layout/GPOS/AnchorMatrix.hh | 2 +- + src/OT/Layout/GPOS/CursivePosFormat1.hh | 4 ++-- + src/OT/Layout/GPOS/ValueFormat.hh | 2 +- + src/hb-aat-layout-kerx-table.hh | 16 ++++++++-------- + src/hb-aat-layout-morx-table.hh | 14 +++++++------- + src/hb-atomic.hh | 6 ++++++ + src/hb-ot-layout-common.hh | 4 ++-- + src/hb-sanitize.hh | 9 +-------- + 11 files changed, 49 insertions(+), 35 deletions(-) + +commit 775320a4f6c320efd998df22879d9037b0ee1ab9 +Author: Behdad Esfahbod +Date: Fri Nov 3 18:38:12 2023 -0600 + + [sanitize] Add barriers to runtime-checked values + + src/OT/Layout/GPOS/AnchorFormat3.hh | 4 ++-- + src/OT/Layout/GPOS/AnchorMatrix.hh | 1 + + src/OT/Layout/GPOS/CursivePosFormat1.hh | 2 ++ + src/OT/Layout/GPOS/ValueFormat.hh | 1 + + src/hb-aat-layout-kerx-table.hh | 8 ++++++++ + src/hb-aat-layout-morx-table.hh | 9 +++++++-- + 6 files changed, 21 insertions(+), 4 deletions(-) + +commit cf49f3f2cbec8fbdc654d45e2f4b8e9c8d91db47 +Author: Behdad Esfahbod +Date: Fri Nov 3 18:20:14 2023 -0600 + + [sanitize] Add barrier() + + src/hb-ot-layout-common.hh | 2 ++ + src/hb-sanitize.hh | 12 ++++++++---- + 2 files changed, 10 insertions(+), 4 deletions(-) + +commit b16f18004482f2981155e0ff94b34aab57b38812 +Author: Behdad Esfahbod +Date: Fri Nov 3 17:51:50 2023 -0600 + + [sanitize] Yet another hack to "fix" barrier issue + + src/hb-atomic.hh | 4 ++-- + src/hb-sanitize.hh | 5 ++++- + 2 files changed, 6 insertions(+), 3 deletions(-) + +commit fd5eb10d3b4cfee1bb10614ff6719378c949492e +Merge: cdcad93b7 6baf791e6 +Author: Behdad Esfahbod +Date: Fri Nov 3 15:30:15 2023 -0600 + + Merge pull request #4477 from googlefonts/fix_feature_variations + + [instancer] Fix feature variations collect lookups + +commit cdcad93b737c4553b98fdc0c57f6432c5643c97a +Author: Behdad Esfahbod +Date: Fri Nov 3 12:45:16 2023 -0600 + + [set] Mark as realloc-movable + + src/hb-set.hh | 2 ++ + 1 file changed, 2 insertions(+) + +commit 6baf791e6f5ef38f18876aa952a506858c383c0e +Author: Qunxin Liu +Date: Fri Nov 3 11:06:07 2023 -0700 + + [instancer] add tests + + ...on-subset.default.retain-all-codepoint.wdth=112.5.ttf | Bin 0 -> 2668 bytes + test/subset/data/fonts/AnekBangla-question-subset.ttf | Bin 0 -> 4488 bytes + .../feature_variation_instance_collect_lookups.tests | 11 +++++++++++ + test/subset/meson.build | 1 + + 4 files changed, 12 insertions(+) + +commit aca55dbe36eafb0f69081323b679f2a5bf51239c +Author: Qunxin Liu +Date: Fri Nov 3 10:51:37 2023 -0700 + + [instancer] fix feature variations collect lookups + + We already know which record to keep, so just collect lookups and no + need to check the substitutes_map + + src/hb-ot-layout-common.hh | 12 ++---------- + src/hb-ot-layout-gsubgpos.hh | 3 +-- + src/hb-ot-layout.cc | 2 +- + src/hb-subset-plan.cc | 2 +- + 4 files changed, 5 insertions(+), 14 deletions(-) + +commit 7766e67b336b9477c99aeff5d417d57b30b5cb6e +Merge: 413af0a9b f05636e1b +Author: Behdad Esfahbod +Date: Fri Nov 3 11:38:21 2023 -0600 + + Merge pull request #4474 from googlefonts/fix_value_format + + [instancer] fix value format for SinglePos/PairPos when strip_hints is on + +commit f05636e1be2664df8356df4adf5f1af1c7628bcd +Author: Qunxin Liu +Date: Thu Nov 2 09:18:15 2023 -0700 + + [instancer] fix build issue after rebase + + src/OT/Layout/GPOS/ValueFormat.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 31b5b2b1d7470dbcebc3bc5eb68ce8cfaca6667b +Author: Qunxin Liu +Date: Thu Nov 2 09:08:36 2023 -0700 + + [instancer] add tests for valueformat + + ...rmat-subset.default.retain-all-codepoint.wght=400.ttf | Bin 0 -> 1848 bytes + ...t-subset.drop-hints.retain-all-codepoint.wght=400.ttf | Bin 0 -> 1824 bytes + .../data/fonts/NotoSansOriya-valueformat-subset.ttf | Bin 0 -> 3048 bytes + .../data/tests/value_format_partial_instance.tests | 12 ++++++++++++ + test/subset/meson.build | 1 + + 5 files changed, 13 insertions(+) + +commit 6c017a1162265bee8c5d09cd89aef26ef25afe51 +Author: Qunxin Liu +Date: Wed Nov 1 09:54:46 2023 -0700 + + [instancer] SinglePos/PairPos: do not strip_hints for partial instancing + + src/OT/Layout/GDEF/GDEF.hh | 1 + + src/OT/Layout/GPOS/Common.hh | 2 +- + src/OT/Layout/GPOS/PairPosFormat1.hh | 37 +++++++++++++--------- + src/OT/Layout/GPOS/PairPosFormat2.hh | 37 +++++++++++++--------- + src/OT/Layout/GPOS/SinglePos.hh | 13 +++----- + src/OT/Layout/GPOS/SinglePosFormat1.hh | 26 +++++++++++++++- + src/OT/Layout/GPOS/SinglePosFormat2.hh | 38 ++++++++++++++++++++++- + src/OT/Layout/GPOS/ValueFormat.hh | 57 ++++++++++++++-------------------- + src/hb-subset-plan.cc | 1 + + src/hb-subset-plan.hh | 3 ++ + src/hb-subset.cc | 2 +- + 11 files changed, 143 insertions(+), 74 deletions(-) + +commit 413af0a9b2cc3bebf559f0f5e459cc98c5ee955e +Author: Qunxin Liu +Date: Thu Nov 2 11:14:48 2023 -0700 + + [instancer] When partial instancing, subset LigCaretList after VarStore instantiation + + src/OT/Layout/GDEF/GDEF.hh | 4 +++- + ...ubset.default.retain-all-codepoint.wght=300.ttf | Bin 0 -> 3300 bytes + ...ns-BlackItalic.default.retain-all-codepoint.ttf | Bin 120020 -> 120020 bytes + ...lackItalic.glyph-names.retain-all-codepoint.ttf | Bin 132264 -> 132264 bytes + ...kItalic.notdef-outline.retain-all-codepoint.ttf | Bin 120020 -> 120020 bytes + ...taliqUrdu-Bold.default.retain-all-codepoint.ttf | Bin 543364 -> 543364 bytes + ...qUrdu-Bold.retain-gids.retain-all-codepoint.ttf | Bin 543364 -> 543364 bytes + test/subset/data/fonts/AnekBangla-subset.ttf | Bin 0 -> 5456 bytes + test/subset/data/tests/gdef_partial_instance.tests | 11 +++++++++++ + test/subset/meson.build | 1 + + 10 files changed, 15 insertions(+), 1 deletion(-) + +commit f57c64d8257e449230979b59ec3b98ed643775be +Author: Behdad Esfahbod +Date: Thu Nov 2 11:21:44 2023 -0600 + + [ci] Try fixing msvc builds again + + https://gitlab.gnome.org/GNOME/glib/-/issues/3134 + + .ci/requirements.in | 1 + + .ci/requirements.txt | 8 +++++++- + 2 files changed, 8 insertions(+), 1 deletion(-) + +commit 724360813b7916bb4a000b361796f63230e7c8c0 +Author: Behdad Esfahbod +Date: Thu Nov 2 11:01:49 2023 -0600 + + [ci] Roll lxml forward + + Should help fixing the msvc fails. + + .ci/requirements.txt | 201 +++++++++++++++++++++++++++++---------------------- + 1 file changed, 113 insertions(+), 88 deletions(-) + +commit b532945987935db56503ad8ffb0655331798af5f +Author: Behdad Esfahbod +Date: Wed Nov 1 16:53:26 2023 -0600 + + [tuple_delta_t] Micro-optimize encoding vector access + + src/hb-ot-var-common.hh | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +commit 59cfb4c570b0e11470900264b151295e64226947 +Author: Behdad Esfahbod +Date: Wed Nov 1 16:25:50 2023 -0600 + + [instancing] Micro-optimize a loop + + src/hb-ot-var-common.hh | 21 +++++++++++++-------- + 1 file changed, 13 insertions(+), 8 deletions(-) + +commit 29d49eced8a9f4a9a6148972b0ba4430a2f7f6bf +Author: Behdad Esfahbod +Date: Wed Nov 1 15:55:47 2023 -0600 + + [vector] Introduce realloc_moves tag + + Some types (even aggregate) can be moved using realloc(). + Extend the fast path to hb_hashmap and tuple_delta_t. + + src/hb-array.hh | 2 ++ + src/hb-map.hh | 2 ++ + src/hb-ot-var-common.hh | 2 ++ + src/hb-vector.hh | 7 ++++--- + 4 files changed, 10 insertions(+), 3 deletions(-) + +commit 7b46d772c44d6f0ee09c0c403fefa833cb385d9e +Author: Garret Rieger +Date: Wed Nov 1 20:07:07 2023 +0000 + + [instancer] Update help message for --instance. + + Remove note about partial instancing not being supported. Add --variations flag as an alternate name for --instance. This matches other hb utils. + + util/hb-subset.cc | 22 +++++++++++++--------- + 1 file changed, 13 insertions(+), 9 deletions(-) + +commit 9d0bc085eeadf9385ae28ee460a9a5e686564917 +Merge: f6f35f73b 2804127ac +Author: Behdad Esfahbod +Date: Tue Oct 31 22:25:07 2023 -0600 + + Merge pull request #4469 from harfbuzz/typed-offsets + + Typed offsets + +commit 2804127ac91d0fde162c034f9cb4d7d3fe9e369b +Author: Behdad Esfahbod +Date: Tue Oct 31 15:12:55 2023 -0600 + + [Value] Typed offsets + + src/OT/Layout/GPOS/PairPosFormat2.hh | 2 +- + src/OT/Layout/GPOS/PairSet.hh | 2 +- + src/OT/Layout/GPOS/PairValueRecord.hh | 4 ++-- + src/OT/Layout/GPOS/SinglePosFormat1.hh | 2 +- + src/OT/Layout/GPOS/SinglePosFormat2.hh | 2 +- + src/OT/Layout/GPOS/ValueFormat.hh | 37 ++++++++++++++++++---------------- + 6 files changed, 26 insertions(+), 23 deletions(-) + +commit 38546acd8391dbad3439a81302ff8e7032eb2ae1 +Author: Behdad Esfahbod +Date: Tue Oct 31 14:56:09 2023 -0600 + + [typed-offset] Fix sanitize() + + src/OT/Layout/GPOS/CursivePosFormat1.hh | 2 +- + src/hb-open-type.hh | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +commit 62117801b8c17d939cccc4c8ce0fe6a0b6a69d31 +Author: Behdad Esfahbod +Date: Tue Oct 31 14:50:45 2023 -0600 + + [AnchorMatrix] Annotate offset base type + + src/OT/Layout/GPOS/AnchorMatrix.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 4f219385a692b4dfd7d0a926b21c61b21f92085d +Author: Behdad Esfahbod +Date: Tue Oct 31 14:33:23 2023 -0600 + + [CursivePosFormat1] Use typed offsets for EntryExitRecord + + src/OT/Layout/GPOS/CursivePosFormat1.hh | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +commit b37cc61d45618b3ac6e7a45386a1bccfad37b02f +Author: Behdad Esfahbod +Date: Tue Oct 31 14:26:42 2023 -0600 + + Add base types to OffsetTo<> + + Unused so far. + + src/OT/Layout/types.hh | 8 ++++---- + src/hb-aat-layout-morx-table.hh | 4 ++-- + src/hb-open-type.hh | 42 ++++++++++++++++++++--------------------- + 3 files changed, 27 insertions(+), 27 deletions(-) + +commit f6f35f73bc865eeb68b74c257f49d66b6a0e76b0 +Author: Qunxin Liu +Date: Fri Oct 27 09:31:07 2023 -0700 + + [instancer] add tests for feature variations partial instancing + + ...Oriya-subset.default.retain-all-codepoint.wdth=75.ttf | Bin 0 -> 3296 bytes + ...-all-layout-features.retain-all-codepoint.wdth=75.ttf | Bin 0 -> 4500 bytes + test/subset/data/fonts/NotoSansOriya-subset.ttf | Bin 0 -> 6212 bytes + .../data/tests/feature_variations_partial_instance.tests | 12 ++++++++++++ + test/subset/meson.build | 1 + + 5 files changed, 13 insertions(+) + +commit 091e538daf396b009e01f5f7d54acbfdbd3b392d +Author: Qunxin Liu +Date: Thu Oct 26 12:52:08 2023 -0700 + + [instancer] support partial instancing for FeatureVariations + + src/hb-ot-layout-common.hh | 110 ++++++++++++++++++++++++++++++-------- + src/hb-ot-layout-gsubgpos.hh | 10 +--- + src/hb-ot-layout.cc | 2 +- + src/hb-subset-plan-member-list.hh | 9 ++++ + src/hb-subset-plan.cc | 41 +++++++++----- + 5 files changed, 128 insertions(+), 44 deletions(-) + +commit e5040c2352fd7c95090176a63f2d9043e4de0739 +Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> +Date: Mon Oct 30 10:02:16 2023 +0000 + + Bump ossf/scorecard-action from 2.3.0 to 2.3.1 + + Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.3.0 to 2.3.1. + - [Release notes](https://github.com/ossf/scorecard-action/releases) + - [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md) + - [Commits](https://github.com/ossf/scorecard-action/compare/483ef80eb98fb506c348f7d62e28055e49fe2398...0864cf19026789058feabb7e87baa5f140aac736) + + --- + updated-dependencies: + - dependency-name: ossf/scorecard-action + dependency-type: direct:production + update-type: version-update:semver-patch + ... + + Signed-off-by: dependabot[bot] + + .github/workflows/scorecard.yml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 16a76829f71e633c165bba9e7ff00cfb00a5d984 +Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> +Date: Mon Oct 30 10:02:12 2023 +0000 + + Bump github/codeql-action from 2.22.4 to 2.22.5 + + Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.22.4 to 2.22.5. + - [Release notes](https://github.com/github/codeql-action/releases) + - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) + - [Commits](https://github.com/github/codeql-action/compare/49abf0ba24d0b7953cb586944e918a0b92074c80...74483a38d39275f33fcff5f35b679b5ca4a26a99) + + --- + updated-dependencies: + - dependency-name: github/codeql-action + dependency-type: direct:production + update-type: version-update:semver-patch + ... + + Signed-off-by: dependabot[bot] + + .github/workflows/scorecard.yml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit bf08205625ac69a1d6fc7b0e066a8a5ed6ef908b +Author: Behdad Esfahbod +Date: Fri Oct 27 12:24:33 2023 -0600 + + [deprecated] Add a mis-spelled macro + + Fixes https://github.com/harfbuzz/harfbuzz/issues/4464 + + docs/harfbuzz-sections.txt | 1 + + src/hb-aat-layout.h | 4 ++-- + src/hb-deprecated.h | 11 ++++++++++- + 3 files changed, 13 insertions(+), 3 deletions(-) + +commit 598de82f3aa6f9f6cbc6c271d0905350e598b281 +Author: Behdad Esfahbod +Date: Fri Oct 27 12:13:13 2023 -0600 + + [hb-subset] Fix warning + + util/hb-subset.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 9fc45f70ad42b87072ced65b8c58b87af005f265 +Author: Behdad Esfahbod +Date: Thu Oct 5 14:06:39 2023 -0600 + + [ReverseChainSingleSubst] Minor optimization + + src/OT/Layout/GSUB/ReverseChainSingleSubstFormat1.hh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 156de3c048237c5953d96ed5e7bdb53261456692 +Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> +Date: Mon Oct 23 10:35:02 2023 +0000 + + Bump meson from 1.2.2 to 1.2.3 in /.ci + + Bumps [meson](https://github.com/mesonbuild/meson) from 1.2.2 to 1.2.3. + - [Release notes](https://github.com/mesonbuild/meson/releases) + - [Commits](https://github.com/mesonbuild/meson/compare/1.2.2...1.2.3) + + --- + updated-dependencies: + - dependency-name: meson + dependency-type: direct:production + update-type: version-update:semver-patch + ... + + Signed-off-by: dependabot[bot] + + .ci/requirements.in | 2 +- + .ci/requirements.txt | 6 +++--- + 2 files changed, 4 insertions(+), 4 deletions(-) + +commit d7cd687b74fd8e103fb52964a079cd667c1847de +Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> +Date: Mon Oct 23 10:15:11 2023 +0000 + + Bump github/codeql-action from 2.22.3 to 2.22.4 + + Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.22.3 to 2.22.4. + - [Release notes](https://github.com/github/codeql-action/releases) + - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) + - [Commits](https://github.com/github/codeql-action/compare/0116bc2df50751f9724a2e35ef1f24d22f90e4e1...49abf0ba24d0b7953cb586944e918a0b92074c80) + + --- + updated-dependencies: + - dependency-name: github/codeql-action + dependency-type: direct:production + update-type: version-update:semver-patch + ... + + Signed-off-by: dependabot[bot] + + .github/workflows/scorecard.yml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 4d123ece5fd5d5c78d530e1c302ea4daa316d5cc +Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> +Date: Mon Oct 23 10:14:58 2023 +0000 + + Bump actions/checkout from 4.1.0 to 4.1.1 + + Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.0 to 4.1.1. + - [Release notes](https://github.com/actions/checkout/releases) + - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) + - [Commits](https://github.com/actions/checkout/compare/8ade135a41bc03ea155e62e844d188df1ea18608...b4ffde65f46336ab88eb53be808477a3936bae11) + + --- + updated-dependencies: + - dependency-name: actions/checkout + dependency-type: direct:production + update-type: version-update:semver-patch + ... + + Signed-off-by: dependabot[bot] + + .github/workflows/arm-ci.yml | 2 +- + .github/workflows/configs-build.yml | 2 +- + .github/workflows/coverity-scan.yml | 2 +- + .github/workflows/linux-ci.yml | 2 +- + .github/workflows/macos-ci.yml | 2 +- + .github/workflows/msvc-ci.yml | 2 +- + .github/workflows/msys2-ci.yml | 2 +- + .github/workflows/scorecard.yml | 2 +- + 8 files changed, 8 insertions(+), 8 deletions(-) + +commit b0150ffd05523c7cef9b3c91a8d6050177fceda3 +Author: 一丝 +Date: Fri Oct 20 21:53:14 2023 +0800 + + [subset] keep East Asian spacing vhal, halt, chws, vchw by default + + Closes: https://github.com/harfbuzz/harfbuzz/issues/4451 + + src/hb-subset-input.cc | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit fde1c3692a4a1e45ee48954fb486ae6c036a5687 +Merge: 38f351d11 e595fe75c +Author: Behdad Esfahbod +Date: Thu Oct 19 11:04:34 2023 -0600 + + Merge pull request #4452 from googlefonts/fix_test + + [subset] bug fixes for GDEF + +commit e595fe75cceb5146cc490804d2619ce31464208e +Author: Qunxin Liu +Date: Wed Oct 18 16:00:06 2023 -0700 + + fix bots + + partial instancing tests are wrapped by experimenal_api, do not enable + them in Makefile + + src/hb-ot-layout-common.hh | 2 +- + test/subset/data/Makefile.am | 1 - + test/subset/data/Makefile.sources | 1 - + 3 files changed, 1 insertion(+), 3 deletions(-) + +commit 38f351d113fcc66cd4aaafbcee952a6067f315a9 +Author: Alexander Borsuk +Date: Wed Oct 18 01:52:18 2023 +0200 + + [docs] Fixed links to freetype FT_LOAD_XXX flags + + Signed-off-by: Alexander Borsuk + + src/hb-ft.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit ce46698929999669000182b8e72aa4b9c0d8ce40 +Author: Qunxin Liu +Date: Wed Oct 18 15:49:57 2023 -0700 + + [subset] update tests + + to reflect changes in GDEF.MarkGlyphSetsDef and Lookup.MarkFilteringSet + + ...r-new.default.retain-all-codepoint.wght=300.ttf | Bin 131712 -> 131708 bytes + ...r-new.default.retain-all-codepoint.wght=700.ttf | Bin 131588 -> 131584 bytes + ...i-ABC.default.retain-all-codepoint.wght=300.ttf | Bin 5808 -> 5788 bytes + ...i-ABC.default.retain-all-codepoint.wght=700.ttf | Bin 5804 -> 5784 bytes + .../Comfortaa-Regular-new.default.61,62,63.ttf | Bin 7060 -> 7036 bytes + .../basics/Comfortaa-Regular-new.default.61,63.ttf | Bin 6692 -> 6668 bytes + .../basics/Comfortaa-Regular-new.default.61.ttf | Bin 6328 -> 6300 bytes + .../basics/Comfortaa-Regular-new.default.62.ttf | Bin 6200 -> 6172 bytes + .../basics/Comfortaa-Regular-new.default.63.ttf | Bin 6256 -> 6228 bytes + ...Regular-new.drop-hints-retain-gids.61,62,63.ttf | Bin 4608 -> 4580 bytes + ...aa-Regular-new.drop-hints-retain-gids.61,63.ttf | Bin 4312 -> 4284 bytes + ...ortaa-Regular-new.drop-hints-retain-gids.61.ttf | Bin 3724 -> 3696 bytes + ...ortaa-Regular-new.drop-hints-retain-gids.62.ttf | Bin 3900 -> 3872 bytes + ...ortaa-Regular-new.drop-hints-retain-gids.63.ttf | Bin 3972 -> 3944 bytes + .../Comfortaa-Regular-new.drop-hints.61,62,63.ttf | Bin 2600 -> 2576 bytes + .../Comfortaa-Regular-new.drop-hints.61,63.ttf | Bin 2296 -> 2272 bytes + .../basics/Comfortaa-Regular-new.drop-hints.61.ttf | Bin 1976 -> 1948 bytes + .../basics/Comfortaa-Regular-new.drop-hints.62.ttf | Bin 1900 -> 1872 bytes + .../basics/Comfortaa-Regular-new.drop-hints.63.ttf | Bin 1968 -> 1940 bytes + .../basics/Comfortaa-Regular-new.gids.61,62,63.ttf | Bin 7988 -> 7964 bytes + .../basics/Comfortaa-Regular-new.gids.61,63.ttf | Bin 7628 -> 7604 bytes + .../basics/Comfortaa-Regular-new.gids.61.ttf | Bin 7256 -> 7232 bytes + .../basics/Comfortaa-Regular-new.gids.62.ttf | Bin 7184 -> 7160 bytes + .../basics/Comfortaa-Regular-new.gids.63.ttf | Bin 7180 -> 7156 bytes + .../Comfortaa-Regular-new.glyph-names.61,62,63.ttf | Bin 7072 -> 7048 bytes + .../Comfortaa-Regular-new.glyph-names.61,63.ttf | Bin 6700 -> 6676 bytes + .../Comfortaa-Regular-new.glyph-names.61.ttf | Bin 6336 -> 6308 bytes + .../Comfortaa-Regular-new.glyph-names.62.ttf | Bin 6208 -> 6180 bytes + .../Comfortaa-Regular-new.glyph-names.63.ttf | Bin 6264 -> 6236 bytes + ...gular-new.keep-all-layout-features.61,62,63.ttf | Bin 7508 -> 7484 bytes + ...-Regular-new.keep-all-layout-features.61,63.ttf | Bin 7144 -> 7120 bytes + ...taa-Regular-new.keep-all-layout-features.61.ttf | Bin 6776 -> 6748 bytes + ...taa-Regular-new.keep-all-layout-features.62.ttf | Bin 6200 -> 6172 bytes + ...taa-Regular-new.keep-all-layout-features.63.ttf | Bin 6256 -> 6228 bytes + ...fortaa-Regular-new.layout-features.61,62,63.ttf | Bin 7060 -> 7036 bytes + ...Comfortaa-Regular-new.layout-features.61,63.ttf | Bin 6692 -> 6668 bytes + .../Comfortaa-Regular-new.layout-features.61.ttf | Bin 6328 -> 6300 bytes + .../Comfortaa-Regular-new.layout-features.62.ttf | Bin 6200 -> 6172 bytes + .../Comfortaa-Regular-new.layout-features.63.ttf | Bin 6256 -> 6228 bytes + .../Comfortaa-Regular-new.name-ids.61,62,63.ttf | Bin 6800 -> 6776 bytes + .../Comfortaa-Regular-new.name-ids.61,63.ttf | Bin 6432 -> 6408 bytes + .../basics/Comfortaa-Regular-new.name-ids.61.ttf | Bin 6068 -> 6040 bytes + .../basics/Comfortaa-Regular-new.name-ids.62.ttf | Bin 5940 -> 5912 bytes + .../basics/Comfortaa-Regular-new.name-ids.63.ttf | Bin 5996 -> 5968 bytes + ...mfortaa-Regular-new.name-languages.61,62,63.ttf | Bin 7060 -> 7036 bytes + .../Comfortaa-Regular-new.name-languages.61,63.ttf | Bin 6692 -> 6668 bytes + .../Comfortaa-Regular-new.name-languages.61.ttf | Bin 6328 -> 6300 bytes + .../Comfortaa-Regular-new.name-languages.62.ttf | Bin 6200 -> 6172 bytes + .../Comfortaa-Regular-new.name-languages.63.ttf | Bin 6256 -> 6228 bytes + .../Comfortaa-Regular-new.name-legacy.61,62,63.ttf | Bin 7060 -> 7036 bytes + .../Comfortaa-Regular-new.name-legacy.61,63.ttf | Bin 6692 -> 6668 bytes + .../Comfortaa-Regular-new.name-legacy.61.ttf | Bin 6328 -> 6300 bytes + .../Comfortaa-Regular-new.name-legacy.62.ttf | Bin 6200 -> 6172 bytes + .../Comfortaa-Regular-new.name-legacy.63.ttf | Bin 6256 -> 6228 bytes + ...egular-new.no-prune-unicode-ranges.61,62,63.ttf | Bin 7060 -> 7036 bytes + ...a-Regular-new.no-prune-unicode-ranges.61,63.ttf | Bin 6692 -> 6668 bytes + ...rtaa-Regular-new.no-prune-unicode-ranges.61.ttf | Bin 6328 -> 6300 bytes + ...rtaa-Regular-new.no-prune-unicode-ranges.62.ttf | Bin 6200 -> 6172 bytes + ...rtaa-Regular-new.no-prune-unicode-ranges.63.ttf | Bin 6256 -> 6228 bytes + ...mfortaa-Regular-new.notdef-outline.61,62,63.ttf | Bin 7652 -> 7628 bytes + .../Comfortaa-Regular-new.notdef-outline.61,63.ttf | Bin 7284 -> 7260 bytes + .../Comfortaa-Regular-new.notdef-outline.61.ttf | Bin 6920 -> 6892 bytes + .../Comfortaa-Regular-new.notdef-outline.62.ttf | Bin 6796 -> 6768 bytes + .../Comfortaa-Regular-new.notdef-outline.63.ttf | Bin 6844 -> 6816 bytes + .../Comfortaa-Regular-new.retain-gids.61,62,63.ttf | Bin 9068 -> 9040 bytes + .../Comfortaa-Regular-new.retain-gids.61,63.ttf | Bin 8708 -> 8680 bytes + .../Comfortaa-Regular-new.retain-gids.61.ttf | Bin 8076 -> 8048 bytes + .../Comfortaa-Regular-new.retain-gids.62.ttf | Bin 8200 -> 8172 bytes + .../Comfortaa-Regular-new.retain-gids.63.ttf | Bin 8260 -> 8232 bytes + .../basics/Roboto-Regular.abc.default.61,62,63.ttf | Bin 2412 -> 2396 bytes + .../basics/Roboto-Regular.abc.default.61,63.ttf | Bin 2208 -> 2192 bytes + .../basics/Roboto-Regular.abc.default.61.ttf | Bin 2008 -> 1988 bytes + .../basics/Roboto-Regular.abc.default.62.ttf | Bin 1876 -> 1856 bytes + .../basics/Roboto-Regular.abc.default.63.ttf | Bin 1932 -> 1912 bytes + ...to-Regular.abc.default.retain-all-codepoint.ttf | Bin 2412 -> 2396 bytes + ...Regular.abc.drop-hints-retain-gids.61,62,63.ttf | Bin 1152 -> 1136 bytes + ...to-Regular.abc.drop-hints-retain-gids.61,63.ttf | Bin 1072 -> 1052 bytes + ...oboto-Regular.abc.drop-hints-retain-gids.61.ttf | Bin 944 -> 924 bytes + ...oboto-Regular.abc.drop-hints-retain-gids.62.ttf | Bin 840 -> 820 bytes + ...oboto-Regular.abc.drop-hints-retain-gids.63.ttf | Bin 928 -> 908 bytes + ...drop-hints-retain-gids.retain-all-codepoint.ttf | Bin 1152 -> 1136 bytes + .../Roboto-Regular.abc.drop-hints.61,62,63.ttf | Bin 1152 -> 1136 bytes + .../basics/Roboto-Regular.abc.drop-hints.61,63.ttf | Bin 1056 -> 1040 bytes + .../basics/Roboto-Regular.abc.drop-hints.61.ttf | Bin 944 -> 924 bytes + .../basics/Roboto-Regular.abc.drop-hints.62.ttf | Bin 836 -> 816 bytes + .../basics/Roboto-Regular.abc.drop-hints.63.ttf | Bin 916 -> 896 bytes + ...Regular.abc.drop-hints.retain-all-codepoint.ttf | Bin 1152 -> 1136 bytes + .../basics/Roboto-Regular.abc.gids.61,62,63.ttf | Bin 2412 -> 2396 bytes + .../basics/Roboto-Regular.abc.gids.61,63.ttf | Bin 2412 -> 2396 bytes + .../expected/basics/Roboto-Regular.abc.gids.61.ttf | Bin 2412 -> 2396 bytes + .../expected/basics/Roboto-Regular.abc.gids.62.ttf | Bin 2412 -> 2396 bytes + .../expected/basics/Roboto-Regular.abc.gids.63.ttf | Bin 2412 -> 2396 bytes + ...oboto-Regular.abc.gids.retain-all-codepoint.ttf | Bin 2412 -> 2396 bytes + .../Roboto-Regular.abc.glyph-names.61,62,63.ttf | Bin 2412 -> 2396 bytes + .../Roboto-Regular.abc.glyph-names.61,63.ttf | Bin 2208 -> 2192 bytes + .../basics/Roboto-Regular.abc.glyph-names.61.ttf | Bin 2008 -> 1988 bytes + .../basics/Roboto-Regular.abc.glyph-names.62.ttf | Bin 1876 -> 1856 bytes + .../basics/Roboto-Regular.abc.glyph-names.63.ttf | Bin 1932 -> 1912 bytes + ...egular.abc.glyph-names.retain-all-codepoint.ttf | Bin 2412 -> 2396 bytes + ...gular.abc.keep-all-layout-features.61,62,63.ttf | Bin 2412 -> 2396 bytes + ...-Regular.abc.keep-all-layout-features.61,63.ttf | Bin 2208 -> 2192 bytes + ...oto-Regular.abc.keep-all-layout-features.61.ttf | Bin 2008 -> 1988 bytes + ...oto-Regular.abc.keep-all-layout-features.62.ttf | Bin 1876 -> 1856 bytes + ...oto-Regular.abc.keep-all-layout-features.63.ttf | Bin 1932 -> 1912 bytes + ...ep-all-layout-features.retain-all-codepoint.ttf | Bin 2412 -> 2396 bytes + ...Roboto-Regular.abc.layout-features.61,62,63.ttf | Bin 2412 -> 2396 bytes + .../Roboto-Regular.abc.layout-features.61,63.ttf | Bin 2208 -> 2192 bytes + .../Roboto-Regular.abc.layout-features.61.ttf | Bin 2008 -> 1988 bytes + .../Roboto-Regular.abc.layout-features.62.ttf | Bin 1876 -> 1856 bytes + .../Roboto-Regular.abc.layout-features.63.ttf | Bin 1932 -> 1912 bytes + ...ar.abc.layout-features.retain-all-codepoint.ttf | Bin 2412 -> 2396 bytes + .../Roboto-Regular.abc.name-ids.61,62,63.ttf | Bin 2412 -> 2396 bytes + .../basics/Roboto-Regular.abc.name-ids.61,63.ttf | Bin 2208 -> 2192 bytes + .../basics/Roboto-Regular.abc.name-ids.61.ttf | Bin 2008 -> 1988 bytes + .../basics/Roboto-Regular.abc.name-ids.62.ttf | Bin 1876 -> 1856 bytes + .../basics/Roboto-Regular.abc.name-ids.63.ttf | Bin 1932 -> 1912 bytes + ...o-Regular.abc.name-ids.retain-all-codepoint.ttf | Bin 2412 -> 2396 bytes + .../Roboto-Regular.abc.name-languages.61,62,63.ttf | Bin 2412 -> 2396 bytes + .../Roboto-Regular.abc.name-languages.61,63.ttf | Bin 2208 -> 2192 bytes + .../Roboto-Regular.abc.name-languages.61.ttf | Bin 2008 -> 1988 bytes + .../Roboto-Regular.abc.name-languages.62.ttf | Bin 1876 -> 1856 bytes + .../Roboto-Regular.abc.name-languages.63.ttf | Bin 1932 -> 1912 bytes + ...lar.abc.name-languages.retain-all-codepoint.ttf | Bin 2412 -> 2396 bytes + .../Roboto-Regular.abc.name-legacy.61,62,63.ttf | Bin 2412 -> 2396 bytes + .../Roboto-Regular.abc.name-legacy.61,63.ttf | Bin 2208 -> 2192 bytes + .../basics/Roboto-Regular.abc.name-legacy.61.ttf | Bin 2008 -> 1988 bytes + .../basics/Roboto-Regular.abc.name-legacy.62.ttf | Bin 1876 -> 1856 bytes + .../basics/Roboto-Regular.abc.name-legacy.63.ttf | Bin 1932 -> 1912 bytes + ...egular.abc.name-legacy.retain-all-codepoint.ttf | Bin 2412 -> 2396 bytes + ...egular.abc.no-prune-unicode-ranges.61,62,63.ttf | Bin 2412 -> 2396 bytes + ...o-Regular.abc.no-prune-unicode-ranges.61,63.ttf | Bin 2208 -> 2192 bytes + ...boto-Regular.abc.no-prune-unicode-ranges.61.ttf | Bin 2008 -> 1988 bytes + ...boto-Regular.abc.no-prune-unicode-ranges.62.ttf | Bin 1876 -> 1856 bytes + ...boto-Regular.abc.no-prune-unicode-ranges.63.ttf | Bin 1932 -> 1912 bytes + ...o-prune-unicode-ranges.retain-all-codepoint.ttf | Bin 2412 -> 2396 bytes + .../Roboto-Regular.abc.notdef-outline.61,62,63.ttf | Bin 2412 -> 2396 bytes + .../Roboto-Regular.abc.notdef-outline.61,63.ttf | Bin 2208 -> 2192 bytes + .../Roboto-Regular.abc.notdef-outline.61.ttf | Bin 2008 -> 1988 bytes + .../Roboto-Regular.abc.notdef-outline.62.ttf | Bin 1876 -> 1856 bytes + .../Roboto-Regular.abc.notdef-outline.63.ttf | Bin 1932 -> 1912 bytes + ...lar.abc.notdef-outline.retain-all-codepoint.ttf | Bin 2412 -> 2396 bytes + .../Roboto-Regular.abc.retain-gids.61,62,63.ttf | Bin 2412 -> 2396 bytes + .../Roboto-Regular.abc.retain-gids.61,63.ttf | Bin 2224 -> 2204 bytes + .../basics/Roboto-Regular.abc.retain-gids.61.ttf | Bin 2008 -> 1988 bytes + .../basics/Roboto-Regular.abc.retain-gids.62.ttf | Bin 1884 -> 1864 bytes + .../basics/Roboto-Regular.abc.retain-gids.63.ttf | Bin 1948 -> 1928 bytes + ...egular.abc.retain-gids.retain-all-codepoint.ttf | Bin 2412 -> 2396 bytes + .../colrv1_copy_varstore/Foldit.default.41,42.ttf | Bin 43860 -> 43840 bytes + .../colrv1_copy_varstore/Foldit.default.41.ttf | Bin 43048 -> 43028 bytes + .../Foldit.default.retain-all-codepoint.ttf | Bin 44336 -> 44324 bytes + .../Foldit.drop-hints-retain-gids.41,42.ttf | Bin 43836 -> 43816 bytes + .../Foldit.drop-hints-retain-gids.41.ttf | Bin 43032 -> 43012 bytes + ...drop-hints-retain-gids.retain-all-codepoint.ttf | Bin 44300 -> 44288 bytes + .../Foldit.drop-hints.41,42.ttf | Bin 43820 -> 43800 bytes + .../colrv1_copy_varstore/Foldit.drop-hints.41.ttf | Bin 43016 -> 42996 bytes + .../Foldit.drop-hints.retain-all-codepoint.ttf | Bin 44300 -> 44288 bytes + .../Foldit.retain-gids.41,42.ttf | Bin 43876 -> 43856 bytes + .../colrv1_copy_varstore/Foldit.retain-gids.41.ttf | Bin 43064 -> 43044 bytes + .../Foldit.retain-gids.retain-all-codepoint.ttf | Bin 44336 -> 44324 bytes + ...ain-all-codepoint.wght=400,wdth=100,opsz=14.ttf | Bin 6408 -> 6404 bytes + .../Roboto-Regular.default.1FC,21,41,20,62,63.ttf | Bin 3004 -> 2984 bytes + ...ar.default.61,62,63,64,65,66,67,68,69,6A,6B.ttf | Bin 4800 -> 4780 bytes + .../full-font/Roboto-Regular.default.61,62,63.ttf | Bin 2632 -> 2616 bytes + .../Roboto-Regular.default.D7,D8,D9,DA,DE.ttf | Bin 2960 -> 2944 bytes + ...oboto-Regular.drop-hints.1FC,21,41,20,62,63.ttf | Bin 1556 -> 1536 bytes + ...drop-hints.61,62,63,64,65,66,67,68,69,6A,6B.ttf | Bin 2452 -> 2432 bytes + .../Roboto-Regular.drop-hints.61,62,63.ttf | Bin 1372 -> 1356 bytes + .../Roboto-Regular.drop-hints.D7,D8,D9,DA,DE.ttf | Bin 1584 -> 1568 bytes + ....filter-scripts-features.1FC,21,41,20,62,63.ttf | Bin 2856 -> 2836 bytes + ...ilter-scripts-features.2.1FC,21,41,20,62,63.ttf | Bin 2856 -> 2836 bytes + ...features.2.61,62,63,64,65,66,67,68,69,6A,6B.ttf | Bin 4560 -> 4540 bytes + ...-Regular.filter-scripts-features.2.61,62,63.ttf | Bin 2484 -> 2468 bytes + ...ar.filter-scripts-features.2.D7,D8,D9,DA,DE.ttf | Bin 2828 -> 2812 bytes + ...s-features.61,62,63,64,65,66,67,68,69,6A,6B.ttf | Bin 3932 -> 3916 bytes + ...to-Regular.filter-scripts-features.61,62,63.ttf | Bin 2484 -> 2468 bytes + ...ular.filter-scripts-features.D7,D8,D9,DA,DE.ttf | Bin 2828 -> 2812 bytes + ...o-Regular.filter-scripts.1FC,21,41,20,62,63.ttf | Bin 2972 -> 2952 bytes + ...er-scripts.61,62,63,64,65,66,67,68,69,6A,6B.ttf | Bin 4140 -> 4124 bytes + .../Roboto-Regular.filter-scripts.61,62,63.ttf | Bin 2600 -> 2584 bytes + ...oboto-Regular.filter-scripts.D7,D8,D9,DA,DE.ttf | Bin 2928 -> 2912 bytes + ...oboto-Regular.no-scripts.1FC,21,41,20,62,63.ttf | Bin 2836 -> 2816 bytes + ...no-scripts.61,62,63,64,65,66,67,68,69,6A,6B.ttf | Bin 3912 -> 3896 bytes + .../Roboto-Regular.no-scripts.61,62,63.ttf | Bin 2464 -> 2448 bytes + .../Roboto-Regular.no-scripts.D7,D8,D9,DA,DE.ttf | Bin 2808 -> 2792 bytes + ....filter-scripts-features.1FC,21,41,20,62,63.ttf | Bin 3476 -> 3472 bytes + ...ilter-scripts-features.2.1FC,21,41,20,62,63.ttf | Bin 3476 -> 3472 bytes + ...features.2.61,62,63,64,65,66,67,68,69,6A,6B.ttf | Bin 8700 -> 8696 bytes + ...le-Roman.filter-scripts-features.2.61,62,63.ttf | Bin 3476 -> 3472 bytes + ...an.filter-scripts-features.2.D7,D8,D9,DA,DE.ttf | Bin 3948 -> 3940 bytes + ...s-features.61,62,63,64,65,66,67,68,69,6A,6B.ttf | Bin 6584 -> 6580 bytes + ...able-Roman.filter-scripts-features.61,62,63.ttf | Bin 3476 -> 3472 bytes + ...oman.filter-scripts-features.D7,D8,D9,DA,DE.ttf | Bin 3948 -> 3940 bytes + ...ariable-Roman.no-scripts.1FC,21,41,20,62,63.ttf | Bin 3456 -> 3452 bytes + ...no-scripts.61,62,63,64,65,66,67,68,69,6A,6B.ttf | Bin 6564 -> 6560 bytes + ...urceSerifVariable-Roman.no-scripts.61,62,63.ttf | Bin 3456 -> 3452 bytes + ...rifVariable-Roman.no-scripts.D7,D8,D9,DA,DE.ttf | Bin 3928 -> 3920 bytes + ...fault.retain-all-codepoint.wght=150,wdth=80.ttf | Bin 114200 -> 114196 bytes + ...fault.retain-all-codepoint.wght=300,wdth=90.ttf | Bin 114300 -> 114296 bytes + ...anges.retain-all-codepoint.wght=150,wdth=80.ttf | Bin 114200 -> 114196 bytes + ...anges.retain-all-codepoint.wght=300,wdth=90.ttf | Bin 114300 -> 114296 bytes + ...n-all-codepoint.wght=200-300-500,wdth=80-90.ttf | Bin 8728 -> 8708 bytes + ...t.retain-all-codepoint.wght=300-600,wdth=85.ttf | Bin 7612 -> 7592 bytes + ...n-all-codepoint.wght=200-300-500,wdth=80-90.ttf | Bin 7592 -> 7568 bytes + ...t.retain-all-codepoint.wght=300-600,wdth=85.ttf | Bin 6956 -> 6932 bytes + ...oto-Regular.glyph_map_roboto.41,43,61,66,69.ttf | Bin 3996 -> 3980 bytes + .../MPLUS1-Variable.default.30DD.wght=100.ttf | Bin 1460 -> 1404 bytes + .../MPLUS1-Variable.default.30DD.wght=400.ttf | Bin 1712 -> 1656 bytes + ...retain-all-codepoint.wght=100,ELGR=1,ELSH=2.ttf | Bin 2244 -> 2224 bytes + ...retain-all-codepoint.wght=100,ELGR=1,ELSH=2.ttf | Bin 2696 -> 2676 bytes + ...F-ABC.default.retain-all-codepoint.wght=800.otf | Bin 1508 -> 1488 bytes + ...C.retain-gids.retain-all-codepoint.wght=800.otf | Bin 1508 -> 1488 bytes + ...oldit.default.retain-all-codepoint.wght=900.ttf | Bin 2508 -> 2488 bytes + ...fault.retain-all-codepoint.wght=200,wdth=90.ttf | Bin 6760 -> 6736 bytes + ...fault.retain-all-codepoint.wght=650,wdth=85.ttf | Bin 6712 -> 6688 bytes + ...fault.retain-all-codepoint.wght=200,wdth=90.ttf | Bin 6440 -> 6416 bytes + ...fault.retain-all-codepoint.wght=650,wdth=85.ttf | Bin 6392 -> 6368 bytes + .../Roboto-Regular.default.1E00,303.ttf | Bin 2472 -> 2464 bytes + .../layout.gdef/Roboto-Regular.default.303.ttf | Bin 2076 -> 2068 bytes + .../Roboto-Regular.default.309,20,30F.ttf | Bin 2148 -> 2140 bytes + .../layout.gdef/Roboto-Regular.default.323.ttf | Bin 1968 -> 1960 bytes + .../Roboto-Regular.default.41,42,43.ttf | Bin 2532 -> 2516 bytes + .../Roboto-Regular.drop-hints.1E00,303.ttf | Bin 1328 -> 1320 bytes + .../layout.gdef/Roboto-Regular.drop-hints.303.ttf | Bin 1072 -> 1064 bytes + .../Roboto-Regular.drop-hints.309,20,30F.ttf | Bin 1108 -> 1100 bytes + .../layout.gdef/Roboto-Regular.drop-hints.323.ttf | Bin 1016 -> 1008 bytes + .../Roboto-Regular.drop-hints.41,42,43.ttf | Bin 1348 -> 1332 bytes + .../Roboto-Regular.keep-gdef-gpos.1E00,303.ttf | Bin 2472 -> 2464 bytes + .../Roboto-Regular.keep-gdef-gpos.303.ttf | Bin 2076 -> 2068 bytes + .../Roboto-Regular.keep-gdef-gpos.309,20,30F.ttf | Bin 2148 -> 2140 bytes + .../Roboto-Regular.keep-gdef-gpos.323.ttf | Bin 1968 -> 1960 bytes + .../Roboto-Regular.keep-gdef-gpos.41,42,43.ttf | Bin 2532 -> 2516 bytes + ...ular.default.627,644,623,62D,644,627,645,2E.ttf | Bin 17564 -> 17552 bytes + ...astaliqUrdu-Regular.default.627,644,62D,628.ttf | Bin 24532 -> 24520 bytes + .../NotoNastaliqUrdu-Regular.default.627,644.ttf | Bin 7776 -> 7752 bytes + ...-Regular.default.633,645,627,621,20,644,627.ttf | Bin 23232 -> 23212 bytes + .../NotoNastaliqUrdu-Regular.default.633,6D2.ttf | Bin 14292 -> 14280 bytes + ...otoNastaliqUrdu-Regular.default.63A,64A,631.ttf | Bin 26124 -> 26116 bytes + ....retain-gids.627,644,623,62D,644,627,645,2E.ttf | Bin 24224 -> 24212 bytes + ...liqUrdu-Regular.retain-gids.627,644,62D,628.ttf | Bin 30432 -> 30420 bytes + ...otoNastaliqUrdu-Regular.retain-gids.627,644.ttf | Bin 13380 -> 13360 bytes + ...ular.retain-gids.633,645,627,621,20,644,627.ttf | Bin 28888 -> 28864 bytes + ...otoNastaliqUrdu-Regular.retain-gids.633,6D2.ttf | Bin 20132 -> 20120 bytes + ...astaliqUrdu-Regular.retain-gids.63A,64A,631.ttf | Bin 31984 -> 31976 bytes + ...HebrewLatin-Regular.default.392,3a7,3b2,3c7.ttf | Bin 2464 -> 2404 bytes + ...wLatin-Regular.default.retain-all-codepoint.ttf | Bin 129952 -> 129896 bytes + ...ewLatin-Regular.layout-test.392,3a7,3b2,3c7.ttf | Bin 2588 -> 2528 bytes + ...in-Regular.layout-test.retain-all-codepoint.ttf | Bin 151928 -> 151868 bytes + ...ewLatin-Regular.retain-gids.392,3a7,3b2,3c7.ttf | Bin 13484 -> 13424 bytes + ...in-Regular.retain-gids.retain-all-codepoint.ttf | Bin 133056 -> 132996 bytes + .../Roboto-Regular.smallcaps.default.41,42,43.ttf | Bin 2424 -> 2408 bytes + .../Roboto-Regular.smallcaps.default.41,43.ttf | Bin 2232 -> 2216 bytes + .../layout/Roboto-Regular.smallcaps.default.41.ttf | Bin 2044 -> 2024 bytes + .../layout/Roboto-Regular.smallcaps.default.43.ttf | Bin 2076 -> 2056 bytes + .../Roboto-Regular.smallcaps.default.CA,CB.ttf | Bin 2348 -> 2332 bytes + ...boto-Regular.smallcaps.retain-gids.41,42,43.ttf | Bin 2676 -> 2660 bytes + .../Roboto-Regular.smallcaps.retain-gids.41,43.ttf | Bin 2496 -> 2476 bytes + .../Roboto-Regular.smallcaps.retain-gids.41.ttf | Bin 2296 -> 2276 bytes + .../Roboto-Regular.smallcaps.retain-gids.43.ttf | Bin 2344 -> 2324 bytes + .../Roboto-Regular.smallcaps.retain-gids.CA,CB.ttf | Bin 6436 -> 6420 bytes + ...odepoint.wght=200-600,wdth=80-90,CTGR=20-60.ttf | Bin 4324 -> 4300 bytes + ...c.default.retain-all-codepoint.wght=300-600.ttf | Bin 6832 -> 6808 bytes + ...c.default.retain-all-codepoint.wght=500-800.ttf | Bin 7312 -> 7288 bytes + ...-Regular.no-layout-closure-gids.no-unicodes.ttf | Bin 2612 -> 2592 bytes + ...Regular.no-layout-closure-gids2.no-unicodes.ttf | Bin 2800 -> 2780 bytes + ...lt.retain-all-codepoint.wght=400,wdth=100.0.ttf | Bin 6804 -> 6780 bytes + ...ult.retain-all-codepoint.wght=drop,wdth=100.ttf | Bin 6804 -> 6780 bytes + .../Roboto-Regular.gids.61,62,63,30D9.ttf | Bin 2680 -> 2664 bytes + 267 files changed, 0 insertions(+), 0 deletions(-) + +commit 8ceed6ee72edd49163714e8f4ce072f104f58277 +Author: Qunxin Liu +Date: Wed Oct 18 15:43:40 2023 -0700 + + [subset] fix Lookup.MarkFilteringSet to use the new indices + + src/OT/Layout/GDEF/GDEF.hh | 23 +++++++++++++++++++++++ + src/hb-ot-layout-common.hh | 16 +++++++++++++--- + src/hb-subset-plan-member-list.hh | 3 +++ + src/hb-subset-plan.cc | 21 +++++++++++++++++++++ + 4 files changed, 60 insertions(+), 3 deletions(-) + +commit 510456e9532734af5417b43be71e9e4acc460c7b +Author: Qunxin Liu +Date: Wed Oct 18 14:26:11 2023 -0700 + + [subset] don't retain empty coverage in MarkGlyphSetsDef + + src/OT/Layout/GDEF/GDEF.hh | 15 +++++++++++---- + 1 file changed, 11 insertions(+), 4 deletions(-) + +commit 16ee24c050660b7075a16c1a1b9f5702e38b65f4 +Author: Qunxin Liu +Date: Wed Oct 18 12:43:36 2023 -0700 + + [subset] bug fix for GDEF + + don't use embed(this), snapshot and revert to lower version if needed + + src/OT/Layout/GDEF/GDEF.hh | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +commit bde6fb83ea6b0c68d17e2d6362f52fdb2828f6ab +Author: Qunxin Liu +Date: Wed Oct 18 10:21:02 2023 -0700 + + add missing file for test empty_region_vardata + + test/subset/data/fonts/RobotoFlex-Variable.ABC.ttf | Bin 0 -> 27440 bytes + 1 file changed, 0 insertions(+), 0 deletions(-) + +commit 57dac23d794cac20f94396f5da60d4745df9d39c +Author: Qunxin Liu +Date: Tue Oct 17 17:11:13 2023 -0700 + + [instancer] add tests + + Also update tests to gei rid of no-tables-with-item-variations profile + + test/subset/data/Makefile.am | 1 + + test/subset/data/Makefile.sources | 1 + + ...ault.retain-all-codepoint.wght=200-300,opsz=14.ttf | Bin 0 -> 10136 bytes + ...retain-all-codepoint.wght=400,wdth=100,opsz=14.ttf | Bin 0 -> 6408 bytes + ...ain-all-codepoint.wght=200-300-500,wdth=80-90.ttf} | Bin + ...ult.retain-all-codepoint.wght=300-600,wdth=85.ttf} | Bin + ...ain-all-codepoint.wght=200-300-500,wdth=80-90.ttf} | Bin + ...ult.retain-all-codepoint.wght=300-600,wdth=85.ttf} | Bin + ...-codepoint.wght=200-600,wdth=80-90,CTGR=20-60.ttf} | Bin 4340 -> 4324 bytes + ...abc.default.retain-all-codepoint.wght=300-600.ttf} | Bin 6848 -> 6832 bytes + ...abc.default.retain-all-codepoint.wght=500-800.ttf} | Bin 7328 -> 7312 bytes + ...man.default.retain-all-codepoint.wght=300-600.ttf} | Bin + ...man.default.retain-all-codepoint.wght=500-800.ttf} | Bin + .../data/profiles/no-tables-with-item-variations.txt | 1 - + test/subset/data/tests/empty_region_vardata.tests | 13 +++++++++++++ + test/subset/data/tests/glyf_partial_instancing.tests | 2 +- + test/subset/data/tests/mvar_partial_instance.tests | 2 +- + test/subset/data/tests/update_def_wght.tests | 2 +- + test/subset/meson.build | 1 + + 19 files changed, 19 insertions(+), 4 deletions(-) + +commit 8585d600c400d541741c3553aa5e14083076560c +Author: Qunxin Liu +Date: Tue Oct 17 14:30:17 2023 -0700 + + [instancer] update variable device flags in ValueFormat + + src/OT/Layout/GPOS/Common.hh | 2 +- + src/OT/Layout/GPOS/PairPosFormat1.hh | 38 ++++++++++++++++++------------- + src/OT/Layout/GPOS/PairPosFormat2.hh | 24 ++++++++++++-------- + src/OT/Layout/GPOS/SinglePos.hh | 11 ++++----- + src/OT/Layout/GPOS/SinglePosFormat1.hh | 2 +- + src/OT/Layout/GPOS/SinglePosFormat2.hh | 2 +- + src/OT/Layout/GPOS/ValueFormat.hh | 41 +++++++++++++++++++++++++++++++--- + 7 files changed, 84 insertions(+), 36 deletions(-) + +commit 1a5dd610beed2f6afd0d4f369b57c814e2b9abb6 +Author: Qunxin Liu +Date: Mon Oct 16 09:47:16 2023 -0700 + + [instancer] retain empty rows when region is empty and item_count is not + + src/hb-ot-var-common.hh | 30 ++++++++++++++++++++---------- + 1 file changed, 20 insertions(+), 10 deletions(-) + +commit 45a7f9cec377df71de4a512720d695186cc23afa +Author: David Manthey +Date: Wed Oct 18 08:28:23 2023 -0400 + + Change the shebang used for python + + The shebang `/usr/bin/python3` assumes python3 is installed in /usr/bin, + which isn't always true (e.g., in the manylinux docker image). Using + `/usr/bin/env python3` uses the python3 that is in the path, which is + more flexible. + + src/relative_to.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + commit 18a6e78549e8e04a281129ea8ca784ce85f111b8 Author: Khaled Hosny Date: Wed Oct 18 01:10:44 2023 +0300 diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/INSTALL b/Build/source/libs/harfbuzz/harfbuzz-src/INSTALL index 8865734f81b..e82fd21de2e 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/INSTALL +++ b/Build/source/libs/harfbuzz/harfbuzz-src/INSTALL @@ -1,8 +1,8 @@ Installation Instructions ************************* - Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software -Foundation, Inc. + Copyright (C) 1994-1996, 1999-2002, 2004-2017, 2020-2021 Free +Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -225,7 +225,7 @@ order to use an ANSI C compiler: and if that doesn't work, install pre-built binaries of GCC for HP-UX. - HP-UX 'make' updates targets which have the same time stamps as their + HP-UX 'make' updates targets which have the same timestamps as their prerequisites, which makes it generally unusable when shipped generated files such as 'configure' are involved. Use GNU 'make' instead. diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/Makefile.am b/Build/source/libs/harfbuzz/harfbuzz-src/Makefile.am index c14b4b7c20c..ec53d67bd0a 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/Makefile.am +++ b/Build/source/libs/harfbuzz/harfbuzz-src/Makefile.am @@ -26,6 +26,7 @@ EXTRA_DIST = \ subprojects/ragel.wrap \ subprojects/packagefiles/ragel/meson.build \ mingw-configure.sh \ + xkcd.png \ $(NULL) MAINTAINERCLEANFILES = \ diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/NEWS b/Build/source/libs/harfbuzz/harfbuzz-src/NEWS index 9154938d70f..386a1067367 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/NEWS +++ b/Build/source/libs/harfbuzz/harfbuzz-src/NEWS @@ -1,3 +1,18 @@ +Overview of changes leading to 8.3.0 +Saturday, November 11, 2023 +==================================== +- Improve memory barrier to fix potential segfaults. +- Various build fixes. +- Various subsetting and instancing fixes. +- Rename “hb-subset” option “--instance” to “--variations” to match the other + tools. Old option is kept as an alias. + +- New API: +HB_AAT_LAYOUT_FEATURE_TYPE_CURSIVE_CONNECTION + +- Deprecated API: +HB_AAT_LAYOUT_FEATURE_TYPE_CURISVE_CONNECTION + Overview of changes leading to 8.2.2 Wednesday, October 18, 2023 “From the river to the sea, Palestine will be free” diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/README b/Build/source/libs/harfbuzz/harfbuzz-src/README index 099d4b7719c..33165091a8b 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/README +++ b/Build/source/libs/harfbuzz/harfbuzz-src/README @@ -13,8 +13,10 @@ HarfBuzz is a text shaping engine. It primarily supports [OpenType][1], but also [Apple Advanced Typography][2]. HarfBuzz is used in Android, Chrome, ChromeOS, Firefox, GNOME, GTK+, KDE, Qt, LibreOffice, OpenJDK, XeTeX, -PlayStation, Microsoft Edge, Photoshop, Illustrator, InDesign, -and other places. +PlayStation, Microsoft Edge, Adobe Photoshop, Illustrator, InDesign, +Godot Engine, and other places. + +[![xkcd-derived image](xkcd.png)](https://xkcd.com/2347/) For bug reports, mailing list, and other information please visit: diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/README.md b/Build/source/libs/harfbuzz/harfbuzz-src/README.md index 099d4b7719c..33165091a8b 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/README.md +++ b/Build/source/libs/harfbuzz/harfbuzz-src/README.md @@ -13,8 +13,10 @@ HarfBuzz is a text shaping engine. It primarily supports [OpenType][1], but also [Apple Advanced Typography][2]. HarfBuzz is used in Android, Chrome, ChromeOS, Firefox, GNOME, GTK+, KDE, Qt, LibreOffice, OpenJDK, XeTeX, -PlayStation, Microsoft Edge, Photoshop, Illustrator, InDesign, -and other places. +PlayStation, Microsoft Edge, Adobe Photoshop, Illustrator, InDesign, +Godot Engine, and other places. + +[![xkcd-derived image](xkcd.png)](https://xkcd.com/2347/) For bug reports, mailing list, and other information please visit: diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/config.h.in b/Build/source/libs/harfbuzz/harfbuzz-src/config.h.in index ab960fbed4f..078c73e6267 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/config.h.in +++ b/Build/source/libs/harfbuzz/harfbuzz-src/config.h.in @@ -76,9 +76,6 @@ /* Define to 1 if you have the `isatty' function. */ #undef HAVE_ISATTY -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - /* Define to 1 if you have the `mmap' function. */ #undef HAVE_MMAP @@ -103,6 +100,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H +/* Define to 1 if you have the header file. */ +#undef HAVE_STDIO_H + /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H @@ -173,14 +173,11 @@ your system. */ #undef PTHREAD_CREATE_JOINABLE -/* Define to 1 if you have the ANSI C header files. */ +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ #undef STDC_HEADERS -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 -#endif - /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac b/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac index fbcd25747cd..0d5b3d96751 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], - [8.2.2], + [8.3.0], [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 05ab1abb9fc..e8723b931ae 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: '8.2.2', + version: '8.3.0', default_options: [ 'cpp_eh=none', # Just to support msvc, we are passing -fno-exceptions also anyway # 'cpp_rtti=false', # Do NOT enable, wraps inherit it and ICU needs RTTI diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/CBDT/CBDT.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/CBDT/CBDT.hh index 457039bfc6c..bcf1848f498 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/CBDT/CBDT.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/CBDT/CBDT.hh @@ -204,6 +204,7 @@ struct IndexSubtable { TRACE_SANITIZE (this); if (!u.header.sanitize (c)) return_trace (false); + hb_barrier (); switch (u.header.indexFormat) { case 1: return_trace (u.format1.sanitize (c, glyph_count)); @@ -378,6 +379,7 @@ struct IndexSubtableRecord { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && + hb_barrier () && firstGlyphIndex <= lastGlyphIndex && offsetToSubtable.sanitize (c, base, lastGlyphIndex - firstGlyphIndex + 1)); } @@ -635,6 +637,7 @@ struct BitmapSizeTable { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && + hb_barrier () && indexSubtableArrayOffset.sanitize (c, base, numberOfIndexSubtables) && horizontal.sanitize (c) && vertical.sanitize (c)); @@ -738,7 +741,9 @@ struct CBLC { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && + hb_barrier () && likely (version.major == 2 || version.major == 3) && + hb_barrier () && sizeTables.sanitize (c, this)); } @@ -975,6 +980,7 @@ struct CBDT { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && + hb_barrier () && likely (version.major == 2 || version.major == 3)); } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/COLR/COLR.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/COLR/COLR.hh index 60b094ecbc8..b632a1d9eba 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/COLR/COLR.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/COLR/COLR.hh @@ -1948,10 +1948,11 @@ struct COLR bool has_v0_data () const { return numBaseGlyphs; } bool has_v1_data () const { - if (version == 1) - return (this+baseGlyphList).len > 0; + if (version != 1) + return false; + hb_barrier (); - return false; + return (this+baseGlyphList).len > 0; } unsigned int get_glyph_layers (hb_codepoint_t glyph, @@ -2032,6 +2033,8 @@ struct COLR hb_set_t *palette_indices) const { if (version != 1) return; + hb_barrier (); + hb_set_t visited_glyphs; hb_colrv1_closure_context_t c (this, &visited_glyphs, layer_indices, palette_indices); @@ -2058,10 +2061,12 @@ struct COLR { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && + hb_barrier () && (this+baseGlyphsZ).sanitize (c, numBaseGlyphs) && (this+layersZ).sanitize (c, numLayers) && (version == 0 || - (version == 1 && + (hb_barrier () && + version == 1 && baseGlyphList.sanitize (c, this) && layerList.sanitize (c, this) && clipList.sanitize (c, this) && @@ -2284,6 +2289,8 @@ struct COLR { if (version == 1) { + hb_barrier (); + const Paint *paint = get_base_glyph_paint (glyph); return paint != nullptr; @@ -2313,6 +2320,8 @@ struct COLR if (version == 1) { + hb_barrier (); + const Paint *paint = get_base_glyph_paint (glyph); if (paint) { diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/CPAL/CPAL.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/CPAL/CPAL.hh index c07716c1c98..2821334db7c 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/CPAL/CPAL.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/CPAL/CPAL.hh @@ -214,13 +214,17 @@ struct CPAL hb_set_t *nameids_to_retain /* OUT */) const { if (version == 1) + { + hb_barrier (); v1 ().collect_name_ids (this, numPalettes, numColors, color_index_map, nameids_to_retain); + } } private: const CPALV1Tail& v1 () const { if (version == 0) return Null (CPALV1Tail); + hb_barrier (); return StructAfter (*this); } @@ -312,7 +316,10 @@ struct CPAL return_trace (false); if (version == 1) + { + hb_barrier (); return_trace (v1 ().serialize (c->serializer, numPalettes, numColors, this, color_index_map)); + } return_trace (true); } @@ -321,6 +328,7 @@ struct CPAL { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && + hb_barrier () && (this+colorRecordsZ).sanitize (c, numColorRecords) && colorRecordIndicesZ.sanitize (c, numPalettes) && (version == 0 || v1 ().sanitize (c, this, numPalettes, numColors))); diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/sbix/sbix.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/sbix/sbix.hh index ce8693cfb16..51ae1a9c63b 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/sbix/sbix.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/sbix/sbix.hh @@ -368,6 +368,7 @@ struct sbix { TRACE_SANITIZE (this); return_trace (likely (c->check_struct (this) && + hb_barrier () && version >= 1 && strikes.sanitize (c, this))); } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/svg/svg.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/svg/svg.hh index c7d91b88ee0..2e1f935109d 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/svg/svg.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/svg/svg.hh @@ -56,6 +56,7 @@ struct SVGDocumentIndexEntry { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && + hb_barrier () && svgDoc.sanitize (c, base, svgDocLength)); } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/Common/Coverage.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/Common/Coverage.hh index 25056c9bc35..344e87afb30 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/Common/Coverage.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/Common/Coverage.hh @@ -64,6 +64,7 @@ struct Coverage { TRACE_SANITIZE (this); if (!u.format.sanitize (c)) return_trace (false); + hb_barrier (); switch (u.format) { case 1: return_trace (u.format1.sanitize (c)); diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GDEF/GDEF.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GDEF/GDEF.hh index dd025c1284d..14a9b5e5cd8 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GDEF/GDEF.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GDEF/GDEF.hh @@ -291,6 +291,7 @@ struct CaretValue { TRACE_SANITIZE (this); if (!u.format.sanitize (c)) return_trace (false); + hb_barrier (); switch (u.format) { case 1: return_trace (u.format1.sanitize (c)); case 2: return_trace (u.format2.sanitize (c)); @@ -441,6 +442,20 @@ struct MarkGlyphSetsFormat1 bool covers (unsigned int set_index, hb_codepoint_t glyph_id) const { return (this+coverage[set_index]).get_coverage (glyph_id) != NOT_COVERED; } + void collect_used_mark_sets (const hb_set_t& glyph_set, + hb_set_t& used_mark_sets /* OUT */) const + { + unsigned i = 0; + for (const auto &offset : coverage) + { + const auto &cov = this+offset; + if (cov.intersects (&glyph_set)) + used_mark_sets.add (i); + + i++; + } + } + template void collect_coverage (hb_vector_t &sets) const { @@ -461,6 +476,7 @@ struct MarkGlyphSetsFormat1 bool ret = true; for (const Offset32To& offset : coverage.iter ()) { + auto snap = c->serializer->snapshot (); auto *o = out->coverage.serialize_append (c->serializer); if (unlikely (!o)) { @@ -468,11 +484,17 @@ struct MarkGlyphSetsFormat1 break; } - //not using o->serialize_subset (c, offset, this, out) here because - //OTS doesn't allow null offset. - //See issue: https://github.com/khaledhosny/ots/issues/172 + //skip empty coverage c->serializer->push (); - c->dispatch (this+offset); + bool res = false; + if (offset) res = c->dispatch (this+offset); + if (!res) + { + c->serializer->pop_discard (); + c->serializer->revert (snap); + (out->coverage.len)--; + continue; + } c->serializer->add_link (*o, c->serializer->pop_pack ()); } @@ -513,6 +535,15 @@ struct MarkGlyphSets } } + void collect_used_mark_sets (const hb_set_t& glyph_set, + hb_set_t& used_mark_sets /* OUT */) const + { + switch (u.format) { + case 1: u.format1.collect_used_mark_sets (glyph_set, used_mark_sets); return; + default:return; + } + } + bool subset (hb_subset_context_t *c) const { TRACE_SUBSET (this); @@ -526,6 +557,7 @@ struct MarkGlyphSets { TRACE_SANITIZE (this); if (!u.format.sanitize (c)) return_trace (false); + hb_barrier (); switch (u.format) { case 1: return_trace (u.format1.sanitize (c)); default:return_trace (true); @@ -600,6 +632,7 @@ struct GDEFVersion1_2 attachList.sanitize (c, this) && ligCaretList.sanitize (c, this) && markAttachClassDef.sanitize (c, this) && + hb_barrier () && (version.to_int () < 0x00010002u || markGlyphSetsDef.sanitize (c, this)) && (version.to_int () < 0x00010003u || varStore.sanitize (c, this))); } @@ -627,23 +660,28 @@ struct GDEFVersion1_2 bool subset (hb_subset_context_t *c) const { TRACE_SUBSET (this); - auto *out = c->serializer->embed (*this); - if (unlikely (!out)) return_trace (false); + auto *out = c->serializer->start_embed (*this); + if (unlikely (!c->serializer->extend_min (out))) return_trace (false); + out->version.major = version.major; + out->version.minor = version.minor; bool subset_glyphclassdef = out->glyphClassDef.serialize_subset (c, glyphClassDef, this, nullptr, false, true); bool subset_attachlist = out->attachList.serialize_subset (c, attachList, this); - bool subset_ligcaretlist = out->ligCaretList.serialize_subset (c, ligCaretList, this); bool subset_markattachclassdef = out->markAttachClassDef.serialize_subset (c, markAttachClassDef, this, nullptr, false, true); bool subset_markglyphsetsdef = false; + auto snapshot_version0 = c->serializer->snapshot (); if (version.to_int () >= 0x00010002u) { + if (unlikely (!c->serializer->embed (markGlyphSetsDef))) return_trace (false); subset_markglyphsetsdef = out->markGlyphSetsDef.serialize_subset (c, markGlyphSetsDef, this); } bool subset_varstore = false; + auto snapshot_version2 = c->serializer->snapshot (); if (version.to_int () >= 0x00010003u) { + if (unlikely (!c->serializer->embed (varStore))) return_trace (false); if (c->plan->all_axes_pinned) out->varStore = 0; else if (c->plan->normalized_coords) @@ -666,15 +704,21 @@ struct GDEFVersion1_2 subset_varstore = out->varStore.serialize_subset (c, varStore, this, c->plan->gdef_varstore_inner_maps.as_array ()); } + if (subset_varstore) { out->version.minor = 3; + c->plan->has_gdef_varstore = true; } else if (subset_markglyphsetsdef) { out->version.minor = 2; + c->serializer->revert (snapshot_version2); } else { out->version.minor = 0; + c->serializer->revert (snapshot_version0); } + bool subset_ligcaretlist = out->ligCaretList.serialize_subset (c, ligCaretList, this); + return_trace (subset_glyphclassdef || subset_attachlist || subset_ligcaretlist || subset_markattachclassdef || (out->version.to_int () >= 0x00010002u && subset_markglyphsetsdef) || @@ -709,6 +753,7 @@ struct GDEF { TRACE_SANITIZE (this); if (unlikely (!u.version.sanitize (c))) return_trace (false); + hb_barrier (); switch (u.version.major) { case 1: return_trace (u.version1.sanitize (c)); #ifndef HB_NO_BEYOND_64K diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/Anchor.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/Anchor.hh index 49e76e77509..7802e397f4c 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/Anchor.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/Anchor.hh @@ -25,6 +25,7 @@ struct Anchor { TRACE_SANITIZE (this); if (!u.format.sanitize (c)) return_trace (false); + hb_barrier (); switch (u.format) { case 1: return_trace (u.format1.sanitize (c)); case 2: return_trace (u.format2.sanitize (c)); diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/AnchorFormat3.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/AnchorFormat3.hh index 56eda4a5778..b5422652c4e 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/AnchorFormat3.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/AnchorFormat3.hh @@ -38,9 +38,15 @@ struct AnchorFormat3 *y = font->em_fscale_y (yCoordinate); if ((font->x_ppem || font->num_coords) && xDeviceTable.sanitize (&c->sanitizer, this)) + { + hb_barrier (); *x += (this+xDeviceTable).get_x_delta (font, c->var_store, c->var_store_cache); + } if ((font->y_ppem || font->num_coords) && yDeviceTable.sanitize (&c->sanitizer, this)) + { + hb_barrier (); *y += (this+yDeviceTable).get_y_delta (font, c->var_store, c->var_store_cache); + } } bool subset (hb_subset_context_t *c) const diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/AnchorMatrix.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/AnchorMatrix.hh index 37ba7916f2a..2557e9a7231 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/AnchorMatrix.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/AnchorMatrix.hh @@ -8,7 +8,7 @@ namespace GPOS_impl { struct AnchorMatrix { HBUINT16 rows; /* Number of rows */ - UnsizedArrayOf> + UnsizedArrayOf> matrixZ; /* Matrix of offsets to Anchor tables-- * from beginning of AnchorMatrix table */ public: @@ -18,6 +18,7 @@ struct AnchorMatrix { TRACE_SANITIZE (this); if (!c->check_struct (this)) return_trace (false); + hb_barrier (); if (unlikely (hb_unsigned_mul_overflows (rows, cols))) return_trace (false); unsigned int count = rows * cols; if (!c->check_array (matrixZ.arrayZ, count)) return_trace (false); @@ -25,6 +26,7 @@ struct AnchorMatrix if (c->lazy_some_gpos) return_trace (true); + hb_barrier (); for (unsigned int i = 0; i < count; i++) if (!matrixZ[i].sanitize (c, this)) return_trace (false); return_trace (true); @@ -38,6 +40,7 @@ struct AnchorMatrix if (unlikely (row >= rows || col >= cols)) return Null (Anchor); auto &offset = matrixZ[row * cols + col]; if (unlikely (!offset.sanitize (&c->sanitizer, this))) return Null (Anchor); + hb_barrier (); *found = !offset.is_null (); return this+offset; } @@ -65,15 +68,14 @@ struct AnchorMatrix if (unlikely (!c->serializer->extend_min (out))) return_trace (false); out->rows = num_rows; - bool ret = false; for (const unsigned i : index_iter) { auto *offset = c->serializer->embed (matrixZ[i]); if (!offset) return_trace (false); - ret |= offset->serialize_subset (c, matrixZ[i], this); + offset->serialize_subset (c, matrixZ[i], this); } - return_trace (ret); + return_trace (true); } }; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/Common.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/Common.hh index 408197454f1..696d25d75c8 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/Common.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/Common.hh @@ -23,7 +23,7 @@ static void SinglePos_serialize (hb_serialize_context_t *c, const SrcLookup *src, Iterator it, const hb_hashmap_t> *layout_variation_idx_delta_map, - bool all_axes_pinned); + unsigned new_format); } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/CursivePosFormat1.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/CursivePosFormat1.hh index 7c42c3f777a..6b019ac513b 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/CursivePosFormat1.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/CursivePosFormat1.hh @@ -11,21 +11,21 @@ struct EntryExitRecord { friend struct CursivePosFormat1; - bool sanitize (hb_sanitize_context_t *c, const void *base) const + bool sanitize (hb_sanitize_context_t *c, const struct CursivePosFormat1 *base) const { TRACE_SANITIZE (this); return_trace (entryAnchor.sanitize (c, base) && exitAnchor.sanitize (c, base)); } void collect_variation_indices (hb_collect_variation_indices_context_t *c, - const void *src_base) const + const struct CursivePosFormat1 *src_base) const { (src_base+entryAnchor).collect_variation_indices (c); (src_base+exitAnchor).collect_variation_indices (c); } bool subset (hb_subset_context_t *c, - const void *src_base) const + const struct CursivePosFormat1 *src_base) const { TRACE_SERIALIZE (this); auto *out = c->serializer->embed (this); @@ -38,11 +38,11 @@ struct EntryExitRecord } protected: - Offset16To + Offset16To entryAnchor; /* Offset to EntryAnchor table--from * beginning of CursivePos * subtable--may be NULL */ - Offset16To + Offset16To exitAnchor; /* Offset to ExitAnchor table--from * beginning of CursivePos * subtable--may be NULL */ @@ -128,6 +128,7 @@ struct CursivePosFormat1 const EntryExitRecord &this_record = entryExitRecord[(this+coverage).get_coverage (buffer->cur().codepoint)]; if (!this_record.entryAnchor || unlikely (!this_record.entryAnchor.sanitize (&c->sanitizer, this))) return_trace (false); + hb_barrier (); hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input; skippy_iter.reset_fast (buffer->idx); @@ -145,6 +146,7 @@ struct CursivePosFormat1 buffer->unsafe_to_concat_from_outbuffer (skippy_iter.idx, buffer->idx + 1); return_trace (false); } + hb_barrier (); unsigned int i = skippy_iter.idx; unsigned int j = buffer->idx; @@ -262,7 +264,7 @@ struct CursivePosFormat1 hb_requires (hb_is_iterator (Iterator))> void serialize (hb_subset_context_t *c, Iterator it, - const void *src_base) + const struct CursivePosFormat1 *src_base) { if (unlikely (!c->serializer->extend_min ((*this)))) return; this->format = 1; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/MarkMarkPosFormat1.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/MarkMarkPosFormat1.hh index 70cf071668e..57eb782a958 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/MarkMarkPosFormat1.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/MarkMarkPosFormat1.hh @@ -42,6 +42,7 @@ struct MarkMarkPosFormat1_2 mark1Coverage.sanitize (c, this) && mark2Coverage.sanitize (c, this) && mark1Array.sanitize (c, this) && + hb_barrier () && mark2Array.sanitize (c, this, (unsigned int) classCount)); } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairPosFormat1.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairPosFormat1.hh index e4a2006fb98..ac2774a76fb 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairPosFormat1.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairPosFormat1.hh @@ -36,6 +36,7 @@ struct PairPosFormat1_3 TRACE_SANITIZE (this); if (!c->check_struct (this)) return_trace (false); + hb_barrier (); unsigned int len1 = valueFormat[0].get_len (); unsigned int len2 = valueFormat[1].get_len (); @@ -131,20 +132,33 @@ struct PairPosFormat1_3 auto *out = c->serializer->start_embed (*this); if (unlikely (!c->serializer->extend_min (out))) return_trace (false); out->format = format; - out->valueFormat[0] = valueFormat[0]; - out->valueFormat[1] = valueFormat[1]; - if (c->plan->flags & HB_SUBSET_FLAGS_NO_HINTING) + + hb_pair_t newFormats = hb_pair (valueFormat[0], valueFormat[1]); + + if (c->plan->normalized_coords) { - hb_pair_t newFormats = compute_effective_value_formats (glyphset); - out->valueFormat[0] = newFormats.first; - out->valueFormat[1] = newFormats.second; + /* all device flags will be dropped when full instancing, no need to strip + * hints, also do not strip emtpy cause we don't compute the new default + * value during stripping */ + newFormats = compute_effective_value_formats (glyphset, false, false, &c->plan->layout_variation_idx_delta_map); } - - if (c->plan->all_axes_pinned) + /* do not strip hints for VF */ + else if (c->plan->flags & HB_SUBSET_FLAGS_NO_HINTING) { - out->valueFormat[0] = out->valueFormat[0].drop_device_table_flags (); - out->valueFormat[1] = out->valueFormat[1].drop_device_table_flags (); + hb_blob_t* blob = hb_face_reference_table (c->plan->source, HB_TAG ('f','v','a','r')); + bool has_fvar = (blob != hb_blob_get_empty ()); + hb_blob_destroy (blob); + + bool strip = !has_fvar; + /* special case: strip hints when a VF has no GDEF varstore after + * subsetting*/ + if (has_fvar && !c->plan->has_gdef_varstore) + strip = true; + newFormats = compute_effective_value_formats (glyphset, strip, true); } + + out->valueFormat[0] = newFormats.first; + out->valueFormat[1] = newFormats.second; hb_sorted_vector_t new_coverage; @@ -175,7 +189,9 @@ struct PairPosFormat1_3 } - hb_pair_t compute_effective_value_formats (const hb_set_t& glyphset) const + hb_pair_t compute_effective_value_formats (const hb_set_t& glyphset, + bool strip_hints, bool strip_empty, + const hb_hashmap_t> *varidx_delta_map = nullptr) const { unsigned record_size = PairSet::get_size (valueFormat); @@ -195,8 +211,8 @@ struct PairPosFormat1_3 { if (record->intersects (glyphset)) { - format1 = format1 | valueFormat[0].get_effective_format (record->get_values_1 ()); - format2 = format2 | valueFormat[1].get_effective_format (record->get_values_2 (valueFormat[0])); + format1 = format1 | valueFormat[0].get_effective_format (record->get_values_1 (), strip_hints, strip_empty, &set, varidx_delta_map); + format2 = format2 | valueFormat[1].get_effective_format (record->get_values_2 (valueFormat[0]), strip_hints, strip_empty, &set, varidx_delta_map); } record = &StructAtOffset (record, record_size); } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairPosFormat2.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairPosFormat2.hh index 4adb1ef606c..dd02da887d4 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairPosFormat2.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairPosFormat2.hh @@ -8,7 +8,7 @@ namespace Layout { namespace GPOS_impl { template -struct PairPosFormat2_4 +struct PairPosFormat2_4 : ValueBase { protected: HBUINT16 format; /* Format identifier--format = 2 */ @@ -287,18 +287,31 @@ struct PairPosFormat2_4 unsigned len2 = valueFormat2.get_len (); hb_pair_t newFormats = hb_pair (valueFormat1, valueFormat2); - if (c->plan->flags & HB_SUBSET_FLAGS_NO_HINTING) - newFormats = compute_effective_value_formats (klass1_map, klass2_map); - out->valueFormat1 = newFormats.first; - out->valueFormat2 = newFormats.second; - - if (c->plan->all_axes_pinned) + if (c->plan->normalized_coords) + { + /* in case of full instancing, all var device flags will be dropped so no + * need to strip hints here */ + newFormats = compute_effective_value_formats (klass1_map, klass2_map, false, false, &c->plan->layout_variation_idx_delta_map); + } + /* do not strip hints for VF */ + else if (c->plan->flags & HB_SUBSET_FLAGS_NO_HINTING) { - out->valueFormat1 = out->valueFormat1.drop_device_table_flags (); - out->valueFormat2 = out->valueFormat2.drop_device_table_flags (); + hb_blob_t* blob = hb_face_reference_table (c->plan->source, HB_TAG ('f','v','a','r')); + bool has_fvar = (blob != hb_blob_get_empty ()); + hb_blob_destroy (blob); + + bool strip = !has_fvar; + /* special case: strip hints when a VF has no GDEF varstore after + * subsetting*/ + if (has_fvar && !c->plan->has_gdef_varstore) + strip = true; + newFormats = compute_effective_value_formats (klass1_map, klass2_map, strip, true); } + out->valueFormat1 = newFormats.first; + out->valueFormat2 = newFormats.second; + unsigned total_len = len1 + len2; hb_vector_t class2_idxs (+ hb_range ((unsigned) class2Count) | hb_filter (klass2_map)); for (unsigned class1_idx : + hb_range ((unsigned) class1Count) | hb_filter (klass1_map)) @@ -326,7 +339,9 @@ struct PairPosFormat2_4 hb_pair_t compute_effective_value_formats (const hb_map_t& klass1_map, - const hb_map_t& klass2_map) const + const hb_map_t& klass2_map, + bool strip_hints, bool strip_empty, + const hb_hashmap_t> *varidx_delta_map = nullptr) const { unsigned len1 = valueFormat1.get_len (); unsigned len2 = valueFormat2.get_len (); @@ -340,8 +355,8 @@ struct PairPosFormat2_4 for (unsigned class2_idx : + hb_range ((unsigned) class2Count) | hb_filter (klass2_map)) { unsigned idx = (class1_idx * (unsigned) class2Count + class2_idx) * record_size; - format1 = format1 | valueFormat1.get_effective_format (&values[idx]); - format2 = format2 | valueFormat2.get_effective_format (&values[idx + len1]); + format1 = format1 | valueFormat1.get_effective_format (&values[idx], strip_hints, strip_empty, this, varidx_delta_map); + format2 = format2 | valueFormat2.get_effective_format (&values[idx + len1], strip_hints, strip_empty, this, varidx_delta_map); } if (format1 == valueFormat1 && format2 == valueFormat2) diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairSet.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairSet.hh index db301bb8160..5560fab1743 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairSet.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairSet.hh @@ -9,7 +9,7 @@ namespace GPOS_impl { template -struct PairSet +struct PairSet : ValueBase { template friend struct PairPosFormat1_3; @@ -45,10 +45,12 @@ struct PairSet bool sanitize (hb_sanitize_context_t *c, const sanitize_closure_t *closure) const { TRACE_SANITIZE (this); - if (!(c->check_struct (this) - && c->check_range (&firstPairValueRecord, + if (!(c->check_struct (this) && + hb_barrier () && + c->check_range (&firstPairValueRecord, len, closure->stride))) return_trace (false); + hb_barrier (); unsigned int count = len; const PairValueRecord *record = &firstPairValueRecord; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairValueRecord.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairValueRecord.hh index 72bf0e99b53..d00618b763b 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairValueRecord.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairValueRecord.hh @@ -29,7 +29,7 @@ struct PairValueRecord struct context_t { - const void *base; + const ValueBase *base; const ValueFormat *valueFormats; const ValueFormat *newFormats; unsigned len1; /* valueFormats[0].get_len() */ @@ -62,7 +62,7 @@ struct PairValueRecord void collect_variation_indices (hb_collect_variation_indices_context_t *c, const ValueFormat *valueFormats, - const void *base) const + const ValueBase *base) const { unsigned record1_len = valueFormats[0].get_len (); unsigned record2_len = valueFormats[1].get_len (); diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/SinglePos.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/SinglePos.hh index 3af6c499659..a0243a218c5 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/SinglePos.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/SinglePos.hh @@ -39,14 +39,12 @@ struct SinglePos const SrcLookup* src, Iterator glyph_val_iter_pairs, const hb_hashmap_t> *layout_variation_idx_delta_map, - bool all_axes_pinned) + unsigned newFormat) { if (unlikely (!c->extend_min (u.format))) return; unsigned format = 2; - ValueFormat new_format = src->get_value_format (); - - if (all_axes_pinned) - new_format = new_format.drop_device_table_flags (); + ValueFormat new_format; + new_format = newFormat; if (glyph_val_iter_pairs) format = get_format (glyph_val_iter_pairs); @@ -89,8 +87,8 @@ SinglePos_serialize (hb_serialize_context_t *c, const SrcLookup *src, Iterator it, const hb_hashmap_t> *layout_variation_idx_delta_map, - bool all_axes_pinned) -{ c->start_embed ()->serialize (c, src, it, layout_variation_idx_delta_map, all_axes_pinned); } + unsigned new_format) +{ c->start_embed ()->serialize (c, src, it, layout_variation_idx_delta_map, new_format); } } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/SinglePosFormat1.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/SinglePosFormat1.hh index dff1f7316d5..b2d151d4461 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/SinglePosFormat1.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/SinglePosFormat1.hh @@ -8,7 +8,7 @@ namespace OT { namespace Layout { namespace GPOS_impl { -struct SinglePosFormat1 +struct SinglePosFormat1 : ValueBase { protected: HBUINT16 format; /* Format identifier--format = 1 */ @@ -28,6 +28,7 @@ struct SinglePosFormat1 TRACE_SANITIZE (this); return_trace (c->check_struct (this) && coverage.sanitize (c, this) && + hb_barrier () && /* The coverage table may use a range to represent a set * of glyphs, which means a small number of bytes can * generate a large glyph set. Manually modify the @@ -146,6 +147,30 @@ struct SinglePosFormat1 hb_set_t intersection; (this+coverage).intersect_set (glyphset, intersection); + unsigned new_format = valueFormat; + + if (c->plan->normalized_coords) + { + new_format = valueFormat.get_effective_format (values.arrayZ, false, false, this, &c->plan->layout_variation_idx_delta_map); + } + /* do not strip hints for VF */ + else if (c->plan->flags & HB_SUBSET_FLAGS_NO_HINTING) + { + hb_blob_t* blob = hb_face_reference_table (c->plan->source, HB_TAG ('f','v','a','r')); + bool has_fvar = (blob != hb_blob_get_empty ()); + hb_blob_destroy (blob); + + bool strip = !has_fvar; + /* special case: strip hints when a VF has no GDEF varstore after + * subsetting*/ + if (has_fvar && !c->plan->has_gdef_varstore) + strip = true; + new_format = valueFormat.get_effective_format (values.arrayZ, + strip, /* strip hints */ + true, /* strip empty */ + this, nullptr); + } + auto it = + hb_iter (intersection) | hb_map_retains_sorting (glyph_map) @@ -153,7 +178,7 @@ struct SinglePosFormat1 ; bool ret = bool (it); - SinglePos_serialize (c->serializer, this, it, &c->plan->layout_variation_idx_delta_map, c->plan->all_axes_pinned); + SinglePos_serialize (c->serializer, this, it, &c->plan->layout_variation_idx_delta_map, new_format); return_trace (ret); } }; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/SinglePosFormat2.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/SinglePosFormat2.hh index 168ad3bb8c8..ae4a5ed7561 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/SinglePosFormat2.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/SinglePosFormat2.hh @@ -7,7 +7,7 @@ namespace OT { namespace Layout { namespace GPOS_impl { -struct SinglePosFormat2 +struct SinglePosFormat2 : ValueBase { protected: HBUINT16 format; /* Format identifier--format = 2 */ @@ -143,6 +143,37 @@ struct SinglePosFormat2 coverage.serialize_serialize (c, glyphs); } + template + unsigned compute_effective_format (const hb_face_t *face, + Iterator it, + bool is_instancing, bool strip_hints, + bool has_gdef_varstore, + const hb_hashmap_t> *varidx_delta_map) const + { + hb_blob_t* blob = hb_face_reference_table (face, HB_TAG ('f','v','a','r')); + bool has_fvar = (blob != hb_blob_get_empty ()); + hb_blob_destroy (blob); + + unsigned new_format = 0; + if (is_instancing) + { + new_format = new_format | valueFormat.get_effective_format (+ it | hb_map (hb_second), false, false, this, varidx_delta_map); + } + /* do not strip hints for VF */ + else if (strip_hints) + { + bool strip = !has_fvar; + if (has_fvar && !has_gdef_varstore) + strip = true; + new_format = new_format | valueFormat.get_effective_format (+ it | hb_map (hb_second), strip, true, this, nullptr); + } + else + new_format = valueFormat; + + return new_format; + } + bool subset (hb_subset_context_t *c) const { TRACE_SUBSET (this); @@ -163,8 +194,13 @@ struct SinglePosFormat2 }) ; + unsigned new_format = compute_effective_format (c->plan->source, it, + bool (c->plan->normalized_coords), + bool (c->plan->flags & HB_SUBSET_FLAGS_NO_HINTING), + c->plan->has_gdef_varstore, + &c->plan->layout_variation_idx_delta_map); bool ret = bool (it); - SinglePos_serialize (c->serializer, this, it, &c->plan->layout_variation_idx_delta_map, c->plan->all_axes_pinned); + SinglePos_serialize (c->serializer, this, it, &c->plan->layout_variation_idx_delta_map, new_format); return_trace (ret); } }; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/ValueFormat.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/ValueFormat.hh index 461a13d4b70..17f57db1f5f 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/ValueFormat.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/ValueFormat.hh @@ -9,6 +9,8 @@ namespace GPOS_impl { typedef HBUINT16 Value; +struct ValueBase {}; // Dummy base class tag for OffsetTo bases. + typedef UnsizedArrayOf ValueRecord; struct ValueFormat : HBUINT16 @@ -78,7 +80,7 @@ struct ValueFormat : HBUINT16 } bool apply_value (hb_ot_apply_context_t *c, - const void *base, + const ValueBase *base, const Value *values, hb_glyph_position_t &glyph_pos) const { @@ -142,11 +144,29 @@ struct ValueFormat : HBUINT16 return ret; } - unsigned int get_effective_format (const Value *values) const + unsigned int get_effective_format (const Value *values, bool strip_hints, bool strip_empty, const ValueBase *base, + const hb_hashmap_t> *varidx_delta_map) const { unsigned int format = *this; for (unsigned flag = xPlacement; flag <= yAdvDevice; flag = flag << 1) { - if (format & flag) should_drop (*values++, (Flags) flag, &format); + if (format & flag) + { + if (strip_hints && flag >= xPlaDevice) + { + format = format & ~flag; + values++; + continue; + } + if (varidx_delta_map && flag >= xPlaDevice) + { + update_var_flag (values++, (Flags) flag, &format, base, varidx_delta_map); + continue; + } + /* do not strip empty when instancing, cause we don't know whether the new + * default value is 0 or not */ + if (strip_empty) should_drop (*values, (Flags) flag, &format); + values++; + } } return format; @@ -154,18 +174,19 @@ struct ValueFormat : HBUINT16 template - unsigned int get_effective_format (Iterator it) const { + unsigned int get_effective_format (Iterator it, bool strip_hints, bool strip_empty, const ValueBase *base, + const hb_hashmap_t> *varidx_delta_map) const { unsigned int new_format = 0; for (const hb_array_t& values : it) - new_format = new_format | get_effective_format (&values); + new_format = new_format | get_effective_format (&values, strip_hints, strip_empty, base, varidx_delta_map); return new_format; } void copy_values (hb_serialize_context_t *c, unsigned int new_format, - const void *base, + const ValueBase *base, const Value *values, const hb_hashmap_t> *layout_variation_idx_delta_map) const { @@ -217,7 +238,7 @@ struct ValueFormat : HBUINT16 } void collect_variation_indices (hb_collect_variation_indices_context_t *c, - const void *base, + const ValueBase *base, const hb_array_t& values) const { unsigned format = *this; @@ -251,17 +272,8 @@ struct ValueFormat : HBUINT16 } } - unsigned drop_device_table_flags () const - { - unsigned format = *this; - for (unsigned flag = xPlaDevice; flag <= yAdvDevice; flag = flag << 1) - format = format & ~flag; - - return format; - } - private: - bool sanitize_value_devices (hb_sanitize_context_t *c, const void *base, const Value *values) const + bool sanitize_value_devices (hb_sanitize_context_t *c, const ValueBase *base, const Value *values) const { unsigned int format = *this; @@ -278,17 +290,17 @@ struct ValueFormat : HBUINT16 return true; } - static inline Offset16To& get_device (Value* value) + static inline Offset16To& get_device (Value* value) { - return *static_cast *> (value); + return *static_cast *> (value); } - static inline const Offset16To& get_device (const Value* value) + static inline const Offset16To& get_device (const Value* value) { - return *static_cast *> (value); + return *static_cast *> (value); } static inline const Device& get_device (const Value* value, bool *worked, - const void *base, + const ValueBase *base, hb_sanitize_context_t &c) { if (worked) *worked |= bool (*value); @@ -296,12 +308,13 @@ struct ValueFormat : HBUINT16 if (unlikely (!offset.sanitize (&c, base))) return Null(Device); + hb_barrier (); return base + offset; } void add_delta_to_value (HBINT16 *value, - const void *base, + const ValueBase *base, const Value *src_value, const hb_hashmap_t> *layout_variation_idx_delta_map) const { @@ -313,7 +326,8 @@ struct ValueFormat : HBUINT16 *value += hb_second (*varidx_delta); } - bool copy_device (hb_serialize_context_t *c, const void *base, + bool copy_device (hb_serialize_context_t *c, + const ValueBase *base, const Value *src_value, const hb_hashmap_t> *layout_variation_idx_delta_map, unsigned int new_format, Flags flag) const @@ -354,7 +368,7 @@ struct ValueFormat : HBUINT16 return (format & devices) != 0; } - bool sanitize_value (hb_sanitize_context_t *c, const void *base, const Value *values) const + bool sanitize_value (hb_sanitize_context_t *c, const ValueBase *base, const Value *values) const { TRACE_SANITIZE (this); @@ -366,7 +380,7 @@ struct ValueFormat : HBUINT16 return_trace (!has_device () || sanitize_value_devices (c, base, values)); } - bool sanitize_values (hb_sanitize_context_t *c, const void *base, const Value *values, unsigned int count) const + bool sanitize_values (hb_sanitize_context_t *c, const ValueBase *base, const Value *values, unsigned int count) const { TRACE_SANITIZE (this); unsigned size = get_size (); @@ -376,11 +390,12 @@ struct ValueFormat : HBUINT16 if (c->lazy_some_gpos) return_trace (true); + hb_barrier (); return_trace (sanitize_values_stride_unsafe (c, base, values, count, size)); } /* Just sanitize referenced Device tables. Doesn't check the values themselves. */ - bool sanitize_values_stride_unsafe (hb_sanitize_context_t *c, const void *base, const Value *values, unsigned int count, unsigned int stride) const + bool sanitize_values_stride_unsafe (hb_sanitize_context_t *c, const ValueBase *base, const Value *values, unsigned int count, unsigned int stride) const { TRACE_SANITIZE (this); @@ -403,6 +418,20 @@ struct ValueFormat : HBUINT16 *format = *format & ~flag; } + void update_var_flag (const Value* value, Flags flag, + unsigned int* format, const ValueBase *base, + const hb_hashmap_t> *varidx_delta_map) const + { + if (*value) + { + unsigned varidx = (base + get_device (value)).get_variation_index (); + hb_pair_t *varidx_delta; + if (varidx_delta_map->has (varidx, &varidx_delta) && + varidx_delta->first != HB_OT_LAYOUT_NO_VARIATIONS_INDEX) + return; + } + *format = *format & ~flag; + } }; } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/ReverseChainSingleSubstFormat1.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/ReverseChainSingleSubstFormat1.hh index 916fa281b32..ec374f2f022 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/ReverseChainSingleSubstFormat1.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/ReverseChainSingleSubstFormat1.hh @@ -33,9 +33,11 @@ struct ReverseChainSingleSubstFormat1 TRACE_SANITIZE (this); if (!(coverage.sanitize (c, this) && backtrack.sanitize (c, this))) return_trace (false); + hb_barrier (); const auto &lookahead = StructAfter (backtrack); if (!lookahead.sanitize (c, this)) return_trace (false); + hb_barrier (); const auto &substitute = StructAfter (lookahead); return_trace (substitute.sanitize (c)); } @@ -109,12 +111,12 @@ struct ReverseChainSingleSubstFormat1 bool apply (hb_ot_apply_context_t *c) const { TRACE_APPLY (this); - if (unlikely (c->nesting_level_left != HB_MAX_NESTING_LEVEL)) - return_trace (false); /* No chaining to this type */ - unsigned int index = (this+coverage).get_coverage (c->buffer->cur ().codepoint); if (likely (index == NOT_COVERED)) return_trace (false); + if (unlikely (c->nesting_level_left != HB_MAX_NESTING_LEVEL)) + return_trace (false); /* No chaining to this type */ + const auto &lookahead = StructAfter (backtrack); const auto &substitute = StructAfter (lookahead); diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/types.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/types.hh index 6a43403e94b..3840db05986 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/types.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/types.hh @@ -38,8 +38,8 @@ struct SmallTypes { using HBUINT = HBUINT16; using HBGlyphID = HBGlyphID16; using Offset = Offset16; - template - using OffsetTo = OT::Offset16To; + template + using OffsetTo = OT::Offset16To; template using ArrayOf = OT::Array16Of; template @@ -52,8 +52,8 @@ struct MediumTypes { using HBUINT = HBUINT24; using HBGlyphID = HBGlyphID24; using Offset = Offset24; - template - using OffsetTo = OT::Offset24To; + template + using OffsetTo = OT::Offset24To; template using ArrayOf = OT::Array24Of; template diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/name/name.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/name/name.hh index c8de1013456..e2a25d4a0f0 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/name/name.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/OT/name/name.hh @@ -242,7 +242,9 @@ struct NameRecord bool sanitize (hb_sanitize_context_t *c, const void *base) const { TRACE_SANITIZE (this); - return_trace (c->check_struct (this) && offset.sanitize (c, base, length)); + return_trace (c->check_struct (this) && + hb_barrier () && + offset.sanitize (c, base, length)); } HBUINT16 platformID; /* Platform ID. */ @@ -465,6 +467,7 @@ struct name { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && + hb_barrier () && likely (format == 0 || format == 1) && c->check_array (nameRecordZ.arrayZ, count) && c->check_range (this, stringOffset) && diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py index 4e87b8450dc..0012e5db041 100755 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-use-table.py @@ -1,9 +1,6 @@ #!/usr/bin/env python3 # flake8: noqa: F821 -import logging -logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO) - """usage: ./gen-use-table.py IndicSyllabicCategory.txt IndicPositionalCategory.txt ArabicShaping.txt DerivedCoreProperties.txt UnicodeData.txt Blocks.txt Scripts.txt IndicSyllabicCategory-Additional.txt IndicPositionalCategory-Additional.txt Input files: @@ -18,6 +15,10 @@ Input files: * ms-use/IndicPositionalCategory-Additional.txt """ +import logging +logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO) + + import sys if len (sys.argv) != 10: diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/classdef-graph.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/classdef-graph.hh index c1432883ffa..9cf845a82d2 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/classdef-graph.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/classdef-graph.hh @@ -39,6 +39,7 @@ struct ClassDefFormat1 : public OT::ClassDefFormat1_3 int64_t vertex_len = vertex.obj.tail - vertex.obj.head; constexpr unsigned min_size = OT::ClassDefFormat1_3::min_size; if (vertex_len < min_size) return false; + hb_barrier (); return vertex_len >= min_size + classValue.get_size () - classValue.len.get_size (); } }; @@ -50,6 +51,7 @@ struct ClassDefFormat2 : public OT::ClassDefFormat2_4 int64_t vertex_len = vertex.obj.tail - vertex.obj.head; constexpr unsigned min_size = OT::ClassDefFormat2_4::min_size; if (vertex_len < min_size) return false; + hb_barrier (); return vertex_len >= min_size + rangeRecord.get_size () - rangeRecord.len.get_size (); } }; @@ -114,6 +116,7 @@ struct ClassDef : public OT::ClassDef { int64_t vertex_len = vertex.obj.tail - vertex.obj.head; if (vertex_len < OT::ClassDef::min_size) return false; + hb_barrier (); switch (u.format) { case 1: return ((ClassDefFormat1*)this)->sanitize (vertex); diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/coverage-graph.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/coverage-graph.hh index 4f44e076d1f..61ca063e345 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/coverage-graph.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/coverage-graph.hh @@ -39,6 +39,7 @@ struct CoverageFormat1 : public OT::Layout::Common::CoverageFormat1_3::min_size; if (vertex_len < min_size) return false; + hb_barrier (); return vertex_len >= min_size + glyphArray.get_size () - glyphArray.len.get_size (); } }; @@ -50,6 +51,7 @@ struct CoverageFormat2 : public OT::Layout::Common::CoverageFormat2_4::min_size; if (vertex_len < min_size) return false; + hb_barrier (); return vertex_len >= min_size + rangeRecord.get_size () - rangeRecord.len.get_size (); } }; @@ -138,6 +140,7 @@ struct Coverage : public OT::Layout::Common::Coverage { int64_t vertex_len = vertex.obj.tail - vertex.obj.head; if (vertex_len < OT::Layout::Common::Coverage::min_size) return false; + hb_barrier (); switch (u.format) { case 1: return ((CoverageFormat1*)this)->sanitize (vertex); diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/graph.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/graph.hh index 2b4e1b2d3f3..26ad00bdd98 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/graph.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/graph.hh @@ -567,6 +567,7 @@ struct graph_t update_distances (); hb_priority_queue_t queue; + queue.alloc (vertices_.length); hb_vector_t &sorted_graph = vertices_scratch_; if (unlikely (!check_success (sorted_graph.resize (vertices_.length)))) return; hb_vector_t id_map; @@ -1370,6 +1371,7 @@ struct graph_t vertices_.tail ().distance = 0; hb_priority_queue_t queue; + queue.alloc (count); queue.insert (0, vertices_.length - 1); hb_vector_t visited; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/gsubgpos-graph.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/gsubgpos-graph.hh index 12fcbdc497f..0f6d5662e03 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/gsubgpos-graph.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/gsubgpos-graph.hh @@ -76,6 +76,7 @@ struct Lookup : public OT::Lookup { int64_t vertex_len = vertex.obj.tail - vertex.obj.head; if (vertex_len < OT::Lookup::min_size) return false; + hb_barrier (); return vertex_len >= this->get_size (); } @@ -351,6 +352,7 @@ struct LookupList : public OT::LookupList { int64_t vertex_len = vertex.obj.tail - vertex.obj.head; if (vertex_len < OT::LookupList::min_size) return false; + hb_barrier (); return vertex_len >= OT::LookupList::item_size * this->len; } }; @@ -364,6 +366,7 @@ struct GSTAR : public OT::GSUBGPOS GSTAR* gstar = (GSTAR*) r.obj.head; if (!gstar || !gstar->sanitize (r)) return nullptr; + hb_barrier (); return gstar; } @@ -383,6 +386,7 @@ struct GSTAR : public OT::GSUBGPOS { int64_t len = vertex.obj.tail - vertex.obj.head; if (len < OT::GSUBGPOS::min_size) return false; + hb_barrier (); return len >= get_size (); } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/markbasepos-graph.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/markbasepos-graph.hh index ae5ebd0d167..fb4166128a9 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/markbasepos-graph.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/graph/markbasepos-graph.hh @@ -40,6 +40,7 @@ struct AnchorMatrix : public OT::Layout::GPOS_impl::AnchorMatrix { int64_t vertex_len = vertex.obj.tail - vertex.obj.head; if (vertex_len < AnchorMatrix::min_size) return false; + hb_barrier (); return vertex_len >= AnchorMatrix::min_size + OT::Offset16::static_size * class_count * this->rows; @@ -128,6 +129,7 @@ struct MarkArray : public OT::Layout::GPOS_impl::MarkArray int64_t vertex_len = vertex.obj.tail - vertex.obj.head; unsigned min_size = MarkArray::min_size; if (vertex_len < min_size) return false; + hb_barrier (); return vertex_len >= get_size (); } @@ -495,6 +497,7 @@ struct MarkBasePos : public OT::Layout::GPOS_impl::MarkBasePos { int64_t vertex_len = vertex.obj.tail - vertex.obj.head; if (vertex_len < u.format.get_size ()) return false; + hb_barrier (); switch (u.format) { case 1: 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 ad158cc9e8f..f7f74b18c9c 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 @@ -42,6 +42,7 @@ struct PairPosFormat1 : public OT::Layout::GPOS_impl::PairPosFormat1_3::min_size; if (vertex_len < min_size) return false; + hb_barrier (); return vertex_len >= min_size + pairSet.get_size () - pairSet.len.get_size(); @@ -198,6 +199,7 @@ struct PairPosFormat2 : public OT::Layout::GPOS_impl::PairPosFormat2_4::min_size; if (vertex_len < min_size) return false; + hb_barrier (); const unsigned class1_count = class1Count; return vertex_len >= @@ -625,6 +627,7 @@ struct PairPos : public OT::Layout::GPOS_impl::PairPos { int64_t vertex_len = vertex.obj.tail - vertex.obj.head; if (vertex_len < u.format.get_size ()) return false; + hb_barrier (); switch (u.format) { case 1: diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-ankr-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-ankr-table.hh index 63fac84524f..dbb38b1bc07 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-ankr-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-ankr-table.hh @@ -75,6 +75,7 @@ struct ankr { TRACE_SANITIZE (this); return_trace (likely (c->check_struct (this) && + hb_barrier () && version == 0 && c->check_range (this, anchorData) && lookupTable.sanitize (c, this, &(this+anchorData)))); diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-bsln-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-bsln-table.hh index bf12d2e699f..8e42fab2e04 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-bsln-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-bsln-table.hh @@ -123,6 +123,7 @@ struct bsln TRACE_SANITIZE (this); if (unlikely (!(c->check_struct (this) && defaultBaseline < 32))) return_trace (false); + hb_barrier (); switch (format) { diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-common.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-common.hh index 672f80e0db8..05dd58c6df6 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-common.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-common.hh @@ -191,6 +191,7 @@ struct LookupSegmentArray { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && + hb_barrier () && first <= last && valuesZ.sanitize (c, base, last - first + 1)); } @@ -199,6 +200,7 @@ struct LookupSegmentArray { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && + hb_barrier () && first <= last && valuesZ.sanitize (c, base, last - first + 1, std::forward (ds)...)); } @@ -360,6 +362,7 @@ struct LookupFormat10 { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && + hb_barrier () && valueSize <= 4 && valueArrayZ.sanitize (c, glyphCount * valueSize)); } @@ -415,6 +418,7 @@ struct Lookup { TRACE_SANITIZE (this); if (!u.format.sanitize (c)) return_trace (false); + hb_barrier (); switch (u.format) { case 0: return_trace (u.format0.sanitize (c)); case 2: return_trace (u.format2.sanitize (c)); @@ -429,6 +433,7 @@ struct Lookup { TRACE_SANITIZE (this); if (!u.format.sanitize (c)) return_trace (false); + hb_barrier (); switch (u.format) { case 0: return_trace (u.format0.sanitize (c, base)); case 2: return_trace (u.format2.sanitize (c, base)); @@ -558,6 +563,7 @@ struct StateTable { TRACE_SANITIZE (this); if (unlikely (!(c->check_struct (this) && + hb_barrier () && nClasses >= 4 /* Ensure pre-defined classes fit. */ && classTable.sanitize (c, this)))) return_trace (false); diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-feat-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-feat-table.hh index 815a1fd2aa9..4fbec332eb7 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-feat-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-feat-table.hh @@ -138,6 +138,7 @@ struct FeatureName { TRACE_SANITIZE (this); return_trace (likely (c->check_struct (this) && + hb_barrier () && (base+settingTableZ).sanitize (c, nSettings))); } @@ -200,6 +201,7 @@ struct feat { TRACE_SANITIZE (this); return_trace (likely (c->check_struct (this) && + hb_barrier () && version.major == 1 && namesZ.sanitize (c, featureNameCount, this))); } 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 8fd3990f887..ee08da172ea 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 @@ -185,6 +185,7 @@ struct ActionSubrecord TRACE_SANITIZE (this); if (unlikely (!c->check_struct (this))) return_trace (false); + hb_barrier (); switch (u.header.actionType) { @@ -220,6 +221,7 @@ struct PostcompensationActionChain TRACE_SANITIZE (this); if (unlikely (!c->check_struct (this))) return_trace (false); + hb_barrier (); unsigned int offset = min_size; for (unsigned int i = 0; i < count; i++) @@ -389,6 +391,7 @@ struct just TRACE_SANITIZE (this); return_trace (likely (c->check_struct (this) && + hb_barrier () && version.major == 1 && horizData.sanitize (c, this, this) && vertData.sanitize (c, this, this))); diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-kerx-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-kerx-table.hh index 35d7c84c2bc..0de54e0a022 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-kerx-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-kerx-table.hh @@ -54,6 +54,7 @@ kerxTupleKern (int value, unsigned int offset = value; const FWORD *pv = &StructAtOffset (base, offset); if (unlikely (!c->sanitizer.check_array (pv, tupleCount))) return 0; + hb_barrier (); return *pv; } @@ -259,6 +260,7 @@ struct KerxSubTableFormat1 depth = 0; return; } + hb_barrier (); hb_mask_t kern_mask = c->plan->kern_mask; @@ -389,6 +391,7 @@ struct KerxSubTableFormat2 kern_idx = Types::offsetToIndex (kern_idx, this, arrayZ.arrayZ); const FWORD *v = &arrayZ[kern_idx]; if (unlikely (!v->sanitize (&c->sanitizer))) return 0; + hb_barrier (); return kerxTupleKern (*v, header.tuple_count (), this, c); } @@ -429,6 +432,7 @@ struct KerxSubTableFormat2 return_trace (likely (c->check_struct (this) && leftClassTable.sanitize (c, this) && rightClassTable.sanitize (c, this) && + hb_barrier () && c->check_range (this, array))); } @@ -509,6 +513,7 @@ struct KerxSubTableFormat4 double the ankrActionIndex to get the correct offset here. */ const HBUINT16 *data = &ankrData[entry.data.ankrActionIndex * 2]; if (!c->sanitizer.check_array (data, 2)) return; + hb_barrier (); unsigned int markControlPoint = *data++; unsigned int currControlPoint = *data++; hb_position_t markX = 0; @@ -537,6 +542,7 @@ struct KerxSubTableFormat4 double the ankrActionIndex to get the correct offset here. */ const HBUINT16 *data = &ankrData[entry.data.ankrActionIndex * 2]; if (!c->sanitizer.check_array (data, 2)) return; + hb_barrier (); unsigned int markAnchorPoint = *data++; unsigned int currAnchorPoint = *data++; const Anchor &markAnchor = c->ankr_table->get_anchor (c->buffer->info[mark].codepoint, @@ -557,6 +563,7 @@ struct KerxSubTableFormat4 by 4 to get the correct offset for the given action. */ const FWORD *data = (const FWORD *) &ankrData[entry.data.ankrActionIndex * 4]; if (!c->sanitizer.check_array (data, 4)) return; + hb_barrier (); int markX = *data++; int markY = *data++; int currX = *data++; @@ -639,6 +646,7 @@ struct KerxSubTableFormat6 if (unlikely (hb_unsigned_mul_overflows (offset, sizeof (FWORD32)))) return 0; const FWORD32 *v = &StructAtOffset (&(this+t.array), offset * sizeof (FWORD32)); if (unlikely (!v->sanitize (&c->sanitizer))) return 0; + hb_barrier (); return kerxTupleKern (*v, header.tuple_count (), &(this+vector), c); } else @@ -649,6 +657,7 @@ struct KerxSubTableFormat6 unsigned int offset = l + r; const FWORD *v = &StructAtOffset (&(this+t.array), offset * sizeof (FWORD)); if (unlikely (!v->sanitize (&c->sanitizer))) return 0; + hb_barrier (); return kerxTupleKern (*v, header.tuple_count (), &(this+vector), c); } } @@ -674,6 +683,7 @@ struct KerxSubTableFormat6 { TRACE_SANITIZE (this); return_trace (likely (c->check_struct (this) && + hb_barrier () && (is_long () ? ( u.l.rowIndexTable.sanitize (c, this) && @@ -787,9 +797,10 @@ struct KerxSubTable bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - if (!u.header.sanitize (c) || - u.header.length <= u.header.static_size || - !c->check_range (this, u.header.length)) + if (!(u.header.sanitize (c) && + hb_barrier () && + u.header.length >= u.header.static_size && + c->check_range (this, u.header.length))) return_trace (false); return_trace (dispatch (c)); @@ -936,9 +947,10 @@ struct KerxTable bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - if (unlikely (!thiz()->version.sanitize (c) || - (unsigned) thiz()->version < (unsigned) T::minVersion || - !thiz()->tableCount.sanitize (c))) + if (unlikely (!(thiz()->version.sanitize (c) && + hb_barrier () && + (unsigned) thiz()->version >= (unsigned) T::minVersion && + thiz()->tableCount.sanitize (c)))) return_trace (false); typedef typename T::SubTable SubTable; @@ -949,6 +961,7 @@ struct KerxTable { if (unlikely (!st->u.header.sanitize (c))) return_trace (false); + hb_barrier (); /* OpenType kern table has 2-byte subtable lengths. That's limiting. * MS implementation also only supports one subtable, of format 0, * anyway. Certain versions of some fonts, like Calibry, contain diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-morx-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-morx-table.hh index f41ecc197fb..06c9334b370 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-morx-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-morx-table.hh @@ -259,7 +259,9 @@ struct ContextualSubtable unsigned int offset = entry.data.markIndex + buffer->info[mark].codepoint; const UnsizedArrayOf &subs_old = (const UnsizedArrayOf &) subs; replacement = &subs_old[Types::wordOffsetToIndex (offset, table, subs_old.arrayZ)]; - if (!replacement->sanitize (&c->sanitizer) || !*replacement) + if (!(replacement->sanitize (&c->sanitizer) && + hb_barrier () && + *replacement)) replacement = nullptr; } if (replacement) @@ -287,7 +289,9 @@ struct ContextualSubtable unsigned int offset = entry.data.currentIndex + buffer->info[idx].codepoint; const UnsizedArrayOf &subs_old = (const UnsizedArrayOf &) subs; replacement = &subs_old[Types::wordOffsetToIndex (offset, table, subs_old.arrayZ)]; - if (!replacement->sanitize (&c->sanitizer) || !*replacement) + if (!(replacement->sanitize (&c->sanitizer) && + hb_barrier () && + *replacement)) replacement = nullptr; } if (replacement) @@ -315,7 +319,7 @@ struct ContextualSubtable bool has_glyph_classes; unsigned int mark; const ContextualSubtable *table; - const UnsizedListOfOffset16To, HBUINT, false> &subs; + const UnsizedListOfOffset16To, HBUINT, void, false> &subs; }; bool apply (hb_aat_apply_context_t *c) const @@ -336,6 +340,7 @@ struct ContextualSubtable unsigned int num_entries = 0; if (unlikely (!machine.sanitize (c, &num_entries))) return_trace (false); + hb_barrier (); if (!Types::extended) return_trace (substitutionTables.sanitize (c, this, 0)); @@ -359,7 +364,7 @@ struct ContextualSubtable protected: StateTable machine; - NNOffsetTo, HBUINT, false>, HBUINT> + NNOffsetTo, HBUINT, void, false>, HBUINT> substitutionTables; public: DEFINE_SIZE_STATIC (20); @@ -513,6 +518,7 @@ struct LigatureSubtable if (unlikely (!buffer->move_to (match_positions[--cursor % ARRAY_LENGTH (match_positions)]))) return; if (unlikely (!actionData->sanitize (&c->sanitizer))) break; + hb_barrier (); action = *actionData; uint32_t uoffset = action & LigActionOffset; @@ -523,6 +529,7 @@ struct LigatureSubtable component_idx = Types::wordOffsetToIndex (component_idx, table, component.arrayZ); const HBUINT16 &componentData = component[component_idx]; if (unlikely (!componentData.sanitize (&c->sanitizer))) break; + hb_barrier (); ligature_idx += componentData; DEBUG_MSG (APPLY, nullptr, "Action store %d last %d", @@ -533,6 +540,7 @@ struct LigatureSubtable ligature_idx = Types::offsetToIndex (ligature_idx, table, ligature.arrayZ); const HBGlyphID16 &ligatureData = ligature[ligature_idx]; if (unlikely (!ligatureData.sanitize (&c->sanitizer))) break; + hb_barrier (); hb_codepoint_t lig = ligatureData; DEBUG_MSG (APPLY, nullptr, "Produced ligature %u", lig); @@ -587,6 +595,7 @@ struct LigatureSubtable TRACE_SANITIZE (this); /* The rest of array sanitizations are done at run-time. */ return_trace (c->check_struct (this) && machine.sanitize (c) && + hb_barrier () && ligAction && component && ligature); } @@ -765,6 +774,7 @@ struct InsertionSubtable unsigned int start = entry.data.markedInsertIndex; const HBGlyphID16 *glyphs = &insertionAction[start]; if (unlikely (!c->sanitizer.check_array (glyphs, count))) count = 0; + hb_barrier (); bool before = flags & MarkedInsertBefore; @@ -793,6 +803,7 @@ struct InsertionSubtable unsigned int start = entry.data.currentInsertIndex; const HBGlyphID16 *glyphs = &insertionAction[start]; if (unlikely (!c->sanitizer.check_array (glyphs, count))) count = 0; + hb_barrier (); bool before = flags & CurrentInsertBefore; @@ -849,6 +860,7 @@ struct InsertionSubtable TRACE_SANITIZE (this); /* The rest of array sanitizations are done at run-time. */ return_trace (c->check_struct (this) && machine.sanitize (c) && + hb_barrier () && insertionAction); } @@ -944,9 +956,10 @@ struct ChainSubtable bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - if (!length.sanitize (c) || - length <= min_size || - !c->check_range (this, length)) + if (!(length.sanitize (c) && + hb_barrier () && + length >= min_size && + c->check_range (this, length))) return_trace (false); hb_sanitize_with_object_t with (c, this); @@ -1089,9 +1102,10 @@ struct Chain bool sanitize (hb_sanitize_context_t *c, unsigned int version HB_UNUSED) const { TRACE_SANITIZE (this); - if (!length.sanitize (c) || - length < min_size || - !c->check_range (this, length)) + if (!(length.sanitize (c) && + hb_barrier () && + length >= min_size && + c->check_range (this, length))) return_trace (false); if (!c->check_array (featureZ.arrayZ, featureCount)) @@ -1103,6 +1117,7 @@ struct Chain { if (!subtable->sanitize (c)) return_trace (false); + hb_barrier (); subtable = &StructAfter> (*subtable); } @@ -1173,7 +1188,10 @@ struct mortmorx bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - if (!version.sanitize (c) || !version || !chainCount.sanitize (c)) + if (!(version.sanitize (c) && + hb_barrier () && + version && + chainCount.sanitize (c))) return_trace (false); const Chain *chain = &firstChain; @@ -1182,6 +1200,7 @@ struct mortmorx { if (!chain->sanitize (c, version)) return_trace (false); + hb_barrier (); chain = &StructAfter> (*chain); } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-opbd-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-opbd-table.hh index 51b650fc33c..9840d3a5541 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-opbd-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-opbd-table.hh @@ -144,6 +144,7 @@ struct opbd TRACE_SANITIZE (this); if (unlikely (!c->check_struct (this) || version.major != 1)) return_trace (false); + hb_barrier (); switch (format) { 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 c72c0865d3e..345a236e95e 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 @@ -134,6 +134,7 @@ struct TrackData { TRACE_SANITIZE (this); return_trace (likely (c->check_struct (this) && + hb_barrier () && sizeTable.sanitize (c, base, nSizes) && trackTable.sanitize (c, nTracks, base, nSizes))); } @@ -203,6 +204,7 @@ struct trak TRACE_SANITIZE (this); return_trace (likely (c->check_struct (this) && + hb_barrier () && version.major == 1 && horizData.sanitize (c, this, this) && vertData.sanitize (c, this, this))); diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout.h index 9af27400886..c682a2f6d78 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout.h +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout.h @@ -40,7 +40,7 @@ HB_BEGIN_DECLS * @HB_AAT_LAYOUT_FEATURE_TYPE_INVALID: Initial, unset feature type * @HB_AAT_LAYOUT_FEATURE_TYPE_ALL_TYPOGRAPHIC: [All Typographic Features](https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html#Type0) * @HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES: [Ligatures](https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html#Type1) - * @HB_AAT_LAYOUT_FEATURE_TYPE_CURISVE_CONNECTION: [Cursive Connection](https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html#Type2) + * @HB_AAT_LAYOUT_FEATURE_TYPE_CURSIVE_CONNECTION: [Cursive Connection](https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html#Type2) * @HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE: [Letter Case](https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html#Type3) * @HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION: [Vertical Substitution](https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html#Type4) * @HB_AAT_LAYOUT_FEATURE_TYPE_LINGUISTIC_REARRANGEMENT: [Linguistic Rearrangement](https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html#Type5) @@ -88,7 +88,7 @@ typedef enum HB_AAT_LAYOUT_FEATURE_TYPE_ALL_TYPOGRAPHIC = 0, HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES = 1, - HB_AAT_LAYOUT_FEATURE_TYPE_CURISVE_CONNECTION = 2, + HB_AAT_LAYOUT_FEATURE_TYPE_CURSIVE_CONNECTION = 2, HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE = 3, HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION = 4, HB_AAT_LAYOUT_FEATURE_TYPE_LINGUISTIC_REARRANGEMENT = 5, diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-ltag-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-ltag-table.hh index 6d771e1513e..c974025d446 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-ltag-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-ltag-table.hh @@ -46,7 +46,9 @@ struct FTStringRange bool sanitize (hb_sanitize_context_t *c, const void *base) const { TRACE_SANITIZE (this); - return_trace (c->check_struct (this) && (base+tag).sanitize (c, length)); + return_trace (c->check_struct (this) && + hb_barrier () && + (base+tag).sanitize (c, length)); } protected: @@ -73,6 +75,7 @@ struct ltag { TRACE_SANITIZE (this); return_trace (likely (c->check_struct (this) && + hb_barrier () && version >= 1 && tagRanges.sanitize (c, this))); } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-array.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-array.hh index 760f90259c8..9037179bc51 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-array.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-array.hh @@ -47,6 +47,8 @@ enum hb_not_found_t template struct hb_array_t : hb_iter_with_fallback_t, Type&> { + static constexpr bool realloc_move = true; + /* * Constructors. */ diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-atomic.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-atomic.hh index 303dfe6d047..366fb32b7de 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-atomic.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-atomic.hh @@ -118,12 +118,12 @@ _hb_atomic_ptr_impl_cmplexch (const void **P, const void *O_, const void *N) */ #ifndef _hb_compiler_memory_r_barrier #if defined(__ATOMIC_ACQUIRE) // gcc-like -#define _hb_compiler_memory_r_barrier() asm volatile("": : :"memory") +static inline void _hb_compiler_memory_r_barrier () { asm volatile("": : :"memory"); } #elif !defined(_MSC_VER) #include #define _hb_compiler_memory_r_barrier() std::atomic_signal_fence (std::memory_order_acquire) #else -#define _hb_compiler_memory_r_barrier() do {} while (0) +static inline void _hb_compiler_memory_r_barrier () {} #endif #endif @@ -218,5 +218,11 @@ struct hb_atomic_ptr_t T *v = nullptr; }; +static inline bool hb_barrier () +{ + _hb_compiler_memory_r_barrier (); + return true; +} + #endif /* HB_ATOMIC_HH */ diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-bit-set-invertible.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-bit-set-invertible.hh index e765a479ae6..26262518070 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-bit-set-invertible.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-bit-set-invertible.hh @@ -359,8 +359,8 @@ struct hb_bit_set_invertible_t typedef hb_codepoint_t __item_t__; hb_codepoint_t __item__ () const { return v; } bool __more__ () const { return v != INVALID; } - void __next__ () { s->next (&v); if (l) l--; } - void __prev__ () { s->previous (&v); } + void __next__ () { s->next (&v); if (likely (l)) l--; } + void __prev__ () { s->previous (&v); l++; } unsigned __len__ () const { return l; } iter_t end () const { return iter_t (*s, false); } bool operator != (const iter_t& o) const diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-deprecated.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-deprecated.h index 9fcce6d9ac4..ad19f9a3e94 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-deprecated.h +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-deprecated.h @@ -56,7 +56,7 @@ HB_BEGIN_DECLS /** * HB_SCRIPT_CANADIAN_ABORIGINAL: * - * Use #HB_SCRIPT_CANADIAN_SYLLABICS instead: + * Use #HB_SCRIPT_CANADIAN_SYLLABICS instead. * * Deprecated: 0.9.20 */ @@ -301,6 +301,15 @@ hb_font_get_glyph_shape (hb_font_t *font, hb_draw_funcs_t *dfuncs, void *draw_data); +/** + * HB_AAT_LAYOUT_FEATURE_TYPE_CURISVE_CONNECTION: + * + * Use #HB_AAT_LAYOUT_FEATURE_TYPE_CURSIVE_CONNECTION instead. + * + * Deprecated: 8.3.0 + */ +#define HB_AAT_LAYOUT_FEATURE_TYPE_CURISVE_CONNECTION HB_AAT_LAYOUT_FEATURE_TYPE_CURSIVE_CONNECTION + #endif diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc index 6ca3f854655..955a9081e09 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc @@ -225,7 +225,7 @@ _hb_ft_hb_font_check_changed (hb_font_t *font, * Sets the FT_Load_Glyph load flags for the specified #hb_font_t. * * For more information, see - * https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#ft_load_xxx + * * * This function works with #hb_font_t objects created by * hb_ft_font_create() or hb_ft_font_create_referenced(). @@ -253,7 +253,7 @@ hb_ft_font_set_load_flags (hb_font_t *font, int load_flags) * Fetches the FT_Load_Glyph load flags of the specified #hb_font_t. * * For more information, see - * https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#ft_load_xxx + * * * This function works with #hb_font_t objects created by * hb_ft_font_create() or hb_ft_font_create_referenced(). diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-map.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-map.hh index 13d62054c11..45a02b830c3 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-map.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-map.hh @@ -42,10 +42,34 @@ template struct hb_hashmap_t { + static constexpr bool realloc_move = true; + hb_hashmap_t () { init (); } ~hb_hashmap_t () { fini (); } - hb_hashmap_t (const hb_hashmap_t& o) : hb_hashmap_t () { alloc (o.population); hb_copy (o, *this); } + hb_hashmap_t (const hb_hashmap_t& o) : hb_hashmap_t () + { + if (unlikely (!o.mask)) return; + + if (item_t::is_trivial) + { + items = (item_t *) hb_malloc (sizeof (item_t) * (o.mask + 1)); + if (unlikely (!items)) + { + successful = false; + return; + } + population = o.population; + occupancy = o.occupancy; + mask = o.mask; + prime = o.prime; + max_chain_length = o.max_chain_length; + memcpy (items, o.items, sizeof (item_t) * (mask + 1)); + return; + } + + alloc (o.population); hb_copy (o, *this); + } hb_hashmap_t (hb_hashmap_t&& o) : hb_hashmap_t () { hb_swap (*this, o); } hb_hashmap_t& operator= (const hb_hashmap_t& o) { reset (); alloc (o.population); hb_copy (o, *this); return *this; } hb_hashmap_t& operator= (hb_hashmap_t&& o) { hb_swap (*this, o); return *this; } @@ -209,9 +233,10 @@ struct hb_hashmap_t old_items[i].hash, std::move (old_items[i].value)); } - if (!item_t::is_trivial) - old_items[i].~item_t (); } + if (!item_t::is_trivial) + for (unsigned int i = 0; i < old_size; i++) + old_items[i].~item_t (); hb_free (old_items); diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-file.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-file.hh index 04f144a72c7..1157ea46d0d 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-file.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-open-file.hh @@ -267,6 +267,7 @@ struct TTCHeader { TRACE_SANITIZE (this); if (unlikely (!u.header.version.sanitize (c))) return_trace (false); + hb_barrier (); switch (u.header.version.major) { case 2: /* version 2 is compatible with version 1 */ case 1: return_trace (u.version1.sanitize (c)); @@ -302,6 +303,7 @@ struct ResourceRecord TRACE_SANITIZE (this); return_trace (c->check_struct (this) && offset.sanitize (c, data_base) && + hb_barrier () && get_face (data_base).sanitize (c)); } @@ -337,6 +339,7 @@ struct ResourceTypeRecord { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && + hb_barrier () && resourcesZ.sanitize (c, type_base, get_resource_count (), data_base)); @@ -385,6 +388,7 @@ struct ResourceMap { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && + hb_barrier () && typeList.sanitize (c, this, &(this+typeList), data_base)); @@ -428,6 +432,7 @@ struct ResourceForkHeader { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && + hb_barrier () && data.sanitize (c, this, dataLen) && map.sanitize (c, this, &(this+data))); } @@ -508,6 +513,7 @@ struct OpenTypeFontFile { TRACE_SANITIZE (this); if (unlikely (!u.tag.sanitize (c))) return_trace (false); + hb_barrier (); switch (u.tag) { case CFFTag: /* All the non-collection tags */ case TrueTag: 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 d3fdd1caf52..6967bca3d4b 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 @@ -309,7 +309,7 @@ struct _hb_has_null static Type *get_crap () { return &Crap (Type); } }; -template +template struct OffsetTo : Offset { using target_t = Type; @@ -335,22 +335,22 @@ struct OffsetTo : Offset } template + hb_enable_if (hb_is_convertible (const Base, const BaseType *))> friend const Type& operator + (const Base &base, const OffsetTo &offset) { return offset ((const void *) base); } template + hb_enable_if (hb_is_convertible (const Base, const BaseType *))> friend const Type& operator + (const OffsetTo &offset, const Base &base) { return offset ((const void *) base); } template + hb_enable_if (hb_is_convertible (Base, BaseType *))> friend Type& operator + (Base &&base, OffsetTo &offset) { return offset ((void *) base); } template + hb_enable_if (hb_is_convertible (Base, BaseType *))> friend Type& operator + (OffsetTo &offset, Base &&base) { return offset ((void *) base); } - template + template bool serialize_subset (hb_subset_context_t *c, const OffsetTo& src, - const void *src_base, Ts&&... ds) + const Base *src_base, Ts&&... ds) { *this = 0; if (src.is_null ()) @@ -414,10 +414,11 @@ struct OffsetTo : Offset const void *src_base, unsigned dst_bias = 0) { return serialize_copy (c, src, src_base, dst_bias, hb_serialize_context_t::Head); } - bool sanitize_shallow (hb_sanitize_context_t *c, const void *base) const + bool sanitize_shallow (hb_sanitize_context_t *c, const BaseType *base) const { TRACE_SANITIZE (this); if (unlikely (!c->check_struct (this))) return_trace (false); + hb_barrier (); //if (unlikely (this->is_null ())) return_trace (true); if (unlikely ((const char *) base + (unsigned) *this < (const char *) base)) return_trace (false); return_trace (true); @@ -427,10 +428,11 @@ struct OffsetTo : Offset #ifndef HB_OPTIMIZE_SIZE HB_ALWAYS_INLINE #endif - bool sanitize (hb_sanitize_context_t *c, const void *base, Ts&&... ds) const + bool sanitize (hb_sanitize_context_t *c, const BaseType *base, Ts&&... ds) const { TRACE_SANITIZE (this); return_trace (sanitize_shallow (c, base) && + hb_barrier () && (this->is_null () || c->dispatch (StructAtOffset (base, *this), std::forward (ds)...) || neuter (c))); @@ -445,14 +447,14 @@ struct OffsetTo : Offset DEFINE_SIZE_STATIC (sizeof (OffsetType)); }; /* Partial specializations. */ -template using Offset16To = OffsetTo; -template using Offset24To = OffsetTo; -template using Offset32To = OffsetTo; +template using Offset16To = OffsetTo; +template using Offset24To = OffsetTo; +template using Offset32To = OffsetTo; -template using NNOffsetTo = OffsetTo; -template using NNOffset16To = Offset16To; -template using NNOffset24To = Offset24To; -template using NNOffset32To = Offset32To; +template using NNOffsetTo = OffsetTo; +template using NNOffset16To = Offset16To; +template using NNOffset24To = Offset24To; +template using NNOffset32To = Offset32To; /* @@ -536,6 +538,7 @@ struct UnsizedArrayOf TRACE_SANITIZE (this); if (unlikely (!sanitize_shallow (c, count))) return_trace (false); if (!sizeof... (Ts) && hb_is_trivially_copyable(Type)) return_trace (true); + hb_barrier (); for (unsigned int i = 0; i < count; i++) if (unlikely (!c->dispatch (arrayZ[i], std::forward (ds)...))) return_trace (false); @@ -555,17 +558,17 @@ struct UnsizedArrayOf }; /* Unsized array of offset's */ -template -using UnsizedArray16OfOffsetTo = UnsizedArrayOf>; +template +using UnsizedArray16OfOffsetTo = UnsizedArrayOf>; /* Unsized array of offsets relative to the beginning of the array itself. */ -template -struct UnsizedListOfOffset16To : UnsizedArray16OfOffsetTo +template +struct UnsizedListOfOffset16To : UnsizedArray16OfOffsetTo { const Type& operator [] (int i_) const { unsigned int i = (unsigned int) i_; - const OffsetTo *p = &this->arrayZ[i]; + const OffsetTo *p = &this->arrayZ[i]; if (unlikely ((const void *) p < (const void *) this->arrayZ)) return Null (Type); /* Overflowed. */ _hb_compiler_memory_r_barrier (); return this+*p; @@ -573,7 +576,7 @@ struct UnsizedListOfOffset16To : UnsizedArray16OfOffsetTo *p = &this->arrayZ[i]; + const OffsetTo *p = &this->arrayZ[i]; if (unlikely ((const void *) p < (const void *) this->arrayZ)) return Crap (Type); /* Overflowed. */ _hb_compiler_memory_r_barrier (); return this+*p; @@ -583,7 +586,7 @@ struct UnsizedListOfOffset16To : UnsizedArray16OfOffsetTo + return_trace ((UnsizedArray16OfOffsetTo ::sanitize (c, count, this, std::forward (ds)...))); } }; @@ -725,6 +728,7 @@ struct ArrayOf TRACE_SANITIZE (this); if (unlikely (!sanitize_shallow (c))) return_trace (false); if (!sizeof... (Ts) && hb_is_trivially_copyable(Type)) return_trace (true); + hb_barrier (); unsigned int count = len; for (unsigned int i = 0; i < count; i++) if (unlikely (!c->dispatch (arrayZ[i], std::forward (ds)...))) @@ -735,7 +739,9 @@ struct ArrayOf bool sanitize_shallow (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - return_trace (len.sanitize (c) && c->check_array_sized (arrayZ, len, sizeof (LenType))); + return_trace (len.sanitize (c) && + hb_barrier () && + c->check_array_sized (arrayZ, len, sizeof (LenType))); } public: @@ -866,6 +872,7 @@ struct HeadlessArrayOf TRACE_SANITIZE (this); if (unlikely (!sanitize_shallow (c))) return_trace (false); if (!sizeof... (Ts) && hb_is_trivially_copyable(Type)) return_trace (true); + hb_barrier (); unsigned int count = get_length (); for (unsigned int i = 0; i < count; i++) if (unlikely (!c->dispatch (arrayZ[i], std::forward (ds)...))) @@ -878,6 +885,7 @@ struct HeadlessArrayOf { TRACE_SANITIZE (this); return_trace (lenP1.sanitize (c) && + hb_barrier () && (!lenP1 || c->check_array_sized (arrayZ, lenP1 - 1, sizeof (LenType)))); } @@ -919,6 +927,7 @@ struct ArrayOfM1 TRACE_SANITIZE (this); if (unlikely (!sanitize_shallow (c))) return_trace (false); if (!sizeof... (Ts) && hb_is_trivially_copyable(Type)) return_trace (true); + hb_barrier (); unsigned int count = lenM1 + 1; for (unsigned int i = 0; i < count; i++) if (unlikely (!c->dispatch (arrayZ[i], std::forward (ds)...))) @@ -931,6 +940,7 @@ struct ArrayOfM1 { TRACE_SANITIZE (this); return_trace (lenM1.sanitize (c) && + hb_barrier () && (c->check_array_sized (arrayZ, lenM1 + 1, sizeof (LenType)))); } @@ -1104,6 +1114,7 @@ struct VarSizedBinSearchArrayOf TRACE_SANITIZE (this); if (unlikely (!sanitize_shallow (c))) return_trace (false); if (!sizeof... (Ts) && hb_is_trivially_copyable(Type)) return_trace (true); + hb_barrier (); unsigned int count = get_length (); for (unsigned int i = 0; i < count; i++) if (unlikely (!(*this)[i].sanitize (c, std::forward (ds)...))) @@ -1130,6 +1141,7 @@ struct VarSizedBinSearchArrayOf { TRACE_SANITIZE (this); return_trace (header.sanitize (c) && + hb_barrier () && Type::static_size <= header.unitSize && c->check_range (bytesZ.arrayZ, header.nUnits, diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff-common.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff-common.hh index 923a32b26f8..4fdba197ac7 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff-common.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff-common.hh @@ -78,7 +78,8 @@ struct CFFIndex hb_requires (hb_is_iterable (Iterable))> bool serialize (hb_serialize_context_t *c, const Iterable &iterable, - const unsigned *p_data_size = nullptr) + const unsigned *p_data_size = nullptr, + unsigned min_off_size = 0) { TRACE_SERIALIZE (this); unsigned data_size; @@ -88,7 +89,7 @@ struct CFFIndex total_size (iterable, &data_size); auto it = hb_iter (iterable); - if (unlikely (!serialize_header (c, +it, data_size))) return_trace (false); + if (unlikely (!serialize_header (c, +it, data_size, min_off_size))) return_trace (false); unsigned char *ret = c->allocate_size (data_size, false); if (unlikely (!ret)) return_trace (false); for (const auto &_ : +it) @@ -111,11 +112,13 @@ struct CFFIndex hb_requires (hb_is_iterator (Iterator))> bool serialize_header (hb_serialize_context_t *c, Iterator it, - unsigned data_size) + unsigned data_size, + unsigned min_off_size = 0) { TRACE_SERIALIZE (this); unsigned off_size = (hb_bit_storage (data_size + 1) + 7) / 8; + off_size = hb_max(min_off_size, off_size); /* serialize CFFIndex header */ if (unlikely (!c->extend_min (this))) return_trace (false); @@ -195,7 +198,7 @@ struct CFFIndex template - static unsigned total_size (const Iterable &iterable, unsigned *data_size = nullptr) + static unsigned total_size (const Iterable &iterable, unsigned *data_size = nullptr, unsigned min_off_size = 0) { auto it = + hb_iter (iterable); if (!it) @@ -211,6 +214,7 @@ struct CFFIndex if (data_size) *data_size = total; unsigned off_size = (hb_bit_storage (total + 1) + 7) / 8; + off_size = hb_max(min_off_size, off_size); return min_size + HBUINT8::static_size + (hb_len (it) + 1) * off_size + total; } @@ -274,8 +278,10 @@ struct CFFIndex { TRACE_SANITIZE (this); return_trace (likely (c->check_struct (this) && + hb_barrier () && (count == 0 || /* empty INDEX */ (count < count + 1u && + hb_barrier () && c->check_struct (&offSize) && offSize >= 1 && offSize <= 4 && c->check_array (offsets, offSize, count + 1u) && c->check_array ((const HBUINT8*) data_base (), 1, offset_at (count)))))); @@ -412,6 +418,7 @@ struct FDSelect0 { TRACE_SANITIZE (this); if (unlikely (!(c->check_struct (this)))) return_trace (false); + hb_barrier (); if (unlikely (!c->check_array (fds, c->get_num_glyphs ()))) return_trace (false); @@ -438,7 +445,9 @@ struct FDSelect3_4_Range bool sanitize (hb_sanitize_context_t *c, const void * /*nullptr*/, unsigned int fdcount) const { TRACE_SANITIZE (this); - return_trace (first < c->get_num_glyphs () && (fd < fdcount)); + return_trace (c->check_struct (this) && + hb_barrier () && + first < c->get_num_glyphs () && (fd < fdcount)); } GID_TYPE first; @@ -456,15 +465,20 @@ struct FDSelect3_4 bool sanitize (hb_sanitize_context_t *c, unsigned int fdcount) const { TRACE_SANITIZE (this); - if (unlikely (!c->check_struct (this) || !ranges.sanitize (c, nullptr, fdcount) || - (nRanges () == 0) || ranges[0].first != 0)) + if (unlikely (!(c->check_struct (this) && + ranges.sanitize (c, nullptr, fdcount) && + hb_barrier () && + (nRanges () != 0) && + ranges[0].first == 0))) return_trace (false); for (unsigned int i = 1; i < nRanges (); i++) if (unlikely (ranges[i - 1].first >= ranges[i].first)) return_trace (false); - if (unlikely (!sentinel().sanitize (c) || (sentinel() != c->get_num_glyphs ()))) + if (unlikely (!(sentinel().sanitize (c) && + hb_barrier () && + (sentinel() == c->get_num_glyphs ())))) return_trace (false); return_trace (true); @@ -559,6 +573,7 @@ struct FDSelect TRACE_SANITIZE (this); if (unlikely (!c->check_struct (this))) return_trace (false); + hb_barrier (); switch (format) { diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff1-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff1-table.hh index 1e81dcb5e3a..c869e90554b 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff1-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff1-table.hh @@ -275,6 +275,7 @@ struct Encoding TRACE_SANITIZE (this); if (unlikely (!c->check_struct (this))) return_trace (false); + hb_barrier (); switch (table_format ()) { @@ -376,13 +377,13 @@ struct Charset1_2 { bool sanitize (hb_sanitize_context_t *c, unsigned int num_glyphs, unsigned *num_charset_entries) const { TRACE_SANITIZE (this); - if (unlikely (!c->check_struct (this))) - return_trace (false); num_glyphs--; unsigned i; for (i = 0; num_glyphs > 0; i++) { - if (unlikely (!ranges[i].sanitize (c) || (num_glyphs < ranges[i].nLeft + 1))) + if (unlikely (!(ranges[i].sanitize (c) && + hb_barrier () && + (num_glyphs >= ranges[i].nLeft + 1)))) return_trace (false); num_glyphs -= (ranges[i].nLeft + 1); } @@ -615,6 +616,7 @@ struct Charset TRACE_SANITIZE (this); if (unlikely (!c->check_struct (this))) return_trace (false); + hb_barrier (); switch (format) { @@ -1055,6 +1057,7 @@ struct cff1 { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && + hb_barrier () && likely (version.major == 1)); } @@ -1085,14 +1088,17 @@ struct cff1 nameIndex = &cff->nameIndex (cff); if ((nameIndex == &Null (CFF1NameIndex)) || !nameIndex->sanitize (&sc)) goto fail; + hb_barrier (); topDictIndex = &StructAtOffset (nameIndex, nameIndex->get_size ()); if ((topDictIndex == &Null (CFF1TopDictIndex)) || !topDictIndex->sanitize (&sc) || (topDictIndex->count == 0)) goto fail; + hb_barrier (); { /* parse top dict */ const hb_ubytes_t topDictStr = (*topDictIndex)[0]; if (unlikely (!topDictStr.sanitize (&sc))) goto fail; + hb_barrier (); cff1_top_dict_interp_env_t env (topDictStr); cff1_top_dict_interpreter_t top_interp (env); if (unlikely (!top_interp.interpret (topDict))) goto fail; @@ -1104,6 +1110,7 @@ struct cff1 { charset = &StructAtOffsetOrNull (cff, topDict.CharsetOffset); if (unlikely ((charset == &Null (Charset)) || !charset->sanitize (&sc, &num_charset_entries))) goto fail; + hb_barrier (); } fdCount = 1; @@ -1114,6 +1121,7 @@ struct cff1 if (unlikely ((fdArray == &Null (CFF1FDArray)) || !fdArray->sanitize (&sc) || (fdSelect == &Null (CFF1FDSelect)) || !fdSelect->sanitize (&sc, fdArray->count))) goto fail; + hb_barrier (); fdCount = fdArray->count; } @@ -1134,21 +1142,25 @@ struct cff1 { encoding = &StructAtOffsetOrNull (cff, topDict.EncodingOffset); if (unlikely ((encoding == &Null (Encoding)) || !encoding->sanitize (&sc))) goto fail; + hb_barrier (); } } stringIndex = &StructAtOffset (topDictIndex, topDictIndex->get_size ()); if ((stringIndex == &Null (CFF1StringIndex)) || !stringIndex->sanitize (&sc)) goto fail; + hb_barrier (); globalSubrs = &StructAtOffset (stringIndex, stringIndex->get_size ()); if ((globalSubrs != &Null (CFF1Subrs)) && !globalSubrs->sanitize (&sc)) goto fail; + hb_barrier (); charStrings = &StructAtOffsetOrNull (cff, topDict.charStringsOffset); if ((charStrings == &Null (CFF1CharStrings)) || unlikely (!charStrings->sanitize (&sc))) goto fail; + hb_barrier (); num_glyphs = charStrings->count; if (num_glyphs != sc.get_num_glyphs ()) @@ -1166,6 +1178,7 @@ struct cff1 { hb_ubytes_t fontDictStr = (*fdArray)[i]; if (unlikely (!fontDictStr.sanitize (&sc))) goto fail; + hb_barrier (); cff1_font_dict_values_t *font; cff1_top_dict_interp_env_t env (fontDictStr); cff1_font_dict_interpreter_t font_interp (env); @@ -1177,6 +1190,7 @@ struct cff1 PRIVDICTVAL *priv = &privateDicts[i]; const hb_ubytes_t privDictStr = StructAtOffset (cff, font->privateDictInfo.offset).as_ubytes (font->privateDictInfo.size); if (unlikely (!privDictStr.sanitize (&sc))) goto fail; + hb_barrier (); num_interp_env_t env2 (privDictStr); dict_interpreter_t priv_interp (env2); priv->init (); @@ -1186,6 +1200,7 @@ struct cff1 if (priv->localSubrs != &Null (CFF1Subrs) && unlikely (!priv->localSubrs->sanitize (&sc))) goto fail; + hb_barrier (); } } else /* non-CID */ @@ -1195,6 +1210,7 @@ struct cff1 const hb_ubytes_t privDictStr = StructAtOffset (cff, font->privateDictInfo.offset).as_ubytes (font->privateDictInfo.size); if (unlikely (!privDictStr.sanitize (&sc))) goto fail; + hb_barrier (); num_interp_env_t env (privDictStr); dict_interpreter_t priv_interp (env); priv->init (); @@ -1204,6 +1220,7 @@ struct cff1 if (priv->localSubrs != &Null (CFF1Subrs) && unlikely (!priv->localSubrs->sanitize (&sc))) goto fail; + hb_barrier (); } return; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff2-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff2-table.hh index af24bb9986f..652748b7375 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff2-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff2-table.hh @@ -90,6 +90,7 @@ struct CFF2FDSelect TRACE_SANITIZE (this); if (unlikely (!c->check_struct (this))) return_trace (false); + hb_barrier (); switch (format) { @@ -115,7 +116,10 @@ struct CFF2VariationStore bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - return_trace (likely (c->check_struct (this)) && c->check_range (&varStore, size) && varStore.sanitize (c)); + return_trace (c->check_struct (this) && + hb_barrier () && + c->check_range (&varStore, size) && + varStore.sanitize (c)); } bool serialize (hb_serialize_context_t *c, const CFF2VariationStore *varStore) @@ -384,6 +388,7 @@ struct cff2 { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && + hb_barrier () && likely (version.major == 2)); } @@ -414,6 +419,7 @@ struct cff2 { /* parse top dict */ hb_ubytes_t topDictStr = (cff2 + cff2->topDict).as_ubytes (cff2->topDictSize); if (unlikely (!topDictStr.sanitize (&sc))) goto fail; + hb_barrier (); num_interp_env_t env (topDictStr); cff2_top_dict_interpreter_t top_interp (env); topDict.init (); @@ -430,6 +436,7 @@ struct cff2 (charStrings == &Null (CFF2CharStrings)) || unlikely (!charStrings->sanitize (&sc)) || (globalSubrs == &Null (CFF2Subrs)) || unlikely (!globalSubrs->sanitize (&sc)) || (fdArray == &Null (CFF2FDArray)) || unlikely (!fdArray->sanitize (&sc)) || + !hb_barrier () || (((fdSelect != &Null (CFF2FDSelect)) && unlikely (!fdSelect->sanitize (&sc, fdArray->count))))) goto fail; @@ -446,6 +453,7 @@ struct cff2 { const hb_ubytes_t fontDictStr = (*fdArray)[i]; if (unlikely (!fontDictStr.sanitize (&sc))) goto fail; + hb_barrier (); cff2_font_dict_values_t *font; num_interp_env_t env (fontDictStr); cff2_font_dict_interpreter_t font_interp (env); @@ -456,6 +464,7 @@ struct cff2 const hb_ubytes_t privDictStr = StructAtOffsetOrNull (cff2, font->privateDictInfo.offset).as_ubytes (font->privateDictInfo.size); if (unlikely (!privDictStr.sanitize (&sc))) goto fail; + hb_barrier (); cff2_priv_dict_interp_env_t env2 (privDictStr); dict_interpreter_t priv_interp (env2); privateDicts[i].init (); @@ -465,6 +474,7 @@ struct cff2 if (privateDicts[i].localSubrs != &Null (CFF2Subrs) && unlikely (!privateDicts[i].localSubrs->sanitize (&sc))) goto fail; + hb_barrier (); } return; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cmap-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cmap-table.hh index 30401b1926e..e2e25818557 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cmap-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cmap-table.hh @@ -556,6 +556,7 @@ struct CmapSubtableFormat4 TRACE_SANITIZE (this); if (unlikely (!c->check_struct (this))) return_trace (false); + hb_barrier (); if (unlikely (!c->check_range (this, length))) { @@ -742,10 +743,11 @@ struct CmapSubtableLongSegmented unsigned num_glyphs) const { hb_codepoint_t last_end = 0; - for (unsigned i = 0; i < this->groups.len; i++) + unsigned count = this->groups.len; + for (unsigned i = 0; i < count; i++) { - hb_codepoint_t start = this->groups[i].startCharCode; - hb_codepoint_t end = hb_min ((hb_codepoint_t) this->groups[i].endCharCode, + hb_codepoint_t start = this->groups.arrayZ[i].startCharCode; + hb_codepoint_t end = hb_min ((hb_codepoint_t) this->groups.arrayZ[i].endCharCode, (hb_codepoint_t) HB_UNICODE_MAX); if (unlikely (start > end || start < last_end)) { // Range is not in order and is invalid, skip it. @@ -754,7 +756,7 @@ struct CmapSubtableLongSegmented last_end = end; - hb_codepoint_t gid = this->groups[i].glyphID; + hb_codepoint_t gid = this->groups.arrayZ[i].glyphID; if (!gid) { if (T::formatNumber == 13) continue; @@ -767,9 +769,9 @@ struct CmapSubtableLongSegmented mapping->alloc (mapping->get_population () + end - start + 1); + unicodes->add_range (start, end); for (unsigned cp = start; cp <= end; cp++) { - unicodes->add (cp); mapping->set (cp, gid); gid += T::increment; } @@ -1427,6 +1429,7 @@ struct CmapSubtable { TRACE_SANITIZE (this); if (!u.format.sanitize (c)) return_trace (false); + hb_barrier (); switch (u.format) { case 0: return_trace (u.format0 .sanitize (c)); case 4: return_trace (u.format4 .sanitize (c)); @@ -2060,6 +2063,7 @@ struct cmap { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && + hb_barrier () && likely (version == 0) && encodingRecord.sanitize (c, this)); } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hdmx-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hdmx-table.hh index cbcf6f5f22f..8582dbe27da 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hdmx-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hdmx-table.hh @@ -71,6 +71,7 @@ struct DeviceRecord { TRACE_SANITIZE (this); return_trace (likely (c->check_struct (this) && + hb_barrier () && c->check_range (this, sizeDeviceRecord))); } @@ -152,6 +153,7 @@ struct hdmx { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && + hb_barrier () && !hb_unsigned_mul_overflows (numRecords, sizeDeviceRecord) && min_size + numRecords * sizeDeviceRecord > numRecords * sizeDeviceRecord && sizeDeviceRecord >= DeviceRecord::min_size && diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-head-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-head-table.hh index 770cf52d173..4cb6c15c677 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-head-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-head-table.hh @@ -103,6 +103,7 @@ struct head { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && + hb_barrier () && version.major == 1 && magicNumber == 0x5F0F3CF5u); } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hhea-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hhea-table.hh index d9c9bd35377..27becfda3d4 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hhea-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hhea-table.hh @@ -50,7 +50,9 @@ struct _hea bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - return_trace (c->check_struct (this) && likely (version.major == 1)); + return_trace (c->check_struct (this) && + hb_barrier () && + likely (version.major == 1)); } public: diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-kern-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-kern-table.hh index ffa11bc2496..39444d803f0 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-kern-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-kern-table.hh @@ -79,6 +79,7 @@ struct KernSubTableFormat3 { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && + hb_barrier () && c->check_range (kernValueZ, kernValueCount * sizeof (FWORD) + glyphCount * 2 + @@ -147,9 +148,10 @@ struct KernSubTable bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - if (unlikely (!u.header.sanitize (c) || - u.header.length < u.header.min_size || - !c->check_range (this, u.header.length))) return_trace (false); + if (unlikely (!(u.header.sanitize (c) && + hb_barrier () && + u.header.length >= u.header.min_size && + c->check_range (this, u.header.length)))) return_trace (false); return_trace (dispatch (c)); } @@ -337,6 +339,7 @@ struct kern { TRACE_SANITIZE (this); if (!u.version32.sanitize (c)) return_trace (false); + hb_barrier (); return_trace (dispatch (c)); } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-base-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-base-table.hh index 2b7e9e4b184..a23b6377d19 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-base-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-base-table.hh @@ -135,6 +135,7 @@ struct BaseCoord { TRACE_SANITIZE (this); if (unlikely (!u.format.sanitize (c))) return_trace (false); + hb_barrier (); switch (u.format) { case 1: return_trace (u.format1.sanitize (c)); case 2: return_trace (u.format2.sanitize (c)); @@ -496,6 +497,7 @@ struct BASE { TRACE_SANITIZE (this); return_trace (likely (c->check_struct (this) && + hb_barrier () && likely (version.major == 1) && hAxis.sanitize (c, this) && vAxis.sanitize (c, this) && diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-common.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-common.hh index e869d8eceab..6b359cceb72 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-common.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-common.hh @@ -64,7 +64,7 @@ struct hb_collect_feature_substitutes_with_var_context_t const hb_hashmap_t *axes_location; hb_hashmap_t> *record_cond_idx_map; hb_hashmap_t *feature_substitutes_map; - bool& insert_catch_all_feature_variation_record; + hb_set_t& catch_all_record_feature_idxes; // not stored in subset_plan hb_set_t *feature_indices; @@ -142,6 +142,8 @@ struct hb_subset_layout_context_t : const hb_map_t *feature_index_map; const hb_hashmap_t *feature_substitutes_map; hb_hashmap_t> *feature_record_cond_idx_map; + const hb_set_t *catch_all_record_feature_idxes; + const hb_hashmap_t> *feature_idx_tag_map; unsigned cur_script_index; unsigned cur_feature_var_record_idx; @@ -164,6 +166,8 @@ struct hb_subset_layout_context_t : feature_index_map = &c_->plan->gsub_features; feature_substitutes_map = &c_->plan->gsub_feature_substitutes_map; feature_record_cond_idx_map = c_->plan->user_axes_location.is_empty () ? nullptr : &c_->plan->gsub_feature_record_cond_idx_map; + catch_all_record_feature_idxes = &c_->plan->gsub_old_features; + feature_idx_tag_map = &c_->plan->gsub_old_feature_idx_tag_map; } else { @@ -172,6 +176,8 @@ struct hb_subset_layout_context_t : feature_index_map = &c_->plan->gpos_features; feature_substitutes_map = &c_->plan->gpos_feature_substitutes_map; feature_record_cond_idx_map = c_->plan->user_axes_location.is_empty () ? nullptr : &c_->plan->gpos_feature_record_cond_idx_map; + catch_all_record_feature_idxes = &c_->plan->gpos_old_features; + feature_idx_tag_map = &c_->plan->gpos_old_feature_idx_tag_map; } } @@ -454,6 +460,7 @@ struct FeatureParamsSize { TRACE_SANITIZE (this); if (unlikely (!c->check_struct (this))) return_trace (false); + hb_barrier (); /* This subtable has some "history", if you will. Some earlier versions of * Adobe tools calculated the offset of the FeatureParams subtable from the @@ -820,6 +827,7 @@ struct Feature TRACE_SANITIZE (this); if (unlikely (!(c->check_struct (this) && lookupIndex.sanitize (c)))) return_trace (false); + hb_barrier (); /* Some earlier versions of Adobe tools calculated the offset of the * FeatureParams subtable from the beginning of the FeatureList table! @@ -838,6 +846,7 @@ struct Feature unsigned int orig_offset = featureParams; if (unlikely (!featureParams.sanitize (c, this, closure ? closure->tag : HB_TAG_NONE))) return_trace (false); + hb_barrier (); if (featureParams == 0 && closure && closure->tag == HB_TAG ('s','i','z','e') && @@ -900,7 +909,8 @@ struct Record { TRACE_SANITIZE (this); const Record_sanitize_closure_t closure = {tag, base}; - return_trace (c->check_struct (this) && offset.sanitize (c, base, &closure)); + return_trace (c->check_struct (this) && + offset.sanitize (c, base, &closure)); } Tag tag; /* 4-byte Tag identifier */ @@ -1371,10 +1381,20 @@ struct Lookup if (lookupFlag & LookupFlag::UseMarkFilteringSet) { - if (unlikely (!c->serializer->extend (out))) return_trace (false); const HBUINT16 &markFilteringSet = StructAfter (subTable); - HBUINT16 &outMarkFilteringSet = StructAfter (out->subTable); - outMarkFilteringSet = markFilteringSet; + hb_codepoint_t *idx; + if (!c->plan->used_mark_sets_map.has (markFilteringSet, &idx)) + { + unsigned new_flag = lookupFlag; + new_flag &= ~LookupFlag::UseMarkFilteringSet; + out->lookupFlag = new_flag; + } + else + { + if (unlikely (!c->serializer->extend (out))) return_trace (false); + HBUINT16 &outMarkFilteringSet = StructAfter (out->subTable); + outMarkFilteringSet = *idx; + } } // Always keep the lookup even if it's empty. The rest of layout subsetting depends on lookup @@ -1391,6 +1411,7 @@ struct Lookup { TRACE_SANITIZE (this); if (!(c->check_struct (this) && subTable.sanitize (c))) return_trace (false); + hb_barrier (); unsigned subtables = get_subtable_count (); if (unlikely (!c->visit_subtables (subtables))) return_trace (false); @@ -1406,6 +1427,8 @@ struct Lookup if (unlikely (get_type () == TSubTable::Extension && !c->get_edit_count ())) { + hb_barrier (); + /* The spec says all subtables of an Extension lookup should * have the same type, which shall not be the Extension type * itself (but we already checked for that). @@ -2156,6 +2179,7 @@ struct ClassDef { TRACE_SANITIZE (this); if (!u.format.sanitize (c)) return_trace (false); + hb_barrier (); switch (u.format) { case 1: return_trace (u.format1.sanitize (c)); case 2: return_trace (u.format2.sanitize (c)); @@ -2534,7 +2558,9 @@ struct VarRegionList bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - return_trace (c->check_struct (this) && axesZ.sanitize (c, axisCount * regionCount)); + return_trace (c->check_struct (this) && + hb_barrier () && + axesZ.sanitize (c, axisCount * regionCount)); } bool serialize (hb_serialize_context_t *c, @@ -2728,6 +2754,7 @@ struct VarData TRACE_SANITIZE (this); return_trace (c->check_struct (this) && regionIndices.sanitize (c) && + hb_barrier () && wordCount () <= regionIndices.len && c->check_range (get_delta_bytes (), itemCount, @@ -3077,6 +3104,7 @@ struct VariationStore TRACE_SANITIZE (this); return_trace (c->check_struct (this) && + hb_barrier () && format == 1 && regions.sanitize (c, this) && dataSets.sanitize (c, this)); @@ -3330,8 +3358,12 @@ struct ConditionFormat1 Triple axis_range (-1.f, 0.f, 1.f); Triple *axis_limit; + bool axis_set_by_user = false; if (c->axes_location->has (axis_tag, &axis_limit)) + { axis_range = *axis_limit; + axis_set_by_user = true; + } float axis_min_val = axis_range.minimum; float axis_default_val = axis_range.middle; @@ -3350,8 +3382,7 @@ struct ConditionFormat1 return DROP_RECORD_WITH_VAR; //condition met and axis pinned, drop the condition - if (c->axes_location->has (axis_tag) && - c->axes_location->get (axis_tag).is_point ()) + if (axis_set_by_user && axis_range.is_point ()) return DROP_COND_WITH_VAR; if (filter_max_val != axis_max_val || filter_min_val != axis_min_val) @@ -3365,7 +3396,6 @@ struct ConditionFormat1 condition_map->set (axisIndex, val); return KEEP_COND_WITH_VAR; } - return KEEP_RECORD_WITH_VAR; } @@ -3424,6 +3454,7 @@ struct Condition { TRACE_SANITIZE (this); if (!u.format.sanitize (c)) return_trace (false); + hb_barrier (); switch (u.format) { case 1: return_trace (u.format1.sanitize (c)); default:return_trace (true); @@ -3497,12 +3528,15 @@ struct ConditionSet } bool subset (hb_subset_context_t *c, - hb_subset_layout_context_t *l) const + hb_subset_layout_context_t *l, + bool insert_catch_all) const { TRACE_SUBSET (this); auto *out = c->serializer->start_embed (this); if (unlikely (!out || !c->serializer->extend_min (out))) return_trace (false); + if (insert_catch_all) return_trace (true); + hb_set_t *retained_cond_set = nullptr; if (l->feature_record_cond_idx_map != nullptr) retained_cond_set = l->feature_record_cond_idx_map->get (l->cur_feature_var_record_idx); @@ -3548,27 +3582,51 @@ struct FeatureTableSubstitutionRecord } void collect_feature_substitutes_with_variations (hb_hashmap_t *feature_substitutes_map, + hb_set_t& catch_all_record_feature_idxes, const hb_set_t *feature_indices, const void *base) const { if (feature_indices->has (featureIndex)) + { feature_substitutes_map->set (featureIndex, &(base+feature)); + catch_all_record_feature_idxes.add (featureIndex); + } + } + + bool serialize (hb_subset_layout_context_t *c, + unsigned feature_index, + const Feature *f, const Tag *tag) + { + TRACE_SERIALIZE (this); + hb_serialize_context_t *s = c->subset_context->serializer; + if (unlikely (!s->extend_min (this))) return_trace (false); + + uint32_t *new_feature_idx; + if (!c->feature_index_map->has (feature_index, &new_feature_idx)) + return_trace (false); + + if (!s->check_assign (featureIndex, *new_feature_idx, HB_SERIALIZE_ERROR_INT_OVERFLOW)) + return_trace (false); + + s->push (); + bool ret = f->subset (c->subset_context, c, tag); + if (ret) s->add_link (feature, s->pop_pack ()); + else s->pop_discard (); + + return_trace (ret); } bool subset (hb_subset_layout_context_t *c, const void *base) const { TRACE_SUBSET (this); - if (!c->feature_index_map->has (featureIndex) || - c->feature_substitutes_map->has (featureIndex)) { - // Feature that is being substituted is not being retained, so we don't - // need this. + uint32_t *new_feature_index; + if (!c->feature_index_map->has (featureIndex, &new_feature_index)) return_trace (false); - } auto *out = c->subset_context->serializer->embed (this); if (unlikely (!out)) return_trace (false); - out->featureIndex = c->feature_index_map->get (featureIndex); + out->featureIndex = *new_feature_index; return_trace (out->feature.serialize_subset (c->subset_context, feature, base, c)); } @@ -3600,16 +3658,10 @@ struct FeatureTableSubstitution } void collect_lookups (const hb_set_t *feature_indexes, - const hb_hashmap_t *feature_substitutes_map, hb_set_t *lookup_indexes /* OUT */) const { + hb_iter (substitutions) | hb_filter (feature_indexes, &FeatureTableSubstitutionRecord::featureIndex) - | hb_filter ([feature_substitutes_map] (const FeatureTableSubstitutionRecord& record) - { - if (feature_substitutes_map == nullptr) return true; - return !feature_substitutes_map->has (record.featureIndex); - }) | hb_apply ([this, lookup_indexes] (const FeatureTableSubstitutionRecord& r) { r.collect_lookups (this, lookup_indexes); }) ; @@ -3634,11 +3686,14 @@ struct FeatureTableSubstitution void collect_feature_substitutes_with_variations (hb_collect_feature_substitutes_with_var_context_t *c) const { for (const FeatureTableSubstitutionRecord& record : substitutions) - record.collect_feature_substitutes_with_variations (c->feature_substitutes_map, c->feature_indices, this); + record.collect_feature_substitutes_with_variations (c->feature_substitutes_map, + c->catch_all_record_feature_idxes, + c->feature_indices, this); } bool subset (hb_subset_context_t *c, - hb_subset_layout_context_t *l) const + hb_subset_layout_context_t *l, + bool insert_catch_all) const { TRACE_SUBSET (this); auto *out = c->serializer->start_embed (*this); @@ -3647,6 +3702,22 @@ struct FeatureTableSubstitution out->version.major = version.major; out->version.minor = version.minor; + if (insert_catch_all) + { + for (unsigned feature_index : *(l->catch_all_record_feature_idxes)) + { + hb_pair_t *p; + if (!l->feature_idx_tag_map->has (feature_index, &p)) + return_trace (false); + auto *o = out->substitutions.serialize_append (c->serializer); + if (!o->serialize (l, feature_index, + reinterpret_cast (p->first), + reinterpret_cast (p->second))) + return_trace (false); + } + return_trace (true); + } + + substitutions.iter () | hb_apply (subset_record_array (l, &(out->substitutions), this)) ; @@ -3658,6 +3729,7 @@ struct FeatureTableSubstitution { TRACE_SANITIZE (this); return_trace (version.sanitize (c) && + hb_barrier () && likely (version.major == 1) && substitutions.sanitize (c, this)); } @@ -3676,10 +3748,9 @@ struct FeatureVariationRecord void collect_lookups (const void *base, const hb_set_t *feature_indexes, - const hb_hashmap_t *feature_substitutes_map, hb_set_t *lookup_indexes /* OUT */) const { - return (base+substitutions).collect_lookups (feature_indexes, feature_substitutes_map, lookup_indexes); + return (base+substitutions).collect_lookups (feature_indexes, lookup_indexes); } void closure_features (const void *base, @@ -3705,14 +3776,15 @@ struct FeatureVariationRecord } } - bool subset (hb_subset_layout_context_t *c, const void *base) const + bool subset (hb_subset_layout_context_t *c, const void *base, + bool insert_catch_all = false) const { TRACE_SUBSET (this); auto *out = c->subset_context->serializer->embed (this); if (unlikely (!out)) return_trace (false); - out->conditions.serialize_subset (c->subset_context, conditions, base, c); - out->substitutions.serialize_subset (c->subset_context, substitutions, base, c); + out->conditions.serialize_subset (c->subset_context, conditions, base, c, insert_catch_all); + out->substitutions.serialize_subset (c->subset_context, substitutions, base, c, insert_catch_all); return_trace (true); } @@ -3771,9 +3843,8 @@ struct FeatureVariations if (c->universal) break; } - if (c->variation_applied && !c->universal && - !c->record_cond_idx_map->is_empty ()) - c->insert_catch_all_feature_variation_record = true; + if (c->universal || c->record_cond_idx_map->is_empty ()) + c->catch_all_record_feature_idxes.reset (); } FeatureVariations* copy (hb_serialize_context_t *c) const @@ -3783,11 +3854,17 @@ struct FeatureVariations } void collect_lookups (const hb_set_t *feature_indexes, - const hb_hashmap_t *feature_substitutes_map, + const hb_hashmap_t> *feature_record_cond_idx_map, hb_set_t *lookup_indexes /* OUT */) const { - for (const FeatureVariationRecord& r : varRecords) - r.collect_lookups (this, feature_indexes, feature_substitutes_map, lookup_indexes); + unsigned count = varRecords.len; + for (unsigned int i = 0; i < count; i++) + { + if (feature_record_cond_idx_map && + !feature_record_cond_idx_map->has (i)) + continue; + varRecords[i].collect_lookups (this, feature_indexes, lookup_indexes); + } } void closure_features (const hb_map_t *lookup_indexes, @@ -3832,6 +3909,13 @@ struct FeatureVariations l->cur_feature_var_record_idx = i; subset_record_array (l, &(out->varRecords), this) (varRecords[i]); } + + if (out->varRecords.len && !l->catch_all_record_feature_idxes->is_empty ()) + { + bool insert_catch_all_record = true; + subset_record_array (l, &(out->varRecords), this, insert_catch_all_record) (varRecords[0]); + } + return_trace (bool (out->varRecords)); } @@ -3839,6 +3923,7 @@ struct FeatureVariations { TRACE_SANITIZE (this); return_trace (version.sanitize (c) && + hb_barrier () && likely (version.major == 1) && varRecords.sanitize (c, this)); } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos.hh index 662ec9d3e8c..499ad673e42 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos.hh @@ -2051,6 +2051,7 @@ struct Rule { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && + hb_barrier () && c->check_range (inputZ.arrayZ, inputZ.item_size * (inputCount ? inputCount - 1 : 0) + LookupRecord::static_size * lookupCount)); @@ -2826,6 +2827,7 @@ struct ContextFormat3 { TRACE_SANITIZE (this); if (unlikely (!c->check_struct (this))) return_trace (false); + hb_barrier (); unsigned int count = glyphCount; if (unlikely (!count)) return_trace (false); /* We want to access coverageZ[0] freely. */ if (unlikely (!c->check_array (coverageZ.arrayZ, count))) return_trace (false); @@ -3219,10 +3221,13 @@ struct ChainRule TRACE_SANITIZE (this); /* Hyper-optimized sanitized because this is really hot. */ if (unlikely (!backtrack.len.sanitize (c))) return_trace (false); + hb_barrier (); const auto &input = StructAfter (backtrack); if (unlikely (!input.lenP1.sanitize (c))) return_trace (false); + hb_barrier (); const auto &lookahead = StructAfter (input); if (unlikely (!lookahead.len.sanitize (c))) return_trace (false); + hb_barrier (); const auto &lookup = StructAfter (lookahead); return_trace (likely (lookup.sanitize (c))); } @@ -4121,11 +4126,14 @@ struct ChainContextFormat3 { TRACE_SANITIZE (this); if (unlikely (!backtrack.sanitize (c, this))) return_trace (false); + hb_barrier (); const auto &input = StructAfter (backtrack); if (unlikely (!input.sanitize (c, this))) return_trace (false); + hb_barrier (); if (unlikely (!input.len)) return_trace (false); /* To be consistent with Context. */ const auto &lookahead = StructAfter (input); if (unlikely (!lookahead.sanitize (c, this))) return_trace (false); + hb_barrier (); const auto &lookup = StructAfter (lookahead); return_trace (likely (lookup.sanitize (c))); } @@ -4209,6 +4217,7 @@ struct ExtensionFormat1 { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && + hb_barrier () && extensionLookupType != T::SubTable::Extension); } @@ -4472,13 +4481,6 @@ struct GSUBGPOSVersion1_2 if (!c->subset_context->serializer->extend_min (&out->featureVars)) return_trace (false); - // TODO(qxliu76): the current implementation doesn't correctly handle feature variations - // that are dropped by instancing when the associated conditions don't trigger. - // Since partial instancing isn't yet supported this isn't an issue yet but will - // need to be fixed for partial instancing. - - - // if all axes are pinned all feature vars are dropped. bool ret = !c->subset_context->plan->all_axes_pinned && out->featureVars.serialize_subset (c->subset_context, featureVars, this, c); @@ -4513,6 +4515,7 @@ struct GSUBGPOS { TRACE_SANITIZE (this); if (unlikely (!u.version.sanitize (c))) return_trace (false); + hb_barrier (); switch (u.version.major) { case 1: return_trace (u.version1.sanitize (c)); #ifndef HB_NO_BEYOND_64K @@ -4638,11 +4641,11 @@ struct GSUBGPOS } void feature_variation_collect_lookups (const hb_set_t *feature_indexes, - const hb_hashmap_t *feature_substitutes_map, + const hb_hashmap_t> *feature_record_cond_idx_map, hb_set_t *lookup_indexes /* OUT */) const { #ifndef HB_NO_VAR - get_feature_variations ().collect_lookups (feature_indexes, feature_substitutes_map, lookup_indexes); + get_feature_variations ().collect_lookups (feature_indexes, feature_record_cond_idx_map, lookup_indexes); #endif } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-jstf-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-jstf-table.hh index a1c125b11b6..0ba7eaa2c5f 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-jstf-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-jstf-table.hh @@ -214,6 +214,7 @@ struct JSTF { TRACE_SANITIZE (this); return_trace (version.sanitize (c) && + hb_barrier () && likely (version.major == 1) && scriptList.sanitize (c, this)); } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math-table.hh index b11da464b22..32e497aef60 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math-table.hh @@ -333,6 +333,7 @@ struct MathKern { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && + hb_barrier () && c->check_array (mathValueRecordsZ.arrayZ, 2 * heightCount + 1) && sanitize_math_value_records (c)); } @@ -984,6 +985,7 @@ struct MathVariants return_trace (c->check_struct (this) && vertGlyphCoverage.sanitize (c, this) && horizGlyphCoverage.sanitize (c, this) && + hb_barrier () && c->check_array (glyphConstruction.arrayZ, vertGlyphCount + horizGlyphCount) && sanitize_offsets (c)); } @@ -1103,6 +1105,7 @@ struct MATH TRACE_SANITIZE (this); return_trace (version.sanitize (c) && likely (version.major == 1) && + hb_barrier () && mathConstants.sanitize (c, this) && mathGlyphInfo.sanitize (c, this) && mathVariants.sanitize (c, this)); diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-maxp-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-maxp-table.hh index 0f4cc414ef8..8f000526b96 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-maxp-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-maxp-table.hh @@ -85,7 +85,7 @@ struct maxp TRACE_SANITIZE (this); if (unlikely (!c->check_struct (this))) return_trace (false); - + hb_barrier (); if (version.major == 1) { const maxpV1Tail &v1 = StructAfter (*this); @@ -103,6 +103,7 @@ struct maxp maxp_prime->numGlyphs = hb_min (c->plan->num_output_glyphs (), 0xFFFFu); if (maxp_prime->version.major == 1) { + hb_barrier (); const maxpV1Tail *src_v1 = &StructAfter (*this); maxpV1Tail *dest_v1 = c->serializer->embed (src_v1); if (unlikely (!dest_v1)) return_trace (false); diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-meta-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-meta-table.hh index e1b68bcf91d..658db584c7d 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-meta-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-meta-table.hh @@ -51,6 +51,7 @@ struct DataMap { TRACE_SANITIZE (this); return_trace (likely (c->check_struct (this) && + hb_barrier () && dataZ.sanitize (c, base, dataLength))); } @@ -101,6 +102,7 @@ struct meta { TRACE_SANITIZE (this); return_trace (likely (c->check_struct (this) && + hb_barrier () && version == 1 && dataMaps.sanitize (c, this))); } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-os2-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-os2-table.hh index 19330b9bd4e..8c2e696f56c 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-os2-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-os2-table.hh @@ -209,6 +209,23 @@ struct OS2 return ret; } + static unsigned calc_avg_char_width (const hb_hashmap_t>& hmtx_map) + { + unsigned num = 0; + unsigned total_width = 0; + for (const auto& _ : hmtx_map.values_ref ()) + { + unsigned width = _.first; + if (width) + { + total_width += width; + num++; + } + } + + return num ? (unsigned) roundf (total_width / num) : 0; + } + bool subset (hb_subset_context_t *c) const { TRACE_SUBSET (this); @@ -239,10 +256,16 @@ struct OS2 if (os2_prime->version >= 2) { + hb_barrier (); auto *table = & const_cast (os2_prime->v2 ()); HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_X_HEIGHT, sxHeight); HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_CAP_HEIGHT, sCapHeight); } + + unsigned avg_char_width = calc_avg_char_width (c->plan->hmtx_map); + if (!c->serializer->check_assign (os2_prime->xAvgCharWidth, avg_char_width, + HB_SERIALIZE_ERROR_INT_OVERFLOW)) + return_trace (false); } #endif @@ -334,6 +357,7 @@ struct OS2 { TRACE_SANITIZE (this); if (unlikely (!c->check_struct (this))) return_trace (false); + hb_barrier (); if (unlikely (version >= 1 && !v1X.sanitize (c))) return_trace (false); if (unlikely (version >= 2 && !v2X.sanitize (c))) return_trace (false); if (unlikely (version >= 5 && !v5X.sanitize (c))) return_trace (false); 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 aaecc348ee1..8132dcfb91b 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 @@ -122,7 +122,10 @@ struct post } if (glyph_names && version.major == 2) + { + hb_barrier (); return_trace (v2X.subset (c)); + } return_trace (true); } @@ -138,6 +141,7 @@ struct post version = table->version.to_int (); if (version != 0x00020000) return; + hb_barrier (); const postV2Tail &v2 = table->v2X; @@ -217,10 +221,16 @@ struct post unsigned int get_glyph_count () const { if (version == 0x00010000) + { + hb_barrier (); return format1_names_length; + } if (version == 0x00020000) + { + hb_barrier (); return glyphNameIndex->len; + } return 0; } @@ -245,13 +255,18 @@ struct post { if (version == 0x00010000) { + hb_barrier (); if (glyph >= format1_names_length) return hb_bytes_t (); return format1_names (glyph); } - if (version != 0x00020000 || glyph >= glyphNameIndex->len) + if (version != 0x00020000) + return hb_bytes_t (); + hb_barrier (); + + if (glyph >= glyphNameIndex->len) return hb_bytes_t (); unsigned int index = glyphNameIndex->arrayZ[glyph]; @@ -284,6 +299,7 @@ struct post { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && + hb_barrier () && (version.to_int () == 0x00010000 || (version.to_int () == 0x00020000 && v2X.sanitize (c)) || version.to_int () == 0x00030000)); 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 f7bb3791cab..58b3cd74dff 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 @@ -327,6 +327,7 @@ struct AxisValueFormat4 { TRACE_SANITIZE (this); return_trace (likely (c->check_struct (this) && + hb_barrier () && axisValues.sanitize (c, axisCount))); } @@ -416,6 +417,7 @@ struct AxisValue TRACE_SANITIZE (this); if (unlikely (!c->check_struct (this))) return_trace (false); + hb_barrier (); switch (u.format) { @@ -560,6 +562,7 @@ struct STAT { TRACE_SANITIZE (this); return_trace (likely (c->check_struct (this) && + hb_barrier () && version.major == 1 && version.minor > 0 && designAxesOffset.sanitize (c, this, designAxisCount) && diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-avar-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-avar-table.hh index f3754aa6b8f..b2e5d87a3cf 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-avar-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-avar-table.hh @@ -273,6 +273,7 @@ struct avar { TRACE_SANITIZE (this); if (!(version.sanitize (c) && + hb_barrier () && (version.major == 1 #ifndef HB_NO_AVAR2 || version.major == 2 @@ -293,6 +294,7 @@ struct avar #ifndef HB_NO_AVAR2 if (version.major < 2) return_trace (true); + hb_barrier (); const auto &v2 = * (const avarV2Tail *) map; if (unlikely (!v2.sanitize (c, this))) @@ -316,6 +318,7 @@ struct avar #ifndef HB_NO_AVAR2 if (version.major < 2) return; + hb_barrier (); for (; count < axisCount; count++) map = &StructAfter (*map); diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-common.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-common.hh index b6fe13f1137..eff6df380f8 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-common.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-common.hh @@ -119,6 +119,7 @@ struct DeltaSetIndexMapFormat01 { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && + hb_barrier () && c->check_range (mapDataZ.arrayZ, mapCount, get_width ())); @@ -191,6 +192,7 @@ struct DeltaSetIndexMap { TRACE_SANITIZE (this); if (!u.format.sanitize (c)) return_trace (false); + hb_barrier (); switch (u.format) { case 0: return_trace (u.format0.sanitize (c)); case 1: return_trace (u.format1.sanitize (c)); @@ -434,6 +436,8 @@ enum packed_delta_flag_t struct tuple_delta_t { + static constexpr bool realloc_move = true; // Watch out when adding new members! + public: hb_hashmap_t axis_tuples; @@ -514,14 +518,19 @@ struct tuple_delta_t return *this; unsigned num = indices.length; - for (unsigned i = 0; i < num; i++) - { - if (!indices.arrayZ[i]) continue; - - deltas_x[i] *= scalar; - if (deltas_y) - deltas_y[i] *= scalar; - } + if (deltas_y) + for (unsigned i = 0; i < num; i++) + { + if (!indices.arrayZ[i]) continue; + deltas_x[i] *= scalar; + deltas_y[i] *= scalar; + } + else + for (unsigned i = 0; i < num; i++) + { + if (!indices.arrayZ[i]) continue; + deltas_x[i] *= scalar; + } return *this; } @@ -767,7 +776,7 @@ struct tuple_delta_t unsigned encoded_len = 0; while (i < num_deltas) { - int val = deltas[i]; + int val = deltas.arrayZ[i]; if (val == 0) encoded_len += encode_delta_run_as_zeroes (i, encoded_bytes.sub_array (encoded_len), deltas); else if (val >= -128 && val <= 127) @@ -786,7 +795,7 @@ struct tuple_delta_t unsigned run_length = 0; auto it = encoded_bytes.iter (); unsigned encoded_len = 0; - while (i < num_deltas && deltas[i] == 0) + while (i < num_deltas && deltas.arrayZ[i] == 0) { i++; run_length++; @@ -815,13 +824,13 @@ struct tuple_delta_t unsigned num_deltas = deltas.length; while (i < num_deltas) { - int val = deltas[i]; + int val = deltas.arrayZ[i]; if (val > 127 || val < -128) break; /* from fonttools: if there're 2 or more zeros in a sequence, * it is better to start a new run to save bytes. */ - if (val == 0 && i + 1 < num_deltas && deltas[i+1] == 0) + if (val == 0 && i + 1 < num_deltas && deltas.arrayZ[i+1] == 0) break; i++; @@ -838,7 +847,7 @@ struct tuple_delta_t for (unsigned j = 0; j < 64; j++) { - *it++ = static_cast (deltas[start + j]); + *it++ = static_cast (deltas.arrayZ[start + j]); encoded_len++; } @@ -853,7 +862,7 @@ struct tuple_delta_t while (start < i) { - *it++ = static_cast (deltas[start++]); + *it++ = static_cast (deltas.arrayZ[start++]); encoded_len++; } } @@ -869,8 +878,8 @@ struct tuple_delta_t unsigned num_deltas = deltas.length; while (i < num_deltas) { - int val = deltas[i]; - + int val = deltas.arrayZ[i]; + /* start a new run for a single zero value*/ if (val == 0) break; @@ -879,7 +888,7 @@ struct tuple_delta_t * Only start a new run when there're 2 continuous such values. */ if (val >= -128 && val <= 127 && i + 1 < num_deltas && - deltas[i+1] >= -128 && deltas[i+1] <= 127) + deltas.arrayZ[i+1] >= -128 && deltas.arrayZ[i+1] <= 127) break; i++; @@ -895,7 +904,7 @@ struct tuple_delta_t for (unsigned j = 0; j < 64; j++) { - int16_t delta_val = deltas[start + j]; + int16_t delta_val = deltas.arrayZ[start + j]; *it++ = static_cast (delta_val >> 8); *it++ = static_cast (delta_val & 0xFF); @@ -912,7 +921,7 @@ struct tuple_delta_t encoded_len++; while (start < i) { - int16_t delta_val = deltas[start++]; + int16_t delta_val = deltas.arrayZ[start++]; *it++ = static_cast (delta_val >> 8); *it++ = static_cast (delta_val & 0xFF); @@ -1175,6 +1184,7 @@ struct TupleVariationData bool create_from_item_var_data (const VarData &var_data, const hb_vector_t>& regions, const hb_map_t& axes_old_index_tag_map, + unsigned& item_count, const hb_inc_bimap_t* inner_map = nullptr) { /* NULL offset, to keep original varidx valid, just return */ @@ -1184,7 +1194,8 @@ struct TupleVariationData unsigned num_regions = var_data.get_region_index_count (); if (!tuple_vars.alloc (num_regions)) return false; - unsigned item_count = inner_map ? inner_map->get_population () : var_data.get_item_count (); + item_count = inner_map ? inner_map->get_population () : var_data.get_item_count (); + if (!item_count) return true; unsigned row_size = var_data.get_row_size (); const HBUINT8 *delta_bytes = var_data.get_delta_bytes (); @@ -1775,6 +1786,14 @@ struct item_variations_t * have the same num of deltas (rows) */ hb_vector_t vars; + /* num of retained rows for each subtable, there're 2 cases when var_data is empty: + * 1. retained item_count is zero + * 2. regions is empty and item_count is non-zero. + * when converting to tuples, both will be dropped because the tuple is empty, + * however, we need to retain 2. as all-zero rows to keep original varidx + * valid, so we need a way to remember the num of rows for each subtable */ + hb_vector_t var_data_num_rows; + /* original region list, decompiled from item varstore, used when rebuilding * region list after instantiation */ hb_vector_t> orig_region_list; @@ -1836,22 +1855,26 @@ struct item_variations_t unsigned num_var_data = varStore.get_sub_table_count (); if (inner_maps && inner_maps.length != num_var_data) return false; - if (!vars.alloc (num_var_data)) return false; + if (!vars.alloc (num_var_data) || + !var_data_num_rows.alloc (num_var_data)) return false; for (unsigned i = 0; i < num_var_data; i++) { if (inner_maps && !inner_maps.arrayZ[i].get_population ()) continue; tuple_variations_t var_data_tuples; + unsigned item_count = 0; if (!var_data_tuples.create_from_item_var_data (varStore.get_sub_table (i), orig_region_list, axes_old_index_tag_map, + item_count, inner_maps ? &(inner_maps.arrayZ[i]) : nullptr)) return false; + var_data_num_rows.push (item_count); vars.push (std::move (var_data_tuples)); } - return !vars.in_error (); + return !vars.in_error () && !var_data_num_rows.in_error () && vars.length == var_data_num_rows.length; } bool instantiate_tuple_vars (const hb_hashmap_t& normalized_axes_location, @@ -1973,12 +1996,8 @@ struct item_variations_t unsigned num_cols = region_list.length; /* pre-alloc a 2D vector for all sub_table's VarData rows */ unsigned total_rows = 0; - for (unsigned major = 0; major < vars.length; major++) - { - const tuple_variations_t& tuples = vars[major]; - /* all tuples in each sub_table should have same num of deltas(num rows) */ - total_rows += tuples.tuple_vars[0].deltas_x.length; - } + for (unsigned major = 0; major < var_data_num_rows.length; major++) + total_rows += var_data_num_rows[major]; if (!delta_rows.resize (total_rows)) return false; /* init all rows to [0]*num_cols */ @@ -1998,7 +2017,7 @@ struct item_variations_t /* deltas are stored in tuples(column based), convert them back into items * (row based) delta */ const tuple_variations_t& tuples = vars[major]; - unsigned num_rows = tuples.tuple_vars[0].deltas_x.length; + unsigned num_rows = var_data_num_rows[major]; for (const tuple_delta_t& tuple: tuples.tuple_vars) { if (tuple.deltas_x.length != num_rows) diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-cvar-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-cvar-table.hh index 381ae3c616b..3798ad3e3e5 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-cvar-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-cvar-table.hh @@ -45,7 +45,8 @@ struct cvar { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && - version.sanitize (c) && likely (version.major == 1) && + hb_barrier () && + likely (version.major == 1) && tupleVariationData.sanitize (c)); } 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 4c4957bd711..07d7586baac 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 @@ -131,6 +131,7 @@ struct InstanceRecord { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && + hb_barrier () && c->check_array (coordinatesZ.arrayZ, axis_count)); } @@ -277,8 +278,10 @@ struct fvar { TRACE_SANITIZE (this); return_trace (version.sanitize (c) && + hb_barrier () && likely (version.major == 1) && c->check_struct (this) && + hb_barrier () && axisSize == 20 && /* Assumed in our code. */ instanceSize >= axisCount * 4 + 4 && get_axes ().sanitize (c) && diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-gvar-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-gvar-table.hh index 8ef9f0ec45c..1c7a1f6c1e9 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-gvar-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-gvar-table.hh @@ -296,7 +296,9 @@ struct gvar bool sanitize_shallow (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - return_trace (c->check_struct (this) && (version.major == 1) && + return_trace (c->check_struct (this) && + hb_barrier () && + (version.major == 1) && sharedTuples.sanitize (c, this, axisCount * sharedTupleCount) && (is_long_offset () ? c->check_array (get_long_offset_array (), c->get_num_glyphs () + 1) : @@ -426,7 +428,10 @@ struct gvar subset_data_size += get_glyph_var_data_bytes (c->source_blob, glyph_count, old_gid).length; } - bool long_offset = subset_data_size & ~0xFFFFu; + bool long_offset = (subset_data_size & ~0xFFFFu); + #ifdef HB_EXPERIMENTAL_API + long_offset = long_offset || (c->plan->flags & HB_SUBSET_FLAGS_IFTB_REQUIREMENTS); +#endif out->flags = long_offset ? 1 : 0; HBUINT8 *subset_offsets = c->serializer->allocate_size ((long_offset ? 4 : 2) * (num_glyphs + 1), false); @@ -444,6 +449,8 @@ struct gvar hb_memcpy (tuples, this+sharedTuples, shared_tuple_size); } + /* This ordering relative to the shared tuples array, which puts the glyphVariationData + last in the table, is required when HB_SUBSET_FLAGS_IFTB_REQUIREMENTS is set */ char *subset_data = c->serializer->allocate_size (subset_data_size, false); if (!subset_data) return_trace (false); out->dataZ = subset_data - (char *) out; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-hvar-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-hvar-table.hh index ca1ea1ca8c2..53a4642d383 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-hvar-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-hvar-table.hh @@ -288,6 +288,7 @@ struct HVARVVAR { TRACE_SANITIZE (this); return_trace (version.sanitize (c) && + hb_barrier () && likely (version.major == 1) && varStore.sanitize (c, this) && advMap.sanitize (c, this) && diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-mvar-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-mvar-table.hh index ceabc9a3e29..6d697776189 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-mvar-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-mvar-table.hh @@ -77,8 +77,10 @@ struct MVAR { TRACE_SANITIZE (this); return_trace (version.sanitize (c) && + hb_barrier () && likely (version.major == 1) && c->check_struct (this) && + hb_barrier () && valueRecordSize >= VariationValueRecord::static_size && varStore.sanitize (c, this) && c->check_range (valuesZ.arrayZ, diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-vorg-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-vorg-table.hh index 671b6d2c290..95ae8ef5590 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-vorg-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-vorg-table.hh @@ -117,6 +117,7 @@ struct VORG { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && + hb_barrier () && version.major == 1 && vertYOrigins.sanitize (c)); } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-priority-queue.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-priority-queue.hh index 2c8ccbfb688..9b962a29d9b 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-priority-queue.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-priority-queue.hh @@ -55,6 +55,9 @@ struct hb_priority_queue_t bool in_error () const { return heap.in_error (); } + bool alloc (unsigned size) + { return heap.alloc (size); } + #ifndef HB_OPTIMIZE_SIZE HB_ALWAYS_INLINE #endif diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-sanitize.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-sanitize.hh index f2b7da1674b..408649c7689 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-sanitize.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-sanitize.hh @@ -134,7 +134,10 @@ struct hb_sanitize_context_t : const char *get_name () { return "SANITIZE"; } template bool may_dispatch (const T *obj HB_UNUSED, const F *format) - { return format->sanitize (this); } + { + return format->sanitize (this) && + hb_barrier (); + } static return_t default_return_value () { return true; } static return_t no_dispatch_return_value () { return false; } bool stop_sublookup_iteration (const return_t r) const { return !r; } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.hh index 7d1c941e4dc..ff2a170d2d1 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.hh @@ -35,6 +35,8 @@ template struct hb_sparseset_t { + static constexpr bool realloc_move = true; + hb_object_header_t header; impl_t s; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-cff1.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-cff1.cc index 872cba66725..e9dd5d6427b 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-cff1.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-cff1.cc @@ -620,6 +620,12 @@ struct cff1_subset_plan drop_hints = plan->flags & HB_SUBSET_FLAGS_NO_HINTING; desubroutinize = plan->flags & HB_SUBSET_FLAGS_DESUBROUTINIZE; + #ifdef HB_EXPERIMENTAL_API + min_charstrings_off_size = (plan->flags & HB_SUBSET_FLAGS_IFTB_REQUIREMENTS) ? 4 : 0; + #else + min_charstrings_off_size = 0; + #endif + subset_charset = !acc.is_predef_charset (); if (!subset_charset) /* check whether the subset renumbers any glyph IDs */ @@ -778,13 +784,43 @@ struct cff1_subset_plan unsigned int topDictModSIDs[name_dict_values_t::ValCount]; bool desubroutinize = false; + + unsigned min_charstrings_off_size = 0; }; } // namespace OT +static bool _serialize_cff1_charstrings (hb_serialize_context_t *c, + struct OT::cff1_subset_plan &plan, + const OT::cff1::accelerator_subset_t &acc) +{ + c->push (); + + unsigned data_size = 0; + unsigned total_size = CFF1CharStrings::total_size (plan.subset_charstrings, &data_size, plan.min_charstrings_off_size); + if (unlikely (!c->start_zerocopy (total_size))) + return false; + + auto *cs = c->start_embed (); + if (unlikely (!cs->serialize (c, plan.subset_charstrings, &data_size, plan.min_charstrings_off_size))) { + c->pop_discard (); + return false; + } + + plan.info.char_strings_link = c->pop_pack (false); + return true; +} + bool OT::cff1::accelerator_subset_t::serialize (hb_serialize_context_t *c, struct OT::cff1_subset_plan &plan) const { + /* push charstrings onto the object stack first which will ensure it packs as the last + object in the table. Keeping the chastrings last satisfies the requirements for patching + via IFTB. If this ordering needs to be changed in the future, charstrings should be left + at the end whenever HB_SUBSET_FLAGS_ITFB_REQUIREMENTS is enabled. */ + if (!_serialize_cff1_charstrings(c, plan, *this)) + return false; + /* private dicts & local subrs */ for (int i = (int) privateDicts.length; --i >= 0 ;) { @@ -823,25 +859,6 @@ OT::cff1::accelerator_subset_t::serialize (hb_serialize_context_t *c, if (!is_CID ()) plan.info.privateDictInfo = plan.fontdicts_mod[0].privateDictInfo; - /* CharStrings */ - { - c->push (); - - unsigned data_size = 0; - unsigned total_size = CFF1CharStrings::total_size (plan.subset_charstrings, &data_size); - if (unlikely (!c->start_zerocopy (total_size))) - return false; - - auto *cs = c->start_embed (); - if (likely (cs->serialize (c, plan.subset_charstrings, &data_size))) - plan.info.char_strings_link = c->pop_pack (false); - else - { - c->pop_discard (); - return false; - } - } - /* FDArray (FD Index) */ if (fdArray != &Null (CFF1FDArray)) { diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-cff2.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-cff2.cc index 3c52fb9c2c3..abc108e5715 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-cff2.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-cff2.cc @@ -439,6 +439,12 @@ struct cff2_subset_plan desubroutinize = plan->flags & HB_SUBSET_FLAGS_DESUBROUTINIZE || pinned; // For instancing we need this path + #ifdef HB_EXPERIMENTAL_API + min_charstrings_off_size = (plan->flags & HB_SUBSET_FLAGS_IFTB_REQUIREMENTS) ? 4 : 0; + #else + min_charstrings_off_size = 0; + #endif + if (desubroutinize) { /* Flatten global & local subrs */ @@ -510,14 +516,45 @@ struct cff2_subset_plan bool drop_hints = false; bool desubroutinize = false; + + unsigned min_charstrings_off_size = 0; }; } // namespace OT +static bool _serialize_cff2_charstrings (hb_serialize_context_t *c, + cff2_subset_plan &plan, + const OT::cff2::accelerator_subset_t &acc) +{ + c->push (); + + unsigned data_size = 0; + unsigned total_size = CFF2CharStrings::total_size (plan.subset_charstrings, &data_size, plan.min_charstrings_off_size); + if (unlikely (!c->start_zerocopy (total_size))) + return false; + + auto *cs = c->start_embed (); + if (unlikely (!cs->serialize (c, plan.subset_charstrings, &data_size, plan.min_charstrings_off_size))) + { + c->pop_discard (); + return false; + } + + plan.info.char_strings_link = c->pop_pack (false); + return true; +} + bool OT::cff2::accelerator_subset_t::serialize (hb_serialize_context_t *c, struct cff2_subset_plan &plan, hb_array_t normalized_coords) const { + /* push charstrings onto the object stack first which will ensure it packs as the last + object in the table. Keeping the chastrings last satisfies the requirements for patching + via IFTB. If this ordering needs to be changed in the future, charstrings should be left + at the end whenever HB_SUBSET_FLAGS_ITFB_REQUIREMENTS is enabled. */ + if (!_serialize_cff2_charstrings(c, plan, *this)) + return false; + /* private dicts & local subrs */ hb_vector_t private_dict_infos; if (unlikely (!private_dict_infos.resize (plan.subset_fdcount))) return false; @@ -556,25 +593,6 @@ OT::cff2::accelerator_subset_t::serialize (hb_serialize_context_t *c, } } - /* CharStrings */ - { - c->push (); - - unsigned data_size = 0; - unsigned total_size = CFF2CharStrings::total_size (plan.subset_charstrings, &data_size); - if (unlikely (!c->start_zerocopy (total_size))) - return false; - - auto *cs = c->start_embed (); - if (likely (cs->serialize (c, plan.subset_charstrings, &data_size))) - plan.info.char_strings_link = c->pop_pack (false); - else - { - c->pop_discard (); - return false; - } - } - /* FDSelect */ if (fdSelect != &Null (CFF2FDSelect)) { 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 0277d3d3d6a..1e0a89a630d 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 @@ -123,6 +123,12 @@ hb_subset_input_t::hb_subset_input_t () //justify HB_TAG ('j', 'a', 'l', 't'), // HarfBuzz doesn't use; others might + //East Asian spacing + HB_TAG ('c', 'h', 'w', 's'), + HB_TAG ('v', 'c', 'h', 'w'), + HB_TAG ('h', 'a', 'l', 't'), + HB_TAG ('v', 'h', 'a', 'l'), + //private HB_TAG ('H', 'a', 'r', 'f'), HB_TAG ('H', 'A', 'R', 'F'), diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-instancer-solver.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-instancer-solver.cc index 4cb3f8a4852..4876bc43797 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-instancer-solver.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-instancer-solver.cc @@ -168,12 +168,14 @@ _solve (Triple tent, Triple axisLimit, bool negative = false) * | * crossing */ - if (gain > outGain) + if (gain >= outGain) { + // Note that this is the branch taken if both gain and outGain are 0. + // Crossing point on the axis. float crossing = peak + (1 - gain) * (upper - peak); - Triple loc{axisDef, peak, crossing}; + Triple loc{hb_max (lower, axisDef), peak, crossing}; float scalar = 1.f; // The part before the crossing point. @@ -253,7 +255,7 @@ _solve (Triple tent, Triple axisLimit, bool negative = false) * axisDef axisMax */ float newUpper = peak + (1 - gain) * (upper - peak); - assert (axisMax <= newUpper); // Because outGain >= gain + assert (axisMax <= newUpper); // Because outGain > gain if (newUpper <= axisDef + (axisMax - axisDef) * 2) { upper = newUpper; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan-member-list.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan-member-list.hh index 8bc1fcb5682..71da80e3875 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan-member-list.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan-member-list.hh @@ -70,6 +70,9 @@ HB_SUBSET_PLAN_MEMBER (hb_set_t, _glyphset_colred) HB_SUBSET_PLAN_MEMBER (hb_map_t, gsub_lookups) HB_SUBSET_PLAN_MEMBER (hb_map_t, gpos_lookups) +//use_mark_sets mapping: old->new +HB_SUBSET_PLAN_MEMBER (hb_map_t, used_mark_sets_map) + //active langsys we'd like to retain HB_SUBSET_PLAN_MEMBER (hb_hashmap_t E(>), gsub_langsys) HB_SUBSET_PLAN_MEMBER (hb_hashmap_t E(>), gpos_langsys) @@ -87,6 +90,15 @@ HB_SUBSET_PLAN_MEMBER (hb_hashmap_t E(>), gpo HB_SUBSET_PLAN_MEMBER (hb_hashmap_t E(), gsub_feature_substitutes_map) HB_SUBSET_PLAN_MEMBER (hb_hashmap_t E(), gpos_feature_substitutes_map) +// old feature_indexes set, used to reinstate the old features +HB_SUBSET_PLAN_MEMBER (hb_set_t, gsub_old_features) +HB_SUBSET_PLAN_MEMBER (hb_set_t, gpos_old_features) + +//feature_index->pair of (address of old feature, feature tag), used for inserting a catch all record +//if necessary +HB_SUBSET_PLAN_MEMBER (hb_hashmap_t E()>), gsub_old_feature_idx_tag_map) +HB_SUBSET_PLAN_MEMBER (hb_hashmap_t E()>), gpos_old_feature_idx_tag_map) + //active layers/palettes we'd like to retain HB_SUBSET_PLAN_MEMBER (hb_map_t, colrv1_layers) HB_SUBSET_PLAN_MEMBER (hb_map_t, colr_palettes) 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 c688b7187b2..5786223196d 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 @@ -150,7 +150,8 @@ static void _collect_layout_indices (hb_subset_plan_t *plan, hb_set_t *feature_indices, /* OUT */ hb_hashmap_t> *feature_record_cond_idx_map, /* OUT */ hb_hashmap_t *feature_substitutes_map, /* OUT */ - bool& insert_catch_all_feature_variation_record) + hb_set_t& catch_all_record_feature_idxes, /* OUT */ + hb_hashmap_t>& catch_all_record_idx_feature_map /* OUT */) { unsigned num_features = table.get_feature_count (); hb_vector_t features; @@ -186,7 +187,7 @@ static void _collect_layout_indices (hb_subset_plan_t *plan, &plan->axes_location, feature_record_cond_idx_map, feature_substitutes_map, - insert_catch_all_feature_variation_record, + catch_all_record_feature_idxes, feature_indices, false, false, @@ -208,17 +209,25 @@ static void _collect_layout_indices (hb_subset_plan_t *plan, f->add_lookup_indexes_to (lookup_indices); } +#ifndef HB_NO_VAR + if (catch_all_record_feature_idxes) + { + for (unsigned feature_index : catch_all_record_feature_idxes) + { + const OT::Feature& f = table.get_feature (feature_index); + f.add_lookup_indexes_to (lookup_indices); + const void *tag = reinterpret_cast (&(table.get_feature_list ().get_tag (feature_index))); + catch_all_record_idx_feature_map.set (feature_index, hb_pair (&f, tag)); + } + } + // If all axes are pinned then all feature variations will be dropped so there's no need // to collect lookups from them. if (!plan->all_axes_pinned) - { - // TODO(qxliu76): this collection doesn't work correctly for feature variations that are dropped - // but not applied. The collection will collect and retain the lookup indices - // associated with those dropped but not activated rules. Since partial instancing - // isn't yet supported this isn't an issue yet but will need to be fixed for - // partial instancing. - table.feature_variation_collect_lookups (feature_indices, feature_substitutes_map, lookup_indices); - } + table.feature_variation_collect_lookups (feature_indices, + plan->user_axes_location.is_empty () ? nullptr: feature_record_cond_idx_map, + lookup_indices); +#endif } @@ -302,7 +311,8 @@ _closure_glyphs_lookups_features (hb_subset_plan_t *plan, script_langsys_map *langsys_map, hb_hashmap_t> *feature_record_cond_idx_map, hb_hashmap_t *feature_substitutes_map, - bool& insert_catch_all_feature_variation_record) + hb_set_t &catch_all_record_feature_idxes, + hb_hashmap_t>& catch_all_record_idx_feature_map) { hb_blob_ptr_t table = plan->source_table (); hb_tag_t table_tag = table->tableTag; @@ -313,7 +323,8 @@ _closure_glyphs_lookups_features (hb_subset_plan_t *plan, &feature_indices, feature_record_cond_idx_map, feature_substitutes_map, - insert_catch_all_feature_variation_record); + catch_all_record_feature_idxes, + catch_all_record_idx_feature_map); if (table_tag == HB_OT_TAG_GSUB && !(plan->flags & HB_SUBSET_FLAGS_NO_LAYOUT_CLOSURE)) hb_ot_layout_lookups_substitute_closure (plan->source, @@ -465,6 +476,24 @@ _math_closure (hb_subset_plan_t *plan, math.destroy (); } +static inline void +_remap_used_mark_sets (hb_subset_plan_t *plan, + hb_map_t& used_mark_sets_map) +{ + hb_blob_ptr_t gdef = plan->source_table (); + + if (!gdef->has_data () || !gdef->has_mark_glyph_sets ()) + { + gdef.destroy (); + return; + } + + hb_set_t used_mark_sets; + gdef->get_mark_glyph_sets ().collect_used_mark_sets (plan->_glyphset_gsub, used_mark_sets); + gdef.destroy (); + + _remap_indexes (&used_mark_sets, &used_mark_sets_map); +} static inline void _remove_invalid_gids (hb_set_t *glyphs, @@ -578,14 +607,18 @@ _populate_unicodes_to_retain (const hb_set_t *unicodes, else { plan->codepoint_to_glyph->alloc (cmap_unicodes->get_population ()); - for (hb_codepoint_t cp : *cmap_unicodes) + hb_codepoint_t first = HB_SET_VALUE_INVALID, last = HB_SET_VALUE_INVALID; + for (; cmap_unicodes->next_range (&first, &last); ) { - hb_codepoint_t gid = (*unicode_glyphid_map)[cp]; - if (!unicodes->has (cp) && !glyphs->has (gid)) - continue; + for (unsigned cp = first; cp <= last; cp++) + { + hb_codepoint_t gid = (*unicode_glyphid_map)[cp]; + if (!unicodes->has (cp) && !glyphs->has (gid)) + 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)); + } } } @@ -714,7 +747,8 @@ _populate_gids_to_retain (hb_subset_plan_t* plan, &plan->gsub_langsys, &plan->gsub_feature_record_cond_idx_map, &plan->gsub_feature_substitutes_map, - plan->gsub_insert_catch_all_feature_variation_rec); + plan->gsub_old_features, + plan->gsub_old_feature_idx_tag_map); if (!drop_tables->has (HB_OT_TAG_GPOS)) _closure_glyphs_lookups_features ( @@ -725,7 +759,8 @@ _populate_gids_to_retain (hb_subset_plan_t* plan, &plan->gpos_langsys, &plan->gpos_feature_record_cond_idx_map, &plan->gpos_feature_substitutes_map, - plan->gpos_insert_catch_all_feature_variation_rec); + plan->gpos_old_features, + plan->gpos_old_feature_idx_tag_map); #endif _remove_invalid_gids (&plan->_glyphset_gsub, plan->source->get_num_glyphs ()); @@ -814,12 +849,12 @@ _create_old_gid_to_new_gid_map (const hb_face_t *face, if (retain_gids) { - DEBUG_MSG (SUBSET, nullptr, + DEBUG_MSG (SUBSET, nullptr, "HB_SUBSET_FLAGS_RETAIN_GIDS cannot be set if " "a custom glyph mapping has been provided."); return false; } - + hb_codepoint_t max_glyph = 0; hb_set_t remaining; for (auto old_gid : all_gids_to_retain->iter ()) @@ -871,9 +906,11 @@ _create_old_gid_to_new_gid_map (const hb_face_t *face, *num_glyphs = max_glyph + 1; } + reverse_glyph_map->alloc (reverse_glyph_map->get_population () + new_to_old_gid_list->length); + hb_iter (new_to_old_gid_list) | hb_sink (reverse_glyph_map) ; + glyph_map->alloc (glyph_map->get_population () + new_to_old_gid_list->length); + hb_iter (new_to_old_gid_list) | hb_map (&hb_codepoint_pair_t::reverse) | hb_sink (glyph_map) @@ -969,7 +1006,7 @@ _update_instance_metrics_map_from_cff2 (hb_subset_plan_t *plan) float *hvar_store_cache = nullptr; if (_hmtx.has_data () && _hmtx.var_table.get_length ()) hvar_store_cache = _hmtx.var_table->get_var_store ().create_cache (); - + OT::vmtx_accelerator_t _vmtx (plan->source); float *vvar_store_cache = nullptr; if (_vmtx.has_data () && _vmtx.var_table.get_length ()) @@ -1093,6 +1130,7 @@ hb_subset_plan_t::hb_subset_plan_t (hb_face_t *face, user_axes_location = input->axes_location; all_axes_pinned = false; pinned_at_default = true; + has_gdef_varstore = false; #ifdef HB_EXPERIMENTAL_API for (auto _ : input->name_table_overrides) @@ -1112,6 +1150,10 @@ hb_subset_plan_t::hb_subset_plan_t (hb_face_t *face, attach_accelerator_data = input->attach_accelerator_data; force_long_loca = input->force_long_loca; +#ifdef HB_EXPERIMENTAL_API + force_long_loca = force_long_loca || (flags & HB_SUBSET_FLAGS_IFTB_REQUIREMENTS); +#endif + if (accel) accelerator = (hb_subset_accelerator_t*) accel; @@ -1160,6 +1202,9 @@ hb_subset_plan_t::hb_subset_plan_t (hb_face_t *face, for (auto &v : bounds_height_vec) v = 0xFFFFFFFF; + if (!drop_tables.has (HB_OT_TAG_GDEF)) + _remap_used_mark_sets (this, used_mark_sets_map); + if (unlikely (in_error ())) return; 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 a05d1d1a620..1f19a58c1ed 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 @@ -147,6 +147,9 @@ struct hb_subset_plan_t bool gsub_insert_catch_all_feature_variation_rec; bool gpos_insert_catch_all_feature_variation_rec; + // whether GDEF VarStore is retained + mutable bool has_gdef_varstore; + #define HB_SUBSET_PLAN_MEMBER(Type, Name) Type Name; #include "hb-subset-plan-member-list.hh" #undef HB_SUBSET_PLAN_MEMBER 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 229b1c30884..06e77dd8eb5 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.cc @@ -460,9 +460,10 @@ _dependencies_satisfied (hb_subset_plan_t *plan, hb_tag_t tag, case HB_OT_TAG_hmtx: case HB_OT_TAG_vmtx: case HB_OT_TAG_maxp: + case HB_OT_TAG_OS2: return !plan->normalized_coords || !pending_subset_tags.has (HB_OT_TAG_glyf); case HB_OT_TAG_GPOS: - return !plan->normalized_coords || plan->all_axes_pinned || !pending_subset_tags.has (HB_OT_TAG_GDEF); + return plan->all_axes_pinned || !pending_subset_tags.has (HB_OT_TAG_GDEF); default: return true; } 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 4c356997f12..d79e7f762a0 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.h +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.h @@ -73,6 +73,9 @@ typedef struct hb_subset_plan_t hb_subset_plan_t; * OS/2 will not be recalculated. * @HB_SUBSET_FLAGS_NO_LAYOUT_CLOSURE: If set don't perform glyph closure on layout * substitution rules (GSUB). Since: 7.2.0. + * @HB_SUBSET_FLAGS_IFTB_REQUIREMENTS: If set enforce requirements on the output subset + * to allow it to be used with incremental font transfer IFTB patches. Primarily, + * this forces all outline data to use long (32 bit) offsets. Since: EXPERIMENTAL * * List of boolean properties that can be configured on the subset input. * @@ -90,6 +93,9 @@ typedef enum { /*< flags >*/ HB_SUBSET_FLAGS_GLYPH_NAMES = 0x00000080u, HB_SUBSET_FLAGS_NO_PRUNE_UNICODE_RANGES = 0x00000100u, HB_SUBSET_FLAGS_NO_LAYOUT_CLOSURE = 0x00000200u, +#ifdef HB_EXPERIMENTAL_API + HB_SUBSET_FLAGS_IFTB_REQUIREMENTS = 0x00000400u, +#endif } hb_subset_flags_t; /** diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-vector.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-vector.hh index 13cfe56b59f..dfe1b7d1c7e 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-vector.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-vector.hh @@ -37,6 +37,8 @@ template struct hb_vector_t { + static constexpr bool realloc_move = true; + typedef Type item_t; static constexpr unsigned item_size = hb_static_size (Type); using array_t = typename std::conditional, hb_array_t>::type; @@ -268,10 +270,9 @@ struct hb_vector_t } return new_array; } - /* Specialization for hb_vector_t> to speed up. */ + /* Specialization for types that can be moved using realloc(). */ template ) || - hb_is_same (T, hb_array_t ))> + hb_enable_if (T::realloc_move)> Type * realloc_vector (unsigned new_allocated, hb_priority<1>) { diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/meson.build b/Build/source/libs/harfbuzz/harfbuzz-src/src/meson.build index 5401e5df6e9..77c7e750178 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/meson.build +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/meson.build @@ -685,29 +685,15 @@ if get_option('tests').enabled() if cpp.get_define('_MSC_FULL_VER') == '' noinst_programs = { 'main': 'main.cc', - 'test-algs': ['test-algs.cc', 'hb-static.cc'], 'test-basics': 'test.cc', - 'test-bimap': ['test-bimap.cc', 'hb-static.cc'], 'test-buffer-serialize': 'test-buffer-serialize.cc', - 'test-classdef-graph': ['graph/test-classdef-graph.cc', 'hb-static.cc', 'graph/gsubgpos-context.cc'], - 'test-instancer-solver': ['test-subset-instancer-solver.cc', 'hb-subset-instancer-solver.cc', 'hb-static.cc'], - 'test-iter': ['test-iter.cc', 'hb-static.cc'], - 'test-map': ['test-map.cc', 'hb-static.cc'], - 'test-multimap': ['test-multimap.cc', 'hb-static.cc'], 'test-ot-meta': 'test-ot-meta.cc', 'test-ot-name': 'test-ot-name.cc', 'test-ot-glyphname': 'test-ot-glyphname.cc', 'test-ot-gpos-size-params': 'test-gpos-size-params.cc', 'test-ot-gsub-get-alternates': 'test-gsub-get-alternates.cc', 'test-ot-gsub-would-substitute': 'test-gsub-would-substitute.cc', - 'test-priority-queue': ['test-priority-queue.cc', 'hb-static.cc'], - 'test-repacker': ['test-repacker.cc', 'hb-static.cc', 'graph/gsubgpos-context.cc'], - 'test-serialize': ['test-serialize.cc', 'hb-static.cc'], - 'test-set': ['test-set.cc', 'hb-static.cc'], - 'test-tuple-varstore': ['test-tuple-varstore.cc', 'hb-subset-instancer-solver.cc', 'hb-static.cc'], - 'test-item-varstore': ['test-item-varstore.cc', 'hb-subset-instancer-solver.cc', 'hb-static.cc'], 'test-use-table': 'test-use-table.cc', - 'test-vector': ['test-vector.cc', 'hb-static.cc'], } foreach name, source : noinst_programs executable(name, source, @@ -720,10 +706,24 @@ if get_option('tests').enabled() endif compiled_tests = { + 'test-algs': ['test-algs.cc', 'hb-static.cc'], 'test-array': ['test-array.cc'], + 'test-bimap': ['test-bimap.cc', 'hb-static.cc'], + 'test-classdef-graph': ['graph/test-classdef-graph.cc', 'hb-static.cc', 'graph/gsubgpos-context.cc'], + 'test-iter': ['test-iter.cc', 'hb-static.cc'], 'test-machinery': ['test-machinery.cc', 'hb-static.cc'], + 'test-map': ['test-map.cc', 'hb-static.cc'], + 'test-multimap': ['test-multimap.cc', 'hb-static.cc'], 'test-number': ['test-number.cc', 'hb-number.cc'], 'test-ot-tag': ['hb-ot-tag.cc'], + 'test-set': ['test-set.cc', 'hb-static.cc'], + 'test-serialize': ['test-serialize.cc', 'hb-static.cc'], + 'test-vector': ['test-vector.cc', 'hb-static.cc'], + 'test-repacker': ['test-repacker.cc', 'hb-static.cc', 'graph/gsubgpos-context.cc'], + 'test-instancer-solver': ['test-subset-instancer-solver.cc', 'hb-subset-instancer-solver.cc', 'hb-static.cc'], + 'test-priority-queue': ['test-priority-queue.cc', 'hb-static.cc'], + 'test-tuple-varstore': ['test-tuple-varstore.cc', 'hb-subset-instancer-solver.cc', 'hb-static.cc'], + 'test-item-varstore': ['test-item-varstore.cc', 'hb-subset-instancer-solver.cc', 'hb-static.cc'], 'test-unicode-ranges': ['test-unicode-ranges.cc'], } foreach name, source : compiled_tests @@ -868,7 +868,7 @@ if get_option('default_library') == 'static' cmake_config.set('HB_LIB_SUFFIX', '${CMAKE_STATIC_LIBRARY_SUFFIX}') elif host_machine.system() == 'darwin' cmake_config.set('HB_LIB_PREFIX', '${CMAKE_SHARED_LIBRARY_PREFIX}') - cmake_config.set('HB_LIB_SUFFIX', '.@0@.${CMAKE_SHARED_LIBRARY_SUFFIX}'.format(hb_so_version)) + cmake_config.set('HB_LIB_SUFFIX', '.@0@${CMAKE_SHARED_LIBRARY_SUFFIX}'.format(hb_so_version)) elif host_machine.system() == 'windows' cmake_config.set('HB_LIB_PREFIX', '${CMAKE_IMPORT_LIBRARY_PREFIX}') cmake_config.set('HB_LIB_SUFFIX', '${CMAKE_IMPORT_LIBRARY_SUFFIX}') diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/relative_to.py b/Build/source/libs/harfbuzz/harfbuzz-src/src/relative_to.py index 8a676bf8f38..b660d279351 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/relative_to.py +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/relative_to.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 import sys from os import path diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/test-subset-instancer-solver.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/test-subset-instancer-solver.cc index e8294cfa876..0a0aea8c2e3 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/test-subset-instancer-solver.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/test-subset-instancer-solver.cc @@ -411,5 +411,15 @@ main (int argc, char **argv) assert (out[0].first == 1.f); assert (out[0].second == Triple (0.5f, 1.f, 1.f)); } + + { + Triple tent (0.6f, 0.7f, 0.8f); + Triple axis_range (-1.f, 0.2f, 1.f); + TripleDistances axis_distances{1.f, 1.f}; + result_t out = rebase_tent (tent, axis_range, axis_distances); + assert (out.length == 1); + assert (out[0].first == 1.f); + assert (approx (out[0].second, Triple (0.5f, 0.625f, 0.75f))); + } } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/xkcd.png b/Build/source/libs/harfbuzz/harfbuzz-src/xkcd.png new file mode 100644 index 00000000000..84256624133 Binary files /dev/null and b/Build/source/libs/harfbuzz/harfbuzz-src/xkcd.png differ diff --git a/Build/source/libs/harfbuzz/version.ac b/Build/source/libs/harfbuzz/version.ac index 3a220a14a99..f9f8eec5a39 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], [8.2.2]) +m4_define([harfbuzz_version], [8.3.0]) -- cgit v1.2.3