diff options
Diffstat (limited to 'Build/source')
24 files changed, 653 insertions, 128 deletions
diff --git a/Build/source/libs/README b/Build/source/libs/README index 67570971b29..86d7c926691 100644 --- a/Build/source/libs/README +++ b/Build/source/libs/README @@ -26,8 +26,8 @@ graphite2 1.3.14 - checked 10apr20 http://sourceforge.net/projects/silgraphite/files/graphite2/ (requires C++11) -harfbuzz 3.1.1 - checked 09nov21 - https://github.com/harfbuzz/harfbuzz/releases/download/3.1.1/ +harfbuzz 3.1.2 - checked 27nov21 + https://github.com/harfbuzz/harfbuzz/releases/download/3.1.2/ icu 68.2 - checked 13feb21 http://download.icu-project.org/files/icu4c/ diff --git a/Build/source/libs/harfbuzz/ChangeLog b/Build/source/libs/harfbuzz/ChangeLog index 85522389825..51407f54f97 100644 --- a/Build/source/libs/harfbuzz/ChangeLog +++ b/Build/source/libs/harfbuzz/ChangeLog @@ -1,3 +1,8 @@ +2021-11-27 Akira Kakuto <kakuto@jcom.zaq.ne.jp> + + Import harfbuzz-3.1.2. + * version.ac: Adjusted. + 2021-11-09 Akira Kakuto <kakuto@jcom.zaq.ne.jp> Import harfbuzz-3.1.1. diff --git a/Build/source/libs/harfbuzz/TLpatches/ChangeLog b/Build/source/libs/harfbuzz/TLpatches/ChangeLog index 115bae35001..64d1a4e3d70 100644 --- a/Build/source/libs/harfbuzz/TLpatches/ChangeLog +++ b/Build/source/libs/harfbuzz/TLpatches/ChangeLog @@ -1,3 +1,8 @@ +2021-11-27 Akira Kakuto <kakuto@jcom.zaq.ne.jp> + + Imported harfbuzz-3.1.2 source tree from: + https://github.com/harfbuzz/harfbuzz/releases/download/3.1.2/ + 2021-11-09 Akira Kakuto <kakuto@jcom.zaq.ne.jp> Imported harfbuzz-3.1.1 source tree from: diff --git a/Build/source/libs/harfbuzz/TLpatches/TL-Changes b/Build/source/libs/harfbuzz/TLpatches/TL-Changes index d539649ac77..69eac2df310 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-3.1.1/ tree as obtained from: - https://github.com/harfbuzz/harfbuzz/releases/download/3.1.1/ +Changes applied to the harfbuzz-3.1.2/ tree as obtained from: + https://github.com/harfbuzz/harfbuzz/releases/download/3.1.2/ Removed: COPYING diff --git a/Build/source/libs/harfbuzz/configure b/Build/source/libs/harfbuzz/configure index f2806883d14..0507f0a6b0b 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) 3.1.1. +# Generated by GNU Autoconf 2.71 for harfbuzz (TeX Live) 3.1.2. # # Report bugs to <tex-k@tug.org>. # @@ -611,8 +611,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='harfbuzz (TeX Live)' PACKAGE_TARNAME='harfbuzz--tex-live-' -PACKAGE_VERSION='3.1.1' -PACKAGE_STRING='harfbuzz (TeX Live) 3.1.1' +PACKAGE_VERSION='3.1.2' +PACKAGE_STRING='harfbuzz (TeX Live) 3.1.2' 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) 3.1.1 to adapt to many kinds of systems. +\`configure' configures harfbuzz (TeX Live) 3.1.2 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) 3.1.1:";; + short | recursive ) echo "Configuration of harfbuzz (TeX Live) 3.1.2:";; 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 3.1.1 +harfbuzz (TeX Live) configure 3.1.2 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 3.1.1, which was +It was created by harfbuzz (TeX Live) $as_me 3.1.2, 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='3.1.1' + VERSION='3.1.2' # Some tools Automake needs. @@ -5035,8 +5035,8 @@ WARNING_CFLAGS=$kpse_cv_warning_cflags HB_VERSION_MAJOR=3 HB_VERSION_MINOR=1 -HB_VERSION_MICRO=1 -HB_VERSION=3.1.1 +HB_VERSION_MICRO=2 +HB_VERSION=3.1.2 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 3.1.1, which was +This file was extended by harfbuzz (TeX Live) $as_me 3.1.2, 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 3.1.1 +harfbuzz (TeX Live) config.status 3.1.2 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 b21e5973a13..6695b505896 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog +++ b/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog @@ -1,3 +1,463 @@ +commit 8aed5c21a31eece6a9f3cd775fda8facb6c28b9b +Author: Khaled Hosny <khaled@aliftype.com> +Date: Fri Nov 26 17:54:18 2021 +0200 + + 3.1.2 + + NEWS | 9 +++++++++ + configure.ac | 2 +- + meson.build | 2 +- + src/hb-version.h | 4 ++-- + 4 files changed, 13 insertions(+), 4 deletions(-) + +commit 720ab0883b4bd7daa32a3c46031a9d8adb5c8a5f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Nov 25 11:49:16 2021 -0700 + + [util] Add --single-par + + Use it in aots tests + + Fixes https://github.com/harfbuzz/harfbuzz/issues/3129 + Related https://github.com/harfbuzz/harfbuzz/issues/3298 + + test/shape/data/aots/hb-aots-tester.cpp | 2 +- + test/shape/data/aots/tests/classdef1.tests | 2 +- + test/shape/data/aots/tests/classdef1_empty.tests | 2 +- + .../shape/data/aots/tests/classdef1_multiple.tests | 2 +- + test/shape/data/aots/tests/classdef1_single.tests | 2 +- + test/shape/data/aots/tests/classdef2.tests | 2 +- + test/shape/data/aots/tests/classdef2_empty.tests | 2 +- + .../shape/data/aots/tests/classdef2_multiple.tests | 2 +- + test/shape/data/aots/tests/classdef2_single.tests | 2 +- + test/shape/data/aots/tests/cmap0.tests | 2 +- + test/shape/data/aots/tests/cmap10.tests | 4 ++-- + test/shape/data/aots/tests/cmap12.tests | 2 +- + test/shape/data/aots/tests/cmap2.tests | 2 +- + test/shape/data/aots/tests/cmap4.tests | 12 ++++++------ + test/shape/data/aots/tests/cmap6.tests | 4 ++-- + test/shape/data/aots/tests/cmap8.tests | 2 +- + .../shape/data/aots/tests/gpos1_1_lookupflag.tests | 2 +- + test/shape/data/aots/tests/gpos1_1_simple.tests | 8 ++++---- + test/shape/data/aots/tests/gpos1_2.tests | 2 +- + .../shape/data/aots/tests/gpos1_2_lookupflag.tests | 2 +- + test/shape/data/aots/tests/gpos2_1.tests | 4 ++-- + .../shape/data/aots/tests/gpos2_1_lookupflag.tests | 4 ++-- + .../shape/data/aots/tests/gpos2_1_next_glyph.tests | 4 ++-- + test/shape/data/aots/tests/gpos2_1_simple.tests | 4 ++-- + test/shape/data/aots/tests/gpos2_2.tests | 10 +++++----- + test/shape/data/aots/tests/gpos3.tests | 22 +++++++++++----------- + test/shape/data/aots/tests/gpos3_lookupflag.tests | 4 ++-- + test/shape/data/aots/tests/gpos4_lookupflag.tests | 4 ++-- + .../data/aots/tests/gpos4_multiple_anchors.tests | 2 +- + test/shape/data/aots/tests/gpos4_simple.tests | 10 +++++----- + test/shape/data/aots/tests/gpos5.tests | 4 ++-- + test/shape/data/aots/tests/gpos6.tests | 6 +++--- + test/shape/data/aots/tests/gpos7_1.tests | 4 ++-- + test/shape/data/aots/tests/gpos9.tests | 4 ++-- + .../data/aots/tests/gpos_chaining1_boundary.tests | 8 ++++---- + .../aots/tests/gpos_chaining1_lookupflag.tests | 2 +- + .../tests/gpos_chaining1_multiple_subrules.tests | 4 ++-- + .../aots/tests/gpos_chaining1_next_glyph.tests | 2 +- + .../data/aots/tests/gpos_chaining1_simple.tests | 22 +++++++++++----------- + .../aots/tests/gpos_chaining1_successive.tests | 2 +- + .../data/aots/tests/gpos_chaining2_boundary.tests | 8 ++++---- + .../aots/tests/gpos_chaining2_lookupflag.tests | 2 +- + .../tests/gpos_chaining2_multiple_subrules.tests | 4 ++-- + .../aots/tests/gpos_chaining2_next_glyph.tests | 2 +- + .../data/aots/tests/gpos_chaining2_simple.tests | 22 +++++++++++----------- + .../aots/tests/gpos_chaining2_successive.tests | 2 +- + .../data/aots/tests/gpos_chaining3_boundary.tests | 8 ++++---- + .../aots/tests/gpos_chaining3_lookupflag.tests | 2 +- + .../aots/tests/gpos_chaining3_next_glyph.tests | 2 +- + .../data/aots/tests/gpos_chaining3_simple.tests | 22 +++++++++++----------- + .../aots/tests/gpos_chaining3_successive.tests | 2 +- + .../data/aots/tests/gpos_context1_boundary.tests | 4 ++-- + .../data/aots/tests/gpos_context1_expansion.tests | 2 +- + .../data/aots/tests/gpos_context1_lookupflag.tests | 4 ++-- + .../tests/gpos_context1_multiple_subrules.tests | 4 ++-- + .../data/aots/tests/gpos_context1_next_glyph.tests | 2 +- + .../data/aots/tests/gpos_context1_simple.tests | 6 +++--- + .../data/aots/tests/gpos_context1_successive.tests | 2 +- + .../data/aots/tests/gpos_context2_boundary.tests | 4 ++-- + .../data/aots/tests/gpos_context2_classes.tests | 4 ++-- + .../data/aots/tests/gpos_context2_expansion.tests | 2 +- + .../data/aots/tests/gpos_context2_lookupflag.tests | 4 ++-- + .../tests/gpos_context2_multiple_subrules.tests | 4 ++-- + .../data/aots/tests/gpos_context2_next_glyph.tests | 2 +- + .../data/aots/tests/gpos_context2_simple.tests | 6 +++--- + .../data/aots/tests/gpos_context2_successive.tests | 2 +- + .../data/aots/tests/gpos_context3_boundary.tests | 4 ++-- + .../data/aots/tests/gpos_context3_lookupflag.tests | 4 ++-- + .../data/aots/tests/gpos_context3_next_glyph.tests | 2 +- + .../data/aots/tests/gpos_context3_simple.tests | 4 ++-- + .../data/aots/tests/gpos_context3_successive.tests | 2 +- + .../shape/data/aots/tests/gsub1_1_lookupflag.tests | 2 +- + test/shape/data/aots/tests/gsub1_1_modulo.tests | 2 +- + test/shape/data/aots/tests/gsub1_1_simple.tests | 2 +- + .../shape/data/aots/tests/gsub1_2_lookupflag.tests | 2 +- + test/shape/data/aots/tests/gsub1_2_simple.tests | 2 +- + .../shape/data/aots/tests/gsub2_1_lookupflag.tests | 2 +- + .../aots/tests/gsub2_1_multiple_sequences.tests | 2 +- + test/shape/data/aots/tests/gsub2_1_simple.tests | 4 ++-- + .../shape/data/aots/tests/gsub3_1_lookupflag.tests | 2 +- + test/shape/data/aots/tests/gsub3_1_multiple.tests | 2 +- + test/shape/data/aots/tests/gsub3_1_simple.tests | 2 +- + .../shape/data/aots/tests/gsub4_1_lookupflag.tests | 2 +- + .../aots/tests/gsub4_1_multiple_ligatures.tests | 4 ++-- + .../data/aots/tests/gsub4_1_multiple_ligsets.tests | 2 +- + test/shape/data/aots/tests/gsub4_1_simple.tests | 2 +- + test/shape/data/aots/tests/gsub7.tests | 4 ++-- + .../data/aots/tests/gsub_chaining1_boundary.tests | 8 ++++---- + .../aots/tests/gsub_chaining1_lookupflag.tests | 2 +- + .../tests/gsub_chaining1_multiple_subrules.tests | 4 ++-- + .../aots/tests/gsub_chaining1_next_glyph.tests | 2 +- + .../data/aots/tests/gsub_chaining1_simple.tests | 22 +++++++++++----------- + .../aots/tests/gsub_chaining1_successive.tests | 2 +- + .../data/aots/tests/gsub_chaining2_boundary.tests | 8 ++++---- + .../aots/tests/gsub_chaining2_lookupflag.tests | 2 +- + .../tests/gsub_chaining2_multiple_subrules.tests | 4 ++-- + .../aots/tests/gsub_chaining2_next_glyph.tests | 2 +- + .../data/aots/tests/gsub_chaining2_simple.tests | 22 +++++++++++----------- + .../aots/tests/gsub_chaining2_successive.tests | 2 +- + .../data/aots/tests/gsub_chaining3_boundary.tests | 8 ++++---- + .../aots/tests/gsub_chaining3_lookupflag.tests | 2 +- + .../aots/tests/gsub_chaining3_next_glyph.tests | 2 +- + .../data/aots/tests/gsub_chaining3_simple.tests | 22 +++++++++++----------- + .../aots/tests/gsub_chaining3_successive.tests | 2 +- + .../data/aots/tests/gsub_context1_boundary.tests | 4 ++-- + .../data/aots/tests/gsub_context1_expansion.tests | 2 +- + .../data/aots/tests/gsub_context1_lookupflag.tests | 4 ++-- + .../tests/gsub_context1_multiple_subrules.tests | 4 ++-- + .../data/aots/tests/gsub_context1_next_glyph.tests | 2 +- + .../data/aots/tests/gsub_context1_simple.tests | 6 +++--- + .../data/aots/tests/gsub_context1_successive.tests | 2 +- + .../data/aots/tests/gsub_context2_boundary.tests | 4 ++-- + .../data/aots/tests/gsub_context2_classes.tests | 4 ++-- + .../data/aots/tests/gsub_context2_expansion.tests | 2 +- + .../data/aots/tests/gsub_context2_lookupflag.tests | 4 ++-- + .../tests/gsub_context2_multiple_subrules.tests | 4 ++-- + .../data/aots/tests/gsub_context2_next_glyph.tests | 2 +- + .../data/aots/tests/gsub_context2_simple.tests | 6 +++--- + .../data/aots/tests/gsub_context2_successive.tests | 2 +- + .../data/aots/tests/gsub_context3_boundary.tests | 4 ++-- + .../data/aots/tests/gsub_context3_lookupflag.tests | 4 ++-- + .../data/aots/tests/gsub_context3_next_glyph.tests | 2 +- + .../data/aots/tests/gsub_context3_simple.tests | 4 ++-- + .../data/aots/tests/gsub_context3_successive.tests | 2 +- + .../data/aots/tests/lookupflag_ignore_attach.tests | 10 +++++----- + .../data/aots/tests/lookupflag_ignore_base.tests | 4 ++-- + .../aots/tests/lookupflag_ignore_combination.tests | 6 +++--- + .../aots/tests/lookupflag_ignore_ligatures.tests | 6 +++--- + .../data/aots/tests/lookupflag_ignore_marks.tests | 2 +- + util/text-options.hh | 10 ++++++---- + 130 files changed, 296 insertions(+), 294 deletions(-) + +commit b58afe586f6d100df94cc3a9b716befc68d8abec +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Nov 25 11:34:24 2021 -0700 + + [util] Undo treat as single-paragraph text provided on cmdline + + Reverts d92ee726ce3b2fc2c249407d977433f0badcc918 + except that it does so even in batch mode. + + Am going to add a --single-par mode that will affect all input + modes. + + Part of https://github.com/harfbuzz/harfbuzz/issues/3129 + Fixes https://github.com/harfbuzz/harfbuzz/issues/3298 + + util/text-options.hh | 34 ++++++++++++++++++++++++++++------ + 1 file changed, 28 insertions(+), 6 deletions(-) + +commit 903a6baecefdbb8a01caed77f215560549e7dd5e +Author: Qunxin Liu <qxliu@google.com> +Date: Mon Nov 15 19:58:33 2021 -0800 + + [subset] layout_features filtering fix + + we should not use get_size (), which returns length * item_size + + src/hb-subset-plan.cc | 18 +++++++++++++++--- + test/subset/data/Makefile.am | 1 + + test/subset/data/Makefile.sources | 1 + + .../FranklinGothic-Regular.default.61,63,68,69.ttf | Bin 0 -> 6856 bytes + ...linGothic-Regular.default.retain-all-codepoint.ttf | Bin 0 -> 44584 bytes + ...FranklinGothic-Regular.layout-test.61,63,68,69.ttf | Bin 0 -> 7928 bytes + ...othic-Regular.layout-test.retain-all-codepoint.ttf | Bin 0 -> 46584 bytes + ...FranklinGothic-Regular.retain-gids.61,63,68,69.ttf | Bin 0 -> 7288 bytes + ...othic-Regular.retain-gids.retain-all-codepoint.ttf | Bin 0 -> 44592 bytes + test/subset/data/fonts/FranklinGothic-Regular.ttf | Bin 0 -> 71856 bytes + test/subset/data/tests/layout.default_features.tests | 11 +++++++++++ + test/subset/meson.build | 1 + + 12 files changed, 29 insertions(+), 3 deletions(-) + +commit 3160789701463bcd822c26010da4de33c92c85d9 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Mon Nov 22 03:31:50 2021 +0200 + + [ci] windows-2016 image is going away in a bit + + https://github.com/actions/virtual-environments/issues/4312 + + windows-latest is the same as windows-2019, but we are using explicit + windows-2019 image for when they become different. + + .github/workflows/msvc-ci.yml | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit ed65577e3d896a2393aa6a92d76da1f81677d45e +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sat Nov 20 20:51:26 2021 +0200 + + [ci] Split sanitizers job + + It was running four different builds sequentially. Each should have been + its own job. + + .circleci/config.yml | 41 ++++++++++++++++++++++++++++++++++------- + 1 file changed, 34 insertions(+), 7 deletions(-) + +commit 69d8f27c69b30f2c3726f279c2daa183d954c6b0 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sat Nov 20 17:09:15 2021 +0200 + + [meson] Require 0.55.0 + + We implicitly require it for building ragel subproject. This new version + requirement should satisfied in both Fedora 33 and Debian bullseye, and + not be too cutting edge for us. + + .circleci/config.yml | 5 +++-- + docs/meson.build | 4 ++-- + meson.build | 39 ++++++++++----------------------------- + perf/meson.build | 10 ++-------- + src/meson.build | 32 ++++++++------------------------ + test/fuzzing/meson.build | 6 +++--- + test/shape/meson.build | 12 ++++++------ + test/subset/meson.build | 8 ++++---- + 8 files changed, 38 insertions(+), 78 deletions(-) + +commit 84dc4e85e889d4b24cca7bb8ef04563fc6d1c3e6 +Author: Qunxin Liu <qxliu@google.com> +Date: Mon Nov 8 09:36:31 2021 -0800 + + [subset] avoid writing out duplicate extra glyph names in post table + + Add check for possible duplicate with other name index + + src/hb-ot-post-table-v2subset.hh | 31 +++++++++++++-------- + test/subset/data/Makefile.am | 1 + + test/subset/data/Makefile.sources | 1 + + ...hnadevaraya-Regular.default.c30,c36,c40,c4d.ttf | Bin 0 -> 10860 bytes + ...varaya-Regular.default.retain-all-codepoint.ttf | Bin 0 -> 573428 bytes + ...evaraya-Regular.glyph-names.c30,c36,c40,c4d.ttf | Bin 0 -> 11292 bytes + ...ya-Regular.glyph-names.retain-all-codepoint.ttf | Bin 0 -> 609076 bytes + ...raya-Regular.notdef-outline.c30,c36,c40,c4d.ttf | Bin 0 -> 10940 bytes + ...Regular.notdef-outline.retain-all-codepoint.ttf | Bin 0 -> 573508 bytes + ...evaraya-Regular.retain-gids.c30,c36,c40,c4d.ttf | Bin 0 -> 16880 bytes + ...ya-Regular.retain-gids.retain-all-codepoint.ttf | Bin 0 -> 573440 bytes + .../data/fonts/SreeKrushnadevaraya-Regular.ttf | Bin 0 -> 612636 bytes + test/subset/data/tests/post.tests | 12 ++++++++ + test/subset/meson.build | 1 + + 14 files changed, 34 insertions(+), 12 deletions(-) + +commit 325f26290eef9b001df4b750f33698d2a81a47f0 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Nov 19 17:19:09 2021 -0700 + + [array] Fix a couple constexpr warnings + + ./subprojects/harfbuzz/src/hb-array.hh:71:25: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const] + constexpr hb_array_t& operator = (const hb_array_t<U> &o) + ^ + const + ../subprojects/harfbuzz/src/hb-array.hh:72:5: warning: use of this statement in a constexpr function is a C++14 extension [-Wc++14-extensions] + { arrayZ = o.arrayZ; length = o.length; backwards_length = o.backwards_length; return *this; } + ^ + ../subprojects/harfbuzz/src/hb-array.hh:329:32: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const] + constexpr hb_sorted_array_t& operator = (const hb_array_t<U> &o) + ^ + const + ../subprojects/harfbuzz/src/hb-array.hh:330:5: warning: use of this statement in a constexpr function is a C++14 extension [-Wc++14-extensions] + { hb_array_t<Type> (*this) = o; return *this; } + ^ + 4 warnings generated. + + src/hb-array.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 98fefd5dedf912aebb58990f8d74fa5fad0ddb2c +Merge: ca418cac7 4731b1073 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Nov 19 13:34:53 2021 -0700 + + Merge pull request #3301 from harfbuzz/hashmap-classes + + Hashmap classes + +commit ca418cac74189dbda1abf433bda4618853107f1f +Author: Qunxin Liu <qxliu@google.com> +Date: Wed Nov 17 16:42:08 2021 -0800 + + [subset] keep features that have FeatureParams and the tag is "size" + + src/hb-ot-layout-gsubgpos.hh | 8 ++++++-- + test/subset/data/Makefile.am | 1 + + test/subset/data/Makefile.sources | 3 ++- + ...C-ExtraLightItalic.default.retain-all-codepoint.ttf | Bin 0 -> 134520 bytes + ...traLightItalic.glyph-names.retain-all-codepoint.ttf | Bin 0 -> 145796 bytes + ...LightItalic.notdef-outline.retain-all-codepoint.ttf | Bin 0 -> 134648 bytes + test/subset/data/fonts/SpectralSC-ExtraLightItalic.ttf | Bin 0 -> 275612 bytes + test/subset/data/tests/layout.drop_feature.tests | 10 ++++++++++ + test/subset/meson.build | 1 + + 9 files changed, 20 insertions(+), 3 deletions(-) + +commit e88fc41ef323cf1105e30b88f726f171504cb85e +Author: Qunxin Liu <qxliu@google.com> +Date: Thu Nov 18 16:53:36 2021 -0800 + + [subset] inputSequence could be empty, change the sanity check + + src/hb-ot-layout-gsubgpos.hh | 5 ++--- + test/subset/data/Makefile.am | 1 + + test/subset/data/Makefile.sources | 1 + + ...ar.layout-test-retain-gids.retain-all-codepoint.ttf | Bin 0 -> 142456 bytes + ...nsNewa-Regular.layout-test.retain-all-codepoint.ttf | Bin 0 -> 142456 bytes + test/subset/data/fonts/NotoSansNewa-Regular.ttf | Bin 0 -> 150892 bytes + test/subset/data/tests/layout.context_format2.tests | 9 +++++++++ + test/subset/meson.build | 1 + + 8 files changed, 14 insertions(+), 3 deletions(-) + +commit 4731b1073636b6ff4ff1bccbe7fb4663a2648674 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Nov 19 12:33:37 2021 -0700 + + [array] Mark constructors constexpr + + ../src/hb-map.hh:44:38: note: non-constexpr constructor 'hb_array_t' cannot be used in a constant expression + static constexpr K INVALID_KEY = kINVALID; + ^ + + src/hb-array.hh | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +commit 1da7423ed9d96c6ed8000f2c6a971bc3ce65cb2b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Nov 19 12:11:41 2021 -0700 + + [array] Add constructor taking std::nullptr_t + + Not all impls implement nullptr_t in a way that would automatically + convert to what we were accepting. + + In file included from ../src/test-map.cc:27: + ../src/hb-map.hh:44:22: error: no viable conversion from 'nullptr_t' to 'const hb_array_t<const char>' + static constexpr K INVALID_KEY = kINVALID; + ^ ~~~~~~~~ + + src/hb-array.hh | 2 ++ + 1 file changed, 2 insertions(+) + +commit e456922a769461757acc6c0628e7af28f27b16ac +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Nov 19 12:04:08 2021 -0700 + + [test] Fix nullptr_t scope issue + + src/test-map.cc | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 5157cac0e28204ce658d784ee1fbe0614e50c786 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Nov 19 12:03:10 2021 -0700 + + [test] Silence unused-variable erros in test + + src/test-map.cc | 3 +++ + 1 file changed, 3 insertions(+) + +commit 394f772937851f10ef05245e32279cf08ca8399d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Nov 19 11:49:23 2021 -0700 + + [map] Allow storing classes in the hashmap + + Fixes https://github.com/harfbuzz/harfbuzz/issues/3293 + + The trick was to change the type of the invalid key/value to be non-class. + + src/hb-map.hh | 22 +++++++++++++++------- + src/hb-ot-layout-common.hh | 8 ++++---- + src/hb-ot-layout-gsubgpos.hh | 8 ++++---- + src/hb-ot-layout.cc | 4 ++-- + src/hb-serialize.hh | 4 +++- + src/hb-set.hh | 6 +++--- + src/hb-subset-plan.cc | 2 +- + src/hb-subset-plan.hh | 4 ++-- + src/test-map.cc | 7 +++++++ + 9 files changed, 41 insertions(+), 24 deletions(-) + +commit cba17fd1015113a1176eef5a87876d4e2b19e13a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Nov 19 11:49:03 2021 -0700 + + [array] Add default methods again, this time the full set + + Should add tests. + + src/hb-array.hh | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +commit a75b96f7e5833c9206f6a15d11168a757a85ee59 +Author: Garret Rieger <grieger@google.com> +Date: Tue Nov 16 14:34:07 2021 -0800 + + [sanitize] In lookup sanitize don't try to access subtable 0 if it isn't there. + + src/hb-ot-layout-common.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 82a9f54410d2d0188eab50c96824f52e2820b1da +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Nov 10 10:15:38 2021 -0800 + + [colr] Simplify sanitize + + src/hb-ot-color-colr-table.hh | 38 ++------------------------------------ + 1 file changed, 2 insertions(+), 36 deletions(-) + +commit 64b29dbd5994a511acee69cb9b45ad650ef88359 +Author: Garret Rieger <grieger@google.com> +Date: Tue Nov 9 09:13:14 2021 -0800 + + [subset] reuse colrv1 max nesting depth constant for sanitize. + + src/hb-ot-color-colr-table.hh | 11 ++++++----- + src/hb-sanitize.hh | 7 ++----- + 2 files changed, 8 insertions(+), 10 deletions(-) + +commit ace98cc65f527dbdfaa3784957535f551c7a600a +Author: Garret Rieger <grieger@google.com> +Date: Mon Nov 8 15:47:56 2021 -0800 + + [subset] Only sanitize recursion depth in COLR. + + src/hb-ot-color-colr-table.hh | 49 ++++++++++++++++++++- + src/hb-sanitize.hh | 26 +++++++---- + ...tcase-minimized-hb-draw-fuzzer-4856957815619584 | Bin 0 -> 486280 bytes + 3 files changed, 65 insertions(+), 10 deletions(-) + +commit 782a7377adc2a13071b6dc74ddca209a8e65e4ba +Author: Garret Rieger <grieger@google.com> +Date: Thu Nov 4 13:39:11 2021 -0700 + + [sanitize] add a maximum recursion depth for sanitize. + + src/hb-sanitize.hh | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + commit cd5c6cd0419ac5e4de975d6c476fb760bf06d2ce Author: Khaled Hosny <khaled@aliftype.com> Date: Mon Nov 8 06:59:55 2021 +0200 diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/NEWS b/Build/source/libs/harfbuzz/harfbuzz-src/NEWS index da7d8db1d6f..5e4368ebe37 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/NEWS +++ b/Build/source/libs/harfbuzz/harfbuzz-src/NEWS @@ -1,3 +1,12 @@ +Overview of changes leading to 3.1.2 +Friday, November 26, 2021 +==================================== +- hb-shape / hb-view: revert treating text on the commandline as single + paragraph (was introduced in 3.0.0); add new --single-par to do that. + (Behdad Esfahbod) +- Subsetter bug fixes. (Garret Rieger, Qunxin Liu, Behdad Esfahbod) + + Overview of changes leading to 3.1.1 Wednesday, November 8, 2021 ==================================== diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac b/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac index 0acbba364f5..af72ff9ea39 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], - [3.1.1], + [3.1.2], [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 cd7acff249f..53b721febe4 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.52.0', - version: '3.1.1', + meson_version: '>= 0.55.0', + version: '3.1.2', default_options: [ 'cpp_rtti=false', # Just to support msvc, we are passing -fno-exceptions also anyway 'cpp_std=c++11', @@ -141,18 +141,12 @@ if not get_option('cairo').disabled() endif if not cairo_dep.found() - # Requires Meson 0.54.0 to use cairo subproject - if meson.version().version_compare('>=0.54.0') - # Note that we don't have harfbuzz -> cairo -> freetype2 -> harfbuzz fallback - # dependency cycle here because we have configured freetype2 above with - # harfbuzz support disabled, so when cairo will lookup freetype2 dependency - # it will be forced to use that one. - cairo_dep = dependency('cairo', fallback: 'cairo', required: get_option('cairo')) - cairo_ft_dep = dependency('cairo-ft', fallback: 'cairo', required: get_option('cairo')) - elif get_option('cairo').enabled() - error('cairo feature is enabled but it cannot be found on the system and ' + - 'meson>=0.54.0 is required to build it as subproject') - endif + # Note that we don't have harfbuzz -> cairo -> freetype2 -> harfbuzz fallback + # dependency cycle here because we have configured freetype2 above with + # harfbuzz support disabled, so when cairo will lookup freetype2 dependency + # it will be forced to use that one. + cairo_dep = dependency('cairo', fallback: 'cairo', required: get_option('cairo')) + cairo_ft_dep = dependency('cairo-ft', fallback: 'cairo', required: get_option('cairo')) endif endif @@ -387,19 +381,6 @@ build_summary = { 'Benchmark': get_option('benchmark').enabled(), }, } -if meson.version().version_compare('>=0.53') - foreach section_title, section : build_summary - summary(section, bool_yn: true, section: section_title) - endforeach -else - summary = [''] - foreach section_title, section : build_summary - summary += ' @0@:'.format(section_title) - foreach feature, value : section - summary += ' @0@:'.format(feature) - summary += ' @0@'.format(value) - endforeach - summary += '' - endforeach - message('\n'.join(summary)) -endif +foreach section_title, section : build_summary + summary(section, bool_yn: true, section: section_title) +endforeach 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 dd61509b2e4..0beffb078f2 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-array.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-array.hh @@ -51,13 +51,19 @@ struct hb_array_t : hb_iter_with_fallback_t<hb_array_t<Type>, Type&> * Constructors. */ hb_array_t () = default; - hb_array_t (Type *array_, unsigned int length_) : arrayZ (array_), length (length_) {} + hb_array_t (const hb_array_t&) = default; + ~hb_array_t () = default; + hb_array_t& operator= (const hb_array_t&) = default; + hb_array_t& operator= (hb_array_t&&) = default; + + constexpr hb_array_t (std::nullptr_t) : hb_array_t () {} + constexpr hb_array_t (Type *array_, unsigned int length_) : arrayZ (array_), length (length_) {} template <unsigned int length_> - hb_array_t (Type (&array_)[length_]) : hb_array_t (array_, length_) {} + constexpr hb_array_t (Type (&array_)[length_]) : hb_array_t (array_, length_) {} template <typename U, hb_enable_if (hb_is_cr_convertible(U, Type))> - hb_array_t (const hb_array_t<U> &o) : + constexpr hb_array_t (const hb_array_t<U> &o) : hb_iter_with_fallback_t<hb_array_t, Type&> (), arrayZ (o.arrayZ), length (o.length), backwards_length (o.backwards_length) {} template <typename U, @@ -303,13 +309,19 @@ struct hb_sorted_array_t : static constexpr bool is_sorted_iterator = true; hb_sorted_array_t () = default; - hb_sorted_array_t (Type *array_, unsigned int length_) : hb_array_t<Type> (array_, length_) {} + hb_sorted_array_t (const hb_sorted_array_t&) = default; + ~hb_sorted_array_t () = default; + hb_sorted_array_t& operator= (const hb_sorted_array_t&) = default; + hb_sorted_array_t& operator= (hb_sorted_array_t&&) = default; + + constexpr hb_sorted_array_t (std::nullptr_t) : hb_sorted_array_t () {} + constexpr hb_sorted_array_t (Type *array_, unsigned int length_) : hb_array_t<Type> (array_, length_) {} template <unsigned int length_> - hb_sorted_array_t (Type (&array_)[length_]) : hb_array_t<Type> (array_) {} + constexpr hb_sorted_array_t (Type (&array_)[length_]) : hb_array_t<Type> (array_) {} template <typename U, hb_enable_if (hb_is_cr_convertible(U, Type))> - hb_sorted_array_t (const hb_array_t<U> &o) : + constexpr hb_sorted_array_t (const hb_array_t<U> &o) : hb_iter_t<hb_sorted_array_t, Type&> (), hb_array_t<Type> (o) {} template <typename U, 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 bb4a0eb5d11..793dcf22ca9 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-map.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-map.hh @@ -35,8 +35,10 @@ */ template <typename K, typename V, - K kINVALID = hb_is_pointer (K) ? 0 : std::is_signed<K>::value ? hb_int_min (K) : (K) -1, - V vINVALID = hb_is_pointer (V) ? 0 : std::is_signed<V>::value ? hb_int_min (V) : (V) -1> + typename k_invalid_t = K, + typename v_invalid_t = V, + k_invalid_t kINVALID = hb_is_pointer (K) ? 0 : std::is_signed<K>::value ? hb_int_min (K) : (K) -1, + v_invalid_t vINVALID = hb_is_pointer (V) ? 0 : std::is_signed<V>::value ? hb_int_min (V) : (V) -1> struct hb_hashmap_t { static constexpr K INVALID_KEY = kINVALID; @@ -62,8 +64,10 @@ struct hb_hashmap_t hb_copy (o, *this); } - static_assert (std::is_integral<K>::value || hb_is_pointer (K), ""); - static_assert (std::is_integral<V>::value || hb_is_pointer (V), ""); + static_assert (std::is_trivially_copyable<K>::value, ""); + static_assert (std::is_trivially_copyable<V>::value, ""); + static_assert (std::is_trivially_destructible<K>::value, ""); + static_assert (std::is_trivially_destructible<V>::value, ""); struct item_t { @@ -348,19 +352,23 @@ struct hb_hashmap_t struct hb_map_t : hb_hashmap_t<hb_codepoint_t, hb_codepoint_t, + hb_codepoint_t, + hb_codepoint_t, HB_MAP_VALUE_INVALID, HB_MAP_VALUE_INVALID> { using hashmap = hb_hashmap_t<hb_codepoint_t, hb_codepoint_t, + hb_codepoint_t, + hb_codepoint_t, HB_MAP_VALUE_INVALID, HB_MAP_VALUE_INVALID>; hb_map_t () = default; ~hb_map_t () = default; - hb_map_t (hb_map_t& o) = default; - hb_map_t& operator= (const hb_map_t& other) = default; - hb_map_t& operator= (hb_map_t&& other) = default; + hb_map_t (hb_map_t&) = default; + hb_map_t& operator= (const hb_map_t&) = default; + hb_map_t& operator= (hb_map_t&&) = default; hb_map_t (std::initializer_list<hb_pair_t<hb_codepoint_t, hb_codepoint_t>> lst) : hashmap (lst) {} template <typename Iterable, hb_requires (hb_is_iterable (Iterable))> diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colr-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colr-table.hh index 03476faba7f..a3c55fa8f40 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colr-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colr-table.hh @@ -38,8 +38,8 @@ */ #define HB_OT_TAG_COLR HB_TAG('C','O','L','R') -#ifndef COLRV1_MAX_NESTING_LEVEL -#define COLRV1_MAX_NESTING_LEVEL 100 +#ifndef HB_COLRV1_MAX_NESTING_LEVEL +#define HB_COLRV1_MAX_NESTING_LEVEL 100 #endif #ifndef COLRV1_ENABLE_SUBSETTING @@ -102,7 +102,7 @@ struct hb_colrv1_closure_context_t : hb_set_t *glyphs_, hb_set_t *layer_indices_, hb_set_t *palette_indices_, - unsigned nesting_level_left_ = COLRV1_MAX_NESTING_LEVEL) : + unsigned nesting_level_left_ = HB_COLRV1_MAX_NESTING_LEVEL) : base (base_), glyphs (glyphs_), layer_indices (layer_indices_), @@ -985,7 +985,7 @@ struct ClipList for (const hb_codepoint_t _ : gids.iter ()) { if (_ == start_gid) continue; - + offset = gid_offset_map.get (_); if (_ == prev_gid + 1 && offset == prev_offset) { @@ -1027,7 +1027,7 @@ struct ClipList const hb_set_t& glyphset = *c->plan->_glyphset; const hb_map_t &glyph_map = *c->plan->glyph_map; - + hb_map_t new_gid_offset_map; hb_set_t new_gids; for (const ClipRecord& record : clips.iter ()) @@ -1062,6 +1062,18 @@ struct ClipList struct Paint { + + template <typename ...Ts> + bool sanitize (hb_sanitize_context_t *c, Ts&&... ds) const + { + TRACE_SANITIZE (this); + + if (unlikely (!c->check_start_recursion (HB_COLRV1_MAX_NESTING_LEVEL))) + return_trace (c->no_dispatch_return_value ()); + + return_trace (c->end_recursion (this->dispatch (c, std::forward<Ts> (ds)...))); + } + template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { 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 5d98278bedc..882c3ae96f4 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 @@ -98,7 +98,7 @@ static void ClassDef_remap_and_serialize (hb_serialize_context_t *c, struct hb_prune_langsys_context_t { hb_prune_langsys_context_t (const void *table_, - hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> *script_langsys_map_, + hb_hashmap_t<unsigned, hb_set_t *> *script_langsys_map_, const hb_map_t *duplicate_feature_map_, hb_set_t *new_collected_feature_indexes_) :table (table_), @@ -137,7 +137,7 @@ struct hb_prune_langsys_context_t public: const void *table; - hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> *script_langsys_map; + hb_hashmap_t<unsigned, hb_set_t *> *script_langsys_map; const hb_map_t *duplicate_feature_map; hb_set_t *new_feature_indexes; @@ -179,14 +179,14 @@ struct hb_subset_layout_context_t : hb_subset_context_t *subset_context; const hb_tag_t table_tag; const hb_map_t *lookup_index_map; - const hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> *script_langsys_map; + const hb_hashmap_t<unsigned, hb_set_t *> *script_langsys_map; const hb_map_t *feature_index_map; unsigned cur_script_index; hb_subset_layout_context_t (hb_subset_context_t *c_, hb_tag_t tag_, hb_map_t *lookup_map_, - hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> *script_langsys_map_, + hb_hashmap_t<unsigned, hb_set_t *> *script_langsys_map_, hb_map_t *feature_index_map_) : subset_context (c_), table_tag (tag_), @@ -1357,7 +1357,7 @@ struct Lookup if (unlikely (!get_subtables<TSubTable> ().sanitize (c, this, get_type ()))) return_trace (false); - if (unlikely (get_type () == TSubTable::Extension && !c->get_edit_count ())) + if (unlikely (get_type () == TSubTable::Extension && subtables && !c->get_edit_count ())) { /* The spec says all subtables of an Extension lookup should * have the same type, which shall not be the Extension type 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 c0ed2bcc03d..6bc06b50eda 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 @@ -163,7 +163,7 @@ struct hb_closure_context_t : hb_set_t *glyphs_, hb_set_t *cur_intersected_glyphs_, hb_map_t *done_lookups_glyph_count_, - hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> *done_lookups_glyph_set_, + hb_hashmap_t<unsigned, hb_set_t *> *done_lookups_glyph_set_, unsigned int nesting_level_left_ = HB_MAX_NESTING_LEVEL) : face (face_), glyphs (glyphs_), @@ -192,7 +192,7 @@ struct hb_closure_context_t : private: hb_map_t *done_lookups_glyph_count; - hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> *done_lookups_glyph_set; + hb_hashmap_t<unsigned, hb_set_t *> *done_lookups_glyph_set; unsigned int lookup_count; }; @@ -1642,9 +1642,8 @@ struct Rule const hb_map_t *klass_map = nullptr) const { TRACE_SUBSET (this); - - const hb_array_t<const HBUINT16> input = inputZ.as_array ((inputCount ? inputCount - 1 : 0)); - if (!input.length) return_trace (false); + if (unlikely (!inputCount)) return_trace (false); + const hb_array_t<const HBUINT16> input = inputZ.as_array (inputCount - 1); const hb_map_t *mapping = klass_map == nullptr ? c->plan->glyph_map : klass_map; if (!hb_all (input, mapping)) return_trace (false); @@ -3631,7 +3630,7 @@ struct GSUBGPOS } void prune_langsys (const hb_map_t *duplicate_feature_map, - hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> *script_langsys_map, + hb_hashmap_t<unsigned, hb_set_t *> *script_langsys_map, hb_set_t *new_feature_indexes /* OUT */) const { hb_prune_langsys_context_t c (this, script_langsys_map, duplicate_feature_map, new_feature_indexes); @@ -3689,7 +3688,7 @@ struct GSUBGPOS hb_map_t *duplicate_feature_map /* OUT */) const { if (feature_indices->is_empty ()) return; - hb_hashmap_t<hb_tag_t, hb_set_t *, (unsigned)-1, nullptr> unique_features; + hb_hashmap_t<hb_tag_t, hb_set_t *> unique_features; //find out duplicate features after subset for (unsigned i : feature_indices->iter ()) { @@ -3784,8 +3783,12 @@ struct GSUBGPOS // http://lists.freedesktop.org/archives/harfbuzz/2012-November/002660.html continue; - if (f.featureParams.is_null () - && !f.intersects_lookup_indexes (lookup_indices) + + if (!f.featureParams.is_null () && + tag == HB_TAG ('s', 'i', 'z', 'e')) + continue; + + if (!f.intersects_lookup_indexes (lookup_indices) #ifndef HB_NO_VAR && !alternate_feature_indices.has (i) #endif diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc index fbdedd0e209..4e1d23eba5c 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc @@ -1493,7 +1493,7 @@ hb_ot_layout_lookup_substitute_closure (hb_face_t *face, { hb_set_t cur_intersected_glyphs; hb_map_t done_lookups_glyph_count; - hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> done_lookups_glyph_set; + hb_hashmap_t<unsigned, hb_set_t *> done_lookups_glyph_set; OT::hb_closure_context_t c (face, glyphs, &cur_intersected_glyphs, &done_lookups_glyph_count, &done_lookups_glyph_set); const OT::SubstLookup& l = face->table.GSUB->table->get_lookup (lookup_index); @@ -1522,7 +1522,7 @@ hb_ot_layout_lookups_substitute_closure (hb_face_t *face, { hb_set_t cur_intersected_glyphs; hb_map_t done_lookups_glyph_count; - hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> done_lookups_glyph_set; + hb_hashmap_t<unsigned, hb_set_t *> done_lookups_glyph_set; OT::hb_closure_context_t c (face, glyphs, &cur_intersected_glyphs, &done_lookups_glyph_count, &done_lookups_glyph_set); const OT::GSUB& gsub = *face->table.GSUB->table; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table-v2subset.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table-v2subset.hh index 94450eb53ad..504de2de740 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table-v2subset.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table-v2subset.hh @@ -79,6 +79,7 @@ HB_INTERNAL bool postV2Tail::subset (hb_subset_context_t *c) const post::accelerator_t _post; _post.init (c->plan->source); + hb_hashmap_t<hb_bytes_t, unsigned, std::nullptr_t, unsigned, nullptr, (unsigned)-1> glyph_name_to_new_index; for (hb_codepoint_t new_gid = 0; new_gid < num_glyphs; new_gid++) { hb_codepoint_t old_gid = reverse_glyph_map.get (new_gid); @@ -90,22 +91,28 @@ HB_INTERNAL bool postV2Tail::subset (hb_subset_context_t *c) const else { hb_bytes_t s = _post.find_glyph_name (old_gid); - int standard_glyph_index = -1; - for (unsigned i = 0; i < format1_names_length; i++) + new_index = glyph_name_to_new_index.get (s); + if (new_index == (unsigned)-1) { - if (s == format1_names (i)) + int standard_glyph_index = -1; + for (unsigned i = 0; i < format1_names_length; i++) { - standard_glyph_index = i; - break; + if (s == format1_names (i)) + { + standard_glyph_index = i; + break; + } } + + if (standard_glyph_index == -1) + { + new_index = 258 + i; + i++; + } + else + { new_index = standard_glyph_index; } + glyph_name_to_new_index.set (s, new_index); } - if (standard_glyph_index == -1) - { - new_index = 258 + i; - i++; - } - else - { new_index = standard_glyph_index; } old_new_index_map.set (old_index, new_index); } old_gid_new_index_map.set (old_gid, new_index); 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 2e536c7a814..65c2772201d 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-sanitize.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-sanitize.hh @@ -123,6 +123,7 @@ struct hb_sanitize_context_t : hb_sanitize_context_t () : start (nullptr), end (nullptr), max_ops (0), max_subtables (0), + recursion_depth (0), writable (false), edit_count (0), blob (nullptr), num_glyphs (65536), @@ -205,6 +206,7 @@ struct hb_sanitize_context_t : (unsigned) HB_SANITIZE_MAX_OPS_MAX); this->edit_count = 0; this->debug_depth = 0; + this->recursion_depth = 0; DEBUG_MSG_LEVEL (SANITIZE, start, 0, +1, "start [%p..%p] (%lu bytes)", @@ -278,6 +280,18 @@ struct hb_sanitize_context_t : return this->check_range (base, a, b, hb_static_size (T)); } + bool check_start_recursion (int max_depth) + { + if (unlikely (recursion_depth >= max_depth)) return false; + return ++recursion_depth; + } + + bool end_recursion (bool result) + { + recursion_depth--; + return result; + } + template <typename Type> bool check_struct (const Type *obj) const { return likely (this->check_range (obj, obj->min_size)); } @@ -389,6 +403,7 @@ struct hb_sanitize_context_t : const char *start, *end; mutable int max_ops, max_subtables; private: + int recursion_depth; bool writable; unsigned int edit_count; hb_blob_t *blob; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-serialize.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-serialize.hh index 57689916f67..d22ae06087f 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-serialize.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-serialize.hh @@ -652,7 +652,9 @@ struct hb_serialize_context_t hb_vector_t<object_t *> packed; /* Map view of packed objects. */ - hb_hashmap_t<const object_t *, objidx_t, nullptr, 0> packed_map; + hb_hashmap_t<const object_t *, objidx_t, + const object_t *, objidx_t, + nullptr, 0> packed_map; }; #endif /* HB_SERIALIZE_HH */ 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 88414271897..af02e9e12b2 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.hh @@ -157,9 +157,9 @@ struct hb_set_t : hb_sparseset_t<hb_bit_set_invertible_t> { hb_set_t () = default; ~hb_set_t () = default; - hb_set_t (hb_set_t& o) = default; - hb_set_t& operator= (const hb_set_t& other) = default; - hb_set_t& operator= (hb_set_t&& other) = default; + hb_set_t (hb_set_t&) = default; + hb_set_t& operator= (const hb_set_t&) = default; + hb_set_t& operator= (hb_set_t&&) = default; hb_set_t (std::initializer_list<hb_codepoint_t> lst) : hb_sparseset_t<hb_bit_set_invertible_t> (lst) {} template <typename Iterable, hb_requires (hb_is_iterable (Iterable))> 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 1e195ff6606..53f8664d92e 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 @@ -41,7 +41,7 @@ #include "hb-ot-math-table.hh" -typedef hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> script_langsys_map; +typedef hb_hashmap_t<unsigned, hb_set_t *> script_langsys_map; #ifndef HB_NO_SUBSET_CFF static inline void _add_cff_seac_components (const OT::cff1::accelerator_t &cff, @@ -100,11 +100,23 @@ static void _collect_layout_indices (hb_face_t *face, if (!features.alloc (table.get_feature_count () + 1)) return; + hb_set_t visited_features; + bool retain_all_features = true; for (unsigned i = 0; i < table.get_feature_count (); i++) { hb_tag_t tag = table.get_feature_tag (i); - if (tag && layout_features_to_retain->has (tag)) - features.push (tag); + if (!tag) continue; + if (!layout_features_to_retain->has (tag)) + { + retain_all_features = false; + continue; + } + + if (visited_features.has (tag)) + continue; + + features.push (tag); + visited_features.add (tag); } if (!features) @@ -113,7 +125,7 @@ static void _collect_layout_indices (hb_face_t *face, // The collect function needs a null element to signal end of the array. features.push (0); - if (features.get_size () == table.get_feature_count () + 1) + if (retain_all_features) { // Looking for all features, trigger the faster collection method. layout_collect_func (face, 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 c30feeb42f2..c0232480bff 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 @@ -84,8 +84,8 @@ struct hb_subset_plan_t hb_map_t *gpos_lookups; //active langsys we'd like to retain - hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> *gsub_langsys; - hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> *gpos_langsys; + hb_hashmap_t<unsigned, hb_set_t *> *gsub_langsys; + hb_hashmap_t<unsigned, hb_set_t *> *gpos_langsys; //active features after removing redundant langsys and prune_features hb_map_t *gsub_features; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/meson.build b/Build/source/libs/harfbuzz/harfbuzz-src/src/meson.build index bda44c68300..1a114f6d433 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/meson.build +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/meson.build @@ -3,7 +3,7 @@ hb_version_h = configure_file( input: 'hb-version.h.in', output: 'hb-version.h', install: true, - install_dir: join_paths(get_option('includedir'), meson.project_name())) + install_dir: get_option('includedir') / meson.project_name()) # Base and default-included sources and headers hb_base_sources = files( @@ -569,7 +569,7 @@ cmake_config.set('have_gobject', '@0@'.format(have_gobject)) configure_file(input: 'harfbuzz-config.cmake.in', output: 'harfbuzz-config.cmake', configuration: cmake_config, - install_dir: join_paths(get_option('libdir'), 'cmake', 'harfbuzz'), + install_dir: get_option('libdir') / 'cmake' / 'harfbuzz', ) libharfbuzz_gobject_dep = null_dep @@ -579,14 +579,12 @@ if have_gobject h_templ = configure_file( input: 'hb-gobject-enums.h.tmpl', output: 'hb-gobject-enums-tmp.h.tmpl', - configuration: configuration_data(), - format: 'cmake') + copy: true) cc_templ = configure_file( input: 'hb-gobject-enums.cc.tmpl', output: 'hb-gobject-enums-tmp.cc.tmpl', - configuration: configuration_data(), - format: 'cmake') + copy: true) enums = gnome.mkenums('hb-gobject', sources: hb_headers, @@ -607,7 +605,7 @@ if have_gobject output: 'hb-gobject-enums.h', command: [find_program('fix_get_types.py'), '@INPUT@', '@OUTPUT@'], install: true, - install_dir: join_paths(get_option('prefix'), get_option('includedir'), meson.project_name()), + install_dir: get_option('prefix') / get_option('includedir') / meson.project_name(), ) hb_gobject_sources += [enum_c] @@ -658,16 +656,10 @@ if have_gobject '--cflags-end']) endif - if build_gir - libharfbuzz_gobject_sources = hb_gen_files_gir - else - libharfbuzz_gobject_sources = hb_gobject_sources - endif - libharfbuzz_gobject_dep = declare_dependency( link_with: libharfbuzz_gobject, include_directories: incsrc, - sources: libharfbuzz_gobject_sources, + sources: build_gir ? hb_gen_files_gir : hb_gobject_sources, dependencies: [glib_dep, gobject_dep]) pkgmod.generate(libharfbuzz_gobject, @@ -708,21 +700,13 @@ if get_option('tests').enabled() env.set('HBHEADERS', ' '.join(HBHEADERS)) if cpp.get_id() != 'msvc' and not meson.is_cross_build() # ensure the local tools are usable - if meson.version().version_compare('>=0.55') - dist_check_script += 'check-libstdc++' - endif - dist_check_script += ['check-static-inits', 'check-symbols'] + dist_check_script += ['check-libstdc++', 'check-static-inits', 'check-symbols'] endif foreach name : dist_check_script - if name == 'check-symbols' - test_depends = defs_list - else - test_depends = [] - endif test(name, find_program(name + '.py'), env: env, - depends: test_depends, + depends: name == 'check-symbols' ? defs_list : [], suite: ['src'], ) endforeach diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/test-map.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/test-map.cc index 5761cc8d652..8c167b1da19 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/test-map.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/test-map.cc @@ -98,5 +98,15 @@ main (int argc, char **argv) assert (v2.get_population () == 2); } + /* Test class key / value types. */ + { + hb_hashmap_t<hb_bytes_t, int, std::nullptr_t, int, nullptr, 0> m1; + hb_hashmap_t<int, hb_bytes_t, int, std::nullptr_t, 0, nullptr> m2; + hb_hashmap_t<hb_bytes_t, hb_bytes_t, std::nullptr_t, std::nullptr_t, nullptr, nullptr> m3; + assert (m1.get_population () == 0); + assert (m2.get_population () == 0); + assert (m3.get_population () == 0); + } + return 0; } diff --git a/Build/source/libs/harfbuzz/version.ac b/Build/source/libs/harfbuzz/version.ac index 43ced8f3ad5..351ea234a00 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], [3.1.1]) +m4_define([harfbuzz_version], [3.1.2]) |