diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2020-12-24 07:21:30 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2020-12-24 07:21:30 +0000 |
commit | f88f99b079f2902f7705a2aff36c0ff8c13df8a8 (patch) | |
tree | 9a4408ede2a693471e9316ce59708ca0eca1b68c /Build | |
parent | d9a6a275c51f6dcebc04e63329571f020c5de19a (diff) |
harfbuzz 2.7.3
git-svn-id: svn://tug.org/texlive/trunk@57216 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
72 files changed, 7108 insertions, 2597 deletions
diff --git a/Build/source/libs/README b/Build/source/libs/README index ea505ecc8f4..90dee2ba694 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 2.7.2 - checked 29aug20 - https://github.com/harfbuzz/harfbuzz/releases/download/2.7.2/ +harfbuzz 2.7.3 - checked 24dec20 + https://github.com/harfbuzz/harfbuzz/releases/download/2.7.3/ icu 63.1 - checked 8jan19 http://download.icu-project.org/files/icu4c/ diff --git a/Build/source/libs/harfbuzz/ChangeLog b/Build/source/libs/harfbuzz/ChangeLog index e5512ddd239..b4d502856e0 100644 --- a/Build/source/libs/harfbuzz/ChangeLog +++ b/Build/source/libs/harfbuzz/ChangeLog @@ -1,3 +1,8 @@ +2020-12-24 Akira Kakuto <kakuto@w32tex.org> + + Import harfbuzz-2.7.3. + * Makefile.am, version.ac: Adjusted. + 2020-08-29 Akira Kakuto <kakuto@w32tex.org> Import harfbuzz-2.7.2. diff --git a/Build/source/libs/harfbuzz/Makefile.am b/Build/source/libs/harfbuzz/Makefile.am index 35634c90e67..19ae68b83d2 100644 --- a/Build/source/libs/harfbuzz/Makefile.am +++ b/Build/source/libs/harfbuzz/Makefile.am @@ -193,6 +193,7 @@ libharfbuzz_a_SOURCES += \ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-indic-table.cc \ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-khmer.hh \ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-khmer.cc \ + @HARFBUZZ_TREE@/src/hb-ot-shape-complex-machine-index.hh \ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-myanmar.hh \ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-myanmar.cc \ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-thai.cc \ diff --git a/Build/source/libs/harfbuzz/Makefile.in b/Build/source/libs/harfbuzz/Makefile.in index 503e15d7d29..1644678f459 100644 --- a/Build/source/libs/harfbuzz/Makefile.in +++ b/Build/source/libs/harfbuzz/Makefile.in @@ -862,6 +862,7 @@ libharfbuzz_a_SOURCES = @HARFBUZZ_TREE@/src/hb-algs.hh \ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-indic-table.cc \ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-khmer.hh \ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-khmer.cc \ + @HARFBUZZ_TREE@/src/hb-ot-shape-complex-machine-index.hh \ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-myanmar.hh \ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-myanmar.cc \ @HARFBUZZ_TREE@/src/hb-ot-shape-complex-thai.cc \ diff --git a/Build/source/libs/harfbuzz/TLpatches/ChangeLog b/Build/source/libs/harfbuzz/TLpatches/ChangeLog index 742a04cb928..1b4fc51c05b 100644 --- a/Build/source/libs/harfbuzz/TLpatches/ChangeLog +++ b/Build/source/libs/harfbuzz/TLpatches/ChangeLog @@ -1,3 +1,8 @@ +2020-12-24 Akira Kakuto <kakuto@w32tex.org> + + Imported harfbuzz-2.7.3 source tree from: + https://github.com/harfbuzz/harfbuzz/releases/download/2.7.3/ + 2020-08-29 Akira Kakuto <kakuto@w32tex.org> Imported harfbuzz-2.7.2 source tree from: diff --git a/Build/source/libs/harfbuzz/TLpatches/TL-Changes b/Build/source/libs/harfbuzz/TLpatches/TL-Changes index f93a5cd553e..4341a8ecac9 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-2.7.2/ tree as obtained from: - https://github.com/harfbuzz/harfbuzz/releases/download/2.7.2/ +Changes applied to the harfbuzz-2.7.3/ tree as obtained from: + https://github.com/harfbuzz/harfbuzz/releases/download/2.7.3/ Removed: COPYING @@ -18,6 +18,7 @@ Removed: test-driver src/Makefile.in src/hb-version.h + unused dirs: docs m4 diff --git a/Build/source/libs/harfbuzz/configure b/Build/source/libs/harfbuzz/configure index cda9ae035c8..bd00d346a2c 100755 --- a/Build/source/libs/harfbuzz/configure +++ b/Build/source/libs/harfbuzz/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for harfbuzz (TeX Live) 2.7.2. +# Generated by GNU Autoconf 2.69 for harfbuzz (TeX Live) 2.7.3. # # Report bugs to <tex-k@tug.org>. # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='harfbuzz (TeX Live)' PACKAGE_TARNAME='harfbuzz--tex-live-' -PACKAGE_VERSION='2.7.2' -PACKAGE_STRING='harfbuzz (TeX Live) 2.7.2' +PACKAGE_VERSION='2.7.3' +PACKAGE_STRING='harfbuzz (TeX Live) 2.7.3' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' @@ -1311,7 +1311,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) 2.7.2 to adapt to many kinds of systems. +\`configure' configures harfbuzz (TeX Live) 2.7.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1382,7 +1382,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of harfbuzz (TeX Live) 2.7.2:";; + short | recursive ) echo "Configuration of harfbuzz (TeX Live) 2.7.3:";; esac cat <<\_ACEOF @@ -1487,7 +1487,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -harfbuzz (TeX Live) configure 2.7.2 +harfbuzz (TeX Live) configure 2.7.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2123,7 +2123,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 2.7.2, which was +It was created by harfbuzz (TeX Live) $as_me 2.7.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -4042,7 +4042,7 @@ fi # Define the identity of the package. PACKAGE='harfbuzz--tex-live-' - VERSION='2.7.2' + VERSION='2.7.3' # Some tools Automake needs. @@ -4236,8 +4236,8 @@ WARNING_CFLAGS=$kpse_cv_warning_cflags HB_VERSION_MAJOR=2 HB_VERSION_MINOR=7 -HB_VERSION_MICRO=2 -HB_VERSION=2.7.2 +HB_VERSION_MICRO=3 +HB_VERSION=2.7.3 ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -7914,7 +7914,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 2.7.2, which was +This file was extended by harfbuzz (TeX Live) $as_me 2.7.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -7980,7 +7980,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -harfbuzz (TeX Live) config.status 2.7.2 +harfbuzz (TeX Live) config.status 2.7.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/CMakeLists.txt b/Build/source/libs/harfbuzz/harfbuzz-src/CMakeLists.txt index 5e0bc9fcd1c..11118595fe3 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/CMakeLists.txt +++ b/Build/source/libs/harfbuzz/harfbuzz-src/CMakeLists.txt @@ -233,7 +233,7 @@ endif () if (HB_HAVE_ICU) add_definitions(-DHAVE_ICU) - # https://github.com/WebKit/webkit/blob/master/Source/cmake/FindICU.cmake + # https://github.com/WebKit/webkit/blob/fdd7733f2f30eab7fe096a9791f98c60f62f49c0/Source/cmake/FindICU.cmake find_package(PkgConfig) pkg_check_modules(PC_ICU QUIET icu-uc) @@ -302,6 +302,7 @@ if (WIN32 AND HB_HAVE_DIRECTWRITE) endif () if (HB_HAVE_GOBJECT) + add_definitions(-DHAVE_GOBJECT) include (FindPerl) # Use the hints from glib-2.0.pc to find glib-mkenums diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog b/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog index 32fbe469569..a00f10075be 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog +++ b/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog @@ -1,3 +1,1735 @@ +commit 954167143befde8366150dcb885f50a9e64346a3 +Merge: 8560c3e3 71a3b54f +Author: Khaled Hosny <dr.khaled.hosny@gmail.com> +Date: Wed Dec 23 23:04:17 2020 +0200 + + Merge pull request #2776 from harfbuzz/release + + 2.7.3 + +commit 71a3b54f3c6c6fba52a2f99e6a9258c62b5104cd +Author: Khaled Hosny <khaled@aliftype.com> +Date: Wed Dec 23 15:33:15 2020 +0200 + + 2.7.3 + + NEWS | 23 +++++++++++++++++++++++ + configure.ac | 2 +- + meson.build | 2 +- + src/hb-buffer.cc | 2 +- + src/hb-version.h | 4 ++-- + 5 files changed, 28 insertions(+), 5 deletions(-) + +commit 8560c3e355dbfd199fbd9e7052151c40a9039b29 +Merge: 769a21aa 296e9d7f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Dec 23 00:25:10 2020 -0800 + + Merge pull request #2774 from harfbuzz/misc-doc + + Doc fixes + +commit 769a21aab6a2b1c43cc10d56de3861a3add723de +Author: Ryan <ryan@luciaonline.net> +Date: Wed Dec 23 02:31:03 2020 -0500 + + meson: avoid regenerating hb-version.h unnecessarily + + The file is a dependency for the library as a whole, so previously editing the Meson build files at all would force a full rebuild. This will only rebuild it if the version has changed. + + src/gen-hb-version.py | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +commit 296e9d7f33fb314d0bd4e0dad5a85f60aefdade9 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Wed Dec 23 01:18:10 2020 +0200 + + [ci] Install fonttools using pip on msys2 + + Hopefully fixes the broken package. + + .github/workflows/msys2-ci.yml | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +commit 3dba7ea93638df814b93d75d31ad3da24605704d +Author: Khaled Hosny <khaled@aliftype.com> +Date: Wed Dec 23 00:55:21 2020 +0200 + + [docs] Add missing API index for 1.4.0 release + + docs/harfbuzz-docs.xml | 1 + + 1 file changed, 1 insertion(+) + +commit c2e2c40bacb296526e1b395a957af0e13da4486f +Author: Khaled Hosny <khaled@aliftype.com> +Date: Wed Dec 23 00:49:23 2020 +0200 + + [docs] Fix gtk-doc comment syntax + + The documentation was not picked otherwise. + + src/hb-aat-layout.cc | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 0826940821e9b8068b0341dae4d3ea237df86aa2 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Wed Dec 23 00:45:39 2020 +0200 + + [docs] Add messing sections + + Docs for these sections were not generated at all. + + docs/harfbuzz-docs.xml | 4 ++++ + src/hb-directwrite.cc | 9 +++++++++ + src/hb-gdi.cc | 10 ++++++++++ + src/hb-ot-metrics.cc | 9 +++++++++ + 4 files changed, 32 insertions(+) + +commit b8b13018edc4115e9857d7871d254c5737f90046 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Wed Dec 23 00:22:56 2020 +0200 + + [docs] Make gtk-doc find these typedef’s + + src/hb-aat-layout.h | 3 +-- + src/hb-buffer.h | 3 +-- + src/hb-font.h | 6 ++---- + src/hb-ot-color.h | 3 +-- + src/hb-ot-deprecated.h | 3 +-- + src/hb-ot-name.h | 3 +-- + src/hb-ot-var.h | 3 +-- + 7 files changed, 8 insertions(+), 16 deletions(-) + +commit 8c3a530fd7aa832215b84f4f38d58f58ac8a5832 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Tue Dec 22 23:52:46 2020 +0200 + + [docs] Some formatting fixes + + src/hb-buffer-serialize.cc | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +commit b029a45caa6067c752643e49b30233a74a8be721 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Tue Dec 22 23:32:48 2020 +0200 + + [docs] Add new API to harfbuzz-sections.txt + + docs/harfbuzz-docs.xml | 1 + + docs/harfbuzz-sections.txt | 3 +++ + 2 files changed, 4 insertions(+) + +commit ea4476d7389b8b5d30f1d969787c752856c32088 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Mon Dec 21 17:44:03 2020 +0200 + + [autotools] Don’t fallback to icu-config + + ICU pkg-config support have been available for a long time, and + icu-config often breaks cross-compiling when the one from host system is + found. + + configure.ac | 19 ------------------- + 1 file changed, 19 deletions(-) + +commit 2953a66ab685957f57e52fb45f42445030d41e06 +Author: Chun-wei Fan <fanchunwei@src.gnome.org> +Date: Wed Dec 9 12:24:18 2020 +0800 + + CMake: Define HAVE_GOBJECT when harfbuzz-gobject is built + + Without this, the built library for harfbuzz-gobject is unuseful. + + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +commit 25c0a792e3c2642e3796e0428fb315da9dc2618e +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 10 14:29:47 2020 -0700 + + Remove unused+wrong UnsizedArrayOf<> operators + + Said compiler is wrong to err since they are unused. But yeah, they + didn't make sense and were copy/paste leftover. + + Fixes https://github.com/harfbuzz/harfbuzz/issues/2763 + + src/hb-open-type.hh | 2 -- + 1 file changed, 2 deletions(-) + +commit 07e304b2a488261a89e74f396902399cb28f5608 +Merge: 7c241651 5f32fdff +Author: Khaled Hosny <dr.khaled.hosny@gmail.com> +Date: Tue Dec 1 22:32:19 2020 +0200 + + Merge pull request #2755 from Myaamori/master + + meson: use meson.current_source_dir() instead of @CURRENT_SOURCE_DIR@ + +commit 7c241651ac3c8a4d97a0a04d4db5bd0088988ed9 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Nov 30 16:38:53 2020 -0700 + + [algs] Don't forward rvalue twice + + Part of https://github.com/harfbuzz/harfbuzz/issues/2293 + + src/hb-algs.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 53806e5b83cee0e275eac038d0780f95ac56588c +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Nov 25 11:51:37 2020 -0700 + + Tiny improvement on previous commit + + Functionally the same. + + src/hb-blob.hh | 1 + + src/hb-null.hh | 1 + + src/hb-ot-layout-gsubgpos.hh | 2 +- + 3 files changed, 3 insertions(+), 1 deletion(-) + +commit a5f6f869e80c371665026dfe9d156f0088f2553d +Author: Dominik Röttsches <drott@chromium.org> +Date: Fri Oct 23 14:25:05 2020 +0300 + + Drop layout table if layout lookup accelerator allocation failed + + If the table is kept, when the table is present but only the accelerator + allocation failed, then we run into nullptr dereferences downstream in + hb_ot_map_t::apply when trying to access proxy.accels[i]. + + To fix this, instead of only setting lookup_count of accelerator_t + itself, drop the whole table to avoid hb-ot-map construction assuming + that the lookups will work correctly despite accelerator allocation + having failed. + + Fixes: + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24490 + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24490 + + src/hb-ot-layout-gsubgpos.hh | 4 ++++ + 1 file changed, 4 insertions(+) + +commit 5f32fdff11bca45ca842dea583f1afd51a6435b9 +Author: Myaamori <myaamori1993@gmail.com> +Date: Tue Nov 24 01:29:24 2020 +0000 + + meson: use meson.current_source_dir() instead of @CURRENT_SOURCE_DIR@ + + @CURRENT_SOURCE_DIR@ is not listed as a valid string substitution + for custom targets in the Meson reference, and in practice + it does not get substituted when using the vs2019 backend. + + src/meson.build | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit b2e7bb2a7caa20af244b7452ec960f9957eb8bba +Author: David Corbett <corbett.dav@northeastern.edu> +Date: Tue Oct 27 19:50:33 2020 -0400 + + Don’t map BCP 47 to coincidentally similar OT tag + + src/gen-tag-table.py | 34 ++++++++--- + src/hb-ot-tag-table.hh | 163 +++++++++++++++++++++++++++++++++++++++++++++++++ + src/hb-ot-tag.cc | 1 + + test/api/test-ot-tag.c | 4 ++ + 4 files changed, 194 insertions(+), 8 deletions(-) + +commit e1df2c5277a365d5e0c83d811f0b95f66428430b +Author: David Corbett <corbett.dav@northeastern.edu> +Date: Mon Oct 26 19:16:35 2020 -0400 + + Map ISO 639 code qul to language system tag 'QUH ' + + src/gen-tag-table.py | 1 + + src/hb-ot-tag-table.hh | 1 + + 2 files changed, 2 insertions(+) + +commit bac8a856f8ce034fde04f024065455c8b29bba5e +Author: Khaled Hosny <khaledhosny@eglug.org> +Date: Sat Nov 21 16:07:57 2020 +0200 + + Revert "[CI] Don’t install ragel on circleci jobs" + + This reverts commit 9a9da110a54ea03a0bdd1e64fa9ff7a2b98ba53c. + + .circleci/config.yml | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +commit f579c66108d4b9d122213704078c998bc194d427 +Author: Khaled Hosny <khaledhosny@eglug.org> +Date: Sat Nov 21 16:06:27 2020 +0200 + + Mark variable unused + + Hopefully fixes build with newer ragel. + + https://github.com/adrian-thurston/ragel/issues/56 + + Fixes https://github.com/harfbuzz/harfbuzz/issues/2752 + + src/hb-ot-shape-complex-use-machine.hh | 2 +- + src/hb-ot-shape-complex-use-machine.rl | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit f83496a9101f764e4eaec2ce205d55aa4f78558f +Author: David Corbett <corbett.dav@northeastern.edu> +Date: Fri Nov 20 08:16:36 2020 -0500 + + [use] Remove workaround for reserved code points + + See <https://github.com/microsoft/font-tools/issues/12>. + + src/gen-use-table.py | 4 +--- + src/ms-use/IndicSyllabicCategory-Additional.txt | 5 ++++- + 2 files changed, 5 insertions(+), 4 deletions(-) + +commit 17da41bd06f2b993976379c8ab9287b485f58dee +Author: David Corbett <corbett.dav@northeastern.edu> +Date: Tue Nov 17 14:29:05 2020 -0500 + + Update language system tag registry to OT 1.8.4 + + src/gen-tag-table.py | 7 +- + src/hb-ot-tag-table.hh | 909 +++++++++++++++++++++++++++++++++++++------------ + test/api/test-ot-tag.c | 6 +- + 3 files changed, 704 insertions(+), 218 deletions(-) + +commit 385d9c08d8906002690a7fbff86c1592f5b627b9 +Merge: c4ade4fd 9722b4b2 +Author: Khaled Hosny <dr.khaled.hosny@gmail.com> +Date: Tue Nov 17 19:43:22 2020 +0200 + + Merge pull request #2700 from xclaesse/cairo-ft + + meson: Fix cairo_ft_dep when fontconfig is a subproject + +commit 9722b4b269bda2d7e84c3164d69caa1324f8f8b3 +Author: Xavier Claessens <xavier.claessens@collabora.com> +Date: Tue Nov 17 11:56:52 2020 -0500 + + Meson: Update all wrap files to latest version + + subprojects/expat.wrap | 19 +++++++++---------- + subprojects/fontconfig.wrap | 6 +++--- + subprojects/google-benchmark.wrap | 15 ++++++++------- + subprojects/libpng.wrap | 22 ++++++++++++---------- + subprojects/zlib.wrap | 17 ++++++++++++----- + 5 files changed, 44 insertions(+), 35 deletions(-) + +commit a082fe400d1c981e22061168299334c853ad85a6 +Author: Xavier Claessens <xavier.claessens@collabora.com> +Date: Fri Nov 6 13:02:21 2020 -0500 + + ci: Install meson 0.56.0 in crossbuild-win32 + + It is required for using cairo as subproject. + + .circleci/config.yml | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit e2ba0e009e499e82b2922db7e58e91bc5f452d03 +Author: Xavier Claessens <xavier.claessens@collabora.com> +Date: Sat Oct 3 21:34:24 2020 -0400 + + meson: Fix check for cairo and cairo-ft dependencies + + When cairo comes from a subproject fallback it should still take + cairo-ft dependency, otherwise it miss freetype2 cflags. + + Also update wrap file to use upstream repository now that meson support + has been merged. + + This requires Meson >= 0.54.0 because cairo itself requires that version + and we use the new `fallback: 'cairo'` syntax without specifying a + variable name because cairo does not provide a variable name for + cairo-ft. + + meson.build | 37 +++++++++++++++++-------------------- + subprojects/cairo.wrap | 4 ++-- + 2 files changed, 19 insertions(+), 22 deletions(-) + +commit c4ade4fdd681b59c0694b7422d7a123fd1e9e6b8 +Merge: e6c21d7b fd8f4ffc +Author: Khaled Hosny <dr.khaled.hosny@gmail.com> +Date: Tue Nov 17 14:32:04 2020 +0200 + + Merge pull request #2686 from simoncozens/more-tracing + + More tracing + +commit fd8f4ffcc6851ff9024957779be50411e87724d5 +Author: Simon Cozens <simon@simon-cozens.org> +Date: Fri Sep 18 16:37:22 2020 +0100 + + Trace reorder, not normalize + + src/hb-ot-shape-normalize.cc | 3 ++- + src/hb-ot-shape.cc | 5 +---- + 2 files changed, 3 insertions(+), 5 deletions(-) + +commit 2e0193d7417d1134e1710bf3fa7690332bc561e0 +Author: Simon Cozens <simon@simon-cozens.org> +Date: Fri Sep 18 16:28:29 2020 +0100 + + Add more cast spaces + + src/hb-ot-shape.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 4bb6d54e3bd16ae42364587f9703128b95de89de +Author: Simon Cozens <simon@simon-cozens.org> +Date: Fri Sep 18 16:26:08 2020 +0100 + + Missing cast + + src/hb-ot-shape-complex-indic.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 8e1bedc50b13d19e1fb3c0fbb0cfa6d87f042f51 +Author: Simon Cozens <simon@simon-cozens.org> +Date: Fri Sep 18 16:25:43 2020 +0100 + + Keep phase names + + src/hb-ot-shape.cc | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +commit 428c111f1389e3ebf8b694f342ffdc011f2ee043 +Author: Simon Cozens <simon@simon-cozens.org> +Date: Fri Sep 18 16:24:47 2020 +0100 + + Fix spacing around casts + + src/hb-ot-layout.cc | 4 ++-- + src/hb-ot-shape-complex-indic.cc | 2 +- + src/hb-ot-shape-complex-khmer.cc | 2 +- + src/hb-ot-shape-complex-myanmar.cc | 2 +- + src/hb-ot-shape-complex-use.cc | 2 +- + 5 files changed, 6 insertions(+), 6 deletions(-) + +commit f19018da412cf0949748dc8ba80e1a0a376238af +Author: Simon Cozens <simon@simon-cozens.org> +Date: Thu Sep 17 15:08:32 2020 +0100 + + Smaller issues from review + + src/hb-ot-shape-complex-indic.cc | 12 ++++++------ + src/hb-ot-shape-complex-myanmar.cc | 2 +- + src/hb-ot-shape.cc | 6 +++--- + 3 files changed, 10 insertions(+), 10 deletions(-) + +commit 8b3b835a0aaf7b21825ad87f0e0ab9efbff34dcc +Author: Simon Cozens <simon@simon-cozens.org> +Date: Thu Sep 17 14:27:31 2020 +0100 + + Trace normalization and preprocessing stages + + src/hb-ot-shape.cc | 15 ++++++++++++--- + 1 file changed, 12 insertions(+), 3 deletions(-) + +commit b50099bff22f9add10e100b6ace5a063a574a066 +Author: Simon Cozens <simon@simon-cozens.org> +Date: Thu Sep 17 14:25:30 2020 +0100 + + Trace reordering in pause functions + + src/hb-ot-shape-complex-indic.cc | 10 ++++++++-- + src/hb-ot-shape-complex-khmer.cc | 10 ++++++---- + src/hb-ot-shape-complex-myanmar.cc | 9 ++++++--- + src/hb-ot-shape-complex-use.cc | 10 +++++++--- + 4 files changed, 27 insertions(+), 12 deletions(-) + +commit e6c21d7b58224f483395a6c9355fe89d88aedd54 +Merge: 3bd43bd0 0c3dcfae +Author: Khaled Hosny <dr.khaled.hosny@gmail.com> +Date: Tue Nov 17 08:53:32 2020 +0200 + + Merge pull request #2692 from ffontaine/master + + src/meson.build: allow introspection when cross-compiling + +commit 0c3dcfae193efd8d5333c44075ba01932edc1059 +Merge: 2604201a 3bd43bd0 +Author: Fabrice Fontaine <fontaine.fabrice@gmail.com> +Date: Tue Nov 17 07:31:07 2020 +0100 + + Merge remote-tracking branch 'upstream/master' + +commit 3bd43bd023ab713781058f9ce5bcb7566ecb2d68 +Author: David Corbett <corbett.dav@northeastern.edu> +Date: Mon Nov 16 21:55:02 2020 -0500 + + Map more ISO 15924 variants to `hb_script_t`s + + src/hb-common.cc | 5 +++++ + 1 file changed, 5 insertions(+) + +commit 27170e058d2925ea05bf59f1ee8f56fb0bcb576a +Author: David Corbett <corbett.dav@northeastern.edu> +Date: Wed Oct 28 18:02:55 2020 -0400 + + Fix names for language tag in gen-tag-table.py + + A BCP 47 language tag with both a script subtag and a region subtag + would be printed as a human-readable name in hb-ot-tag-table.hh as if it + only had its language subtag. + + src/gen-tag-table.py | 18 +++---- + src/hb-ot-tag-table.hh | 126 ++++++++++++++++++++++++------------------------- + 2 files changed, 73 insertions(+), 71 deletions(-) + +commit 5091ea7e247b118009c719076650a93b3e2dde6d +Merge: 69cc214c 07961dae +Author: Khaled Hosny <dr.khaled.hosny@gmail.com> +Date: Sat Oct 24 22:37:52 2020 +0200 + + Merge pull request #2733 from astiob/buffer-context-doc + + [docs] Describe buffer context applicability more explicitly + +commit 07961daed06d181615d8087b25122985c83760cc +Author: Oleg Oshmyan <chortos@inbox.lv> +Date: Sat Oct 24 21:58:02 2020 +0300 + + [docs] Describe buffer context applicability more explicitly + + Make it abundantly clear that the context's script etc. don't matter. + + Fixes https://github.com/harfbuzz/harfbuzz/issues/2730 + + docs/usermanual-buffers-language-script-and-direction.xml | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +commit 69cc214c9a47ec9f19bfe477149c6c68cff6a483 +Merge: 49ebb9eb 5adc1344 +Author: Khaled Hosny <dr.khaled.hosny@gmail.com> +Date: Sat Oct 24 10:41:33 2020 +0200 + + Merge pull request #2729 from khaledhosny/autotools-pkg-config + + [autotools] Require pkg-config 0.28 + +commit 5adc1344a4c695ed655aabd02c8bfab114bb4d52 +Author: Khaled Hosny <khaledhosny@eglug.org> +Date: Fri Oct 23 18:39:34 2020 +0200 + + [ci] Upload meason logs on some CircleCI jobs + + .circleci/config.yml | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit 71376f88ef07163f1330f1f54f9f479cd3a67306 +Author: Khaled Hosny <khaledhosny@eglug.org> +Date: Fri Oct 23 18:21:41 2020 +0200 + + [ci] CircleCI removed xcode:9.0.1 image + + The replacement run newer versions of macOS (10.13.3), making this job + obsolete as it tests nothing the other jobs don’t test. + + .circleci/config.yml | 12 ------------ + 1 file changed, 12 deletions(-) + +commit 05403a07b5accbc248064ec44fb884efeb811fa2 +Author: Khaled Hosny <khaledhosny@eglug.org> +Date: Fri Oct 23 17:24:29 2020 +0200 + + [autotools] Require pkg-config 0.28 + + Follow up 0615c7b64b63400b2a70a1a6dd8a57d0b0fff10c, which fixes #1565. + This seems to be the version that fixed the circular dependency, based + on the ChangeLog: + https://cgit.freedesktop.org/pkg-config/commit/?h=pkg-config-0.28&id=74ceac54ef6f9247c00f08eecd8cca811a3c5934 + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 49ebb9ebdd689490c74da835a3fb829f14df6ed1 +Author: David Corbett <corbett.dav@northeastern.edu> +Date: Sat Oct 17 12:03:44 2020 -0400 + + [use] Remove redundant O entries from the table + + src/gen-use-table.py | 11 +++--- + src/hb-ot-shape-complex-use-table.cc | 69 ++++++++++++++++++------------------ + 2 files changed, 39 insertions(+), 41 deletions(-) + +commit 79fd5ce22e03d9db6553dadc0a5e3862b0bfa20d +Author: David Corbett <corbett.dav@northeastern.edu> +Date: Sat Oct 17 11:57:08 2020 -0400 + + [use] Merge IND and Rsv classes into O + + src/gen-use-table.py | 10 ++------- + src/hb-ot-shape-complex-use-machine.hh | 40 +++++++++++++++++----------------- + src/hb-ot-shape-complex-use-machine.rl | 6 ++--- + src/hb-ot-shape-complex-use-table.cc | 20 +++++++---------- + src/hb-ot-shape-complex-use.hh | 2 -- + 5 files changed, 32 insertions(+), 46 deletions(-) + +commit c2cdcd4901132ea7690bda655602d84e63505eb1 +Author: Khaled Hosny <khaledhosny@eglug.org> +Date: Sat Oct 17 21:57:27 2020 +0200 + + [tests] warning: unused variable 'num_glyphs' + + test/api/test-buffer.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit e25aa49a1bcd8f25eeda1846c7daf9b887571d84 +Author: David Corbett <corbett.dav@northeastern.edu> +Date: Sat Oct 17 12:32:41 2020 -0400 + + Fix a dead link in CMakeLists.txt + + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 9a9da110a54ea03a0bdd1e64fa9ff7a2b98ba53c +Author: Khaled Hosny <dr.khaled.hosny@gmail.com> +Date: Sat Oct 17 17:58:11 2020 +0200 + + [CI] Don’t install ragel on circleci jobs + + Latest ragel version is broken (https://github.com/adrian-thurston/ragel/issues/56), but we also don’t need to regenerate state machine on CI jobs. + + .circleci/config.yml | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +commit cde2cf84c0d6515c701296351b9d5a80a41d78c5 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Oct 16 23:49:31 2020 -0600 + + [use] Minor clean-up of unused categories + + src/hb-ot-shape-complex-use-machine.hh | 34 +++++++++++++++++----------------- + src/hb-ot-shape-complex-use-machine.rl | 7 ------- + src/hb-ot-shape-complex-use.cc | 3 +-- + src/hb-ot-shape-complex-use.hh | 7 ------- + 4 files changed, 18 insertions(+), 33 deletions(-) + +commit 0792690b73010e24848fe82d5983ef01f38ed1fb +Author: David Corbett <corbett.dav@northeastern.edu> +Date: Fri Oct 16 22:41:12 2020 -0400 + + [use] Skip WJ and ZWJ when clustering + + src/gen-use-table.py | 13 +- + src/hb-ot-shape-complex-use-machine.hh | 580 ++++++++++----------- + src/hb-ot-shape-complex-use-machine.rl | 9 +- + src/hb-ot-shape-complex-use-table.cc | 8 +- + src/hb-ot-shape-complex-use.hh | 2 - + .../shaping/data/in-house/tests/use-syllable.tests | 2 + + 6 files changed, 272 insertions(+), 342 deletions(-) + +commit 3fcf466b7b77f8eaf281f7a1a4e6ca90b5be54fe +Author: Laurenz <laurmaedje@gmail.com> +Date: Fri Oct 16 23:03:01 2020 +0200 + + [hb-shape-fallback] Use signed int for correction + + src/hb-ot-shape-fallback.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 77e704d1dbfbdb6c54127112814b24358ec52eea +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Oct 15 02:02:04 2020 -0600 + + [buffer] Add assert_unicode()/assert_glyphs() and use internally + + src/hb-buffer-serialize.cc | 13 ++++--------- + src/hb-buffer.cc | 10 ++++------ + src/hb-buffer.hh | 10 ++++++++++ + src/hb-shape-plan.cc | 3 ++- + 4 files changed, 20 insertions(+), 16 deletions(-) + +commit 5ef0613909b8223396f2342119d217e2f24aff26 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Oct 15 01:54:28 2020 -0600 + + [buffer] Add ensure_glyphs()/ensure_unicode() + + Use in deserialize. To be used more. + + src/hb-buffer-deserialize-json.hh | 1257 +++++++++++++----------------- + src/hb-buffer-deserialize-json.rl | 21 +- + src/hb-buffer-deserialize-text.hh | 1531 +++++++++++++++++-------------------- + src/hb-buffer-deserialize-text.rl | 21 +- + src/hb-buffer.hh | 23 + + 5 files changed, 1270 insertions(+), 1583 deletions(-) + +commit 84dd65a8740a91e58eaef43c0006ace3a3aa54a7 +Author: Khaled Hosny <khaledhosny@eglug.org> +Date: Tue Oct 13 20:21:28 2020 +0200 + + [test] Remove timeout from test runners + + See https://github.com/harfbuzz/harfbuzz/issues/2707#issuecomment-707744079 + + This wasn’t inconsistent as well, HB_TEST_SUBSET_FUZZER_TIMEOUT defaulted + to 12 in the test runner, but it was overridden to 50 in meson.build, + and then meson has its own test timeout. + + .circleci/config.yml | 2 +- + test/fuzzing/meson.build | 1 - + test/fuzzing/run-draw-fuzzer-tests.py | 2 +- + test/fuzzing/run-shape-fuzzer-tests.py | 2 +- + test/fuzzing/run-subset-fuzzer-tests.py | 2 +- + 5 files changed, 4 insertions(+), 5 deletions(-) + +commit 3232e6f2a9053e31da67fc7ff293e007e698ef39 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Oct 15 00:20:17 2020 -0600 + + [buffer] Add hb_buffer_has_positions() + + Fixes https://github.com/harfbuzz/harfbuzz/issues/2716 + + docs/harfbuzz-sections.txt | 1 + + src/hb-buffer.cc | 21 ++++++++++++++++++++- + src/hb-buffer.h | 3 +++ + 3 files changed, 24 insertions(+), 1 deletion(-) + +commit 97a093c52f87dbfb0c800dd09a23436479e69861 +Author: Khaled Hosny <khaledhosny@eglug.org> +Date: Mon Oct 12 15:32:22 2020 +0200 + + [hb-subset] Improve error handling a bit + + * Check that output-file option is actually set before trying to open + it. + * Print file name and errno when opening the output file fails. + * Be more resilient when writing output file and use ferror() to check + for errors. + + Fixes https://github.com/harfbuzz/harfbuzz/issues/2711 + + util/hb-subset.cc | 36 ++++++++++++++++++------------------ + 1 file changed, 18 insertions(+), 18 deletions(-) + +commit fa771a7f85d6d07ed64db438c8f07cd6b3f65e3e +Author: Khaled Hosny <khaledhosny@eglug.org> +Date: Sun Oct 11 22:11:17 2020 +0200 + + [tests] Fix memory leak in test + + To make valgrind bot happy. + + test/api/test-buffer.c | 21 +++++++++++---------- + 1 file changed, 11 insertions(+), 10 deletions(-) + +commit dec52006d939755e38dfc3da6de100f2443d574c +Author: David Corbett <corbett.dav@northeastern.edu> +Date: Sat Oct 10 14:49:55 2020 -0400 + + Map BCP 47 tags to all macrolanguages + + The general rule is that if a BCP 47 macrolanguage maps to an OpenType + language system tag, all its individual languages map to it too. + Previously, a tag like "prs" (Dari) would not map to the language system + tag ('FAR ') of its macrolanguage ("fa") because "prs" already has its + own language system tag ('DRI '). That exception has been removed: now + "prs" maps to 'DRI ' and falls back to 'FAR '. + + src/gen-tag-table.py | 7 +-- + src/hb-ot-tag-table.hh | 128 ++++++++++++++++++++++++++++++++++++++++++------- + 2 files changed, 112 insertions(+), 23 deletions(-) + +commit 1d53268dfe39b6842b5129ce731f67021cb1d844 +Author: David Corbett <corbett.dav@northeastern.edu> +Date: Sat Oct 10 14:46:36 2020 -0400 + + Fix two-way mapping of "man" and 'MNK ' + + src/gen-tag-table.py | 4 ++-- + src/hb-ot-tag-table.hh | 2 ++ + test/api/test-ot-tag.c | 2 ++ + 3 files changed, 6 insertions(+), 2 deletions(-) + +commit ab38cf674658fbdde5732171b218fddaaccecbf9 +Author: David Corbett <corbett.dav@northeastern.edu> +Date: Sat Oct 10 14:21:20 2020 -0400 + + Map hy-arevmda to 'HYE ' instead of HYE0 + + src/gen-tag-table.py | 3 +++ + src/hb-ot-tag-table.hh | 7 +++++++ + 2 files changed, 10 insertions(+) + +commit 916c5a900708f25b3b6efa7079ae0b9ce701643c +Author: David Corbett <corbett.dav@northeastern.edu> +Date: Sat Oct 10 14:15:16 2020 -0400 + + Consistently emit BCP 47 subtag scope suffixes + + src/gen-tag-table.py | 23 ++++++++--- + src/hb-ot-tag-table.hh | 102 ++++++++++++++++++++++++------------------------- + 2 files changed, 69 insertions(+), 56 deletions(-) + +commit 1c05f6789b86ae7bf54fb74255b3c8cea31d9978 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Oct 11 12:28:25 2020 -0600 + + [buffer] Increase work limits + + Our previous limits of 64 per input character was already hit + by David Corbett's under-development Duployan font. + + Increase work limits by factor of 16, and number of glyphs by factor of 2. + + Fixes https://github.com/harfbuzz/harfbuzz/issues/2707 + + src/hb-buffer.hh | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +commit b37edebfcb10ef9d37258d504de4d1a97847d6eb +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Oct 9 21:26:09 2020 -0600 + + [buffer/deserialize] Do not clear() buffer upon content type mismatch + + We return false. I don't see reason to clear buffer. + + src/hb-buffer-deserialize-json.hh | 54 +++++++++++------------- + src/hb-buffer-deserialize-json.rl | 8 +--- + src/hb-buffer-deserialize-text.hh | 86 ++++++++++++++++----------------------- + src/hb-buffer-deserialize-text.rl | 8 +--- + 4 files changed, 63 insertions(+), 93 deletions(-) + +commit c396e1600f732e6e53a8733815b0a215ab9be6ce +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Oct 9 21:13:10 2020 -0600 + + [buffer/deserialize] Accept arbitrary glyph names + + Accepts escapes. Added TODO items for matching escaping in serialize(). + + src/hb-buffer-deserialize-json.hh | 201 ++++++------ + src/hb-buffer-deserialize-json.rl | 17 +- + src/hb-buffer-deserialize-text.hh | 630 +++++++++++++++++++++++--------------- + src/hb-buffer-deserialize-text.rl | 9 +- + src/hb-buffer-serialize.cc | 14 +- + 5 files changed, 524 insertions(+), 347 deletions(-) + +commit 4a4eebcf86f258b3dc465400092063300a588bbf +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Oct 9 21:06:20 2020 -0600 + + [buffer/serialize] Minor renames in Ragel machines + + As per my previous review on: + https://github.com/harfbuzz/harfbuzz/pull/2687 + + src/hb-buffer-deserialize-json.hh | 2 +- + src/hb-buffer-deserialize-json.rl | 18 +++---- + src/hb-buffer-deserialize-text.hh | 104 +++++++++++++++++++++++--------------- + src/hb-buffer-deserialize-text.rl | 20 +++++--- + 4 files changed, 86 insertions(+), 58 deletions(-) + +commit 540d2cdddb4ae4a39194d3cf0efc19a9e9edaf22 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Oct 9 18:07:28 2020 -0600 + + [tests/buffer] Revert unintended whitespace changes + + From 9e5538d6a3d6f1ffbee7fad3c821621f17d61494 + + Tried squashing into, but too much merge conflict. + + test/api/test-buffer.c | 1332 ++++++++++++++++++++++++------------------------ + 1 file changed, 667 insertions(+), 665 deletions(-) + +commit 78fb6a11afde1b4b62c343d72ea31f9f21580402 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Oct 9 18:02:16 2020 -0600 + + Whitespace + + src/hb-buffer-serialize.cc | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +commit 140552cec98684cdab72a29ee59ba6ddfcca75b4 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Oct 9 18:01:32 2020 -0600 + + [buffer/serialize] Only serialize empty buffers of CONTENT_TYPE_INVALID + + src/hb-buffer-serialize.cc | 2 ++ + 1 file changed, 2 insertions(+) + +commit 04658ec48f9c934e8453583b161e7b5260231a8d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Oct 9 17:59:54 2020 -0600 + + [tests/buffer] Update tests for previous commit + + test/api/test-buffer.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 8f5d8b155c0cbf9f61cf6a23d73dbc7130df21e0 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Oct 9 17:58:57 2020 -0600 + + [buffer] Buffer start <= end <= len requirement in (de-)serialize + + src/hb-buffer-serialize.cc | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit 3b64122a7fd5218df6e0f8b345becb7ff73510f7 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Oct 9 17:55:21 2020 -0600 + + [buffer] Fix immutable case with end_ptr==nullptr + + src/hb-buffer-serialize.cc | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit 7c0bc0bb926a37a5bc1289c1c0867843e476e863 +Author: Simon Cozens <simon@simon-cozens.org> +Date: Fri Sep 25 21:24:41 2020 +0100 + + Serialize invalid buffer to !! (text) or [] (json) + + There is no generic deserialize - you have to choose glyphs or unicode - so there is no way to deserialize this buffer. + + src/hb-buffer-serialize.cc | 49 +++++++++++++++++++++++++++++++++++++++++----- + test/api/test-buffer.c | 20 ++++++++++++++++--- + 2 files changed, 61 insertions(+), 8 deletions(-) + +commit 5bb88c4f4569a2740d392c1a432ebb3537935e9c +Author: Simon Cozens <simon@simon-cozens.org> +Date: Fri Sep 25 10:08:00 2020 +0100 + + Oops debug print + + src/hb-buffer-serialize.cc | 1 - + 1 file changed, 1 deletion(-) + +commit f56eb402f06003ef66f3922dd948257516fec18e +Author: Simon Cozens <simon@simon-cozens.org> +Date: Fri Sep 25 10:06:33 2020 +0100 + + Immutable buffer fix + + src/hb-buffer-serialize.cc | 7 +++++++ + 1 file changed, 7 insertions(+) + +commit 150f391438a56ada7227fbcb94a6a86f3305c68e +Author: Simon Cozens <simon@simon-cozens.org> +Date: Fri Sep 25 10:04:39 2020 +0100 + + Prohibit mixed glyphs/unicode buffers in deserialization + + src/hb-buffer-deserialize-json.hh | 190 ++++-- + src/hb-buffer-deserialize-json.rl | 28 +- + src/hb-buffer-deserialize-text.hh | 130 ++-- + src/hb-buffer-deserialize-text.rl | 28 +- + test/api/test-buffer.c | 1315 +++++++++++++++++++------------------ + 5 files changed, 938 insertions(+), 753 deletions(-) + +commit 6b1726b6efcd5c2a7c610277d58be57b0ec659dd +Author: Simon Cozens <simon@simon-cozens.org> +Date: Mon Sep 21 16:35:40 2020 +0100 + + Typos + + src/hb-buffer-serialize.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 3d3c87e7e7bb8a6ec104da72aa7e6103941045bd +Author: Simon Cozens <simon@simon-cozens.org> +Date: Mon Sep 21 14:35:05 2020 +0100 + + Put the flags back in and serialize clusters. + + Note that now JSON glyph buffers and Unicode buffers look very similar, except for the g/u property difference. + + src/hb-buffer-deserialize-json.hh | 467 +++++++++++++++++--------------------- + src/hb-buffer-deserialize-json.rl | 9 +- + src/hb-buffer-deserialize-text.hh | 434 +++++++++++++++++++---------------- + src/hb-buffer-deserialize-text.rl | 2 +- + src/hb-buffer-serialize.cc | 45 +++- + src/hb-buffer.h | 3 +- + test/api/test-buffer.c | 19 +- + 7 files changed, 500 insertions(+), 479 deletions(-) + +commit 432a05b2af8522c2c5f0c7c21f06e44ab6d6a07a +Author: Simon Cozens <simon@simon-cozens.org> +Date: Fri Sep 18 14:19:39 2020 +0100 + + (Simple) tests for Unicode serialization/deserialization + + test/api/test-buffer.c | 41 +++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 41 insertions(+) + +commit c03a2001b2e19ff8b88e24f5b489af58952a86e7 +Author: Simon Cozens <simon@simon-cozens.org> +Date: Fri Sep 18 14:19:17 2020 +0100 + + Deserialization routines for Unicode buffers + + src/hb-buffer-deserialize-json.hh | 467 ++++++++++++++++++++++---------------- + src/hb-buffer-deserialize-json.rl | 8 +- + src/hb-buffer-deserialize-text.hh | 456 +++++++++++++++++++++++-------------- + src/hb-buffer-deserialize-text.rl | 19 +- + src/hb-buffer-serialize.cc | 87 ++++++- + src/hb-buffer.h | 8 + + 6 files changed, 655 insertions(+), 390 deletions(-) + +commit c0716bb5dc8b25ec452e71afc74ebebbc927fed8 +Author: Simon Cozens <simon@simon-cozens.org> +Date: Fri Sep 18 10:31:28 2020 +0100 + + Move delimiter addition into hb-buffer-serialize + + src/hb-buffer-serialize.cc | 23 ++++++++++++++++++++++- + util/options.cc | 8 -------- + 2 files changed, 22 insertions(+), 9 deletions(-) + +commit 36ede569622f64406b441758d03c7a44a55a3c50 +Author: Simon Cozens <simon@simon-cozens.org> +Date: Fri Sep 18 10:24:29 2020 +0100 + + Fix docs + + Note the delimiters stuff isn’t true yet, will be working on that + + src/hb-buffer-serialize.cc | 59 +++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 58 insertions(+), 1 deletion(-) + +commit bb7b634cd044846e95f47538fe0f3bb8c35abd5f +Author: Simon Cozens <simon@simon-cozens.org> +Date: Fri Sep 18 09:49:19 2020 +0100 + + Simplify JSON unicode serialization + + It’s just an array of codepoints; no need to turn them into objects + + src/hb-buffer-serialize.cc | 5 ----- + 1 file changed, 5 deletions(-) + +commit 57a528ab2ca09b2252598008e3d83a9bda1576ae +Author: Simon Cozens <simon@simon-cozens.org> +Date: Fri Sep 18 09:35:05 2020 +0100 + + Convert tabs to spaces + + src/hb-buffer-serialize.cc | 298 +++++++++++++++++++++------------------------ + 1 file changed, 136 insertions(+), 162 deletions(-) + +commit aff6a362665cd6c582c9f79cbc3724fb918e22ce +Author: Simon Cozens <simon@simon-cozens.org> +Date: Fri Sep 18 09:27:27 2020 +0100 + + Use auxbuffer for serialize_unicode_text + + src/hb-buffer-serialize.cc | 39 ++++++++++++++++++++++----------------- + 1 file changed, 22 insertions(+), 17 deletions(-) + +commit a0203a28bb8e22a960eaeda8256ea7e657b2552a +Author: Simon Cozens <simon@simon-cozens.org> +Date: Thu Sep 17 16:49:59 2020 +0100 + + Use hb_buffer_serialize to trace in utils + + util/hb-shape.cc | 2 +- + util/options.cc | 37 +++++++++++++------------------------ + util/options.hh | 4 +--- + 3 files changed, 15 insertions(+), 28 deletions(-) + +commit 58bcc1cedd5a38a0a0da569e7e11c7641cdfc910 +Author: Simon Cozens <simon@simon-cozens.org> +Date: Thu Sep 17 16:29:40 2020 +0100 + + Serialize Unicode buffers + + src/hb-buffer-serialize.cc | 181 +++++++++++++++++++++++++++++++++++++++++++++ + src/hb-buffer.h | 20 +++++ + 2 files changed, 201 insertions(+) + +commit c39ab82c90479341dcf28eaa8174af6f08c0d7ae +Author: David Corbett <corbett.dav@northeastern.edu> +Date: Tue Oct 6 16:51:40 2020 -0400 + + Fix usage text of gen-use-table.py + + src/gen-use-table.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit a99e8721bfdb3f346d169e0d3ff0a52e13fbd1d7 +Author: David Corbett <corbett.dav@northeastern.edu> +Date: Mon Sep 28 21:12:46 2020 -0400 + + [use] Fix tests with MSVC + + src/hb-ot-shape-complex-use-machine.hh | 17 +++++++++-------- + src/hb-ot-shape-complex-use-machine.rl | 3 ++- + 2 files changed, 11 insertions(+), 9 deletions(-) + +commit 7e6070a47f2127c90ad233ab3794097357a3f4ed +Author: Koji Ishii <kojii@chromium.org> +Date: Mon Aug 31 17:21:21 2020 +0900 + + Set *coord to nullptr + + src/hb-ot-layout-base-table.hh | 18 +++++++++++++++--- + 1 file changed, 15 insertions(+), 3 deletions(-) + +commit 4e0bddb7fea3ada6dc1ba05ed2fab9f2b813640d +Author: Koji Ishii <kojii@chromium.org> +Date: Wed Aug 19 20:49:10 2020 +0900 + + get_baseline + + src/hb-ot-layout-base-table.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 48fcb9094aeb04bb4ff581c04603fbb7acfd71df +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Sep 27 16:53:32 2020 -0600 + + [docs] Remove misleading wording re OpenType + + HarfBuzz has not *just* been implementing OpenType for a while. + At least since 2.0, where we added native AAT support in Oct 2018. + + docs/harfbuzz-docs.xml | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit 5539d158b75470dcf41bb86e2e8b9a7a986447c0 +Merge: 1a15bf1c cc7b3a1a +Author: Khaled Hosny <dr.khaled.hosny@gmail.com> +Date: Sat Sep 26 10:41:38 2020 +0200 + + Merge pull request #1679 from n8willis/docs-gtkdoc-extern + + [Docs] Add GTK-Doc comments for external APIs + +commit 1a15bf1c535236c4117dcf5eb9afa4e462fbe364 +Merge: 8c5d1332 fb0195ba +Author: Khaled Hosny <dr.khaled.hosny@gmail.com> +Date: Sat Sep 26 10:41:04 2020 +0200 + + Merge pull request #2695 from khaledhosny/docs-fix + + Minor build docs improvement + +commit cc7b3a1abd24aebabd812a151e0c206bf6f09635 +Author: Khaled Hosny <khaledhosny@eglug.org> +Date: Sat Sep 26 10:22:39 2020 +0200 + + [Docs] Address review comments + + src/hb-face.cc | 11 ++++++----- + src/hb-face.h | 2 -- + src/hb-unicode.cc | 5 +++++ + 3 files changed, 11 insertions(+), 7 deletions(-) + +commit 41b46a3cb2d18417d642c3101aacc38fc6a56dc9 +Author: n8willis <n8willis@users.noreply.github.com> +Date: Sun Apr 26 16:01:31 2020 +0100 + + Update hb-face.cc + + src/hb-face.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 726e320ece912a75918f4a3208dff973b18c4b45 +Author: n8willis <n8willis@users.noreply.github.com> +Date: Sun Apr 26 15:56:57 2020 +0100 + + Update inline doc for hb_face_create: explain index + + src/hb-face.cc | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit 70331ca4850427b2c5b235ab46f6b5fb6f7036f6 +Author: Nathan Willis <nwillis@glyphography.com> +Date: Mon Apr 22 19:25:42 2019 +0100 + + [Docs] Minor + + update GTK-Doc comments in hb-ot-layout. + + src/hb-ot-layout.cc | 36 ++++++++++++++++++------------------ + 1 file changed, 18 insertions(+), 18 deletions(-) + +commit eb10ef46aa1c62d6871f4780831e7ea326af10cf +Author: Nathan Willis <nwillis@glyphography.com> +Date: Mon Apr 22 19:22:24 2019 +0100 + + [Docs] Add GTK-Doc comments for hb-ot-font and hb-ot-shape. + + src/hb-ot-font.cc | 3 +++ + src/hb-ot-shape.cc | 15 +++++++++++++++ + 2 files changed, 18 insertions(+) + +commit 3e72febde020649cb7c213f71675804e09fb1926 +Author: Nathan Willis <nwillis@glyphography.com> +Date: Mon Apr 22 19:21:27 2019 +0100 + + [Docs] Add GTK-Doc comments for hb-face. + + src/hb-face.cc | 174 +++++++++++++++++++++++++++++++++------------------------ + src/hb-face.h | 8 +++ + 2 files changed, 110 insertions(+), 72 deletions(-) + +commit 88cdea60e07187139419c0dc2cc76eb7a3c81a6e +Author: Nathan Willis <nwillis@glyphography.com> +Date: Mon Apr 22 19:17:40 2019 +0100 + + [Docs] Add GTK-Doc comments to hb-shape-plan. + + src/hb-shape-plan.cc | 140 ++++++++++++++++++++++++++++++++++----------------- + src/hb-shape-plan.h | 14 ++++++ + 2 files changed, 109 insertions(+), 45 deletions(-) + +commit 5b43eb5a4caadd1494a7402ff0bea893102556d7 +Author: Nathan Willis <nwillis@glyphography.com> +Date: Mon Apr 22 19:16:48 2019 +0100 + + [Docs] Add GTK-Dod comments to hb-unicode. + + src/hb-unicode.cc | 118 ++++++++++++--------- + src/hb-unicode.h | 307 +++++++++++++++++++++++++++++++++++++++++++++++------- + 2 files changed, 339 insertions(+), 86 deletions(-) + +commit fb0195ba8314a3e15e436ad82b68a65b20711098 +Author: Khaled Hosny <khaledhosny@eglug.org> +Date: Sat Sep 26 09:33:41 2020 +0200 + + [docs] Fix syntax and expand Windows section a tiny bit + + docs/usermanual-install-harfbuzz.xml | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +commit db2381c92d2ffae66f155567b09576ecbfaca0af +Author: Khaled Hosny <khaledhosny@eglug.org> +Date: Sat Sep 26 09:30:25 2020 +0200 + + [docs] Fix indentation of commands + + DocBook outputs the extra spacing before the commands verbatim. + + docs/usermanual-install-harfbuzz.xml | 52 +++++++++--------------------------- + 1 file changed, 13 insertions(+), 39 deletions(-) + +commit 2604201ae0f4f4e5b659d7af00684cb38d79c502 +Author: Fabrice Fontaine <fontaine.fabrice@gmail.com> +Date: Thu Sep 24 21:00:34 2020 +0200 + + src/meson.build: allow introspection when cross-compiling + + introspection can be enabled when cross-compiling on certains conditions + (for example it is supported by buildroot) so, as suggested by + Tim-Philipp Müller, disable it by default for cross builds unless the + option was explicitly enabled by the user + + Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> + + src/meson.build | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +commit 8c5d1332f152383563c2ef4b3377b9d54b151def +Merge: 82fe1318 df00f45e +Author: Khaled Hosny <dr.khaled.hosny@gmail.com> +Date: Thu Sep 24 13:09:38 2020 +0200 + + Merge pull request #1664 from n8willis/docs-gtkdoc-otvar + + [Docs] Add gtk-doc comments for hb-ot-var + +commit df00f45e261df757caf42d9435ec06f015e4a54d +Author: Khaled Hosny <khaledhosny@eglug.org> +Date: Thu Sep 24 11:57:12 2020 +0200 + + Fix annotation in previous commits + + src/hb-ot-var.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 5a695a79a0f1269b1ad3b4601f5dfb9794729982 +Author: Nathan Willis <nwillis@glyphography.com> +Date: Sat May 11 13:54:40 2019 +0100 + + Swap # for () in gtk-doc function mention. + + src/hb-ot-var.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 379be7b7c8d25f86f3d302ea4179e1bf93f025b9 +Author: n8willis <n8willis@users.noreply.github.com> +Date: Thu May 9 14:40:57 2019 +0100 + + Update src/hb-ot-var.cc + + Co-Authored-By: Khaled Hosny <khaledhosny@eglug.org> + + src/hb-ot-var.cc | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +commit 938add712a25d20fbc9752963885a32753e30937 +Author: Nathan Willis <nwillis@glyphography.com> +Date: Thu Apr 11 19:45:12 2019 +0100 + + Add GTK-Doc comments for hb-ot-var. + + src/hb-ot-var.cc | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- + src/hb-ot-var.h | 41 +++++++++++++++++++- + 2 files changed, 150 insertions(+), 6 deletions(-) + +commit 82fe13182d928e5d0e7f2c93528bddc0848e163b +Merge: a1f4d285 9a1be3fe +Author: Khaled Hosny <dr.khaled.hosny@gmail.com> +Date: Tue Sep 22 17:40:38 2020 +0200 + + Merge pull request #1661 from n8willis/docs-gtkdoc-aat + + [Docs] Add gtk-doc comments for hb-aat-layout + +commit 9a1be3fed58e75d23dcda087de63f7e410680631 +Author: Khaled Hosny <khaledhosny@eglug.org> +Date: Tue Sep 22 16:46:03 2020 +0200 + + Fix enum documentation syntax + + src/hb-aat-layout.h | 643 +++++++++++++++++++++++----------------------------- + 1 file changed, 283 insertions(+), 360 deletions(-) + +commit 3c9244e662c8225ed11c72db0c095dfe04b0f925 +Author: n8willis <n8willis@users.noreply.github.com> +Date: Sat May 11 16:44:30 2019 +0100 + + Update src/hb-aat-layout.cc + + Co-Authored-By: Khaled Hosny <khaledhosny@eglug.org> + + src/hb-aat-layout.cc | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +commit d619ba0681504a107e0bb8bde85d0564f9327edd +Author: Nathan Willis <nwillis@glyphography.com> +Date: Mon Apr 8 20:17:38 2019 +0100 + + Add gtk-doc documentation to AAT layout functions and enums. + + src/hb-aat-layout.cc | 26 ++++++++++----- + src/hb-aat-layout.h | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++-- + 2 files changed, 106 insertions(+), 12 deletions(-) + +commit 514e6baaf061ee5c601f6b181f8dd9cd436843a9 +Author: Nathan Willis <nwillis@glyphography.com> +Date: Thu Apr 4 10:18:29 2019 +0100 + + [gtk-doc] document AAT functions and enums. + + src/hb-aat-layout.cc | 63 ++++++++--- + src/hb-aat-layout.h | 293 +++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 341 insertions(+), 15 deletions(-) + +commit a1f4d285e1305fda5da771c3c5555c912b8e2d65 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Sep 21 16:50:11 2020 -0600 + + [buffer] Fix invalid write access in hb_buffer_deserialize_glyphs() + + If buffer is immutable, we were trying to set content_type on it. + Ouch! + + src/hb-buffer-serialize.cc | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit 18b8046c6aa2e311f0b47bfa66613c764d13283e +Merge: 1f8b1e7f e43b9a29 +Author: Caleb Maclennan <caleb@chiefworks.com> +Date: Mon Sep 21 17:32:34 2020 +0300 + + Merge pull request #2678 from alerque/post-artifacts + +commit 1f8b1e7f186f44db575e18d0958c9fb3ea14a594 +Author: ebraminio <ebrahim@gnu.org> +Date: Mon Sep 21 11:39:38 2020 +0330 + + [ENOMEM] Return gracefully if stages isn't initialized correctly (#2639) + + This happens if calls to 'm.lookups[table_index].push ()' has been + silently failed due to lack of memory. + + This change just returns gracefully instead issuing the assert. + + Fixes https://crbug.com/oss-fuzz/24494 + + src/hb-ot-map.hh | 4 ++-- + ...z-testcase-minimized-hb-shape-fuzzer-5753845452636160 | Bin 0 -> 2109 bytes + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit a0ebea5280abddb9eb22dcc8fd97c521c38da597 +Merge: e40c0d82 f9f473a4 +Author: Khaled Hosny <dr.khaled.hosny@gmail.com> +Date: Fri Sep 18 17:04:38 2020 +0200 + + Merge pull request #2665 from khaledhosny/doc-default-features + + [docs] Improve documentation for default features + +commit f9f473a4c40d95392fd314ff7e31f89d8b3b452d +Author: Khaled Hosny <khaledhosny@eglug.org> +Date: Wed Sep 2 16:40:52 2020 +0200 + + [docs] Improve documentation for default features + + Fixes https://github.com/harfbuzz/harfbuzz/issues/2213 + + docs/usermanual-opentype-features.xml | 44 +++++++++++++++++++++++++++++------ + 1 file changed, 37 insertions(+), 7 deletions(-) + +commit e40c0d82e2c01af4c180f7e4f8ccc4200e6a5362 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Sep 16 12:48:30 2020 -0600 + + [ENOMEM] Handle immutable buffer in shape_full() + + Move the content_type changing to shape_plan_execute() where it belongs. + Skip setting if content type is UNKNOWN, which happens with empty buffers + only, including the immutable buffer. + + Alternate fix to https://github.com/harfbuzz/harfbuzz/pull/2606 + and https://github.com/harfbuzz/harfbuzz/pull/2625 + + src/hb-shape-plan.cc | 55 +++++++++++++++++++++++++++++++++------------------- + src/hb-shape.cc | 4 ---- + 2 files changed, 35 insertions(+), 24 deletions(-) + +commit bbbcad0dbbe980209be946612de352cadae98522 +Author: Garret Rieger <grieger@google.com> +Date: Wed Sep 16 11:19:40 2020 -0700 + + Revert "[ENOMEM] don't perform set process operations if the other set is in an error state." + + This reverts commit f3929abafe3b64f15d0dc2d21ad7b493eeb92dfe. + + src/hb-set.hh | 1 - + ...-testcase-minimized-hb-subset-fuzzer-5345734743031808 | Bin 1240 -> 0 bytes + 2 files changed, 1 deletion(-) + +commit f3929abafe3b64f15d0dc2d21ad7b493eeb92dfe +Author: Garret Rieger <grieger@google.com> +Date: Tue Sep 15 13:06:36 2020 -0700 + + [ENOMEM] don't perform set process operations if the other set is in an error state. + Running a process while the other set is in an error state can potentially corrupt this sets map map (for example by overwritting all of the major values with 0). + + src/hb-set.hh | 1 + + ...-testcase-minimized-hb-subset-fuzzer-5345734743031808 | Bin 0 -> 1240 bytes + 2 files changed, 1 insertion(+) + +commit 584d3a43b269032322b00a19e240e3222425f2a9 +Merge: 8c3d4de7 7d64b097 +Author: Simon Cozens <simon@simon-cozens.org> +Date: Wed Sep 16 15:08:50 2020 +0100 + + Merge pull request #2681 from khaledhosny/myanmar-liga + + [myanmar] Don’t disable liga feature + +commit 7d64b09765e326da810e98d3234ca72209cd5aae +Author: Khaled Hosny <khaledhosny@eglug.org> +Date: Sat Sep 12 21:17:18 2020 +0200 + + [myanmar] Don’t disable liga feature + + This seems to have been carried over from the Indic shaper, but + Uniscribe enables it by default. + + See https://github.com/harfbuzz/harfbuzz/issues/2213#issuecomment-686062915 + + src/hb-ot-shape-complex-myanmar.cc | 8 +------- + test/shaping/data/in-house/Makefile.sources | 1 + + .../fonts/065b01e54f35f0d849fd43bd5b936212739a50cb.ttf | Bin 0 -> 1808 bytes + test/shaping/data/in-house/meson.build | 1 + + test/shaping/data/in-house/tests/myanmar-misc.tests | 1 + + 5 files changed, 4 insertions(+), 7 deletions(-) + +commit 8c3d4de796d8d691c63d5c20ac32051c652d72b8 +Author: Garret Rieger <grieger@google.com> +Date: Wed Sep 9 12:38:34 2020 -0700 + + [subset] Fix integer underflow in ContextFormat2. + + src/hb-ot-layout-gsubgpos.hh | 2 +- + ...testcase-minimized-hb-subset-fuzzer-5689082504806400 | Bin 0 -> 84172 bytes + 2 files changed, 1 insertion(+), 1 deletion(-) + +commit e43b9a29a98d303240976bb0a7de27a0e3a56504 +Author: Caleb Maclennan <caleb@alerque.com> +Date: Fri Sep 11 22:15:10 2020 +0300 + + [ci] Trigger dependencies of publish jobs on tags + + .circleci/config.yml | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +commit deb09e0d7556cbe88e8003c6ff0fa2192052c337 +Author: Caleb Maclennan <caleb@alerque.com> +Date: Fri Sep 11 19:52:46 2020 +0300 + + [ci] Tweak job names so config is valid Circle 2.1 schema + + .circleci/config.yml | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +commit f4dea33f6d9acd6eea16f4a3130c9ec5d57928bf +Author: Caleb Maclennan <caleb@alerque.com> +Date: Fri Sep 11 17:23:00 2020 +0300 + + [ci] Move repeated artifact upload job code to script + + .ci/publish_release_artifact.sh | 20 ++++++++++++++++++++ + .circleci/config.yml | 22 +++++----------------- + 2 files changed, 25 insertions(+), 17 deletions(-) + +commit 65be538fffb01a03d98212e77f5240225580dfe0 +Author: Caleb Maclennan <caleb@alerque.com> +Date: Fri Sep 11 16:46:34 2020 +0300 + + [ci] Add job to publish autotools dist file to GitHub + + .circleci/config.yml | 27 +++++++++++++++++++++++++++ + 1 file changed, 27 insertions(+) + +commit 42bcc47d01d86eb44feae2df9d9fc6d4345270bb +Author: Caleb Maclennan <caleb@alerque.com> +Date: Fri Sep 11 16:40:32 2020 +0300 + + [ci] Use executor with Circle's image for autotools job + + .circleci/config.yml | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +commit c70f5090229ea4dbdea823d5f92cc17e3d2e73f3 +Author: Caleb Maclennan <caleb@alerque.com> +Date: Fri Sep 11 14:54:02 2020 +0300 + + [ci] Use `ghr` CLI tool to post Win32 artifact to GitHub + + .circleci/config.yml | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +commit 610ed3b42c8a1b411f99654f45c68aba2215afbd +Author: Caleb Maclennan <caleb@alerque.com> +Date: Fri Sep 11 10:47:08 2020 +0300 + + [ci] Add job to publish Win32 releases and pass it artifacts + + .circleci/config.yml | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +commit a2d45cd5f7a16c8757f148f452561fdbe531ee4c +Author: Caleb Maclennan <caleb@alerque.com> +Date: Fri Sep 11 14:14:20 2020 +0300 + + [ci] Use Circle's customized image for workspace support + + .circleci/config.yml | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +commit ac3f859a30731fcd2cf4be044d69a64cc43b5225 +Author: David Corbett <corbett.dav@northeastern.edu> +Date: Wed Sep 9 11:49:56 2020 -0400 + + Demote unregistered vendor-specific language tags + + src/gen-tag-table.py | 12 +----------- + src/hb-ot-tag-table.hh | 4 +--- + 2 files changed, 2 insertions(+), 14 deletions(-) + +commit ee12c078ed775cda64f177055a1d1640675fb2d2 +Merge: 695d85ca 5aff8310 +Author: Khaled Hosny <dr.khaled.hosny@gmail.com> +Date: Tue Sep 8 15:37:30 2020 +0200 + + Merge pull request #2668 from rossburton/meson + + meson: add hb-version.h to dependencies correctly + +commit 695d85ca327cf6aaafcde36870a21f70d46fa863 +Merge: 91fe20f0 e876886d +Author: Khaled Hosny <dr.khaled.hosny@gmail.com> +Date: Tue Sep 8 15:37:00 2020 +0200 + + Merge pull request #2674 from rossburton/reprod + + src/hb-gobject-enums.cc.tmpl: write out only the filename, not the full path + +commit 91fe20f0f5b868fc375291c525a32a6777554bd3 +Author: David Corbett <corbett.dav@northeastern.edu> +Date: Fri Sep 4 09:18:19 2020 -0400 + + Disambiguate OT tags when primary tag is not first + + src/gen-tag-table.py | 4 ++++ + src/hb-ot-tag-table.hh | 8 +++++++- + test/api/test-ot-tag.c | 3 +++ + 3 files changed, 14 insertions(+), 1 deletion(-) + +commit e876886d1e877ad90b6f02badefd6ebee1bc0b09 +Author: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Tue Aug 18 10:31:47 2020 +0000 + + src/hb-gobject-enums.cc.tmpl: write out only the filename, not the full path + + This is beneficial for reproducible builds, as build paths can vary + between builds. + + src/hb-gobject-enums.cc.tmpl | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 5aff83104e03d6d2617987d24a51e490ab7a5cd1 +Author: Ross Burton <ross.burton@arm.com> +Date: Mon Sep 7 10:55:33 2020 +0100 + + [build] generate hb-version.h once at configure time with Meson + + Currently with Meson hb-version.h is generated during the build without + any explicit dependencies which can result in build failures due races + over the file. + + Change this to be generated at configure time, so that the file is always + generated once before the build itself. + + Closes #2667 + + src/meson.build | 17 ++++++++--------- + 1 file changed, 8 insertions(+), 9 deletions(-) + +commit bc1c93fbe04459a4b12c76c713ba1b750d2d9108 +Author: Ross Burton <ross.burton@arm.com> +Date: Mon Sep 7 17:11:17 2020 +0100 + + [build] No need to pass source directory to gen-hb-version + + The input file is by definition in the source directory, so dirname() + that instead of needing the directory to be passed. + + Needed because a follow-up commit will change when this is called, and the + source directory isn't trivially available at that point. + + src/gen-hb-version.py | 6 +++--- + src/meson.build | 2 +- + 2 files changed, 4 insertions(+), 4 deletions(-) + +commit faf09f5466370a45e1a9d7c07968af517d680d78 +Author: David Corbett <corbett.dav@northeastern.edu> +Date: Fri Aug 14 18:30:20 2020 -0400 + + [USE] Support hieroglyph clusters + + src/gen-use-table.py | 24 ++ + src/hb-ot-shape-complex-use-machine.hh | 465 +++++++++++++++++---------------- + src/hb-ot-shape-complex-use-machine.rl | 6 + + src/hb-ot-shape-complex-use-table.cc | 104 +++++++- + src/hb-ot-shape-complex-use.cc | 2 + + src/hb-ot-shape-complex-use.hh | 4 + + 6 files changed, 366 insertions(+), 239 deletions(-) + +commit 06f49fc8ae40f083758e1ca8e9bd9879549d8c39 +Author: David Corbett <corbett.dav@northeastern.edu> +Date: Thu Aug 13 13:37:45 2020 -0400 + + [USE] Update to the 2020-08-13 USE specification + + This also uses the data files from + <https://github.com/microsoft/font-tools/tree/78b2134fdca84df41a931d30d5c48fec115eca41/USE>. + + src/gen-use-table.py | 210 +++++++----- + src/hb-ot-shape-complex-use-machine.hh | 330 +++++++++--------- + src/hb-ot-shape-complex-use-machine.rl | 3 +- + src/hb-ot-shape-complex-use-table.cc | 398 ++++++++++++++++++---- + src/hb-ot-shape-complex-vowel-constraints.cc | 2 +- + src/hb-ot-shape-complex.hh | 7 + + src/ms-use/IndicPositionalCategory-Additional.txt | 102 ++++++ + src/ms-use/IndicShapingInvalidCluster.txt | 4 +- + src/ms-use/IndicSyllabicCategory-Additional.txt | 207 +++++++++++ + src/update-unicode-tables.make | 2 +- + 10 files changed, 946 insertions(+), 319 deletions(-) + +commit e3db84a9d05f40c5281d889a726eb2e4baa12328 +Author: David Corbett <corbett.dav@husky.neu.edu> +Date: Fri May 3 23:29:58 2019 -0400 + + [use] Test CGJ and ZWNJ + + test/shaping/data/in-house/tests/use-syllable.tests | 4 ++++ + 1 file changed, 4 insertions(+) + +commit 6a38adeb577444cd164eeb6ace70741fe1a33791 +Author: David Corbett <corbett.dav@husky.neu.edu> +Date: Fri May 3 14:16:50 2019 -0400 + + [use] Skip most default ignorables when clustering + + src/Makefile.sources | 1 + + src/gen-use-table.py | 12 +- + src/hb-ot-shape-complex-machine-index.hh | 69 ++++ + src/hb-ot-shape-complex-use-machine.hh | 592 +++++++++++++++---------------- + src/hb-ot-shape-complex-use-machine.rl | 55 ++- + src/hb-ot-shape-complex-use-table.cc | 76 ++-- + src/hb-ot-shape-complex-use.hh | 2 - + 7 files changed, 422 insertions(+), 385 deletions(-) + +commit 645f4e7cdd874bd454fceec76b33e57c0a205775 +Author: David Corbett <corbett.dav@husky.neu.edu> +Date: Fri May 3 18:28:18 2019 -0400 + + Unhide CGJ before ccc=0 characters + + If a CGJ precedes a starter, then it cannot have blocked any reordering, + so it can safely be skipped. + + src/hb-ot-shape-normalize.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 9825e3dd2eaea4e267054adebc8d972e1f01cc0d +Author: Garret Rieger <grieger@google.com> +Date: Wed Aug 26 17:31:50 2020 -0700 + + [ENOMEM] fix access to unitialized memory. + If the serialize() call fails to write the object then we can't safely read varstore_prime fields. Fixes https://oss-fuzz.com/testcase-detail/5137462782066688. + + src/hb-ot-layout-common.hh | 5 ++++- + ...testcase-minimized-hb-subset-fuzzer-5137462782066688 | Bin 0 -> 76354 bytes + 2 files changed, 4 insertions(+), 1 deletion(-) + +commit 45de128930a902004baa875831e38ef62780ae2e +Merge: 9c98b2b9 fe6381d9 +Author: Khaled Hosny <dr.khaled.hosny@gmail.com> +Date: Tue Sep 1 04:58:50 2020 +0300 + + Merge pull request #2661 from khaledhosny/failing-dw-build + + [ci] Fix failing DirectWrite build + +commit fe6381d9f1a34f33f020d4f7c871304376dc2844 +Author: Khaled Hosny <khaledhosny@eglug.org> +Date: Tue Sep 1 03:44:01 2020 +0200 + + [build] Minor + + src/meson.build | 12 ++++-------- + 1 file changed, 4 insertions(+), 8 deletions(-) + +commit a4f3a752ddd89b1155978fe862d6f45bd5a89d53 +Author: ebraminio <ebrahim@gnu.org> +Date: Tue Sep 1 03:21:12 2020 +0200 + + [build] hb-directwrite needs a C++ linker + + src/meson.build | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + commit 9c98b2b9a9e43669c5e2b37eaa41b1e07de1ede3 Author: Khaled Hosny <khaledhosny@eglug.org> Date: Sat Aug 29 00:39:42 2020 +0200 diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/NEWS b/Build/source/libs/harfbuzz/harfbuzz-src/NEWS index f211a3781c9..92df1d09191 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/NEWS +++ b/Build/source/libs/harfbuzz/harfbuzz-src/NEWS @@ -1,3 +1,26 @@ +Overview of changes leading to 2.7.3 +Wednesday, December 23, 2020 +==================================== +- Update USE shaper to 2020-08-13 specification, and other improvements. +- Don’t disable liga feature in myanmar shaper, to match Uniscribe. +- Improvements to language and script tags handling. +- Update language system tag registry to OpenType 1.8.4 +- Support for serializing and deserializing Unicode buffers. Serialized buffers + are now delimited with `<>` or `[]` based on whether it is a Unicode or + glyphs buffer. +- Increase buffer work limits to handle fonts with many complex lookups. +- Handle more shaping operations in trace output. +- Memory access fixes. +- More OOM fixes. +- Improved documentation. +- Build system improvements. +- New API: ++hb_buffer_has_positions() ++hb_buffer_serialize() ++hb_buffer_serialize_unicode() ++hb_buffer_deserialize_unicode() + + Overview of changes leading to 2.7.2 Saturday, August 29, 2020 ==================================== diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac b/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac index a3c8a61a03e..130e09a1091 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], - [2.7.2], + [2.7.3], [https://github.com/harfbuzz/harfbuzz/issues/new], [harfbuzz], [http://harfbuzz.org/]) @@ -25,7 +25,7 @@ AM_PROG_CC_C_O AC_PROG_CXX AX_CXX_COMPILE_STDCXX(11) AC_SYS_LARGEFILE -PKG_PROG_PKG_CONFIG([0.20]) +PKG_PROG_PKG_CONFIG([0.28]) AM_MISSING_PROG([RAGEL], [ragel]) AM_MISSING_PROG([GIT], [git]) @@ -239,25 +239,6 @@ AC_ARG_WITH(icu, have_icu=false if test "x$with_icu" = "xyes" -o "x$with_icu" = "xbuiltin" -o "x$with_icu" = "xauto"; then PKG_CHECK_MODULES(ICU, icu-uc, have_icu=true, :) - - dnl Fallback to icu-config if ICU pkg-config files could not be found - if test "$have_icu" != "true"; then - AC_CHECK_TOOL(ICU_CONFIG, icu-config, no) - AC_MSG_CHECKING([for ICU by using icu-config fallback]) - if test "$ICU_CONFIG" != "no" && "$ICU_CONFIG" --version >/dev/null; then - have_icu=true - # We don't use --cflags as this gives us a lot of things that we don't - # necessarily want, like debugging and optimization flags - # See man (1) icu-config for more info. - ICU_CFLAGS=`$ICU_CONFIG --cppflags` - ICU_LIBS=`$ICU_CONFIG --ldflags-searchpath --ldflags-libsonly` - AC_SUBST(ICU_CFLAGS) - AC_SUBST(ICU_LIBS) - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - fi fi if test \( "x$with_icu" = "xyes" -o "x$with_icu" = "xbuiltin" \) -a "x$have_icu" != "xtrue"; then AC_MSG_ERROR([icu support requested but icu-uc not found]) diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/meson.build b/Build/source/libs/harfbuzz/harfbuzz-src/meson.build index bf3925dbc88..61f46ca72be 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.47.0', - version: '2.7.2', + version: '2.7.3', default_options: [ 'cpp_eh=none', # Just to support msvc, we are passing -fno-rtti also anyway 'cpp_rtti=false', # Just to support msvc, we are passing -fno-exceptions also anyway @@ -127,34 +127,31 @@ cairo_dep = null_dep cairo_ft_dep = null_dep if not get_option('cairo').disabled() cairo_dep = dependency('cairo', required: false) + cairo_ft_dep = dependency('cairo-ft', required: false) if (not cairo_dep.found() and cpp.get_id() == 'msvc' and cpp.has_header('cairo.h')) cairo_dep = cpp.find_library('cairo', required: false) + if cairo_dep.found() and cpp.has_function('cairo_ft_font_face_create_for_ft_face', + prefix: '#include <cairo-ft.h>', + dependencies: cairo_dep) + cairo_ft_dep = cairo_dep + endif endif if not cairo_dep.found() - # 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', 'libcairo_dep'], - required: get_option('cairo')) - endif - - # Ensure that cairo-ft is fetched from the same library as cairo itself - if cairo_dep.found() - if cairo_dep.type_name() == 'internal' - # It is true at least for the port we have - cairo_ft_dep = cairo_dep - elif (cairo_dep.type_name() == 'library' and - cpp.has_function('cairo_ft_font_face_create_for_ft_face', - prefix: '#include <cairo-ft.h>', - dependencies: cairo_dep)) - cairo_ft_dep = cairo_dep - else # including the most important type for us, 'pkgconfig' - cairo_ft_dep = dependency('cairo-ft', required: get_option('cairo')) + # 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 endif endif diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources b/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources index 8bb29120644..f7d4587041a 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources @@ -118,6 +118,7 @@ HB_BASE_sources = \ hb-ot-shape-complex-indic.hh \ hb-ot-shape-complex-khmer.cc \ hb-ot-shape-complex-khmer.hh \ + hb-ot-shape-complex-machine-index.hh \ hb-ot-shape-complex-myanmar.cc \ hb-ot-shape-complex-myanmar.hh \ hb-ot-shape-complex-thai.cc \ diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-hb-version.py b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-hb-version.py index 15e56b93f98..879811ffc83 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-hb-version.py +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-hb-version.py @@ -2,17 +2,26 @@ "This tool is intended to be used from meson" -import os, sys, shutil +import os, sys, shutil, re -if len (sys.argv) < 5: +if len (sys.argv) < 4: sys.exit(__doc__) version = sys.argv[1] major, minor, micro = version.split (".") OUTPUT = sys.argv[2] -CURRENT_SOURCE_DIR = sys.argv[3] -INPUT = sys.argv[4] +INPUT = sys.argv[3] +CURRENT_SOURCE_DIR = os.path.dirname(INPUT) + +try: + with open (OUTPUT, "r") as old_output: + for line in old_output: + old_version = re.match (r"#define HB_VERSION_STRING \"(\d.\d.\d)\"", line) + if old_version and old_version[1] == version: + sys.exit () +except IOError: + pass with open (INPUT, "r", encoding='utf-8') as template: with open (OUTPUT, "wb") as output: diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-tag-table.py b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-tag-table.py index 401f4ca5b7e..093dd818ec7 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-tag-table.py +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-tag-table.py @@ -47,6 +47,8 @@ def expect (condition, message=None): raise AssertionError raise AssertionError (message) +DEFAULT_LANGUAGE_SYSTEM = '' + # from https://www-01.sil.org/iso639-3/iso-639-3.tab ISO_639_3_TO_1 = { 'aar': 'aa', @@ -468,11 +470,8 @@ class OpenTypeRegistryParser (HTMLParser): if ot_macrolanguages: for ot_macrolanguage in ot_macrolanguages: for language in languages: - # Remove the following condition if e.g. nn should map to NYN,NOR - # instead of just NYN. - if language not in original_ot_from_bcp_47: - self.add_language (language, ot_macrolanguage) - self.ranks[ot_macrolanguage] += 1 + self.add_language (language, ot_macrolanguage) + self.ranks[ot_macrolanguage] += 1 else: for language in languages: if language in original_ot_from_bcp_47: @@ -556,7 +555,7 @@ class BCP47Parser (object): self.grandfathered.add (subtag.lower ()) elif line.startswith ('Description: '): description = line.split (' ', 1)[1].replace (' (individual language)', '') - description = re.sub (' (\((individual |macro)language\)|languages)$', '', + description = re.sub (' (\(family\)|\((individual |macro)language\)|languages)$', '', description) if subtag in self.names: self.names[subtag] += '\n' + description @@ -591,7 +590,9 @@ class BCP47Parser (object): elif not has_preferred_value and line.startswith ('Macrolanguage: '): self._add_macrolanguage (line.split (' ')[1], subtag) elif subtag_type == 'variant': - if line.startswith ('Prefix: '): + if line.startswith ('Deprecated: '): + self.scopes[subtag] = ' (retired code)' + self.scopes.get (subtag, '') + elif line.startswith ('Prefix: '): self.prefixes[subtag].add (line.split (' ')[1]) elif line.startswith ('File-Date: '): self.header = line @@ -622,6 +623,17 @@ class BCP47Parser (object): for macrolanguage in macrolanguages: self._add_macrolanguage (biggest_macrolanguage, macrolanguage) + def _get_name_piece (self, subtag): + """Return the first name of a subtag plus its scope suffix. + + Args: + subtag (str): A BCP 47 subtag. + + Returns: + The name form of ``subtag``. + """ + return self.names[subtag].split ('\n')[0] + self.scopes.get (subtag, '') + def get_name (self, lt): """Return the names of the subtags in a language tag. @@ -631,13 +643,13 @@ class BCP47Parser (object): Returns: The name form of ``lt``. """ - name = self.names[lt.language].split ('\n')[0] + name = self._get_name_piece (lt.language) if lt.script: - name += '; ' + self.names[lt.script.title ()].split ('\n')[0] + name += '; ' + self._get_name_piece (lt.script.title ()) if lt.region: - name += '; ' + self.names[lt.region.upper ()].split ('\n')[0] + name += '; ' + self._get_name_piece (lt.region.upper ()) if lt.variant: - name += '; ' + self.names[lt.variant].split ('\n')[0] + name += '; ' + self._get_name_piece (lt.variant) return name bcp_47 = BCP47Parser () @@ -673,22 +685,18 @@ ot.add_language ('und-fonnapa', 'APPH') ot.remove_language_ot ('IRT') ot.add_language ('ga-Latg', 'IRT') +ot.add_language ('hy-arevmda', 'HYE') + ot.remove_language_ot ('KGE') ot.add_language ('und-Geok', 'KGE') -ot.add_language ('guk', 'GUK') -ot.names['GUK'] = 'Gumuz (SIL fonts)' -ot.ranks['GUK'] = ot.ranks['GMZ'] + 1 - bcp_47.macrolanguages['id'] = {'in'} bcp_47.macrolanguages['ijo'] = {'ijc'} ot.add_language ('kht', 'KHN') ot.names['KHN'] = ot.names['KHT'] + ' (Microsoft fonts)' -ot.names['KHT'] = ot.names['KHT'] + ' (OpenType spec and SIL fonts)' -ot.ranks['KHN'] = ot.ranks['KHT'] -ot.ranks['KHT'] += 1 +ot.ranks['KHN'] = ot.ranks['KHT'] + 1 ot.ranks['LCR'] = ot.ranks['MCR'] + 1 @@ -706,6 +714,7 @@ ot.add_language ('qu', 'QUZ') ot.add_language ('qub', 'QWH') ot.add_language ('qud', 'QVI') ot.add_language ('qug', 'QVI') +ot.add_language ('qul', 'QUH') ot.add_language ('qup', 'QVI') ot.add_language ('qur', 'QWH') ot.add_language ('qus', 'QUH') @@ -736,10 +745,6 @@ ot.add_language ('qxw', 'QWH') bcp_47.macrolanguages['ro'].remove ('mo') bcp_47.macrolanguages['ro-MD'].add ('mo') -ot.add_language ('sgw', 'SGW') -ot.names['SGW'] = ot.names['CHG'] + ' (SIL fonts)' -ot.ranks['SGW'] = ot.ranks['CHG'] + 1 - ot.remove_language_ot ('SYRE') ot.remove_language_ot ('SYRJ') ot.remove_language_ot ('SYRN') @@ -756,14 +761,17 @@ ot.add_language ('xwo', 'TOD') ot.remove_language_ot ('ZHH') ot.remove_language_ot ('ZHP') ot.remove_language_ot ('ZHT') +ot.remove_language_ot ('ZHTM') bcp_47.macrolanguages['zh'].remove ('lzh') bcp_47.macrolanguages['zh'].remove ('yue') ot.add_language ('zh-Hant-MO', 'ZHH') +ot.add_language ('zh-Hant-MO', 'ZHTM') ot.add_language ('zh-Hant-HK', 'ZHH') ot.add_language ('zh-Hans', 'ZHS') ot.add_language ('zh-Hant', 'ZHT') ot.add_language ('zh-HK', 'ZHH') ot.add_language ('zh-MO', 'ZHH') +ot.add_language ('zh-MO', 'ZHTM') ot.add_language ('zh-TW', 'ZHT') ot.add_language ('lzh', 'ZHT') ot.add_language ('lzh-Hans', 'ZHS') @@ -795,6 +803,7 @@ def rank_delta (bcp_47, ot): disambiguation = { 'ALT': 'alt', 'ARK': 'rki', + 'ATH': 'ath', 'BHI': 'bhb', 'BLN': 'bjt', 'BTI': 'beb', @@ -806,6 +815,7 @@ disambiguation = { 'ECR': 'crj', 'HAL': 'cfm', 'HND': 'hnd', + 'HYE': 'hyw', 'KIS': 'kqs', 'KUI': 'uki', 'LRC': 'bqi', @@ -818,15 +828,23 @@ disambiguation = { 'QVI': 'qvi', 'QWH': 'qwh', 'SIG': 'stv', - 'TNE': 'yrk', + 'SRB': 'sr', 'ZHH': 'zh-HK', 'ZHS': 'zh-Hans', 'ZHT': 'zh-Hant', + 'ZHTM': 'zh-MO', } ot.inherit_from_macrolanguages () bcp_47.remove_extra_macrolanguages () ot.inherit_from_macrolanguages () +ot.names[DEFAULT_LANGUAGE_SYSTEM] = '*/' +ot.ranks[DEFAULT_LANGUAGE_SYSTEM] = max (ot.ranks.values ()) + 1 +for tricky_ot_tag in filter (lambda tag: re.match ('[A-Z]{3}$', tag), ot.names): + possible_bcp_47_tag = tricky_ot_tag.lower () + if possible_bcp_47_tag in bcp_47.names and not ot.from_bcp_47[possible_bcp_47_tag]: + ot.add_language (possible_bcp_47_tag, DEFAULT_LANGUAGE_SYSTEM) + bcp_47.macrolanguages[possible_bcp_47_tag] = set () ot.sort_languages () print ('/* == Start of generated table == */') @@ -855,6 +873,8 @@ def hb_tag (tag): Returns: A snippet of C++ representing ``tag``. """ + if tag == DEFAULT_LANGUAGE_SYSTEM: + return 'HB_TAG_NONE\t ' return "HB_TAG('%s','%s','%s','%s')" % tuple (('%-4s' % tag)[:4]) def get_variant_set (name): @@ -903,14 +923,18 @@ for language, tags in sorted (ot.from_bcp_47.items ()): print ('\t/* ', end='') bcp_47_name = bcp_47.names.get (language, '') bcp_47_name_candidates = bcp_47_name.split ('\n') - intersection = language_name_intersection (bcp_47_name, ot.names[tag]) + ot_name = ot.names[tag] scope = bcp_47.scopes.get (language, '') - if not intersection: - write ('%s%s -> %s' % (bcp_47_name_candidates[0], scope, ot.names[tag])) + if tag == DEFAULT_LANGUAGE_SYSTEM: + write (f'{bcp_47_name_candidates[0]}{scope} != {ot.names[language.upper ()]}') else: - name = get_matching_language_name (intersection, bcp_47_name_candidates) - bcp_47.names[language] = name - write ('%s%s' % (name if len (name) > len (ot.names[tag]) else ot.names[tag], scope)) + intersection = language_name_intersection (bcp_47_name, ot_name) + if not intersection: + write ('%s%s -> %s' % (bcp_47_name_candidates[0], scope, ot_name)) + else: + name = get_matching_language_name (intersection, bcp_47_name_candidates) + bcp_47.names[language] = name + write ('%s%s' % (name if len (name) > len (ot_name) else ot_name, scope)) print (' */') print ('};') @@ -992,22 +1016,24 @@ for initial, items in sorted (complex_tags.items ()): print (" case '%s':" % initial) for lt, tags in items: print (' if (', end='') + script = lt.script + region = lt.region if lt.grandfathered: print ('0 == strcmp (&lang_str[1], "%s")' % lt.language[1:], end='') else: string_literal = lt.language[1:] + '-' - if lt.script: - string_literal += lt.script - lt.script = None - if lt.region: - string_literal += '-' + lt.region - lt.region = None + if script: + string_literal += script + script = None + if region: + string_literal += '-' + region + region = None if string_literal[-1] == '-': print ('0 == strncmp (&lang_str[1], "%s", %i)' % (string_literal, len (string_literal)), end='') else: print ('lang_matches (&lang_str[1], "%s")' % string_literal, end='') - print_subtag_matches (lt.script, True) - print_subtag_matches (lt.region, True) + print_subtag_matches (script, True) + print_subtag_matches (region, True) print_subtag_matches (lt.variant, True) print (')') print (' {') @@ -1074,11 +1100,18 @@ def verify_disambiguation_dict (): global disambiguation global ot for ot_tag, bcp_47_tags in ot.to_bcp_47.items (): - primary_tags = list (t for t in bcp_47_tags if t not in bcp_47.grandfathered and ot.from_bcp_47.get (t)[0] == ot_tag) + if ot_tag == DEFAULT_LANGUAGE_SYSTEM: + primary_tags = [] + else: + primary_tags = list (t for t in bcp_47_tags if t not in bcp_47.grandfathered and ot.from_bcp_47.get (t)[0] == ot_tag) if len (primary_tags) == 1: expect (ot_tag not in disambiguation, 'unnecessary disambiguation for OT tag: %s' % ot_tag) if '-' in primary_tags[0]: disambiguation[ot_tag] = primary_tags[0] + else: + first_tag = sorted (t for t in bcp_47_tags if t not in bcp_47.grandfathered and ot_tag in ot.from_bcp_47.get (t))[0] + if primary_tags[0] != first_tag: + disambiguation[ot_tag] = primary_tags[0] elif len (primary_tags) == 0: expect (ot_tag not in disambiguation, 'There is no possible valid disambiguation for %s' % ot_tag) else: @@ -1093,8 +1126,8 @@ def verify_disambiguation_dict (): '%s is not a valid disambiguation for %s' % (disambiguation[ot_tag], ot_tag)) elif ot_tag not in disambiguation: disambiguation[ot_tag] = macrolanguages[0] - different_primary_tags = sorted (t for t in primary_tags if not same_tag (t, ot.from_bcp_47.get (t))) - if different_primary_tags and disambiguation[ot_tag] == different_primary_tags[0] and '-' not in disambiguation[ot_tag]: + different_bcp_47_tags = sorted (t for t in bcp_47_tags if not same_tag (t, ot.from_bcp_47.get (t))) + if different_bcp_47_tags and disambiguation[ot_tag] == different_bcp_47_tags[0] and '-' not in disambiguation[ot_tag]: del disambiguation[ot_tag] for ot_tag in disambiguation.keys (): expect (ot_tag in ot.to_bcp_47, 'unknown OT tag: %s' % ot_tag) 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 e4b48353f33..a1865e96770 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,32 +1,53 @@ #!/usr/bin/env python3 # flake8: noqa: F821 -"""usage: ./gen-use-table.py IndicSyllabicCategory.txt IndicPositionalCategory.txt UnicodeData.txt Blocks.txt +"""usage: ./gen-use-table.py IndicSyllabicCategory.txt IndicPositionalCategory.txt UnicodeData.txt ArabicShaping.txt Blocks.txt IndicSyllabicCategory-Additional.txt IndicPositionalCategory-Additional.txt -Input file: +Input files: * https://unicode.org/Public/UCD/latest/ucd/IndicSyllabicCategory.txt * https://unicode.org/Public/UCD/latest/ucd/IndicPositionalCategory.txt * https://unicode.org/Public/UCD/latest/ucd/UnicodeData.txt +* https://unicode.org/Public/UCD/latest/ucd/ArabicShaping.txt * https://unicode.org/Public/UCD/latest/ucd/Blocks.txt +* ms-use/IndicSyllabicCategory-Additional.txt +* ms-use/IndicPositionalCategory-Additional.txt """ import sys -if len (sys.argv) != 5: +if len (sys.argv) != 8: sys.exit (__doc__) -BLACKLISTED_BLOCKS = ["Thai", "Lao"] +BLACKLISTED_BLOCKS = [ + 'Samaritan', + 'Thai', + 'Lao', +] files = [open (x, encoding='utf-8') for x in sys.argv[1:]] headers = [[f.readline () for i in range (2)] for j,f in enumerate(files) if j != 2] +for j in range(5, 7): + for line in files[j]: + line = line.rstrip() + if not line: + break + headers[j - 1].append(line) headers.append (["UnicodeData.txt does not have a header."]) data = [{} for _ in files] values = [{} for _ in files] for i, f in enumerate (files): + extended = False + for line in f: + # TODO: https://github.com/MicrosoftDocs/typography-issues/issues/522 + if extended and line.startswith ('# ') and line.find (';'): + line = line[2:] + elif 'USE_Syllabic_Category' in line: + extended = True + j = line.find ('#') if j >= 0: line = line[:j] @@ -42,16 +63,25 @@ for i, f in enumerate (files): else: end = int (uu[1], 16) - t = fields[1 if i != 2 else 2] + t = fields[1 if i not in [2, 3] else 2] + + if i == 3: + t = 'jt_' + t + elif i == 5 and t == 'Consonant_Final_Modifier': + # TODO: https://github.com/MicrosoftDocs/typography-issues/issues/336 + t = 'Syllable_Modifier' + elif i == 6 and t == 'NA': + t = 'Not_Applicable' + i0 = i if i < 5 else i - 5 for u in range (start, end + 1): - data[i][u] = t - values[i][t] = values[i].get (t, 0) + end - start + 1 + data[i0][u] = t + values[i0][t] = values[i0].get (t, 0) + end - start + 1 -defaults = ('Other', 'Not_Applicable', 'Cn', 'No_Block') +defaults = ('Other', 'Not_Applicable', 'Cn', 'jt_X', 'No_Block') # TODO Characters that are not in Unicode Indic files, but used in USE -data[0][0x034F] = defaults[0] +data[0][0x0640] = defaults[0] data[0][0x1B61] = defaults[0] data[0][0x1B63] = defaults[0] data[0][0x1B64] = defaults[0] @@ -61,6 +91,29 @@ data[0][0x1B67] = defaults[0] data[0][0x1B69] = defaults[0] data[0][0x1B6A] = defaults[0] data[0][0x2060] = defaults[0] +for u in range (0x07CA, 0x07EA + 1): + data[0][u] = defaults[0] +data[0][0x07FA] = defaults[0] +for u in range (0x0840, 0x0858 + 1): + data[0][u] = defaults[0] +for u in range (0x1887, 0x18A8 + 1): + data[0][u] = defaults[0] +data[0][0x18AA] = defaults[0] +for u in range (0xA840, 0xA872 + 1): + data[0][u] = defaults[0] +for u in range (0x10B80, 0x10B91 + 1): + data[0][u] = defaults[0] +for u in range (0x10BA9, 0x10BAE + 1): + data[0][u] = defaults[0] +data[0][0x10FB0] = defaults[0] +for u in range (0x10FB2, 0x10FB6 + 1): + data[0][u] = defaults[0] +for u in range (0x10FB8, 0x10FBF + 1): + data[0][u] = defaults[0] +for u in range (0x10FC1, 0x10FC4 + 1): + data[0][u] = defaults[0] +for u in range (0x10FC9, 0x10FCB + 1): + data[0][u] = defaults[0] # TODO https://github.com/harfbuzz/harfbuzz/pull/1685 data[0][0x1B5B] = 'Consonant_Placeholder' data[0][0x1B5C] = 'Consonant_Placeholder' @@ -72,8 +125,6 @@ data[0][0x11C44] = 'Consonant_Placeholder' data[0][0x11C45] = 'Consonant_Placeholder' # TODO https://github.com/harfbuzz/harfbuzz/pull/1399 data[0][0x111C8] = 'Consonant_Placeholder' -for u in range (0xFE00, 0xFE0F + 1): - data[0][u] = defaults[0] # Merge data into one dict: for i,v in enumerate (defaults): @@ -86,7 +137,7 @@ for i,d in enumerate (data): if not u in combined: combined[u] = list (defaults) combined[u][i] = v -combined = {k:v for k,v in combined.items() if v[3] not in BLACKLISTED_BLOCKS} +combined = {k:v for k,v in combined.items() if v[4] not in BLACKLISTED_BLOCKS} data = combined del combined @@ -133,6 +184,10 @@ property_names = [ 'Number_Joiner', 'Number', 'Brahmi_Joining_Number', + 'Hieroglyph', + 'Hieroglyph_Joiner', + 'Hieroglyph_Segment_Begin', + 'Hieroglyph_Segment_End', # Indic_Positional_Category 'Not_Applicable', 'Right', @@ -150,6 +205,14 @@ property_names = [ 'Bottom_And_Right', 'Top_And_Bottom_And_Right', 'Overstruck', + # Joining_Type + 'jt_C', + 'jt_D', + 'jt_L', + 'jt_R', + 'jt_T', + 'jt_U', + 'jt_X', ] class PropertyValue(object): @@ -174,99 +237,86 @@ for name in property_names: globals().update(property_values) -def is_BASE(U, UISC, UGC): +def is_BASE(U, UISC, UGC, AJT): return (UISC in [Number, Consonant, Consonant_Head_Letter, - #SPEC-DRAFT Consonant_Placeholder, Tone_Letter, - Vowel_Independent #SPEC-DRAFT + Vowel_Independent, ] or + # TODO: https://github.com/MicrosoftDocs/typography-issues/issues/484 + AJT in [jt_C, jt_D, jt_L, jt_R] and UISC != Joiner or (UGC == Lo and UISC in [Avagraha, Bindu, Consonant_Final, Consonant_Medial, Consonant_Subjoined, Vowel, Vowel_Dependent])) -def is_BASE_IND(U, UISC, UGC): - #SPEC-DRAFT return (UISC in [Consonant_Dead, Modifying_Letter] or UGC == Po) - return (UISC in [Consonant_Dead, Modifying_Letter] or - (UGC == Po and not U in [0x104B, 0x104E, 0x1B5B, 0x1B5C, 0x1B5F, 0x2022, 0x111C8, 0x11A3F, 0x11A45, 0x11C44, 0x11C45]) or - False # SPEC-DRAFT-OUTDATED! U == 0x002D - ) -def is_BASE_NUM(U, UISC, UGC): +def is_BASE_NUM(U, UISC, UGC, AJT): return UISC == Brahmi_Joining_Number -def is_BASE_OTHER(U, UISC, UGC): - if UISC == Consonant_Placeholder: return True #SPEC-DRAFT - #SPEC-DRAFT return U in [0x00A0, 0x00D7, 0x2015, 0x2022, 0x25CC, 0x25FB, 0x25FC, 0x25FD, 0x25FE] +def is_BASE_OTHER(U, UISC, UGC, AJT): + if UISC == Consonant_Placeholder: return True return U in [0x2015, 0x2022, 0x25FB, 0x25FC, 0x25FD, 0x25FE] -def is_CGJ(U, UISC, UGC): - return U == 0x034F -def is_CONS_FINAL(U, UISC, UGC): +def is_CONS_FINAL(U, UISC, UGC, AJT): return ((UISC == Consonant_Final and UGC != Lo) or UISC == Consonant_Succeeding_Repha) -def is_CONS_FINAL_MOD(U, UISC, UGC): - #SPEC-DRAFT return UISC in [Consonant_Final_Modifier, Syllable_Modifier] - return UISC == Syllable_Modifier -def is_CONS_MED(U, UISC, UGC): +def is_CONS_FINAL_MOD(U, UISC, UGC, AJT): + return UISC == Syllable_Modifier +def is_CONS_MED(U, UISC, UGC, AJT): # Consonant_Initial_Postfixed is new in Unicode 11; not in the spec. return (UISC == Consonant_Medial and UGC != Lo or UISC == Consonant_Initial_Postfixed) -def is_CONS_MOD(U, UISC, UGC): - return UISC in [Nukta, Gemination_Mark, Consonant_Killer] -def is_CONS_SUB(U, UISC, UGC): - #SPEC-DRAFT return UISC == Consonant_Subjoined +def is_CONS_MOD(U, UISC, UGC, AJT): + return (UISC in [Nukta, Gemination_Mark, Consonant_Killer] and + not is_SYM_MOD(U, UISC, UGC, AJT)) +def is_CONS_SUB(U, UISC, UGC, AJT): return UISC == Consonant_Subjoined and UGC != Lo -def is_CONS_WITH_STACKER(U, UISC, UGC): +def is_CONS_WITH_STACKER(U, UISC, UGC, AJT): return UISC == Consonant_With_Stacker -def is_HALANT(U, UISC, UGC): +def is_HALANT(U, UISC, UGC, AJT): return (UISC in [Virama, Invisible_Stacker] - and not is_HALANT_OR_VOWEL_MODIFIER(U, UISC, UGC) - and not is_SAKOT(U, UISC, UGC)) -def is_HALANT_OR_VOWEL_MODIFIER(U, UISC, UGC): + and not is_HALANT_OR_VOWEL_MODIFIER(U, UISC, UGC, AJT) + and not is_SAKOT(U, UISC, UGC, AJT)) +def is_HALANT_OR_VOWEL_MODIFIER(U, UISC, UGC, AJT): # https://github.com/harfbuzz/harfbuzz/issues/1102 # https://github.com/harfbuzz/harfbuzz/issues/1379 return U in [0x11046, 0x1134D] -def is_HALANT_NUM(U, UISC, UGC): +def is_HALANT_NUM(U, UISC, UGC, AJT): return UISC == Number_Joiner -def is_ZWNJ(U, UISC, UGC): +def is_HIEROGLYPH(U, UISC, UGC, AJT): + return UISC == Hieroglyph +def is_HIEROGLYPH_JOINER(U, UISC, UGC, AJT): + return UISC == Hieroglyph_Joiner +def is_HIEROGLYPH_SEGMENT_BEGIN(U, UISC, UGC, AJT): + return UISC == Hieroglyph_Segment_Begin +def is_HIEROGLYPH_SEGMENT_END(U, UISC, UGC, AJT): + return UISC == Hieroglyph_Segment_End +def is_ZWNJ(U, UISC, UGC, AJT): return UISC == Non_Joiner -def is_ZWJ(U, UISC, UGC): - return UISC == Joiner -def is_Word_Joiner(U, UISC, UGC): - return U == 0x2060 -def is_OTHER(U, UISC, UGC): - #SPEC-OUTDATED return UGC == Zs # or any other SCRIPT_COMMON characters - return (UISC == Other - and not is_SYM(U, UISC, UGC) - and not is_SYM_MOD(U, UISC, UGC) - and not is_CGJ(U, UISC, UGC) - and not is_Word_Joiner(U, UISC, UGC) - and not is_VARIATION_SELECTOR(U, UISC, UGC) +def is_OTHER(U, UISC, UGC, AJT): + return ((UGC in [Cn, Po] or UISC in [Consonant_Dead, Joiner, Modifying_Letter, Other]) + and not is_BASE(U, UISC, UGC, AJT) + and not is_BASE_OTHER(U, UISC, UGC, AJT) + and not is_SYM(U, UISC, UGC, AJT) + and not is_SYM_MOD(U, UISC, UGC, AJT) ) -def is_Reserved(U, UISC, UGC): - return UGC == 'Cn' -def is_REPHA(U, UISC, UGC): +def is_REPHA(U, UISC, UGC, AJT): return UISC in [Consonant_Preceding_Repha, Consonant_Prefixed] -def is_SAKOT(U, UISC, UGC): +def is_SAKOT(U, UISC, UGC, AJT): return U == 0x1A60 -def is_SYM(U, UISC, UGC): - if U == 0x25CC: return False #SPEC-DRAFT - #SPEC-DRAFT return UGC in [So, Sc] or UISC == Symbol_Letter - return UGC in [So, Sc] and U not in [0x1B62, 0x1B68] -def is_SYM_MOD(U, UISC, UGC): +def is_SYM(U, UISC, UGC, AJT): + if U in [0x25CC, 0x1E14F]: return False + return UGC in [So, Sc] and U not in [0x0F01, 0x1B62, 0x1B68] +def is_SYM_MOD(U, UISC, UGC, AJT): return U in [0x1B6B, 0x1B6C, 0x1B6D, 0x1B6E, 0x1B6F, 0x1B70, 0x1B71, 0x1B72, 0x1B73] -def is_VARIATION_SELECTOR(U, UISC, UGC): - return 0xFE00 <= U <= 0xFE0F -def is_VOWEL(U, UISC, UGC): +def is_VOWEL(U, UISC, UGC, AJT): # https://github.com/harfbuzz/harfbuzz/issues/376 return (UISC == Pure_Killer or (UGC != Lo and UISC in [Vowel, Vowel_Dependent] and U not in [0xAA29])) -def is_VOWEL_MOD(U, UISC, UGC): +def is_VOWEL_MOD(U, UISC, UGC, AJT): # https://github.com/harfbuzz/harfbuzz/issues/376 return (UISC in [Tone_Mark, Cantillation_Mark, Register_Shifter, Visarga] or (UGC != Lo and (UISC == Bindu or U in [0xAA29]))) +# CGJ, VS, WJ, and ZWJ are handled in find_syllables use_mapping = { 'B': is_BASE, - 'IND': is_BASE_IND, 'N': is_BASE_NUM, 'GB': is_BASE_OTHER, - 'CGJ': is_CGJ, 'F': is_CONS_FINAL, 'FM': is_CONS_FINAL_MOD, 'M': is_CONS_MED, @@ -276,16 +326,16 @@ use_mapping = { 'H': is_HALANT, 'HVM': is_HALANT_OR_VOWEL_MODIFIER, 'HN': is_HALANT_NUM, + 'G': is_HIEROGLYPH, + 'J': is_HIEROGLYPH_JOINER, + 'SB': is_HIEROGLYPH_SEGMENT_BEGIN, + 'SE': is_HIEROGLYPH_SEGMENT_END, 'ZWNJ': is_ZWNJ, - 'ZWJ': is_ZWJ, - 'WJ': is_Word_Joiner, 'O': is_OTHER, - 'Rsv': is_Reserved, 'R': is_REPHA, 'S': is_SYM, 'Sk': is_SAKOT, 'SM': is_SYM_MOD, - 'VS': is_VARIATION_SELECTOR, 'V': is_VOWEL, 'VM': is_VOWEL_MOD, } @@ -304,13 +354,13 @@ use_positions = { }, 'CM': { 'Abv': [Top], - 'Blw': [Bottom], + 'Blw': [Bottom, Overstruck], }, 'V': { 'Abv': [Top, Top_And_Bottom, Top_And_Bottom_And_Right, Top_And_Right], 'Blw': [Bottom, Overstruck, Bottom_And_Right], - 'Pst': [Right, Top_And_Left, Top_And_Left_And_Right, Left_And_Right], - 'Pre': [Left], + 'Pst': [Right], + 'Pre': [Left, Top_And_Left, Top_And_Left_And_Right, Left_And_Right], }, 'VM': { 'Abv': [Top], @@ -330,13 +380,14 @@ use_positions = { 'Blw': [Bottom], 'Pst': [Not_Applicable], }, + 'R': None, 'SUB': None, } def map_to_use(data): out = {} items = use_mapping.items() - for U,(UISC,UIPC,UGC,UBlock) in data.items(): + for U,(UISC,UIPC,UGC,AJT,UBlock) in data.items(): # Resolve Indic_Syllabic_Category @@ -346,20 +397,6 @@ def map_to_use(data): # Tibetan: # TODO: These don't have UISC assigned in Unicode 13.0.0, but have UIPC if 0x0F18 <= U <= 0x0F19 or 0x0F3E <= U <= 0x0F3F: UISC = Vowel_Dependent - if 0x0F86 <= U <= 0x0F87: UISC = Tone_Mark - # Overrides to allow NFC order matching syllable - # https://github.com/harfbuzz/harfbuzz/issues/1012 - if UBlock == 'Tibetan' and is_VOWEL (U, UISC, UGC): - if UIPC == Top: - UIPC = Bottom - - # TODO: https://github.com/harfbuzz/harfbuzz/pull/982 - # also https://github.com/harfbuzz/harfbuzz/issues/1012 - if UBlock == 'Chakma' and is_VOWEL (U, UISC, UGC): - if UIPC == Top: - UIPC = Bottom - elif UIPC == Bottom: - UIPC = Top # TODO: https://github.com/harfbuzz/harfbuzz/pull/627 if 0x1BF2 <= U <= 0x1BF3: UISC = Nukta; UIPC = Bottom @@ -368,11 +405,11 @@ def map_to_use(data): # the nasalization marks, maybe only for U+1CE9..U+1CF1. if U == 0x1CED: UISC = Tone_Mark - # TODO: https://github.com/harfbuzz/harfbuzz/issues/1105 - if U == 0x11134: UISC = Gemination_Mark + # TODO: https://github.com/microsoft/font-tools/issues/1 + if U == 0xA982: UISC = Consonant_Succeeding_Repha - values = [k for k,v in items if v(U,UISC,UGC)] - assert len(values) == 1, "%s %s %s %s" % (hex(U), UISC, UGC, values) + values = [k for k,v in items if v(U,UISC,UGC,AJT)] + assert len(values) == 1, "%s %s %s %s %s" % (hex(U), UISC, UGC, AJT, values) USE = values[0] # Resolve Indic_Positional_Category @@ -380,9 +417,6 @@ def map_to_use(data): # TODO: These should die, but have UIPC in Unicode 13.0.0 if U in [0x953, 0x954]: UIPC = Not_Applicable - # TODO: https://github.com/harfbuzz/harfbuzz/pull/2012 - if U == 0x1C29: UIPC = Left - # TODO: These are not in USE's override list that we have, nor are they in Unicode 13.0.0 if 0xA926 <= U <= 0xA92A: UIPC = Top # TODO: https://github.com/harfbuzz/harfbuzz/pull/1037 @@ -390,14 +424,18 @@ def map_to_use(data): if U in [0x11302, 0x11303, 0x114C1]: UIPC = Top if 0x1CF8 <= U <= 0x1CF9: UIPC = Top - assert (UIPC in [Not_Applicable, Visual_Order_Left] or - USE == 'R' or - USE in use_positions), "%s %s %s %s %s" % (hex(U), UIPC, USE, UISC, UGC) + # TODO: https://github.com/harfbuzz/harfbuzz/pull/982 + # also https://github.com/harfbuzz/harfbuzz/issues/1012 + if 0x1112A <= U <= 0x1112B: UIPC = Top + if 0x11131 <= U <= 0x11132: UIPC = Top + + assert (UIPC in [Not_Applicable, Visual_Order_Left] or U == 0x0F7F or + USE in use_positions), "%s %s %s %s %s %s" % (hex(U), UIPC, USE, UISC, UGC, AJT) pos_mapping = use_positions.get(USE, None) if pos_mapping: values = [k for k,v in pos_mapping.items() if v and UIPC in v] - assert len(values) == 1, "%s %s %s %s %s %s" % (hex(U), UIPC, USE, UISC, UGC, values) + assert len(values) == 1, "%s %s %s %s %s %s %s" % (hex(U), UIPC, USE, UISC, UGC, AJT, values) USE = USE + values[0] out[U] = (USE, UBlock) @@ -410,7 +448,7 @@ print ("/* == Start of generated table == */") print ("/*") print (" * The following table is generated by running:") print (" *") -print (" * ./gen-use-table.py IndicSyllabicCategory.txt IndicPositionalCategory.txt UnicodeData.txt Blocks.txt") +print (" * {} IndicSyllabicCategory.txt IndicPositionalCategory.txt UnicodeData.txt ArabicShaping.txt Blocks.txt IndicSyllabicCategory-Additional.txt IndicPositionalCategory-Additional.txt".format (sys.argv[0])) print (" *") print (" * on files with these headers:") print (" *") @@ -477,6 +515,8 @@ print ("static const USE_TABLE_ELEMENT_TYPE use_table[] = {") for u in uu: if u <= last: continue + if data[u][0] == 'O': + continue block = data[u][1] start = u//8*8 diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout.cc index fac510e9e60..74ebaa64ecc 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout.cc @@ -79,13 +79,18 @@ AAT::hb_aat_apply_context_t::set_ankr_table (const AAT::ankr *ankr_table_) * @short_description: Apple Advanced Typography Layout * @include: hb-aat.h * - * Functions for querying OpenType Layout features in the font face. + * Functions for querying AAT Layout features in the font face. + * + * HarfBuzz supports all of the AAT tables used to implement shaping. Other + * AAT tables and their associated features are not supported. **/ #if !defined(HB_NO_AAT) || defined(HAVE_CORETEXT) -/* Table data courtesy of Apple. Converted from mnemonics to integers +/* Mapping from OpenType feature tags to AAT feature names and selectors. + * + * Table data courtesy of Apple. Converted from mnemonics to integers * when moving to this file. */ static const hb_aat_feature_mapping_t feature_mappings[] = { @@ -167,6 +172,17 @@ static const hb_aat_feature_mapping_t feature_mappings[] = {HB_TAG ('z','e','r','o'), HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS, HB_AAT_LAYOUT_FEATURE_SELECTOR_SLASHED_ZERO_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_SLASHED_ZERO_OFF}, }; +/** + * hb_aat_layout_find_feature_mapping: + * @tag: The requested #hb_tag_t feature tag + * + * Fetches the AAT feature-and-selector combination that corresponds + * to a given OpenType feature tag. + * + * Return value: the AAT features and selectors corresponding to the + * OpenType feature tag queried + * + **/ const hb_aat_feature_mapping_t * hb_aat_layout_find_feature_mapping (hb_tag_t tag) { @@ -202,11 +218,17 @@ hb_aat_layout_compile_map (const hb_aat_map_builder_t *mapper, } -/* +/** * hb_aat_layout_has_substitution: - * @face: + * @face: #hb_face_t to work upon + * + * Tests whether the specified face includes any substitutions in the + * `morx` or `mort` tables. + * + * <note>Note: does not examine the `GSUB` table.</note> + * + * Return value: true if data found, false otherwise * - * Returns: * Since: 2.3.0 */ hb_bool_t @@ -263,11 +285,17 @@ hb_aat_layout_remove_deleted_glyphs (hb_buffer_t *buffer) hb_ot_layout_delete_glyphs_inplace (buffer, is_deleted_glyph); } -/* +/** * hb_aat_layout_has_positioning: - * @face: + * @face: #hb_face_t to work upon + * + * Tests whether the specified face includes any positioning information + * in the `kerx` table. + * + * <note>Note: does not examine the `GPOS` table.</note> + * + * Return value: true if data found, false otherwise * - * Returns: * Since: 2.3.0 */ hb_bool_t @@ -290,11 +318,15 @@ hb_aat_layout_position (const hb_ot_shape_plan_t *plan, } -/* +/** * hb_aat_layout_has_tracking: - * @face: + * @face:: #hb_face_t to work upon + * + * Tests whether the specified face includes any tracking information + * in the `trak` table. + * + * Return value: true if data found, false otherwise * - * Returns: * Since: 2.3.0 */ hb_bool_t @@ -316,10 +348,13 @@ hb_aat_layout_track (const hb_ot_shape_plan_t *plan, /** * hb_aat_layout_get_feature_types: - * @face: a face object - * @start_offset: iteration's start offset - * @feature_count:(inout) (allow-none): buffer size as input, filled size as output - * @features: (out caller-allocates) (array length=feature_count): features buffer + * @face: #hb_face_t to work upon + * @start_offset: offset of the first feature type to retrieve + * @feature_count: (inout) (allow-none): Input = the maximum number of feature types to return; + * Output = the actual number of feature types returned (may be zero) + * @features: (out caller-allocates) (array length=feature_count): Array of feature types found + * + * Fetches a list of the AAT feature types included in the specified face. * * Return value: Number of all available feature types. * @@ -336,10 +371,12 @@ hb_aat_layout_get_feature_types (hb_face_t *face, /** * hb_aat_layout_feature_type_get_name_id: - * @face: a face object - * @feature_type: feature id + * @face: #hb_face_t to work upon + * @feature_type: The #hb_aat_layout_feature_type_t of the requested feature type * - * Return value: Name ID index + * Fetches the name ID of the specified feature type in the face's `name` table. + * + * Return value: Name ID of the requested feature type * * Since: 2.2.0 */ @@ -352,18 +389,22 @@ hb_aat_layout_feature_type_get_name_id (hb_face_t *face, /** * hb_aat_layout_feature_type_get_selectors: - * @face: a face object - * @feature_type: feature id - * @start_offset: iteration's start offset - * @selector_count: (inout) (allow-none): buffer size as input, filled size as output - * @selectors: (out caller-allocates) (array length=selector_count): settings buffer - * @default_index: (out) (allow-none): index of default selector if any + * @face: #hb_face_t to work upon + * @feature_type: The #hb_aat_layout_feature_type_t of the requested feature type + * @start_offset: offset of the first feature type to retrieve + * @selector_count: (inout) (allow-none): Input = the maximum number of selectors to return; + * Output = the actual number of selectors returned (may be zero) + * @selectors: (out caller-allocates) (array length=selector_count): A buffer pointer. + * The selectors available for the feature type queries. + * @default_index: (out) (allow-none): The index of the feature's default selector, if any + * + * Fetches a list of the selectors available for the specified feature in the given face. * * If upon return, @default_index is set to #HB_AAT_LAYOUT_NO_SELECTOR_INDEX, then * the feature type is non-exclusive. Otherwise, @default_index is the index of * the selector that is selected by default. * - * Return value: Number of all available feature selectors. + * Return value: Number of all available feature selectors * * Since: 2.2.0 */ 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 b617e8b703d..dc1bf965737 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 @@ -37,7 +37,48 @@ HB_BEGIN_DECLS /** * hb_aat_layout_feature_type_t: + * @HB_AAT_LAYOUT_FEATURE_TYPE_INVALID: Initial, unset feature type + * @HB_AAT_LAYOUT_FEATURE_TYPE_ALL_TYPOGRAPHIC: + * @HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES: + * @HB_AAT_LAYOUT_FEATURE_TYPE_CURISVE_CONNECTION: + * @HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE: + * @HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION: + * @HB_AAT_LAYOUT_FEATURE_TYPE_LINGUISTIC_REARRANGEMENT: + * @HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING: + * @HB_AAT_LAYOUT_FEATURE_TYPE_SMART_SWASH_TYPE: + * @HB_AAT_LAYOUT_FEATURE_TYPE_DIACRITICS_TYPE: + * @HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION: + * @HB_AAT_LAYOUT_FEATURE_TYPE_FRACTIONS: + * @HB_AAT_LAYOUT_FEATURE_TYPE_OVERLAPPING_CHARACTERS_TYPE: + * @HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS: + * @HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS: + * @HB_AAT_LAYOUT_FEATURE_TYPE_ORNAMENT_SETS_TYPE: + * @HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_ALTERNATIVES: + * @HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE: + * @HB_AAT_LAYOUT_FEATURE_TYPE_STYLE_OPTIONS: + * @HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE: + * @HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE: + * @HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING: + * @HB_AAT_LAYOUT_FEATURE_TYPE_TRANSLITERATION: + * @HB_AAT_LAYOUT_FEATURE_TYPE_ANNOTATION_TYPE: + * @HB_AAT_LAYOUT_FEATURE_TYPE_KANA_SPACING_TYPE: + * @HB_AAT_LAYOUT_FEATURE_TYPE_IDEOGRAPHIC_SPACING_TYPE: + * @HB_AAT_LAYOUT_FEATURE_TYPE_UNICODE_DECOMPOSITION_TYPE: + * @HB_AAT_LAYOUT_FEATURE_TYPE_RUBY_KANA: + * @HB_AAT_LAYOUT_FEATURE_TYPE_CJK_SYMBOL_ALTERNATIVES_TYPE: + * @HB_AAT_LAYOUT_FEATURE_TYPE_IDEOGRAPHIC_ALTERNATIVES_TYPE: + * @HB_AAT_LAYOUT_FEATURE_TYPE_CJK_VERTICAL_ROMAN_PLACEMENT_TYPE: + * @HB_AAT_LAYOUT_FEATURE_TYPE_ITALIC_CJK_ROMAN: + * @HB_AAT_LAYOUT_FEATURE_TYPE_CASE_SENSITIVE_LAYOUT: + * @HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA: + * @HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES: + * @HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES: + * @HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE: + * @HB_AAT_LAYOUT_FEATURE_TYPE_UPPER_CASE: + * @HB_AAT_LAYOUT_FEATURE_TYPE_LANGUAGE_TAG_TYPE: + * @HB_AAT_LAYOUT_FEATURE_TYPE_CJK_ROMAN_SPACING_TYPE: * + * The possible feature types defined for AAT shaping. * * Since: 2.2.0 */ @@ -85,12 +126,265 @@ typedef enum HB_AAT_LAYOUT_FEATURE_TYPE_LANGUAGE_TAG_TYPE = 39, HB_AAT_LAYOUT_FEATURE_TYPE_CJK_ROMAN_SPACING_TYPE = 103, + /*< private >*/ _HB_AAT_LAYOUT_FEATURE_TYPE_MAX_VALUE = HB_TAG_MAX_SIGNED /*< skip >*/ } hb_aat_layout_feature_type_t; /** * hb_aat_layout_feature_selector_t: + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_INVALID: Initial, unset feature selector + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_ALL_TYPE_FEATURES_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_ALL_TYPOGRAPHIC + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_ALL_TYPE_FEATURES_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_ALL_TYPOGRAPHIC + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_REQUIRED_LIGATURES_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_REQUIRED_LIGATURES_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_COMMON_LIGATURES_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_COMMON_LIGATURES_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_RARE_LIGATURES_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_RARE_LIGATURES_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_LOGOS_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_LOGOS_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_REBUS_PICTURES_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_REBUS_PICTURES_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_DIPHTHONG_LIGATURES_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_DIPHTHONG_LIGATURES_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_SQUARED_LIGATURES_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_SQUARED_LIGATURES_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_ABBREV_SQUARED_LIGATURES_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_ABBREV_SQUARED_LIGATURES_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_SYMBOL_LIGATURES_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_SYMBOL_LIGATURES_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_LIGATURES_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_LIGATURES_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_HISTORICAL_LIGATURES_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_HISTORICAL_LIGATURES_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_UNCONNECTED: for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_PARTIALLY_CONNECTED: for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_CURSIVE: for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_UPPER_AND_LOWER_CASE: Deprecated + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_ALL_CAPS: Deprecated + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_ALL_LOWER_CASE: Deprecated + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_SMALL_CAPS: Deprecated + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_INITIAL_CAPS: Deprecated + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_INITIAL_CAPS_AND_SMALL_CAPS: Deprecated + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_LINGUISTIC_REARRANGEMENT_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_LINGUISTIC_REARRANGEMENT + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_LINGUISTIC_REARRANGEMENT_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_LINGUISTIC_REARRANGEMENT + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_MONOSPACED_NUMBERS: for #HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_PROPORTIONAL_NUMBERS: for #HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_THIRD_WIDTH_NUMBERS: for #HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_QUARTER_WIDTH_NUMBERS: for #HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_WORD_INITIAL_SWASHES_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_SMART_SWASH_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_WORD_INITIAL_SWASHES_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_SMART_SWASH_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_WORD_FINAL_SWASHES_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_SMART_SWASH_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_WORD_FINAL_SWASHES_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_SMART_SWASH_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_LINE_INITIAL_SWASHES_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_SMART_SWASH_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_LINE_INITIAL_SWASHES_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_SMART_SWASH_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_LINE_FINAL_SWASHES_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_SMART_SWASH_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_LINE_FINAL_SWASHES_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_SMART_SWASH_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_NON_FINAL_SWASHES_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_SMART_SWASH_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_NON_FINAL_SWASHES_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_SMART_SWASH_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_SHOW_DIACRITICS: for #HB_AAT_LAYOUT_FEATURE_TYPE_DIACRITICS_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_HIDE_DIACRITICS: for #HB_AAT_LAYOUT_FEATURE_TYPE_DIACRITICS_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_DECOMPOSE_DIACRITICS: for #HB_AAT_LAYOUT_FEATURE_TYPE_DIACRITICS_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_NORMAL_POSITION: for #HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_SUPERIORS: for #HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_INFERIORS: for #HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_ORDINALS: for #HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_SCIENTIFIC_INFERIORS: for #HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_FRACTIONS: for #HB_AAT_LAYOUT_FEATURE_TYPE_FRACTIONS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_VERTICAL_FRACTIONS: for #HB_AAT_LAYOUT_FEATURE_TYPE_FRACTIONS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_DIAGONAL_FRACTIONS: for #HB_AAT_LAYOUT_FEATURE_TYPE_FRACTIONS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_PREVENT_OVERLAP_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_OVERLAPPING_CHARACTERS_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_PREVENT_OVERLAP_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_OVERLAPPING_CHARACTERS_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_HYPHENS_TO_EM_DASH_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_HYPHENS_TO_EM_DASH_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_HYPHEN_TO_EN_DASH_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_HYPHEN_TO_EN_DASH_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_SLASHED_ZERO_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_SLASHED_ZERO_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_FORM_INTERROBANG_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_FORM_INTERROBANG_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_SMART_QUOTES_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_SMART_QUOTES_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_PERIODS_TO_ELLIPSIS_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_PERIODS_TO_ELLIPSIS_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_HYPHEN_TO_MINUS_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_HYPHEN_TO_MINUS_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_ASTERISK_TO_MULTIPLY_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_ASTERISK_TO_MULTIPLY_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_SLASH_TO_DIVIDE_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_SLASH_TO_DIVIDE_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_INEQUALITY_LIGATURES_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_INEQUALITY_LIGATURES_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_EXPONENTS_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_EXPONENTS_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_MATHEMATICAL_GREEK_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_MATHEMATICAL_GREEK_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_ORNAMENTS: for #HB_AAT_LAYOUT_FEATURE_TYPE_ORNAMENT_SETS_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_DINGBATS: for #HB_AAT_LAYOUT_FEATURE_TYPE_ORNAMENT_SETS_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_PI_CHARACTERS: for #HB_AAT_LAYOUT_FEATURE_TYPE_ORNAMENT_SETS_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_FLEURONS: for #HB_AAT_LAYOUT_FEATURE_TYPE_ORNAMENT_SETS_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_DECORATIVE_BORDERS: for #HB_AAT_LAYOUT_FEATURE_TYPE_ORNAMENT_SETS_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_INTERNATIONAL_SYMBOLS: for #HB_AAT_LAYOUT_FEATURE_TYPE_ORNAMENT_SETS_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_MATH_SYMBOLS: for #HB_AAT_LAYOUT_FEATURE_TYPE_ORNAMENT_SETS_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_ALTERNATES: for #HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_DESIGN_LEVEL1: for #HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_DESIGN_LEVEL2: for #HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_DESIGN_LEVEL3: for #HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_DESIGN_LEVEL4: for #HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_DESIGN_LEVEL5: for #HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_STYLE_OPTIONS: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLE_OPTIONS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_DISPLAY_TEXT: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLE_OPTIONS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_ENGRAVED_TEXT: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLE_OPTIONS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_ILLUMINATED_CAPS: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLE_OPTIONS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_TITLING_CAPS: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLE_OPTIONS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_TALL_CAPS: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLE_OPTIONS + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_CHARACTERS: for #HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_SIMPLIFIED_CHARACTERS: for #HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_JIS1978_CHARACTERS: for #HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_JIS1983_CHARACTERS: for #HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_JIS1990_CHARACTERS: for #HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_ALT_ONE: for #HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_ALT_TWO: for #HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_ALT_THREE: for #HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_ALT_FOUR: for #HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_ALT_FIVE: for #HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_EXPERT_CHARACTERS: for #HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_JIS2004_CHARACTERS: for #HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_HOJO_CHARACTERS: for #HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_NLCCHARACTERS: for #HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_NAMES_CHARACTERS: for #HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_LOWER_CASE_NUMBERS: for #HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_UPPER_CASE_NUMBERS: for #HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_PROPORTIONAL_TEXT: for #HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_MONOSPACED_TEXT: for #HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_HALF_WIDTH_TEXT: for #HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_THIRD_WIDTH_TEXT: for #HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_QUARTER_WIDTH_TEXT: for #HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_ALT_PROPORTIONAL_TEXT: for #HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_ALT_HALF_WIDTH_TEXT: for #HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_TRANSLITERATION: for #HB_AAT_LAYOUT_FEATURE_TYPE_TRANSLITERATION + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_HANJA_TO_HANGUL: for #HB_AAT_LAYOUT_FEATURE_TYPE_TRANSLITERATION + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_HIRAGANA_TO_KATAKANA: for #HB_AAT_LAYOUT_FEATURE_TYPE_TRANSLITERATION + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_KATAKANA_TO_HIRAGANA: for #HB_AAT_LAYOUT_FEATURE_TYPE_TRANSLITERATION + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_KANA_TO_ROMANIZATION: for #HB_AAT_LAYOUT_FEATURE_TYPE_TRANSLITERATION + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_ROMANIZATION_TO_HIRAGANA: for #HB_AAT_LAYOUT_FEATURE_TYPE_TRANSLITERATION + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_ROMANIZATION_TO_KATAKANA: for #HB_AAT_LAYOUT_FEATURE_TYPE_TRANSLITERATION + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_HANJA_TO_HANGUL_ALT_ONE: for #HB_AAT_LAYOUT_FEATURE_TYPE_TRANSLITERATION + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_HANJA_TO_HANGUL_ALT_TWO: for #HB_AAT_LAYOUT_FEATURE_TYPE_TRANSLITERATION + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_HANJA_TO_HANGUL_ALT_THREE: for #HB_AAT_LAYOUT_FEATURE_TYPE_TRANSLITERATION + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_ANNOTATION: for #HB_AAT_LAYOUT_FEATURE_TYPE_ANNOTATION_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_BOX_ANNOTATION: for #HB_AAT_LAYOUT_FEATURE_TYPE_ANNOTATION_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_ROUNDED_BOX_ANNOTATION: for #HB_AAT_LAYOUT_FEATURE_TYPE_ANNOTATION_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_CIRCLE_ANNOTATION: for #HB_AAT_LAYOUT_FEATURE_TYPE_ANNOTATION_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_INVERTED_CIRCLE_ANNOTATION: for #HB_AAT_LAYOUT_FEATURE_TYPE_ANNOTATION_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_PARENTHESIS_ANNOTATION: for #HB_AAT_LAYOUT_FEATURE_TYPE_ANNOTATION_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_PERIOD_ANNOTATION: for #HB_AAT_LAYOUT_FEATURE_TYPE_ANNOTATION_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_ROMAN_NUMERAL_ANNOTATION: for #HB_AAT_LAYOUT_FEATURE_TYPE_ANNOTATION_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_DIAMOND_ANNOTATION: for #HB_AAT_LAYOUT_FEATURE_TYPE_ANNOTATION_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_INVERTED_BOX_ANNOTATION: for #HB_AAT_LAYOUT_FEATURE_TYPE_ANNOTATION_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_INVERTED_ROUNDED_BOX_ANNOTATION: for #HB_AAT_LAYOUT_FEATURE_TYPE_ANNOTATION_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_FULL_WIDTH_KANA: for #HB_AAT_LAYOUT_FEATURE_TYPE_KANA_SPACING_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_PROPORTIONAL_KANA: for #HB_AAT_LAYOUT_FEATURE_TYPE_KANA_SPACING_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_FULL_WIDTH_IDEOGRAPHS: for #HB_AAT_LAYOUT_FEATURE_TYPE_IDEOGRAPHIC_SPACING_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_PROPORTIONAL_IDEOGRAPHS: for #HB_AAT_LAYOUT_FEATURE_TYPE_IDEOGRAPHIC_SPACING_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_HALF_WIDTH_IDEOGRAPHS: for #HB_AAT_LAYOUT_FEATURE_TYPE_IDEOGRAPHIC_SPACING_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_CANONICAL_COMPOSITION_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_UNICODE_DECOMPOSITION_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_CANONICAL_COMPOSITION_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_UNICODE_DECOMPOSITION_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_COMPATIBILITY_COMPOSITION_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_UNICODE_DECOMPOSITION_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_COMPATIBILITY_COMPOSITION_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_UNICODE_DECOMPOSITION_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_TRANSCODING_COMPOSITION_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_UNICODE_DECOMPOSITION_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_TRANSCODING_COMPOSITION_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_UNICODE_DECOMPOSITION_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_RUBY_KANA: Deprecated; use #HB_AAT_LAYOUT_FEATURE_SELECTOR_RUBY_KANA_OFF instead + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_RUBY_KANA: Deprecated; use #HB_AAT_LAYOUT_FEATURE_SELECTOR_RUBY_KANA_ON instead + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_RUBY_KANA_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_RUBY_KANA + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_RUBY_KANA_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_RUBY_KANA + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_CJK_SYMBOL_ALTERNATIVES: for #HB_AAT_LAYOUT_FEATURE_TYPE_CJK_SYMBOL_ALTERNATIVES_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_SYMBOL_ALT_ONE: for #HB_AAT_LAYOUT_FEATURE_TYPE_CJK_SYMBOL_ALTERNATIVES_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_SYMBOL_ALT_TWO: for #HB_AAT_LAYOUT_FEATURE_TYPE_CJK_SYMBOL_ALTERNATIVES_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_SYMBOL_ALT_THREE: for #HB_AAT_LAYOUT_FEATURE_TYPE_CJK_SYMBOL_ALTERNATIVES_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_SYMBOL_ALT_FOUR: for #HB_AAT_LAYOUT_FEATURE_TYPE_CJK_SYMBOL_ALTERNATIVES_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_SYMBOL_ALT_FIVE: for #HB_AAT_LAYOUT_FEATURE_TYPE_CJK_SYMBOL_ALTERNATIVES_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_IDEOGRAPHIC_ALTERNATIVES: for #HB_AAT_LAYOUT_FEATURE_TYPE_IDEOGRAPHIC_ALTERNATIVES_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_IDEOGRAPHIC_ALT_ONE: for #HB_AAT_LAYOUT_FEATURE_TYPE_IDEOGRAPHIC_ALTERNATIVES_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_IDEOGRAPHIC_ALT_TWO: for #HB_AAT_LAYOUT_FEATURE_TYPE_IDEOGRAPHIC_ALTERNATIVES_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_IDEOGRAPHIC_ALT_THREE: for #HB_AAT_LAYOUT_FEATURE_TYPE_IDEOGRAPHIC_ALTERNATIVES_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_IDEOGRAPHIC_ALT_FOUR: for #HB_AAT_LAYOUT_FEATURE_TYPE_IDEOGRAPHIC_ALTERNATIVES_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_IDEOGRAPHIC_ALT_FIVE: for #HB_AAT_LAYOUT_FEATURE_TYPE_IDEOGRAPHIC_ALTERNATIVES_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_VERTICAL_ROMAN_CENTERED: for #HB_AAT_LAYOUT_FEATURE_TYPE_CJK_VERTICAL_ROMAN_PLACEMENT_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_VERTICAL_ROMAN_HBASELINE: for #HB_AAT_LAYOUT_FEATURE_TYPE_CJK_VERTICAL_ROMAN_PLACEMENT_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_CJK_ITALIC_ROMAN: Deprecated; use #HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_ITALIC_ROMAN_OFF instead + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_ITALIC_ROMAN: Deprecated; use #HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_ITALIC_ROMAN_ON instead + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_ITALIC_ROMAN_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_ITALIC_CJK_ROMAN + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_ITALIC_ROMAN_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_ITALIC_CJK_ROMAN + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_CASE_SENSITIVE_LAYOUT_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_CASE_SENSITIVE_LAYOUT + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_CASE_SENSITIVE_LAYOUT_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_CASE_SENSITIVE_LAYOUT + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_CASE_SENSITIVE_SPACING_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_CASE_SENSITIVE_LAYOUT + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_CASE_SENSITIVE_SPACING_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_CASE_SENSITIVE_LAYOUT + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_ALTERNATE_HORIZ_KANA_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_ALTERNATE_HORIZ_KANA_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_ALTERNATE_VERT_KANA_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_ALTERNATE_VERT_KANA_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_STYLISTIC_ALTERNATES: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_ONE_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_ONE_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWO_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWO_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_THREE_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_THREE_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FOUR_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FOUR_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FIVE_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FIVE_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SIX_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SIX_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SEVEN_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SEVEN_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_EIGHT_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_EIGHT_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_NINE_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_NINE_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TEN_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TEN_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_ELEVEN_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_ELEVEN_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWELVE_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWELVE_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_THIRTEEN_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_THIRTEEN_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FOURTEEN_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FOURTEEN_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FIFTEEN_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FIFTEEN_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SIXTEEN_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SIXTEEN_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SEVENTEEN_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SEVENTEEN_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_EIGHTEEN_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_EIGHTEEN_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_NINETEEN_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_NINETEEN_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWENTY_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWENTY_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_ALTERNATES_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_ALTERNATES_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_SWASH_ALTERNATES_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_SWASH_ALTERNATES_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_SWASH_ALTERNATES_ON: for #HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_SWASH_ALTERNATES_OFF: for #HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_DEFAULT_LOWER_CASE: for #HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_LOWER_CASE_SMALL_CAPS: for #HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_LOWER_CASE_PETITE_CAPS: for #HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_DEFAULT_UPPER_CASE: for #HB_AAT_LAYOUT_FEATURE_TYPE_UPPER_CASE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_UPPER_CASE_SMALL_CAPS: for #HB_AAT_LAYOUT_FEATURE_TYPE_UPPER_CASE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_UPPER_CASE_PETITE_CAPS: for #HB_AAT_LAYOUT_FEATURE_TYPE_UPPER_CASE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_HALF_WIDTH_CJK_ROMAN: for #HB_AAT_LAYOUT_FEATURE_TYPE_CJK_ROMAN_SPACING_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_PROPORTIONAL_CJK_ROMAN: for #HB_AAT_LAYOUT_FEATURE_TYPE_CJK_ROMAN_SPACING_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_DEFAULT_CJK_ROMAN: for #HB_AAT_LAYOUT_FEATURE_TYPE_CJK_ROMAN_SPACING_TYPE + * @HB_AAT_LAYOUT_FEATURE_SELECTOR_FULL_WIDTH_CJK_ROMAN: for #HB_AAT_LAYOUT_FEATURE_TYPE_CJK_ROMAN_SPACING_TYPE * + * The selectors defined for specifying AAT feature settings. * * Since: 2.2.0 */ @@ -424,6 +718,7 @@ typedef enum HB_AAT_LAYOUT_FEATURE_SELECTOR_DEFAULT_CJK_ROMAN = 2, HB_AAT_LAYOUT_FEATURE_SELECTOR_FULL_WIDTH_CJK_ROMAN = 3, + /*< private >*/ _HB_AAT_LAYOUT_FEATURE_SELECTOR_MAX_VALUE = HB_TAG_MAX_SIGNED /*< skip >*/ } hb_aat_layout_feature_selector_t; @@ -437,8 +732,7 @@ HB_EXTERN hb_ot_name_id_t hb_aat_layout_feature_type_get_name_id (hb_face_t *face, hb_aat_layout_feature_type_t feature_type); -typedef struct hb_aat_layout_feature_selector_info_t -{ +typedef struct hb_aat_layout_feature_selector_info_t { hb_ot_name_id_t name_id; hb_aat_layout_feature_selector_t enable; hb_aat_layout_feature_selector_t disable; @@ -446,6 +740,13 @@ typedef struct hb_aat_layout_feature_selector_info_t unsigned int reserved; } hb_aat_layout_feature_selector_info_t; +/** + * HB_AAT_LAYOUT_NO_SELECTOR_INDEX + * + * Used when getting or setting AAT feature selectors. Indicates that + * there is no selector index corresponding to the selector of interest. + * + */ #define HB_AAT_LAYOUT_NO_SELECTOR_INDEX 0xFFFFu HB_EXTERN unsigned int diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-algs.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-algs.hh index 30b5812e124..98de61f3e88 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-algs.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-algs.hh @@ -350,14 +350,14 @@ struct { template <typename T, typename T2> constexpr auto operator () (T&& a, T2&& b) const HB_AUTO_RETURN - (hb_forward<T> (a) <= hb_forward<T2> (b) ? hb_forward<T> (a) : hb_forward<T2> (b)) + (a <= b ? hb_forward<T> (a) : hb_forward<T2> (b)) } HB_FUNCOBJ (hb_min); struct { template <typename T, typename T2> constexpr auto operator () (T&& a, T2&& b) const HB_AUTO_RETURN - (hb_forward<T> (a) >= hb_forward<T2> (b) ? hb_forward<T> (a) : hb_forward<T2> (b)) + (a >= b ? hb_forward<T> (a) : hb_forward<T2> (b)) } HB_FUNCOBJ (hb_max); struct diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-blob.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-blob.hh index d85bd823b00..b03dfc13809 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-blob.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-blob.hh @@ -90,6 +90,7 @@ struct hb_blob_ptr_t unsigned int get_length () const { return b.get ()->length; } void destroy () { hb_blob_destroy (b.get ()); b = nullptr; } + private: hb_nonnull_ptr_t<hb_blob_t> b; }; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.hh index 1f9e2e91db8..01db2954985 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.hh @@ -1,30 +1,29 @@ - #line 1 "hb-buffer-deserialize-json.rl" /* - * Copyright © 2013 Google, Inc. - * - * This is part of HarfBuzz, a text shaping library. - * - * Permission is hereby granted, without written agreement and without - * license or royalty fees, to use, copy, modify, and distribute this - * software and its documentation for any purpose, provided that the - * above copyright notice and the following two paragraphs appear in - * all copies of this software. - * - * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR - * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES - * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN - * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, - * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS - * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO - * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - * - * Google Author(s): Behdad Esfahbod - */ +* Copyright © 2013 Google, Inc. +* +* This is part of HarfBuzz, a text shaping library. +* +* Permission is hereby granted, without written agreement and without +* license or royalty fees, to use, copy, modify, and distribute this +* software and its documentation for any purpose, provided that the +* above copyright notice and the following two paragraphs appear in +* all copies of this software. +* +* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR +* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES +* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN +* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. +* +* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, +* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS +* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO +* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. +* +* Google Author(s): Behdad Esfahbod +*/ #ifndef HB_BUFFER_DESERIALIZE_JSON_HH #define HB_BUFFER_DESERIALIZE_JSON_HH @@ -32,612 +31,577 @@ #include "hb.hh" -#line 36 "hb-buffer-deserialize-json.hh" +#line 35 "hb-buffer-deserialize-json.hh" static const unsigned char _deserialize_json_trans_keys[] = { - 0u, 0u, 9u, 123u, 9u, 34u, 97u, 103u, 120u, 121u, 34u, 34u, 9u, 58u, 9u, 57u, - 48u, 57u, 9u, 125u, 9u, 125u, 9u, 125u, 34u, 34u, 9u, 58u, 9u, 57u, 48u, 57u, - 9u, 125u, 9u, 125u, 108u, 108u, 34u, 34u, 9u, 58u, 9u, 57u, 9u, 125u, 9u, 125u, - 120u, 121u, 34u, 34u, 9u, 58u, 9u, 57u, 48u, 57u, 9u, 125u, 9u, 125u, 34u, 34u, - 9u, 58u, 9u, 57u, 48u, 57u, 9u, 125u, 9u, 125u, 34u, 34u, 9u, 58u, 9u, 57u, - 65u, 122u, 34u, 122u, 9u, 125u, 9u, 125u, 9u, 93u, 9u, 123u, 0u, 0u, 0 + 1u, 0u, 0u, 18u, 0u, 2u, 10u, 15u, + 16u, 17u, 2u, 2u, 0u, 7u, 0u, 6u, + 5u, 6u, 0u, 19u, 0u, 19u, 0u, 19u, + 2u, 2u, 0u, 7u, 0u, 6u, 5u, 6u, + 0u, 19u, 0u, 19u, 14u, 14u, 2u, 2u, + 0u, 7u, 0u, 6u, 0u, 19u, 0u, 19u, + 16u, 17u, 2u, 2u, 0u, 7u, 0u, 6u, + 5u, 6u, 0u, 19u, 0u, 19u, 2u, 2u, + 0u, 7u, 0u, 6u, 5u, 6u, 0u, 19u, + 0u, 19u, 2u, 2u, 0u, 7u, 0u, 6u, + 2u, 8u, 0u, 19u, 2u, 8u, 0u, 19u, + 0u, 19u, 2u, 2u, 0u, 7u, 0u, 6u, + 0u, 19u, 0u, 9u, 0u, 18u, 1u, 0u, + 0u }; -static const char _deserialize_json_key_spans[] = { - 0, 115, 26, 7, 2, 1, 50, 49, - 10, 117, 117, 117, 1, 50, 49, 10, - 117, 117, 1, 1, 50, 49, 117, 117, - 2, 1, 50, 49, 10, 117, 117, 1, - 50, 49, 10, 117, 117, 1, 50, 49, - 58, 89, 117, 117, 85, 115, 0 +static const signed char _deserialize_json_char_class[] = { + 0, 0, 0, 0, 0, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 0, + 1, 2, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 3, 4, 1, 1, 5, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 7, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 8, 9, 1, 1, 1, + 10, 1, 11, 12, 1, 1, 13, 1, + 1, 1, 1, 14, 1, 1, 1, 1, + 1, 1, 1, 1, 15, 1, 1, 16, + 17, 1, 18, 1, 19, 0 }; static const short _deserialize_json_index_offsets[] = { - 0, 0, 116, 143, 151, 154, 156, 207, - 257, 268, 386, 504, 622, 624, 675, 725, - 736, 854, 972, 974, 976, 1027, 1077, 1195, - 1313, 1316, 1318, 1369, 1419, 1430, 1548, 1666, - 1668, 1719, 1769, 1780, 1898, 2016, 2018, 2069, - 2119, 2178, 2268, 2386, 2504, 2590, 2706 + 0, 0, 19, 22, 28, 30, 31, 39, + 46, 48, 68, 88, 108, 109, 117, 124, + 126, 146, 166, 167, 168, 176, 183, 203, + 223, 225, 226, 234, 241, 243, 263, 283, + 284, 292, 299, 301, 321, 341, 342, 350, + 357, 364, 384, 391, 411, 431, 432, 440, + 447, 467, 477, 496, 0 +}; + +static const signed char _deserialize_json_indicies[] = { + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 3, 0, 4, 5, 6, + 7, 8, 0, 9, 10, 11, 12, 12, + 0, 0, 0, 0, 0, 0, 13, 13, + 0, 0, 0, 14, 15, 16, 18, 19, + 20, 0, 0, 21, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 22, 23, 0, 0, 3, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 24, + 20, 0, 0, 21, 0, 19, 19, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 22, 25, 25, 0, 0, + 0, 0, 0, 0, 26, 26, 0, 0, + 0, 27, 28, 29, 31, 32, 33, 0, + 0, 34, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 35, 33, 0, 0, 34, 0, 32, + 32, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 35, 36, 37, + 37, 0, 0, 0, 0, 0, 0, 38, + 38, 0, 0, 0, 0, 39, 40, 42, + 0, 0, 43, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 44, 42, 0, 0, 43, 0, + 45, 45, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 44, 46, + 47, 48, 48, 0, 0, 0, 0, 0, + 0, 49, 49, 0, 0, 0, 50, 51, + 52, 54, 55, 56, 0, 0, 57, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 58, 56, + 0, 0, 57, 0, 55, 55, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 58, 59, 59, 0, 0, 0, + 0, 0, 0, 60, 60, 0, 0, 0, + 61, 62, 63, 65, 66, 67, 0, 0, + 68, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 69, 67, 0, 0, 68, 0, 66, 66, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 69, 70, 70, 0, + 0, 0, 0, 0, 0, 71, 71, 0, + 72, 0, 0, 73, 74, 76, 75, 75, + 75, 75, 75, 77, 79, 0, 0, 80, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 81, + 75, 0, 0, 0, 0, 0, 75, 83, + 0, 0, 84, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 85, 83, 0, 0, 84, 0, + 87, 87, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 85, 88, + 88, 0, 0, 0, 0, 0, 0, 89, + 89, 0, 0, 0, 0, 90, 91, 83, + 0, 0, 84, 0, 93, 93, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 85, 94, 0, 0, 95, 0, + 0, 0, 0, 0, 96, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, + 0 }; -static const char _deserialize_json_indicies[] = { - 0, 0, 0, 0, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 0, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 2, 1, 3, 3, 3, - 3, 3, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 3, 1, 4, 1, - 5, 1, 6, 7, 1, 1, 8, 1, - 9, 10, 1, 11, 1, 11, 11, 11, - 11, 11, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 11, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 12, 1, - 12, 12, 12, 12, 12, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 12, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 13, 1, 1, 14, - 15, 15, 15, 15, 15, 15, 15, 15, - 15, 1, 16, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 1, 18, 18, 18, - 18, 18, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 18, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 19, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 20, 1, 21, 21, 21, 21, 21, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 21, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 22, - 1, 18, 18, 18, 18, 18, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 18, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 19, 1, 1, 1, - 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 20, 1, 23, - 1, 23, 23, 23, 23, 23, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 23, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 24, 1, 24, 24, 24, 24, - 24, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 24, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 25, 1, 1, 26, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 1, 28, 29, - 29, 29, 29, 29, 29, 29, 29, 29, - 1, 30, 30, 30, 30, 30, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 30, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 31, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 32, 1, 30, - 30, 30, 30, 30, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 30, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 31, 1, 1, 1, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 32, 1, 33, 1, 34, - 1, 34, 34, 34, 34, 34, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 34, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 35, 1, 35, 35, 35, 35, - 35, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 35, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 36, 37, 37, 37, 37, - 37, 37, 37, 37, 37, 1, 38, 38, - 38, 38, 38, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 38, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 39, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 40, 1, 38, 38, 38, 38, - 38, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 38, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 39, - 1, 1, 1, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 40, 1, 42, 43, 1, 44, 1, 44, - 44, 44, 44, 44, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 44, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 45, 1, 45, 45, 45, 45, 45, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 45, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 46, 1, - 1, 47, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 1, 49, 50, 50, 50, - 50, 50, 50, 50, 50, 50, 1, 51, - 51, 51, 51, 51, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 51, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 52, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 53, 1, 51, 51, 51, - 51, 51, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 51, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 52, 1, 1, 1, 50, 50, 50, 50, - 50, 50, 50, 50, 50, 50, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 53, 1, 54, 1, 54, 54, 54, - 54, 54, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 54, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 55, 1, - 55, 55, 55, 55, 55, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 55, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 56, 1, 1, 57, - 58, 58, 58, 58, 58, 58, 58, 58, - 58, 1, 59, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 1, 61, 61, 61, - 61, 61, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 61, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 62, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 63, 1, 61, 61, 61, 61, 61, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 61, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 62, 1, - 1, 1, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 63, - 1, 64, 1, 64, 64, 64, 64, 64, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 64, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 65, 1, 65, 65, - 65, 65, 65, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 65, 1, 66, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 67, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 1, - 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 1, 1, 1, 1, 1, 1, - 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 1, 70, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 71, 71, - 1, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 1, 1, 1, 1, 1, - 1, 1, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 1, 1, 1, 1, - 71, 1, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 1, 72, 72, 72, - 72, 72, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 72, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 73, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 74, 1, 72, 72, 72, 72, 72, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 72, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 73, 1, - 1, 1, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 74, - 1, 76, 76, 76, 76, 76, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 76, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 77, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 78, 1, 0, - 0, 0, 0, 0, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 1, 1, 0 +static const signed char _deserialize_json_index_defaults[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 75, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0 }; -static const char _deserialize_json_trans_targs[] = { - 1, 0, 2, 2, 3, 4, 18, 24, - 37, 5, 12, 6, 7, 8, 9, 11, - 9, 11, 10, 2, 44, 10, 44, 13, - 14, 15, 16, 17, 16, 17, 10, 2, - 44, 19, 20, 21, 22, 23, 10, 2, - 44, 23, 25, 31, 26, 27, 28, 29, - 30, 29, 30, 10, 2, 44, 32, 33, - 34, 35, 36, 35, 36, 10, 2, 44, - 38, 39, 40, 42, 43, 41, 10, 41, - 10, 2, 44, 43, 44, 45, 46 +static const signed char _deserialize_json_cond_targs[] = { + 0, 1, 2, 2, 3, 4, 18, 24, + 37, 45, 5, 12, 6, 7, 8, 9, + 11, 8, 9, 11, 10, 2, 49, 10, + 49, 13, 14, 15, 16, 17, 15, 16, + 17, 10, 2, 49, 19, 20, 21, 22, + 23, 22, 10, 2, 49, 23, 25, 31, + 26, 27, 28, 29, 30, 28, 29, 30, + 10, 2, 49, 32, 33, 34, 35, 36, + 34, 35, 36, 10, 2, 49, 38, 39, + 40, 43, 44, 40, 41, 42, 41, 10, + 2, 49, 43, 10, 2, 49, 44, 44, + 46, 47, 43, 48, 48, 48, 49, 50, + 51, 0 }; -static const char _deserialize_json_trans_actions[] = { - 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2, 2, 2, - 0, 0, 3, 3, 4, 0, 5, 0, - 0, 2, 2, 2, 0, 0, 6, 6, - 7, 0, 0, 0, 2, 2, 8, 8, - 9, 0, 0, 0, 0, 0, 2, 2, - 2, 0, 0, 10, 10, 11, 0, 0, - 2, 2, 2, 0, 0, 12, 12, 13, - 0, 0, 0, 2, 2, 2, 14, 0, - 15, 15, 16, 0, 0, 0, 0 +static const signed char _deserialize_json_cond_actions[] = { + 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 2, + 2, 0, 0, 0, 3, 3, 4, 0, + 5, 0, 0, 2, 2, 2, 0, 0, + 0, 6, 6, 7, 0, 0, 0, 2, + 2, 0, 8, 8, 9, 0, 0, 0, + 0, 0, 2, 2, 2, 0, 0, 0, + 10, 10, 11, 0, 0, 2, 2, 2, + 0, 0, 0, 12, 12, 13, 0, 0, + 2, 14, 14, 0, 15, 0, 0, 16, + 16, 17, 0, 18, 18, 19, 0, 15, + 0, 0, 20, 20, 0, 21, 0, 0, + 0, 0 }; static const int deserialize_json_start = 1; -static const int deserialize_json_first_final = 44; +static const int deserialize_json_first_final = 49; static const int deserialize_json_error = 0; static const int deserialize_json_en_main = 1; -#line 97 "hb-buffer-deserialize-json.rl" +#line 108 "hb-buffer-deserialize-json.rl" static hb_bool_t -_hb_buffer_deserialize_glyphs_json (hb_buffer_t *buffer, - const char *buf, - unsigned int buf_len, - const char **end_ptr, - hb_font_t *font) +_hb_buffer_deserialize_json (hb_buffer_t *buffer, +const char *buf, +unsigned int buf_len, +const char **end_ptr, +hb_font_t *font) { - const char *p = buf, *pe = buf + buf_len; - - /* Ensure we have positions. */ - (void) hb_buffer_get_glyph_positions (buffer, nullptr); - - while (p < pe && ISSPACE (*p)) - p++; - if (p < pe && *p == (buffer->len ? ',' : '[')) - { - *end_ptr = ++p; - } - - const char *tok = nullptr; - int cs; - hb_glyph_info_t info = {0}; - hb_glyph_position_t pos = {0}; - -#line 466 "hb-buffer-deserialize-json.hh" + const char *p = buf, *pe = buf + buf_len; + + /* Ensure we have positions. */ + (void) hb_buffer_get_glyph_positions (buffer, nullptr); + + while (p < pe && ISSPACE (*p)) + p++; + if (p < pe && *p == (buffer->len ? ',' : '[')) + { + *end_ptr = ++p; + } + + const char *tok = nullptr; + int cs; + hb_glyph_info_t info = {0}; + hb_glyph_position_t pos = {0}; + +#line 223 "hb-buffer-deserialize-json.hh" { - cs = deserialize_json_start; + cs = (int)deserialize_json_start; } - -#line 471 "hb-buffer-deserialize-json.hh" + +#line 228 "hb-buffer-deserialize-json.hh" { - int _slen; - int _trans; - const unsigned char *_keys; - const char *_inds; - if ( p == pe ) - goto _test_eof; - if ( cs == 0 ) - goto _out; -_resume: - _keys = _deserialize_json_trans_keys + (cs<<1); - _inds = _deserialize_json_indicies + _deserialize_json_index_offsets[cs]; - - _slen = _deserialize_json_key_spans[cs]; - _trans = _inds[ _slen > 0 && _keys[0] <=(*p) && - (*p) <= _keys[1] ? - (*p) - _keys[0] : _slen ]; - - cs = _deserialize_json_trans_targs[_trans]; - - if ( _deserialize_json_trans_actions[_trans] == 0 ) - goto _again; - - switch ( _deserialize_json_trans_actions[_trans] ) { - case 1: + unsigned int _trans = 0; + const unsigned char * _keys; + const signed char * _inds; + int _ic; + _resume: {} + if ( p == pe ) + goto _out; + _keys = ( _deserialize_json_trans_keys + ((cs<<1))); + _inds = ( _deserialize_json_indicies + (_deserialize_json_index_offsets[cs])); + + if ( ( (*( p))) <= 125 && ( (*( p))) >= 9 ) { + _ic = (int)_deserialize_json_char_class[(int)( (*( p))) - 9]; + if ( _ic <= (int)(*( _keys+1)) && _ic >= (int)(*( _keys)) ) + _trans = (unsigned int)(*( _inds + (int)( _ic - (int)(*( _keys)) ) )); + else + _trans = (unsigned int)_deserialize_json_index_defaults[cs]; + } + else { + _trans = (unsigned int)_deserialize_json_index_defaults[cs]; + } + + cs = (int)_deserialize_json_cond_targs[_trans]; + + if ( _deserialize_json_cond_actions[_trans] != 0 ) { + + switch ( _deserialize_json_cond_actions[_trans] ) { + case 1: { + { #line 38 "hb-buffer-deserialize-json.rl" - { - memset (&info, 0, sizeof (info)); - memset (&pos , 0, sizeof (pos )); -} - break; - case 5: + + memset (&info, 0, sizeof (info)); + memset (&pos , 0, sizeof (pos )); + } + +#line 264 "hb-buffer-deserialize-json.hh" + + + break; + } + case 5: { + { #line 43 "hb-buffer-deserialize-json.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 2: + + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; + } + +#line 280 "hb-buffer-deserialize-json.hh" + + + break; + } + case 2: { + { #line 51 "hb-buffer-deserialize-json.rl" - { - tok = p; -} - break; - case 14: + + tok = p; + } + +#line 292 "hb-buffer-deserialize-json.hh" + + + break; + } + case 15: { + { #line 55 "hb-buffer-deserialize-json.rl" - { - if (!hb_font_glyph_from_string (font, - tok, p - tok, - &info.codepoint)) - return false; -} - break; - case 15: -#line 62 "hb-buffer-deserialize-json.rl" - { if (!parse_uint (tok, p, &info.codepoint)) return false; } - break; - case 8: -#line 63 "hb-buffer-deserialize-json.rl" - { if (!parse_uint (tok, p, &info.cluster )) return false; } - break; - case 10: -#line 64 "hb-buffer-deserialize-json.rl" - { if (!parse_int (tok, p, &pos.x_offset )) return false; } - break; - case 12: -#line 65 "hb-buffer-deserialize-json.rl" - { if (!parse_int (tok, p, &pos.y_offset )) return false; } - break; - case 3: + if (unlikely (!buffer->ensure_glyphs ())) return false; } + +#line 302 "hb-buffer-deserialize-json.hh" + + + break; + } + case 21: { + { +#line 56 "hb-buffer-deserialize-json.rl" + if (unlikely (!buffer->ensure_unicode ())) return false; } + +#line 312 "hb-buffer-deserialize-json.hh" + + + break; + } + case 16: { + { +#line 58 "hb-buffer-deserialize-json.rl" + + /* TODO Unescape \" and \\ if found. */ + if (!hb_font_glyph_from_string (font, + tok, p - tok, + &info.codepoint)) + return false; + } + +#line 328 "hb-buffer-deserialize-json.hh" + + + break; + } + case 18: { + { #line 66 "hb-buffer-deserialize-json.rl" - { if (!parse_int (tok, p, &pos.x_advance)) return false; } - break; - case 6: + if (!parse_uint (tok, p, &info.codepoint)) return false; } + +#line 338 "hb-buffer-deserialize-json.hh" + + + break; + } + case 8: { + { #line 67 "hb-buffer-deserialize-json.rl" - { if (!parse_int (tok, p, &pos.y_advance)) return false; } - break; - case 16: -#line 62 "hb-buffer-deserialize-json.rl" - { if (!parse_uint (tok, p, &info.codepoint)) return false; } + if (!parse_uint (tok, p, &info.cluster )) return false; } + +#line 348 "hb-buffer-deserialize-json.hh" + + + break; + } + case 10: { + { +#line 68 "hb-buffer-deserialize-json.rl" + if (!parse_int (tok, p, &pos.x_offset )) return false; } + +#line 358 "hb-buffer-deserialize-json.hh" + + + break; + } + case 12: { + { +#line 69 "hb-buffer-deserialize-json.rl" + if (!parse_int (tok, p, &pos.y_offset )) return false; } + +#line 368 "hb-buffer-deserialize-json.hh" + + + break; + } + case 3: { + { +#line 70 "hb-buffer-deserialize-json.rl" + if (!parse_int (tok, p, &pos.x_advance)) return false; } + +#line 378 "hb-buffer-deserialize-json.hh" + + + break; + } + case 6: { + { +#line 71 "hb-buffer-deserialize-json.rl" + if (!parse_int (tok, p, &pos.y_advance)) return false; } + +#line 388 "hb-buffer-deserialize-json.hh" + + + break; + } + case 14: { + { +#line 51 "hb-buffer-deserialize-json.rl" + + tok = p; + } + +#line 400 "hb-buffer-deserialize-json.hh" + + { +#line 55 "hb-buffer-deserialize-json.rl" + if (unlikely (!buffer->ensure_glyphs ())) return false; } + +#line 406 "hb-buffer-deserialize-json.hh" + + + break; + } + case 20: { + { +#line 51 "hb-buffer-deserialize-json.rl" + + tok = p; + } + +#line 418 "hb-buffer-deserialize-json.hh" + + { +#line 56 "hb-buffer-deserialize-json.rl" + if (unlikely (!buffer->ensure_unicode ())) return false; } + +#line 424 "hb-buffer-deserialize-json.hh" + + + break; + } + case 17: { + { +#line 58 "hb-buffer-deserialize-json.rl" + + /* TODO Unescape \" and \\ if found. */ + if (!hb_font_glyph_from_string (font, + tok, p - tok, + &info.codepoint)) + return false; + } + +#line 440 "hb-buffer-deserialize-json.hh" + + { #line 43 "hb-buffer-deserialize-json.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 9: -#line 63 "hb-buffer-deserialize-json.rl" - { if (!parse_uint (tok, p, &info.cluster )) return false; } + + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; + } + +#line 452 "hb-buffer-deserialize-json.hh" + + + break; + } + case 19: { + { +#line 66 "hb-buffer-deserialize-json.rl" + if (!parse_uint (tok, p, &info.codepoint)) return false; } + +#line 462 "hb-buffer-deserialize-json.hh" + + { #line 43 "hb-buffer-deserialize-json.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 11: -#line 64 "hb-buffer-deserialize-json.rl" - { if (!parse_int (tok, p, &pos.x_offset )) return false; } + + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; + } + +#line 474 "hb-buffer-deserialize-json.hh" + + + break; + } + case 9: { + { +#line 67 "hb-buffer-deserialize-json.rl" + if (!parse_uint (tok, p, &info.cluster )) return false; } + +#line 484 "hb-buffer-deserialize-json.hh" + + { #line 43 "hb-buffer-deserialize-json.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 13: -#line 65 "hb-buffer-deserialize-json.rl" - { if (!parse_int (tok, p, &pos.y_offset )) return false; } + + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; + } + +#line 496 "hb-buffer-deserialize-json.hh" + + + break; + } + case 11: { + { +#line 68 "hb-buffer-deserialize-json.rl" + if (!parse_int (tok, p, &pos.x_offset )) return false; } + +#line 506 "hb-buffer-deserialize-json.hh" + + { #line 43 "hb-buffer-deserialize-json.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 4: -#line 66 "hb-buffer-deserialize-json.rl" - { if (!parse_int (tok, p, &pos.x_advance)) return false; } + + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; + } + +#line 518 "hb-buffer-deserialize-json.hh" + + + break; + } + case 13: { + { +#line 69 "hb-buffer-deserialize-json.rl" + if (!parse_int (tok, p, &pos.y_offset )) return false; } + +#line 528 "hb-buffer-deserialize-json.hh" + + { #line 43 "hb-buffer-deserialize-json.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 7: -#line 67 "hb-buffer-deserialize-json.rl" - { if (!parse_int (tok, p, &pos.y_advance)) return false; } + + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; + } + +#line 540 "hb-buffer-deserialize-json.hh" + + + break; + } + case 4: { + { +#line 70 "hb-buffer-deserialize-json.rl" + if (!parse_int (tok, p, &pos.x_advance)) return false; } + +#line 550 "hb-buffer-deserialize-json.hh" + + { #line 43 "hb-buffer-deserialize-json.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; -#line 624 "hb-buffer-deserialize-json.hh" - } - -_again: - if ( cs == 0 ) - goto _out; - if ( ++p != pe ) - goto _resume; - _test_eof: {} - _out: {} + + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; + } + +#line 562 "hb-buffer-deserialize-json.hh" + + + break; + } + case 7: { + { +#line 71 "hb-buffer-deserialize-json.rl" + if (!parse_int (tok, p, &pos.y_advance)) return false; } + +#line 572 "hb-buffer-deserialize-json.hh" + + { +#line 43 "hb-buffer-deserialize-json.rl" + + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; + } + +#line 584 "hb-buffer-deserialize-json.hh" + + + break; + } + } + + } + + if ( cs != 0 ) { + p += 1; + goto _resume; + } + _out: {} } - -#line 125 "hb-buffer-deserialize-json.rl" - - - *end_ptr = p; - - return p == pe && *(p-1) != ']'; + +#line 136 "hb-buffer-deserialize-json.rl" + + + *end_ptr = p; + + return p == pe && *(p-1) != ']'; } #endif /* HB_BUFFER_DESERIALIZE_JSON_HH */ diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.rl b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.rl index f3abb027b20..382423f6c7d 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.rl +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.rl @@ -52,14 +52,18 @@ action tok { tok = p; } -action parse_glyph { +action ensure_glyphs { if (unlikely (!buffer->ensure_glyphs ())) return false; } +action ensure_unicode { if (unlikely (!buffer->ensure_unicode ())) return false; } + +action parse_glyph_name { + /* TODO Unescape \" and \\ if found. */ if (!hb_font_glyph_from_string (font, tok, p - tok, &info.codepoint)) return false; } -action parse_gid { if (!parse_uint (tok, p, &info.codepoint)) return false; } +action parse_codepoint { if (!parse_uint (tok, p, &info.codepoint)) return false; } action parse_cluster { if (!parse_uint (tok, p, &info.cluster )) return false; } action parse_x_offset { if (!parse_int (tok, p, &pos.x_offset )) return false; } action parse_y_offset { if (!parse_int (tok, p, &pos.y_offset )) return false; } @@ -72,20 +76,27 @@ num = '-'? unum; comma = space* ',' space*; colon = space* ':' space*; -glyph_id = unum; -glyph_name = alpha (alnum|'_'|'.'|'-')*; +codepoint = unum; +glyph_name = '"' ([^\\"] | '\\' [\\"])* '"'; -glyph_string = '"' (glyph_name >tok %parse_glyph) '"'; -glyph_number = (glyph_id >tok %parse_gid); +parse_glyph_name = (glyph_name >tok %parse_glyph_name); +parse_codepoint = (codepoint >tok %parse_codepoint); -glyph = "\"g\"" colon (glyph_string | glyph_number); +glyph = "\"g\"" colon (parse_glyph_name | parse_codepoint); +unicode = "\"u\"" colon parse_codepoint; cluster = "\"cl\"" colon (unum >tok %parse_cluster); xoffset = "\"dx\"" colon (num >tok %parse_x_offset); yoffset = "\"dy\"" colon (num >tok %parse_y_offset); xadvance= "\"ax\"" colon (num >tok %parse_x_advance); yadvance= "\"ay\"" colon (num >tok %parse_y_advance); -element = glyph | cluster | xoffset | yoffset | xadvance | yadvance; +element = glyph @ensure_glyphs + | unicode @ensure_unicode + | cluster + | xoffset + | yoffset + | xadvance + | yadvance; item = ( '{' space* element (comma element)* space* '}') >clear_item @@ -97,7 +108,7 @@ main := space* item (comma item)* space* (','|']')?; }%% static hb_bool_t -_hb_buffer_deserialize_glyphs_json (hb_buffer_t *buffer, +_hb_buffer_deserialize_json (hb_buffer_t *buffer, const char *buf, unsigned int buf_len, const char **end_ptr, diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.hh index 67f0a1252f8..fb36f560159 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.hh @@ -1,30 +1,29 @@ - #line 1 "hb-buffer-deserialize-text.rl" /* - * Copyright © 2013 Google, Inc. - * - * This is part of HarfBuzz, a text shaping library. - * - * Permission is hereby granted, without written agreement and without - * license or royalty fees, to use, copy, modify, and distribute this - * software and its documentation for any purpose, provided that the - * above copyright notice and the following two paragraphs appear in - * all copies of this software. - * - * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR - * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES - * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN - * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, - * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS - * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO - * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - * - * Google Author(s): Behdad Esfahbod - */ +* Copyright © 2013 Google, Inc. +* +* This is part of HarfBuzz, a text shaping library. +* +* Permission is hereby granted, without written agreement and without +* license or royalty fees, to use, copy, modify, and distribute this +* software and its documentation for any purpose, provided that the +* above copyright notice and the following two paragraphs appear in +* all copies of this software. +* +* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR +* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES +* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN +* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. +* +* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, +* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS +* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO +* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. +* +* Google Author(s): Behdad Esfahbod +*/ #ifndef HB_BUFFER_DESERIALIZE_TEXT_HH #define HB_BUFFER_DESERIALIZE_TEXT_HH @@ -32,540 +31,734 @@ #include "hb.hh" -#line 36 "hb-buffer-deserialize-text.hh" +#line 35 "hb-buffer-deserialize-text.hh" static const unsigned char _deserialize_text_trans_keys[] = { - 0u, 0u, 9u, 122u, 45u, 57u, 48u, 57u, 45u, 57u, 48u, 57u, 48u, 57u, 45u, 57u, - 48u, 57u, 44u, 44u, 45u, 57u, 48u, 57u, 44u, 57u, 9u, 124u, 9u, 124u, 0u, 0u, - 9u, 122u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, - 9u, 124u, 9u, 124u, 9u, 124u, 0 + 1u, 0u, 0u, 13u, 12u, 12u, 2u, 2u, + 5u, 11u, 0u, 12u, 5u, 6u, 4u, 6u, + 5u, 6u, 5u, 6u, 4u, 6u, 5u, 6u, + 3u, 3u, 4u, 6u, 5u, 6u, 3u, 6u, + 2u, 16u, 4u, 6u, 5u, 6u, 0u, 16u, + 0u, 16u, 1u, 0u, 0u, 12u, 0u, 16u, + 0u, 16u, 0u, 16u, 0u, 16u, 0u, 16u, + 0u, 16u, 0u, 16u, 0u, 16u, 0u, 16u, + 0u, 16u, 0u, 16u, 0u, 16u, 0u, 16u, + 0u, 16u, 0u }; -static const char _deserialize_text_key_spans[] = { - 0, 114, 13, 10, 13, 10, 10, 13, - 10, 1, 13, 10, 14, 116, 116, 0, - 114, 116, 116, 116, 116, 116, 116, 116, - 116, 116, 116 +static const signed char _deserialize_text_char_class[] = { + 0, 0, 0, 0, 0, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 0, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 2, 3, 4, 1, 1, 5, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 1, 1, 7, 8, 9, 1, 10, + 11, 11, 11, 11, 11, 11, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 12, 1, 1, 1, + 1, 1, 13, 14, 15, 1, 1, 1, + 11, 11, 11, 11, 11, 11, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 16, 0 }; static const short _deserialize_text_index_offsets[] = { - 0, 0, 115, 129, 140, 154, 165, 176, - 190, 201, 203, 217, 228, 243, 360, 477, - 478, 593, 710, 827, 944, 1061, 1178, 1295, - 1412, 1529, 1646 + 0, 0, 14, 15, 16, 23, 36, 38, + 41, 43, 45, 48, 50, 51, 54, 56, + 60, 75, 78, 80, 97, 114, 114, 127, + 144, 161, 178, 195, 212, 229, 246, 263, + 280, 297, 314, 331, 348, 0 +}; + +static const signed char _deserialize_text_indicies[] = { + 1, 0, 0, 0, 0, 0, 0, 2, + 0, 0, 0, 0, 0, 3, 4, 6, + 7, 7, 0, 0, 0, 0, 7, 8, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 4, 10, 11, 13, 14, + 15, 17, 18, 20, 21, 23, 24, 25, + 27, 28, 29, 31, 32, 33, 35, 36, + 29, 0, 28, 28, 38, 38, 0, 0, + 0, 0, 38, 0, 38, 0, 0, 0, + 38, 38, 38, 40, 41, 42, 44, 45, + 47, 0, 0, 0, 0, 48, 48, 0, + 49, 50, 0, 48, 0, 0, 0, 0, + 51, 52, 0, 0, 0, 0, 0, 0, + 0, 0, 53, 0, 0, 0, 0, 0, + 0, 54, 8, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 4, 56, + 0, 0, 0, 0, 0, 0, 0, 0, + 57, 0, 0, 0, 0, 0, 0, 58, + 56, 0, 0, 0, 0, 60, 60, 0, + 0, 57, 0, 0, 0, 0, 0, 0, + 58, 63, 62, 64, 0, 62, 62, 62, + 62, 65, 62, 66, 62, 62, 62, 67, + 68, 69, 71, 38, 72, 0, 38, 38, + 38, 38, 73, 38, 74, 38, 38, 38, + 37, 75, 76, 78, 0, 0, 79, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 80, 81, 82, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 53, 83, 84, 62, 64, + 0, 62, 62, 62, 62, 65, 62, 66, + 62, 62, 62, 67, 68, 69, 86, 0, + 87, 0, 0, 0, 0, 0, 0, 0, + 88, 0, 0, 0, 0, 57, 89, 91, + 0, 92, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 93, 94, + 91, 0, 92, 0, 0, 36, 36, 0, + 0, 0, 0, 0, 0, 0, 0, 93, + 94, 86, 0, 87, 0, 0, 97, 97, + 0, 0, 0, 88, 0, 0, 0, 0, + 57, 89, 99, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 100, 101, 99, 0, 0, 0, 0, + 45, 45, 0, 0, 0, 0, 0, 0, + 0, 0, 100, 101, 78, 0, 0, 79, + 0, 18, 18, 0, 0, 0, 0, 0, + 0, 0, 0, 80, 81, 0 }; -static const char _deserialize_text_indicies[] = { - 0, 0, 0, 0, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 0, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 2, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 1, 1, 1, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 1, 1, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 1, 5, 1, 1, 6, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 1, 8, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 1, 10, 1, 1, - 11, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 1, 13, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 1, 15, 16, - 16, 16, 16, 16, 16, 16, 16, 16, - 1, 17, 1, 1, 18, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 1, 20, - 21, 21, 21, 21, 21, 21, 21, 21, - 21, 1, 22, 1, 23, 1, 1, 24, - 25, 25, 25, 25, 25, 25, 25, 25, - 25, 1, 26, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 1, 22, 1, 1, - 1, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 1, 28, 28, 28, 28, - 28, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 28, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 29, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 30, 1, 1, 31, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 32, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 33, - 1, 34, 34, 34, 34, 34, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 34, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 35, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 36, 1, 1, 0, - 0, 0, 0, 0, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 1, 1, 1, 1, 1, 1, 1, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 1, 1, 1, 1, 1, 1, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 1, 28, 28, 28, 28, 28, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 28, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 29, 1, 1, 1, - 1, 37, 37, 37, 37, 37, 37, 37, - 37, 37, 37, 1, 1, 1, 30, 1, - 1, 31, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 32, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 33, 1, 38, - 38, 38, 38, 38, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 38, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 39, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 40, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 41, 1, 42, 42, 42, 42, - 42, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 42, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 43, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 44, - 1, 42, 42, 42, 42, 42, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 42, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 43, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 44, 1, 38, 38, - 38, 38, 38, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 38, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 39, 1, 1, 1, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 40, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 41, 1, 45, 45, 45, 45, 45, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 45, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 46, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 47, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 48, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 49, 1, - 50, 50, 50, 50, 50, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 50, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 51, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 52, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 53, 1, 50, 50, 50, - 50, 50, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 50, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 51, - 1, 1, 1, 1, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 52, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 53, 1, 45, 45, 45, 45, 45, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 45, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 46, 1, 1, 1, - 1, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 1, 1, 1, 1, 1, - 1, 47, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 48, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 49, 1, 28, - 28, 28, 28, 28, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 28, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 29, 1, 55, 55, 1, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55, - 1, 1, 1, 30, 1, 1, 31, 55, - 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55, - 55, 1, 1, 32, 1, 55, 1, 55, - 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55, - 55, 1, 33, 1, 0 +static const signed char _deserialize_text_index_defaults[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 62, 38, 0, 0, 62, 0, 0, + 0, 0, 0, 0, 0, 0 }; -static const char _deserialize_text_trans_targs[] = { - 1, 0, 13, 17, 26, 3, 18, 21, - 18, 21, 5, 19, 20, 19, 20, 22, - 25, 8, 9, 12, 9, 12, 10, 11, - 23, 24, 23, 24, 14, 2, 6, 7, - 15, 16, 14, 15, 16, 17, 14, 4, - 15, 16, 14, 15, 16, 14, 2, 7, - 15, 16, 14, 2, 15, 16, 25, 26 +static const signed char _deserialize_text_cond_targs[] = { + 0, 1, 2, 25, 3, 3, 4, 19, + 5, 6, 23, 24, 7, 8, 27, 36, + 8, 27, 36, 9, 30, 33, 10, 11, + 12, 15, 11, 12, 15, 13, 13, 14, + 31, 32, 14, 31, 32, 16, 26, 17, + 18, 34, 35, 18, 34, 35, 19, 20, + 19, 6, 21, 22, 20, 21, 22, 23, + 20, 21, 22, 24, 24, 25, 26, 26, + 7, 9, 10, 16, 21, 29, 26, 26, + 7, 9, 10, 21, 29, 27, 28, 17, + 21, 29, 28, 29, 29, 30, 28, 7, + 10, 29, 31, 28, 7, 21, 29, 32, + 33, 33, 34, 28, 21, 29, 35, 36, + 0 }; -static const char _deserialize_text_trans_actions[] = { - 0, 0, 1, 1, 1, 2, 2, 2, - 0, 0, 2, 2, 2, 0, 0, 2, - 2, 2, 2, 2, 0, 0, 3, 2, - 2, 2, 0, 0, 4, 5, 5, 5, - 4, 4, 0, 0, 0, 0, 6, 7, - 6, 6, 8, 8, 8, 9, 10, 10, - 9, 9, 11, 12, 11, 11, 0, 0 +static const signed char _deserialize_text_cond_actions[] = { + 0, 0, 0, 0, 1, 0, 0, 2, + 0, 0, 2, 2, 0, 3, 4, 4, + 0, 5, 5, 0, 4, 4, 0, 3, + 3, 3, 0, 0, 0, 6, 0, 3, + 4, 4, 0, 5, 5, 0, 5, 0, + 3, 4, 4, 0, 5, 5, 7, 7, + 8, 9, 7, 7, 0, 0, 0, 10, + 10, 10, 10, 10, 8, 11, 12, 13, + 14, 14, 14, 15, 11, 11, 16, 17, + 18, 18, 18, 16, 16, 19, 19, 20, + 19, 19, 0, 0, 13, 10, 10, 21, + 21, 10, 22, 22, 23, 22, 22, 22, + 10, 5, 24, 24, 24, 24, 24, 19, + 0 }; -static const char _deserialize_text_eof_actions[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 4, 0, 0, - 0, 4, 6, 8, 8, 6, 9, 11, - 11, 9, 4 +static const signed char _deserialize_text_eof_trans[] = { + 1, 2, 3, 6, 7, 9, 10, 13, + 17, 20, 23, 27, 28, 31, 35, 29, + 38, 40, 44, 47, 53, 54, 55, 56, + 60, 62, 71, 78, 83, 70, 86, 91, + 96, 97, 99, 103, 104, 0 }; static const int deserialize_text_start = 1; -static const int deserialize_text_first_final = 13; +static const int deserialize_text_first_final = 19; static const int deserialize_text_error = 0; static const int deserialize_text_en_main = 1; -#line 91 "hb-buffer-deserialize-text.rl" +#line 114 "hb-buffer-deserialize-text.rl" static hb_bool_t -_hb_buffer_deserialize_glyphs_text (hb_buffer_t *buffer, - const char *buf, - unsigned int buf_len, - const char **end_ptr, - hb_font_t *font) +_hb_buffer_deserialize_text (hb_buffer_t *buffer, +const char *buf, +unsigned int buf_len, +const char **end_ptr, +hb_font_t *font) { - const char *p = buf, *pe = buf + buf_len; - - /* Ensure we have positions. */ - (void) hb_buffer_get_glyph_positions (buffer, nullptr); - - while (p < pe && ISSPACE (*p)) - p++; - if (p < pe && *p == (buffer->len ? '|' : '[')) - { - *end_ptr = ++p; - } - - const char *eof = pe, *tok = nullptr; - int cs; - hb_glyph_info_t info = {0}; - hb_glyph_position_t pos = {0}; - -#line 343 "hb-buffer-deserialize-text.hh" + const char *p = buf, *pe = buf + buf_len; + + /* Ensure we have positions. */ + (void) hb_buffer_get_glyph_positions (buffer, nullptr); + + while (p < pe && ISSPACE (*p)) + p++; + + const char *eof = pe, *tok = nullptr; + int cs; + hb_glyph_info_t info = {0}; + hb_glyph_position_t pos = {0}; + +#line 204 "hb-buffer-deserialize-text.hh" { - cs = deserialize_text_start; + cs = (int)deserialize_text_start; } - -#line 348 "hb-buffer-deserialize-text.hh" + +#line 209 "hb-buffer-deserialize-text.hh" { - int _slen; - int _trans; - const unsigned char *_keys; - const char *_inds; - if ( p == pe ) - goto _test_eof; - if ( cs == 0 ) - goto _out; -_resume: - _keys = _deserialize_text_trans_keys + (cs<<1); - _inds = _deserialize_text_indicies + _deserialize_text_index_offsets[cs]; - - _slen = _deserialize_text_key_spans[cs]; - _trans = _inds[ _slen > 0 && _keys[0] <=(*p) && - (*p) <= _keys[1] ? - (*p) - _keys[0] : _slen ]; - - cs = _deserialize_text_trans_targs[_trans]; - - if ( _deserialize_text_trans_actions[_trans] == 0 ) - goto _again; - - switch ( _deserialize_text_trans_actions[_trans] ) { - case 2: + unsigned int _trans = 0; + const unsigned char * _keys; + const signed char * _inds; + int _ic; + _resume: {} + if ( p == pe && p != eof ) + goto _out; + if ( p == eof ) { + if ( _deserialize_text_eof_trans[cs] > 0 ) { + _trans = (unsigned int)_deserialize_text_eof_trans[cs] - 1; + } + } + else { + _keys = ( _deserialize_text_trans_keys + ((cs<<1))); + _inds = ( _deserialize_text_indicies + (_deserialize_text_index_offsets[cs])); + + if ( ( (*( p))) <= 124 && ( (*( p))) >= 9 ) { + _ic = (int)_deserialize_text_char_class[(int)( (*( p))) - 9]; + if ( _ic <= (int)(*( _keys+1)) && _ic >= (int)(*( _keys)) ) + _trans = (unsigned int)(*( _inds + (int)( _ic - (int)(*( _keys)) ) )); + else + _trans = (unsigned int)_deserialize_text_index_defaults[cs]; + } + else { + _trans = (unsigned int)_deserialize_text_index_defaults[cs]; + } + + } + cs = (int)_deserialize_text_cond_targs[_trans]; + + if ( _deserialize_text_cond_actions[_trans] != 0 ) { + + switch ( _deserialize_text_cond_actions[_trans] ) { + case 1: { + { +#line 38 "hb-buffer-deserialize-text.rl" + + memset (&info, 0, sizeof (info)); + memset (&pos , 0, sizeof (pos )); + } + +#line 252 "hb-buffer-deserialize-text.hh" + + + break; + } + case 3: { + { #line 51 "hb-buffer-deserialize-text.rl" - { - tok = p; -} - break; - case 5: + + tok = p; + } + +#line 264 "hb-buffer-deserialize-text.hh" + + + break; + } + case 5: { + { #line 55 "hb-buffer-deserialize-text.rl" - { - if (!hb_font_glyph_from_string (font, - tok, p - tok, - &info.codepoint)) - return false; -} - break; - case 10: -#line 62 "hb-buffer-deserialize-text.rl" - { if (!parse_uint (tok, p, &info.cluster )) return false; } - break; - case 3: -#line 63 "hb-buffer-deserialize-text.rl" - { if (!parse_int (tok, p, &pos.x_offset )) return false; } - break; - case 12: -#line 64 "hb-buffer-deserialize-text.rl" - { if (!parse_int (tok, p, &pos.y_offset )) return false; } - break; - case 7: -#line 65 "hb-buffer-deserialize-text.rl" - { if (!parse_int (tok, p, &pos.x_advance)) return false; } - break; - case 1: + if (unlikely (!buffer->ensure_glyphs ())) return false; } + +#line 274 "hb-buffer-deserialize-text.hh" + + + break; + } + case 8: { + { +#line 56 "hb-buffer-deserialize-text.rl" + if (unlikely (!buffer->ensure_unicode ())) return false; } + +#line 284 "hb-buffer-deserialize-text.hh" + + + break; + } + case 18: { + { +#line 58 "hb-buffer-deserialize-text.rl" + + /* TODO Unescape delimeters. */ + if (!hb_font_glyph_from_string (font, + tok, p - tok, + &info.codepoint)) + return false; + } + +#line 300 "hb-buffer-deserialize-text.hh" + + + break; + } + case 9: { + { +#line 66 "hb-buffer-deserialize-text.rl" + if (!parse_hex (tok, p, &info.codepoint )) return false; } + +#line 310 "hb-buffer-deserialize-text.hh" + + + break; + } + case 21: { + { +#line 68 "hb-buffer-deserialize-text.rl" + if (!parse_uint (tok, p, &info.cluster )) return false; } + +#line 320 "hb-buffer-deserialize-text.hh" + + + break; + } + case 6: { + { +#line 69 "hb-buffer-deserialize-text.rl" + if (!parse_int (tok, p, &pos.x_offset )) return false; } + +#line 330 "hb-buffer-deserialize-text.hh" + + + break; + } + case 23: { + { +#line 70 "hb-buffer-deserialize-text.rl" + if (!parse_int (tok, p, &pos.y_offset )) return false; } + +#line 340 "hb-buffer-deserialize-text.hh" + + + break; + } + case 20: { + { +#line 71 "hb-buffer-deserialize-text.rl" + if (!parse_int (tok, p, &pos.x_advance)) return false; } + +#line 350 "hb-buffer-deserialize-text.hh" + + + break; + } + case 15: { + { #line 38 "hb-buffer-deserialize-text.rl" - { - memset (&info, 0, sizeof (info)); - memset (&pos , 0, sizeof (pos )); -} + + memset (&info, 0, sizeof (info)); + memset (&pos , 0, sizeof (pos )); + } + +#line 363 "hb-buffer-deserialize-text.hh" + + { #line 51 "hb-buffer-deserialize-text.rl" - { - tok = p; -} - break; - case 4: + + tok = p; + } + +#line 371 "hb-buffer-deserialize-text.hh" + + + break; + } + case 4: { + { +#line 51 "hb-buffer-deserialize-text.rl" + + tok = p; + } + +#line 383 "hb-buffer-deserialize-text.hh" + + { #line 55 "hb-buffer-deserialize-text.rl" - { - if (!hb_font_glyph_from_string (font, - tok, p - tok, - &info.codepoint)) - return false; -} -#line 43 "hb-buffer-deserialize-text.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 9: -#line 62 "hb-buffer-deserialize-text.rl" - { if (!parse_uint (tok, p, &info.cluster )) return false; } + if (unlikely (!buffer->ensure_glyphs ())) return false; } + +#line 389 "hb-buffer-deserialize-text.hh" + + + break; + } + case 2: { + { +#line 51 "hb-buffer-deserialize-text.rl" + + tok = p; + } + +#line 401 "hb-buffer-deserialize-text.hh" + + { +#line 56 "hb-buffer-deserialize-text.rl" + if (unlikely (!buffer->ensure_unicode ())) return false; } + +#line 407 "hb-buffer-deserialize-text.hh" + + + break; + } + case 16: { + { +#line 58 "hb-buffer-deserialize-text.rl" + + /* TODO Unescape delimeters. */ + if (!hb_font_glyph_from_string (font, + tok, p - tok, + &info.codepoint)) + return false; + } + +#line 423 "hb-buffer-deserialize-text.hh" + + { #line 43 "hb-buffer-deserialize-text.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 11: -#line 64 "hb-buffer-deserialize-text.rl" - { if (!parse_int (tok, p, &pos.y_offset )) return false; } + + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; + } + +#line 435 "hb-buffer-deserialize-text.hh" + + + break; + } + case 7: { + { +#line 66 "hb-buffer-deserialize-text.rl" + if (!parse_hex (tok, p, &info.codepoint )) return false; } + +#line 445 "hb-buffer-deserialize-text.hh" + + { #line 43 "hb-buffer-deserialize-text.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 6: -#line 65 "hb-buffer-deserialize-text.rl" - { if (!parse_int (tok, p, &pos.x_advance)) return false; } + + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; + } + +#line 457 "hb-buffer-deserialize-text.hh" + + + break; + } + case 10: { + { +#line 68 "hb-buffer-deserialize-text.rl" + if (!parse_uint (tok, p, &info.cluster )) return false; } + +#line 467 "hb-buffer-deserialize-text.hh" + + { #line 43 "hb-buffer-deserialize-text.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 8: -#line 66 "hb-buffer-deserialize-text.rl" - { if (!parse_int (tok, p, &pos.y_advance)) return false; } + + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; + } + +#line 479 "hb-buffer-deserialize-text.hh" + + + break; + } + case 22: { + { +#line 70 "hb-buffer-deserialize-text.rl" + if (!parse_int (tok, p, &pos.y_offset )) return false; } + +#line 489 "hb-buffer-deserialize-text.hh" + + { #line 43 "hb-buffer-deserialize-text.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; -#line 480 "hb-buffer-deserialize-text.hh" - } - -_again: - if ( cs == 0 ) - goto _out; - if ( ++p != pe ) - goto _resume; - _test_eof: {} - if ( p == eof ) - { - switch ( _deserialize_text_eof_actions[cs] ) { - case 4: -#line 55 "hb-buffer-deserialize-text.rl" - { - if (!hb_font_glyph_from_string (font, - tok, p - tok, - &info.codepoint)) - return false; -} + + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; + } + +#line 501 "hb-buffer-deserialize-text.hh" + + + break; + } + case 19: { + { +#line 71 "hb-buffer-deserialize-text.rl" + if (!parse_int (tok, p, &pos.x_advance)) return false; } + +#line 511 "hb-buffer-deserialize-text.hh" + + { #line 43 "hb-buffer-deserialize-text.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 9: -#line 62 "hb-buffer-deserialize-text.rl" - { if (!parse_uint (tok, p, &info.cluster )) return false; } + + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; + } + +#line 523 "hb-buffer-deserialize-text.hh" + + + break; + } + case 24: { + { +#line 72 "hb-buffer-deserialize-text.rl" + if (!parse_int (tok, p, &pos.y_advance)) return false; } + +#line 533 "hb-buffer-deserialize-text.hh" + + { #line 43 "hb-buffer-deserialize-text.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 11: -#line 64 "hb-buffer-deserialize-text.rl" - { if (!parse_int (tok, p, &pos.y_offset )) return false; } + + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; + } + +#line 545 "hb-buffer-deserialize-text.hh" + + + break; + } + case 12: { + { +#line 38 "hb-buffer-deserialize-text.rl" + + memset (&info, 0, sizeof (info)); + memset (&pos , 0, sizeof (pos )); + } + +#line 558 "hb-buffer-deserialize-text.hh" + + { +#line 51 "hb-buffer-deserialize-text.rl" + + tok = p; + } + +#line 566 "hb-buffer-deserialize-text.hh" + + { +#line 55 "hb-buffer-deserialize-text.rl" + if (unlikely (!buffer->ensure_glyphs ())) return false; } + +#line 572 "hb-buffer-deserialize-text.hh" + + + break; + } + case 14: { + { +#line 38 "hb-buffer-deserialize-text.rl" + + memset (&info, 0, sizeof (info)); + memset (&pos , 0, sizeof (pos )); + } + +#line 585 "hb-buffer-deserialize-text.hh" + + { +#line 51 "hb-buffer-deserialize-text.rl" + + tok = p; + } + +#line 593 "hb-buffer-deserialize-text.hh" + + { +#line 58 "hb-buffer-deserialize-text.rl" + + /* TODO Unescape delimeters. */ + if (!hb_font_glyph_from_string (font, + tok, p - tok, + &info.codepoint)) + return false; + } + +#line 605 "hb-buffer-deserialize-text.hh" + + + break; + } + case 17: { + { +#line 58 "hb-buffer-deserialize-text.rl" + + /* TODO Unescape delimeters. */ + if (!hb_font_glyph_from_string (font, + tok, p - tok, + &info.codepoint)) + return false; + } + +#line 621 "hb-buffer-deserialize-text.hh" + + { +#line 55 "hb-buffer-deserialize-text.rl" + if (unlikely (!buffer->ensure_glyphs ())) return false; } + +#line 627 "hb-buffer-deserialize-text.hh" + + { #line 43 "hb-buffer-deserialize-text.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 6: -#line 65 "hb-buffer-deserialize-text.rl" - { if (!parse_int (tok, p, &pos.x_advance)) return false; } + + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; + } + +#line 639 "hb-buffer-deserialize-text.hh" + + + break; + } + case 11: { + { +#line 38 "hb-buffer-deserialize-text.rl" + + memset (&info, 0, sizeof (info)); + memset (&pos , 0, sizeof (pos )); + } + +#line 652 "hb-buffer-deserialize-text.hh" + + { +#line 51 "hb-buffer-deserialize-text.rl" + + tok = p; + } + +#line 660 "hb-buffer-deserialize-text.hh" + + { +#line 58 "hb-buffer-deserialize-text.rl" + + /* TODO Unescape delimeters. */ + if (!hb_font_glyph_from_string (font, + tok, p - tok, + &info.codepoint)) + return false; + } + +#line 672 "hb-buffer-deserialize-text.hh" + + { #line 43 "hb-buffer-deserialize-text.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 8: -#line 66 "hb-buffer-deserialize-text.rl" - { if (!parse_int (tok, p, &pos.y_advance)) return false; } + + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; + } + +#line 684 "hb-buffer-deserialize-text.hh" + + + break; + } + case 13: { + { +#line 38 "hb-buffer-deserialize-text.rl" + + memset (&info, 0, sizeof (info)); + memset (&pos , 0, sizeof (pos )); + } + +#line 697 "hb-buffer-deserialize-text.hh" + + { +#line 51 "hb-buffer-deserialize-text.rl" + + tok = p; + } + +#line 705 "hb-buffer-deserialize-text.hh" + + { +#line 58 "hb-buffer-deserialize-text.rl" + + /* TODO Unescape delimeters. */ + if (!hb_font_glyph_from_string (font, + tok, p - tok, + &info.codepoint)) + return false; + } + +#line 717 "hb-buffer-deserialize-text.hh" + + { +#line 55 "hb-buffer-deserialize-text.rl" + if (unlikely (!buffer->ensure_glyphs ())) return false; } + +#line 723 "hb-buffer-deserialize-text.hh" + + { #line 43 "hb-buffer-deserialize-text.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; -#line 557 "hb-buffer-deserialize-text.hh" - } - } - - _out: {} + + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; + } + +#line 735 "hb-buffer-deserialize-text.hh" + + + break; + } + } + + } + + if ( p == eof ) { + if ( cs >= 19 ) + goto _out; + } + else { + if ( cs != 0 ) { + p += 1; + goto _resume; + } + } + _out: {} } - -#line 119 "hb-buffer-deserialize-text.rl" - - - *end_ptr = p; - - return p == pe && *(p-1) != ']'; + +#line 138 "hb-buffer-deserialize-text.rl" + + + *end_ptr = p; + + return p == pe && *(p-1) != ']'; } #endif /* HB_BUFFER_DESERIALIZE_TEXT_HH */ diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.rl b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.rl index 6268a6c5039..a2170288ecb 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.rl +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.rl @@ -52,30 +52,37 @@ action tok { tok = p; } +action ensure_glyphs { if (unlikely (!buffer->ensure_glyphs ())) return false; } +action ensure_unicode { if (unlikely (!buffer->ensure_unicode ())) return false; } + action parse_glyph { + /* TODO Unescape delimeters. */ if (!hb_font_glyph_from_string (font, tok, p - tok, &info.codepoint)) return false; } +action parse_hexdigits {if (!parse_hex (tok, p, &info.codepoint )) return false; } + action parse_cluster { if (!parse_uint (tok, p, &info.cluster )) return false; } action parse_x_offset { if (!parse_int (tok, p, &pos.x_offset )) return false; } action parse_y_offset { if (!parse_int (tok, p, &pos.y_offset )) return false; } action parse_x_advance { if (!parse_int (tok, p, &pos.x_advance)) return false; } action parse_y_advance { if (!parse_int (tok, p, &pos.y_advance)) return false; } -unum = '0' | [1-9] digit*; +unum = '0' | [1-9] digit*; num = '-'? unum; glyph_id = unum; -glyph_name = alpha (alnum|'_'|'.'|'-')*; +glyph_name = ([^\\\]=@+,|] | '\\' [\\\]=@+,|]) *; glyph = (glyph_id | glyph_name) >tok %parse_glyph; cluster = '=' (unum >tok %parse_cluster); offsets = '@' (num >tok %parse_x_offset) ',' (num >tok %parse_y_offset ); advances= '+' (num >tok %parse_x_advance) (',' (num >tok %parse_y_advance))?; -item = + +glyph_item = ( glyph cluster? @@ -83,15 +90,31 @@ item = advances? ) >clear_item + @ensure_glyphs + %add_item + ; + +unicode = 'U' '+' xdigit+ >tok %parse_hexdigits; + +unicode_item = + ( + unicode + cluster? + ) + >clear_item + @ensure_unicode %add_item ; -main := space* item (space* '|' space* item)* space* ('|'|']')?; +glyphs = glyph_item (space* '|' space* glyph_item)* space* ('|'|']')?; +unicodes = unicode_item (space* '|' space* unicode_item)* space* ('|'|'>')?; + +main := space* ( ('[' glyphs) | ('<' unicodes) ); }%% static hb_bool_t -_hb_buffer_deserialize_glyphs_text (hb_buffer_t *buffer, +_hb_buffer_deserialize_text (hb_buffer_t *buffer, const char *buf, unsigned int buf_len, const char **end_ptr, @@ -104,10 +127,6 @@ _hb_buffer_deserialize_glyphs_text (hb_buffer_t *buffer, while (p < pe && ISSPACE (*p)) p++; - if (p < pe && *p == (buffer->len ? '|' : '[')) - { - *end_ptr = ++p; - } const char *eof = pe, *tok = nullptr; int cs; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-serialize.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-serialize.cc index bc6c978b38c..f65bad45bb1 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-serialize.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-serialize.cc @@ -91,26 +91,26 @@ hb_buffer_serialize_format_to_string (hb_buffer_serialize_format_t format) { switch ((unsigned) format) { - case HB_BUFFER_SERIALIZE_FORMAT_TEXT: return serialize_formats[0]; - case HB_BUFFER_SERIALIZE_FORMAT_JSON: return serialize_formats[1]; + case HB_BUFFER_SERIALIZE_FORMAT_TEXT: return serialize_formats[0]; + case HB_BUFFER_SERIALIZE_FORMAT_JSON: return serialize_formats[1]; default: - case HB_BUFFER_SERIALIZE_FORMAT_INVALID: return nullptr; + case HB_BUFFER_SERIALIZE_FORMAT_INVALID: return nullptr; } } static unsigned int _hb_buffer_serialize_glyphs_json (hb_buffer_t *buffer, - unsigned int start, - unsigned int end, - char *buf, - unsigned int buf_size, - unsigned int *buf_consumed, - hb_font_t *font, - hb_buffer_serialize_flags_t flags) + unsigned int start, + unsigned int end, + char *buf, + unsigned int buf_size, + unsigned int *buf_consumed, + hb_font_t *font, + hb_buffer_serialize_flags_t flags) { hb_glyph_info_t *info = hb_buffer_get_glyph_infos (buffer, nullptr); hb_glyph_position_t *pos = (flags & HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS) ? - nullptr : hb_buffer_get_glyph_positions (buffer, nullptr); + nullptr : hb_buffer_get_glyph_positions (buffer, nullptr); *buf_consumed = 0; hb_position_t x = 0, y = 0; @@ -125,6 +125,8 @@ _hb_buffer_serialize_glyphs_json (hb_buffer_t *buffer, if (i) *p++ = ','; + else + *p++ = '['; *p++ = '{'; @@ -134,8 +136,9 @@ _hb_buffer_serialize_glyphs_json (hb_buffer_t *buffer, char g[128]; hb_font_glyph_to_string (font, info[i].codepoint, g, sizeof (g)); *p++ = '"'; - for (char *q = g; *q; q++) { - if (*q == '"') + for (char *q = g; *q; q++) + { + if (unlikely (*q == '"' || *q == '\\')) *p++ = '\\'; *p++ = *q; } @@ -151,16 +154,16 @@ _hb_buffer_serialize_glyphs_json (hb_buffer_t *buffer, if (!(flags & HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS)) { p += hb_max (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), ",\"dx\":%d,\"dy\":%d", - x+pos[i].x_offset, y+pos[i].y_offset)); + x+pos[i].x_offset, y+pos[i].y_offset)); if (!(flags & HB_BUFFER_SERIALIZE_FLAG_NO_ADVANCES)) - p += hb_max (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), ",\"ax\":%d,\"ay\":%d", - pos[i].x_advance, pos[i].y_advance)); + p += hb_max (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), ",\"ax\":%d,\"ay\":%d", + pos[i].x_advance, pos[i].y_advance)); } if (flags & HB_BUFFER_SERIALIZE_FLAG_GLYPH_FLAGS) { if (info[i].mask & HB_GLYPH_FLAG_DEFINED) - p += hb_max (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), ",\"fl\":%u", info[i].mask & HB_GLYPH_FLAG_DEFINED)); + p += hb_max (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), ",\"fl\":%u", info[i].mask & HB_GLYPH_FLAG_DEFINED)); } if (flags & HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS) @@ -168,12 +171,14 @@ _hb_buffer_serialize_glyphs_json (hb_buffer_t *buffer, hb_glyph_extents_t extents; hb_font_get_glyph_extents(font, info[i].codepoint, &extents); p += hb_max (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), ",\"xb\":%d,\"yb\":%d", - extents.x_bearing, extents.y_bearing)); + extents.x_bearing, extents.y_bearing)); p += hb_max (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), ",\"w\":%d,\"h\":%d", - extents.width, extents.height)); + extents.width, extents.height)); } *p++ = '}'; + if (i == end-1) + *p++ = ']'; unsigned int l = p - b; if (buf_size > l) @@ -197,18 +202,71 @@ _hb_buffer_serialize_glyphs_json (hb_buffer_t *buffer, } static unsigned int +_hb_buffer_serialize_unicode_json (hb_buffer_t *buffer, + unsigned int start, + unsigned int end, + char *buf, + unsigned int buf_size, + unsigned int *buf_consumed, + hb_buffer_serialize_flags_t flags) +{ + hb_glyph_info_t *info = hb_buffer_get_glyph_infos (buffer, nullptr); + + *buf_consumed = 0; + for (unsigned int i = start; i < end; i++) + { + char b[1024]; + char *p = b; + + if (i) + *p++ = ','; + else + *p++ = '['; + + *p++ = '{'; + + APPEND ("\"u\":"); + + p += hb_max (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), "%u", info[i].codepoint)); + + if (!(flags & HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS)) { + p += hb_max (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), ",\"cl\":%u", info[i].cluster)); + } + + *p++ = '}'; + + if (i == end-1) + *p++ = ']'; + + unsigned int l = p - b; + if (buf_size > l) + { + memcpy (buf, b, l); + buf += l; + buf_size -= l; + *buf_consumed += l; + *buf = '\0'; + } else + return i - start; + + } + + return end - start; +} + +static unsigned int _hb_buffer_serialize_glyphs_text (hb_buffer_t *buffer, - unsigned int start, - unsigned int end, - char *buf, - unsigned int buf_size, - unsigned int *buf_consumed, - hb_font_t *font, - hb_buffer_serialize_flags_t flags) + unsigned int start, + unsigned int end, + char *buf, + unsigned int buf_size, + unsigned int *buf_consumed, + hb_font_t *font, + hb_buffer_serialize_flags_t flags) { hb_glyph_info_t *info = hb_buffer_get_glyph_infos (buffer, nullptr); hb_glyph_position_t *pos = (flags & HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS) ? - nullptr : hb_buffer_get_glyph_positions (buffer, nullptr); + nullptr : hb_buffer_get_glyph_positions (buffer, nullptr); *buf_consumed = 0; hb_position_t x = 0, y = 0; @@ -221,9 +279,12 @@ _hb_buffer_serialize_glyphs_text (hb_buffer_t *buffer, if (i) *p++ = '|'; + else + *p++ = '['; if (!(flags & HB_BUFFER_SERIALIZE_FLAG_NO_GLYPH_NAMES)) { + /* TODO Escape delimiters we use. */ hb_font_glyph_to_string (font, info[i].codepoint, p, 128); p += strlen (p); } @@ -237,21 +298,21 @@ _hb_buffer_serialize_glyphs_text (hb_buffer_t *buffer, if (!(flags & HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS)) { if (x+pos[i].x_offset || y+pos[i].y_offset) - p += hb_max (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), "@%d,%d", x+pos[i].x_offset, y+pos[i].y_offset)); + p += hb_max (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), "@%d,%d", x+pos[i].x_offset, y+pos[i].y_offset)); if (!(flags & HB_BUFFER_SERIALIZE_FLAG_NO_ADVANCES)) { - *p++ = '+'; - p += hb_max (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), "%d", pos[i].x_advance)); - if (pos[i].y_advance) - p += hb_max (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), ",%d", pos[i].y_advance)); + *p++ = '+'; + p += hb_max (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), "%d", pos[i].x_advance)); + if (pos[i].y_advance) + p += hb_max (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), ",%d", pos[i].y_advance)); } } if (flags & HB_BUFFER_SERIALIZE_FLAG_GLYPH_FLAGS) { if (info[i].mask & HB_GLYPH_FLAG_DEFINED) - p += hb_max (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), "#%X", info[i].mask &HB_GLYPH_FLAG_DEFINED)); + p += hb_max (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), "#%X", info[i].mask &HB_GLYPH_FLAG_DEFINED)); } if (flags & HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS) @@ -261,6 +322,10 @@ _hb_buffer_serialize_glyphs_text (hb_buffer_t *buffer, p += hb_max (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), "<%d,%d,%d,%d>", extents.x_bearing, extents.y_bearing, extents.width, extents.height)); } + if (i == end-1) { + *p++ = ']'; + } + unsigned int l = p - b; if (buf_size > l) { @@ -282,6 +347,51 @@ _hb_buffer_serialize_glyphs_text (hb_buffer_t *buffer, return end - start; } + +static unsigned int +_hb_buffer_serialize_unicode_text (hb_buffer_t *buffer, + unsigned int start, + unsigned int end, + char *buf, + unsigned int buf_size, + unsigned int *buf_consumed, + hb_buffer_serialize_flags_t flags) +{ + hb_glyph_info_t *info = hb_buffer_get_glyph_infos (buffer, nullptr); + *buf_consumed = 0; + for (unsigned int i = start; i < end; i++) + { + char b[1024]; + char *p = b; + + if (i) + *p++ = '|'; + else + *p++ = '<'; + + p += hb_max (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), "U+%04X", info[i].codepoint)); + + if (!(flags & HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS)) { + p += hb_max (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), "=%u", info[i].cluster)); + } + + if (i == end-1) + *p++ = '>'; + + unsigned int l = p - b; + if (buf_size > l) + { + memcpy (buf, b, l); + buf += l; + buf_size -= l; + *buf_consumed += l; + *buf = '\0'; + } else + return i - start; + } + return end - start; +} + /** * hb_buffer_serialize_glyphs: * @buffer: an #hb_buffer_t buffer. @@ -308,6 +418,7 @@ _hb_buffer_serialize_glyphs_text (hb_buffer_t *buffer, * ``` * [uni0651=0@518,0+0|uni0628=0+1897] * ``` + * * - The serialized glyphs are delimited with `[` and `]`. * - Glyphs are separated with `|` * - Each glyph starts with glyph name, or glyph index if @@ -316,12 +427,28 @@ _hb_buffer_serialize_glyphs_text (hb_buffer_t *buffer, * - If #HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS is not set, the #hb_glyph_position_t in the format: * - If both #hb_glyph_position_t.x_offset and #hb_glyph_position_t.y_offset are not 0, `@x_offset,y_offset`. Then, * - `+x_advance`, then `,y_advance` if #hb_glyph_position_t.y_advance is not 0. Then, - * - If #HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS is set, the - * #hb_glyph_extents_t in the format - * `<x_bearing,y_bearing,width,height>` + * - If #HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS is set, the #hb_glyph_extents_t in the format `<x_bearing,y_bearing,width,height>` * * ## json - * TODO. + * A machine-readable, structured format. + * The serialized glyphs will look something like: + * + * ``` + * [{"g":"uni0651","cl":0,"dx":518,"dy":0,"ax":0,"ay":0}, + * {"g":"uni0628","cl":0,"dx":0,"dy":0,"ax":1897,"ay":0}] + * ``` + * + * Each glyph is a JSON object, with the following properties: + * - `g`: the glyph name or glyph index if + * #HB_BUFFER_SERIALIZE_FLAG_NO_GLYPH_NAMES flag is set. + * - `cl`: #hb_glyph_info_t.cluster if + * #HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS is not set. + * - `dx`,`dy`,`ax`,`ay`: #hb_glyph_position_t.x_offset, #hb_glyph_position_t.y_offset, + * #hb_glyph_position_t.x_advance and #hb_glyph_position_t.y_advance + * respectively, if #HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS is not set. + * - `xb`,`yb`,`w`,`h`: #hb_glyph_extents_t.x_bearing, #hb_glyph_extents_t.y_bearing, + * #hb_glyph_extents_t.width and #hb_glyph_extents_t.height respectively if + * #HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS is set. * * Return value: * The number of serialized items. @@ -330,16 +457,17 @@ _hb_buffer_serialize_glyphs_text (hb_buffer_t *buffer, **/ unsigned int hb_buffer_serialize_glyphs (hb_buffer_t *buffer, - unsigned int start, - unsigned int end, - char *buf, - unsigned int buf_size, - unsigned int *buf_consumed, - hb_font_t *font, - hb_buffer_serialize_format_t format, - hb_buffer_serialize_flags_t flags) + unsigned int start, + unsigned int end, + char *buf, + unsigned int buf_size, + unsigned int *buf_consumed, + hb_font_t *font, + hb_buffer_serialize_format_t format, + hb_buffer_serialize_flags_t flags) { - assert (start <= end && end <= buffer->len); + end = hb_clamp (end, start, buffer->len); + start = hb_min (start, end); unsigned int sconsumed; if (!buf_consumed) @@ -348,8 +476,7 @@ hb_buffer_serialize_glyphs (hb_buffer_t *buffer, if (buf_size) *buf = '\0'; - assert ((!buffer->len && (buffer->content_type == HB_BUFFER_CONTENT_TYPE_INVALID)) || - (buffer->content_type == HB_BUFFER_CONTENT_TYPE_GLYPHS)); + buffer->assert_glyphs (); if (!buffer->have_positions) flags |= HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS; @@ -364,13 +491,13 @@ hb_buffer_serialize_glyphs (hb_buffer_t *buffer, { case HB_BUFFER_SERIALIZE_FORMAT_TEXT: return _hb_buffer_serialize_glyphs_text (buffer, start, end, - buf, buf_size, buf_consumed, - font, flags); + buf, buf_size, buf_consumed, + font, flags); case HB_BUFFER_SERIALIZE_FORMAT_JSON: return _hb_buffer_serialize_glyphs_json (buffer, start, end, - buf, buf_size, buf_consumed, - font, flags); + buf, buf_size, buf_consumed, + font, flags); default: case HB_BUFFER_SERIALIZE_FORMAT_INVALID: @@ -379,6 +506,182 @@ hb_buffer_serialize_glyphs (hb_buffer_t *buffer, } } +/** + * hb_buffer_serialize_unicode: + * @buffer: an #hb_buffer_t buffer. + * @start: the first item in @buffer to serialize. + * @end: the last item in @buffer to serialize. + * @buf: (out) (array length=buf_size) (element-type uint8_t): output string to + * write serialized buffer into. + * @buf_size: the size of @buf. + * @buf_consumed: (out) (allow-none): if not %NULL, will be set to the number of byes written into @buf. + * @format: the #hb_buffer_serialize_format_t to use for formatting the output. + * + * Serializes @buffer into a textual representation of its content, + * when the buffer contains Unicode codepoints (i.e., before shaping). This is + * useful for showing the contents of the buffer, for example during debugging. + * There are currently two supported serialization formats: + * + * ## text + * A human-readable, plain text format. + * The serialized codepoints will look something like: + * + * ``` + *  <U+0651=0|U+0628=1> + * ``` + * + * - Glyphs are separated with `|` + * - Unicode codepoints are expressed as zero-padded four (or more) + * digit hexadecimal numbers preceded by `U+` + * - If #HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS is not set, the cluster + * will be indicated with a `=` then #hb_glyph_info_t.cluster. + * + * ## json + * A machine-readable, structured format. + * The serialized codepoints will be a list of objects with the following + * properties: + * - `u`: the Unicode codepoint as a decimal integer + * - `cl`: #hb_glyph_info_t.cluster if + * #HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS is not set. + * + * For example: + * + * ``` + * [{u:1617,cl:0},{u:1576,cl:1}] + * ``` + * + * Return value: + * The number of serialized items. + * + * Since: 2.7.3 + **/ +unsigned int +hb_buffer_serialize_unicode (hb_buffer_t *buffer, + unsigned int start, + unsigned int end, + char *buf, + unsigned int buf_size, + unsigned int *buf_consumed, + hb_buffer_serialize_format_t format, + hb_buffer_serialize_flags_t flags) +{ + end = hb_clamp (end, start, buffer->len); + start = hb_min (start, end); + + unsigned int sconsumed; + if (!buf_consumed) + buf_consumed = &sconsumed; + *buf_consumed = 0; + if (buf_size) + *buf = '\0'; + + buffer->assert_unicode (); + + if (unlikely (start == end)) + return 0; + + switch (format) + { + case HB_BUFFER_SERIALIZE_FORMAT_TEXT: + return _hb_buffer_serialize_unicode_text (buffer, start, end, + buf, buf_size, buf_consumed, flags); + + case HB_BUFFER_SERIALIZE_FORMAT_JSON: + return _hb_buffer_serialize_unicode_json (buffer, start, end, + buf, buf_size, buf_consumed, flags); + + default: + case HB_BUFFER_SERIALIZE_FORMAT_INVALID: + return 0; + + } +} + +static unsigned int +_hb_buffer_serialize_invalid (hb_buffer_t *buffer, + unsigned int start, + unsigned int end, + char *buf, + unsigned int buf_size, + unsigned int *buf_consumed, + hb_buffer_serialize_format_t format, + hb_buffer_serialize_flags_t flags) +{ + assert (!buffer->len); + + unsigned int sconsumed; + if (!buf_consumed) + buf_consumed = &sconsumed; + if (buf_size < 3) + return 0; + if (format == HB_BUFFER_SERIALIZE_FORMAT_JSON) { + *buf++ = '['; + *buf++ = ']'; + *buf = '\0'; + } else if (format == HB_BUFFER_SERIALIZE_FORMAT_TEXT) { + *buf++ = '!'; + *buf++ = '!'; + *buf = '\0'; + } + *buf_consumed = 2; + return 0; +} + +/** + * hb_buffer_serialize: + * @buffer: an #hb_buffer_t buffer. + * @start: the first item in @buffer to serialize. + * @end: the last item in @buffer to serialize. + * @buf: (out) (array length=buf_size) (element-type uint8_t): output string to + * write serialized buffer into. + * @buf_size: the size of @buf. + * @buf_consumed: (out) (allow-none): if not %NULL, will be set to the number of byes written into @buf. + * @font: (allow-none): the #hb_font_t used to shape this buffer, needed to + * read glyph names and extents. If %NULL, and empty font will be used. + * @format: the #hb_buffer_serialize_format_t to use for formatting the output. + * @flags: the #hb_buffer_serialize_flags_t that control what glyph properties + * to serialize. + * + * Serializes @buffer into a textual representation of its content, whether + * Unicode codepoints or glyph identifiers and positioning information. This is + * useful for showing the contents of the buffer, for example during debugging. + * See the documentation of hb_buffer_serialize_unicode() and + * hb_buffer_serialize_glyphs() for a description of the output format. + * + * Return value: + * The number of serialized items. + * + * Since: 2.7.3 + **/ +unsigned int +hb_buffer_serialize (hb_buffer_t *buffer, + unsigned int start, + unsigned int end, + char *buf, + unsigned int buf_size, + unsigned int *buf_consumed, + hb_font_t *font, + hb_buffer_serialize_format_t format, + hb_buffer_serialize_flags_t flags) +{ + switch (buffer->content_type) + { + + case HB_BUFFER_CONTENT_TYPE_GLYPHS: + return hb_buffer_serialize_glyphs (buffer, start, end, buf, buf_size, + buf_consumed, font, format, flags); + + case HB_BUFFER_CONTENT_TYPE_UNICODE: + return hb_buffer_serialize_unicode (buffer, start, end, buf, buf_size, + buf_consumed, format, flags); + + case HB_BUFFER_CONTENT_TYPE_INVALID: + default: + return _hb_buffer_serialize_invalid (buffer, start, end, buf, buf_size, + buf_consumed, format, flags); + } +} + static bool parse_int (const char *pp, const char *end, int32_t *pv) { @@ -403,6 +706,18 @@ parse_uint (const char *pp, const char *end, uint32_t *pv) return true; } +static bool +parse_hex (const char *pp, const char *end, uint32_t *pv) +{ + unsigned int v; + const char *p = pp; + if (unlikely (!hb_parse_uint (&p, end, &v, true/* whole buffer */, 16))) + return false; + + *pv = v; + return true; +} + #include "hb-buffer-deserialize-json.hh" #include "hb-buffer-deserialize-text.hh" @@ -423,19 +738,25 @@ parse_uint (const char *pp, const char *end, uint32_t *pv) **/ hb_bool_t hb_buffer_deserialize_glyphs (hb_buffer_t *buffer, - const char *buf, - int buf_len, /* -1 means nul-terminated */ - const char **end_ptr, /* May be NULL */ - hb_font_t *font, /* May be NULL */ - hb_buffer_serialize_format_t format) + const char *buf, + int buf_len, /* -1 means nul-terminated */ + const char **end_ptr, /* May be NULL */ + hb_font_t *font, /* May be NULL */ + hb_buffer_serialize_format_t format) { const char *end; if (!end_ptr) end_ptr = &end; *end_ptr = buf; - assert ((!buffer->len && (buffer->content_type == HB_BUFFER_CONTENT_TYPE_INVALID)) || - (buffer->content_type == HB_BUFFER_CONTENT_TYPE_GLYPHS)); + buffer->assert_glyphs (); + + if (unlikely (hb_object_is_immutable (buffer))) + { + if (end_ptr) + *end_ptr = buf; + return false; + } if (buf_len == -1) buf_len = strlen (buf); @@ -454,14 +775,82 @@ hb_buffer_deserialize_glyphs (hb_buffer_t *buffer, switch (format) { case HB_BUFFER_SERIALIZE_FORMAT_TEXT: - return _hb_buffer_deserialize_glyphs_text (buffer, - buf, buf_len, end_ptr, - font); + return _hb_buffer_deserialize_text (buffer, + buf, buf_len, end_ptr, + font); + + case HB_BUFFER_SERIALIZE_FORMAT_JSON: + return _hb_buffer_deserialize_json (buffer, + buf, buf_len, end_ptr, + font); + + default: + case HB_BUFFER_SERIALIZE_FORMAT_INVALID: + return false; + + } +} + + +/** + * hb_buffer_deserialize_unicode: + * @buffer: an #hb_buffer_t buffer. + * @buf: (array length=buf_len): + * @buf_len: + * @end_ptr: (out): + * @format: + * + * + * + * Return value: + * + * Since: 2.7.3 + **/ +hb_bool_t +hb_buffer_deserialize_unicode (hb_buffer_t *buffer, + const char *buf, + int buf_len, /* -1 means nul-terminated */ + const char **end_ptr, /* May be NULL */ + hb_buffer_serialize_format_t format) +{ + const char *end; + if (!end_ptr) + end_ptr = &end; + *end_ptr = buf; + + buffer->assert_unicode (); + + if (unlikely (hb_object_is_immutable (buffer))) + { + if (end_ptr) + *end_ptr = buf; + return false; + } + + if (buf_len == -1) + buf_len = strlen (buf); + + if (!buf_len) + { + *end_ptr = buf; + return false; + } + + hb_buffer_set_content_type (buffer, HB_BUFFER_CONTENT_TYPE_UNICODE); + + hb_font_t* font = hb_font_get_empty (); + + switch (format) + { + case HB_BUFFER_SERIALIZE_FORMAT_TEXT: + return _hb_buffer_deserialize_text (buffer, + buf, buf_len, end_ptr, + font); case HB_BUFFER_SERIALIZE_FORMAT_JSON: - return _hb_buffer_deserialize_glyphs_json (buffer, - buf, buf_len, end_ptr, - font); + return _hb_buffer_deserialize_json (buffer, + buf, buf_len, end_ptr, + font); default: case HB_BUFFER_SERIALIZE_FORMAT_INVALID: diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.cc index 4fadbb78d23..1458cda128a 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.cc @@ -50,7 +50,7 @@ * Checks the equality of two #hb_segment_properties_t's. * * Return value: - * %true if all properties of @a equal those of @b, false otherwise. + * %true if all properties of @a equal those of @b, %false otherwise. * * Since: 0.9.7 **/ @@ -617,8 +617,7 @@ hb_buffer_t::unsafe_to_break_from_outbuffer (unsigned int start, unsigned int en void hb_buffer_t::guess_segment_properties () { - assert ((content_type == HB_BUFFER_CONTENT_TYPE_UNICODE) || - (!len && (content_type == HB_BUFFER_CONTENT_TYPE_INVALID))); + assert_unicode (); /* If script is set to INVALID, guess from buffer contents */ if (props.script == HB_SCRIPT_INVALID) { @@ -1405,6 +1404,25 @@ hb_buffer_get_glyph_positions (hb_buffer_t *buffer, } /** + * hb_buffer_has_positions: + * @buffer: an #hb_buffer_t. + * + * Returns whether @buffer has glyph position data. + * A buffer gains position data when hb_buffer_get_glyph_positions() is called on it, + * and cleared of position data when hb_buffer_clear_contents() is called. + * + * Return value: + * %true if the @buffer has position array, %false otherwise. + * + * Since: 2.7.3 + **/ +HB_EXTERN hb_bool_t +hb_buffer_has_positions (hb_buffer_t *buffer) +{ + return buffer->have_positions; +} + +/** * hb_glyph_info_get_glyph_flags: * @info: a #hb_glyph_info_t. * @@ -1513,8 +1531,7 @@ hb_buffer_add_utf (hb_buffer_t *buffer, typedef typename utf_t::codepoint_t T; const hb_codepoint_t replacement = buffer->replacement; - assert ((buffer->content_type == HB_BUFFER_CONTENT_TYPE_UNICODE) || - (!buffer->len && (buffer->content_type == HB_BUFFER_CONTENT_TYPE_INVALID))); + buffer->assert_unicode (); if (unlikely (hb_object_is_immutable (buffer))) return; @@ -1834,8 +1851,8 @@ void hb_buffer_normalize_glyphs (hb_buffer_t *buffer) { assert (buffer->have_positions); - assert ((buffer->content_type == HB_BUFFER_CONTENT_TYPE_GLYPHS) || - (!buffer->len && (buffer->content_type == HB_BUFFER_CONTENT_TYPE_INVALID))); + + buffer->assert_glyphs (); bool backward = HB_DIRECTION_IS_BACKWARD (buffer->props.direction); diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.h index 2f581f3c735..932531a8cb2 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.h +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.h @@ -59,8 +59,7 @@ HB_BEGIN_DECLS * The #hb_glyph_info_t is the structure that holds information about the * glyphs and their relation to input text. */ -typedef struct hb_glyph_info_t -{ +typedef struct hb_glyph_info_t { hb_codepoint_t codepoint; /*< private >*/ hb_mask_t mask; @@ -447,6 +446,9 @@ HB_EXTERN hb_glyph_position_t * hb_buffer_get_glyph_positions (hb_buffer_t *buffer, unsigned int *length); +HB_EXTERN hb_bool_t +hb_buffer_has_positions (hb_buffer_t *buffer); + HB_EXTERN void hb_buffer_normalize_glyphs (hb_buffer_t *buffer); @@ -518,6 +520,27 @@ hb_buffer_serialize_glyphs (hb_buffer_t *buffer, hb_buffer_serialize_format_t format, hb_buffer_serialize_flags_t flags); +HB_EXTERN unsigned int +hb_buffer_serialize_unicode (hb_buffer_t *buffer, + unsigned int start, + unsigned int end, + char *buf, + unsigned int buf_size, + unsigned int *buf_consumed, + hb_buffer_serialize_format_t format, + hb_buffer_serialize_flags_t flags); + +HB_EXTERN unsigned int +hb_buffer_serialize (hb_buffer_t *buffer, + unsigned int start, + unsigned int end, + char *buf, + unsigned int buf_size, + unsigned int *buf_consumed, + hb_font_t *font, + hb_buffer_serialize_format_t format, + hb_buffer_serialize_flags_t flags); + HB_EXTERN hb_bool_t hb_buffer_deserialize_glyphs (hb_buffer_t *buffer, const char *buf, @@ -526,6 +549,14 @@ hb_buffer_deserialize_glyphs (hb_buffer_t *buffer, hb_font_t *font, hb_buffer_serialize_format_t format); +HB_EXTERN hb_bool_t +hb_buffer_deserialize_unicode (hb_buffer_t *buffer, + const char *buf, + int buf_len, + const char **end_ptr, + hb_buffer_serialize_format_t format); + + /* * Compare buffers diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.hh index 3420ba434ae..9cad5206e23 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.hh @@ -35,20 +35,20 @@ #ifndef HB_BUFFER_MAX_LEN_FACTOR -#define HB_BUFFER_MAX_LEN_FACTOR 32 +#define HB_BUFFER_MAX_LEN_FACTOR 64 #endif #ifndef HB_BUFFER_MAX_LEN_MIN -#define HB_BUFFER_MAX_LEN_MIN 8192 +#define HB_BUFFER_MAX_LEN_MIN 16384 #endif #ifndef HB_BUFFER_MAX_LEN_DEFAULT #define HB_BUFFER_MAX_LEN_DEFAULT 0x3FFFFFFF /* Shaping more than a billion chars? Let us know! */ #endif #ifndef HB_BUFFER_MAX_OPS_FACTOR -#define HB_BUFFER_MAX_OPS_FACTOR 64 +#define HB_BUFFER_MAX_OPS_FACTOR 1024 #endif #ifndef HB_BUFFER_MAX_OPS_MIN -#define HB_BUFFER_MAX_OPS_MIN 1024 +#define HB_BUFFER_MAX_OPS_MIN 16384 #endif #ifndef HB_BUFFER_MAX_OPS_DEFAULT #define HB_BUFFER_MAX_OPS_DEFAULT 0x1FFFFFFF /* Shaping more than a billion operations? Let us know! */ @@ -339,6 +339,39 @@ struct hb_buffer_t bool ensure_inplace (unsigned int size) { return likely (!size || size < allocated); } + void assert_glyphs () + { + assert ((content_type == HB_BUFFER_CONTENT_TYPE_GLYPHS) || + (!len && (content_type == HB_BUFFER_CONTENT_TYPE_INVALID))); + } + void assert_unicode () + { + assert ((content_type == HB_BUFFER_CONTENT_TYPE_UNICODE) || + (!len && (content_type == HB_BUFFER_CONTENT_TYPE_INVALID))); + } + bool ensure_glyphs () + { + if (unlikely (content_type != HB_BUFFER_CONTENT_TYPE_GLYPHS)) + { + if (content_type != HB_BUFFER_CONTENT_TYPE_INVALID) + return false; + assert (len == 0); + content_type = HB_BUFFER_CONTENT_TYPE_GLYPHS; + } + return true; + } + bool ensure_unicode () + { + if (unlikely (content_type != HB_BUFFER_CONTENT_TYPE_UNICODE)) + { + if (content_type != HB_BUFFER_CONTENT_TYPE_INVALID) + return false; + assert (len == 0); + content_type = HB_BUFFER_CONTENT_TYPE_UNICODE; + } + return true; + } + HB_INTERNAL bool make_room_for (unsigned int num_in, unsigned int num_out); HB_INTERNAL bool shift_forward (unsigned int count); diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc index 5acfa78431a..af8f4a20726 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc @@ -448,7 +448,12 @@ hb_script_from_iso15924_tag (hb_tag_t tag) case HB_TAG('Q','a','a','c'): return HB_SCRIPT_COPTIC; /* Script variants from https://unicode.org/iso15924/ */ + case HB_TAG('A','r','a','n'): return HB_SCRIPT_ARABIC; case HB_TAG('C','y','r','s'): return HB_SCRIPT_CYRILLIC; + case HB_TAG('G','e','o','k'): return HB_SCRIPT_GEORGIAN; + case HB_TAG('H','a','n','s'): return HB_SCRIPT_HAN; + case HB_TAG('H','a','n','t'): return HB_SCRIPT_HAN; + case HB_TAG('J','a','m','o'): return HB_SCRIPT_HANGUL; case HB_TAG('L','a','t','f'): return HB_SCRIPT_LATIN; case HB_TAG('L','a','t','g'): return HB_SCRIPT_LATIN; case HB_TAG('S','y','r','e'): return HB_SCRIPT_SYRIAC; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-directwrite.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-directwrite.cc index f2fce073e05..92c956c0328 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-directwrite.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-directwrite.cc @@ -33,6 +33,15 @@ #include "hb-directwrite.h" +/** + * SECTION:hb-directwrite + * @title: hb-directwrite + * @short_description: DirectWrite integration + * @include: hb-directwrite.h + * + * Functions for using HarfBuzz with DirectWrite fonts. + **/ + /* Declare object creator for dynamic support of DWRITE */ typedef HRESULT (* WINAPI t_DWriteCreateFactory)( DWRITE_FACTORY_TYPE factoryType, diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc index 7bde50df5ba..848c4ff9c4a 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc @@ -41,8 +41,10 @@ * @short_description: Font face objects * @include: hb.h * - * Font face is objects represent a single face in a font family. - * More exactly, a font face represents a single face in a binary font file. + * A font face is an object that represents a single face from within a + * font family. + * + * More precisely, a font face represents a single face in a binary font file. * Font faces are typically built from a binary blob and a face index. * Font faces are used to create fonts. **/ @@ -52,7 +54,7 @@ * hb_face_count: * @blob: a blob. * - * Get number of faces in a blob. + * Fetches the number of faces in a blob. * * Return value: Number of faces in @blob * @@ -96,13 +98,19 @@ DEFINE_NULL_INSTANCE (hb_face_t) = /** * hb_face_create_for_tables: - * @reference_table_func: (closure user_data) (destroy destroy) (scope notified): - * @user_data: - * @destroy: - * + * @reference_table_func: (closure user_data) (destroy destroy) (scope notified): Table-referencing function + * @user_data: A pointer to the user data + * @destroy: (optional): A callback to call when @data is not needed anymore * + * Variant of hb_face_create(), built for those cases where it is more + * convenient to provide data for individual tables instead of the whole font + * data. With the caveat that hb_face_get_table_tags() does not currently work + * with faces created this way. + * + * Creates a new face object from the specified @user_data and @reference_table_func, + * with the @destroy callback. * - * Return value: (transfer full) + * Return value: (transfer full): The new face object * * Since: 0.9.2 **/ @@ -182,12 +190,15 @@ _hb_face_for_data_reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void /** * hb_face_create: (Xconstructor) - * @blob: - * @index: - * + * @blob: #hb_blob_t to work upon + * @index: The index of the face within @blob * + * Constructs a new face object from the specified blob and + * a face index into that blob. This is used for blobs of + * file formats such as Dfont and TTC that can contain more + * than one face. * - * Return value: (transfer full): + * Return value: (transfer full): The new face object * * Since: 0.9.2 **/ @@ -222,9 +233,9 @@ hb_face_create (hb_blob_t *blob, /** * hb_face_get_empty: * + * Fetches the singleton empty face object. * - * - * Return value: (transfer full) + * Return value: (transfer full) The empty face object * * Since: 0.9.2 **/ @@ -237,11 +248,11 @@ hb_face_get_empty () /** * hb_face_reference: (skip) - * @face: a face. - * + * @face: A face object * + * Increases the reference count on a face object. * - * Return value: + * Return value: The @face object * * Since: 0.9.2 **/ @@ -253,9 +264,11 @@ hb_face_reference (hb_face_t *face) /** * hb_face_destroy: (skip) - * @face: a face. - * - * + * @face: A face object + * + * Decreases the reference count on a face object. When the + * reference count reaches zero, the face is destroyed, + * freeing all memory. * * Since: 0.9.2 **/ @@ -283,15 +296,15 @@ hb_face_destroy (hb_face_t *face) /** * hb_face_set_user_data: (skip) - * @face: a face. - * @key: - * @data: - * @destroy: - * @replace: - * + * @face: A face object + * @key: The user-data key to set + * @data: A pointer to the user data + * @destroy: (optional): A callback to call when @data is not needed anymore + * @replace: Whether to replace an existing data with the same key * + * Attaches a user-data key/data pair to the given face object. * - * Return value: + * Return value: %true if success, false otherwise * * Since: 0.9.2 **/ @@ -307,12 +320,13 @@ hb_face_set_user_data (hb_face_t *face, /** * hb_face_get_user_data: (skip) - * @face: a face. - * @key: + * @face: A face object + * @key: The user-data key to query * + * Fetches the user data associated with the specified key, + * attached to the specified face object. * - * - * Return value: (transfer none): + * Return value: (transfer none): A pointer to the user data * * Since: 0.9.2 **/ @@ -325,9 +339,9 @@ hb_face_get_user_data (const hb_face_t *face, /** * hb_face_make_immutable: - * @face: a face. - * + * @face: A face object * + * Makes the given face object immutable. * * Since: 0.9.2 **/ @@ -342,11 +356,11 @@ hb_face_make_immutable (hb_face_t *face) /** * hb_face_is_immutable: - * @face: a face. + * @face: A face object * + * Tests whether the given face object is immutable. * - * - * Return value: + * Return value: True is @face is immutable, false otherwise * * Since: 0.9.2 **/ @@ -359,12 +373,13 @@ hb_face_is_immutable (const hb_face_t *face) /** * hb_face_reference_table: - * @face: a face. - * @tag: - * + * @face: A face object + * @tag: The #hb_tag_t of the table to query * + * Fetches a reference to the specified table within + * the specified face. * - * Return value: (transfer full): + * Return value: (transfer full): A pointer to the @tag table within @face * * Since: 0.9.2 **/ @@ -380,11 +395,13 @@ hb_face_reference_table (const hb_face_t *face, /** * hb_face_reference_blob: - * @face: a face. - * + * @face: A face object * + * Fetches a pointer to the binary blob that contains the + * specified face. Returns an empty blob if referencing face data is not + * possible. * - * Return value: (transfer full): + * Return value: (transfer full): A pointer to the blob for @face * * Since: 0.9.2 **/ @@ -396,10 +413,13 @@ hb_face_reference_blob (hb_face_t *face) /** * hb_face_set_index: - * @face: a face. - * @index: + * @face: A face object + * @index: The index to assign * + * Assigns the specified face-index to @face. Fails if the + * face is immutable. * + * <note>Note: face indices within a collection are zero-based.</note> * * Since: 0.9.2 **/ @@ -415,11 +435,13 @@ hb_face_set_index (hb_face_t *face, /** * hb_face_get_index: - * @face: a face. + * @face: A face object * + * Fetches the face-index corresponding to the given face. * + * <note>Note: face indices within a collection are zero-based.</note> * - * Return value: + * Return value: The index of @face. * * Since: 0.9.2 **/ @@ -431,10 +453,10 @@ hb_face_get_index (const hb_face_t *face) /** * hb_face_set_upem: - * @face: a face. - * @upem: - * + * @face: A face object + * @upem: The units-per-em value to assign * + * Sets the units-per-em (upem) for a face object to the specified value. * * Since: 0.9.2 **/ @@ -450,11 +472,11 @@ hb_face_set_upem (hb_face_t *face, /** * hb_face_get_upem: - * @face: a face. - * + * @face: A face object * + * Fetches the units-per-em (upem) value of the specified face object. * - * Return value: + * Return value: The upem value of @face * * Since: 0.9.2 **/ @@ -466,10 +488,10 @@ hb_face_get_upem (const hb_face_t *face) /** * hb_face_set_glyph_count: - * @face: a face. - * @glyph_count: - * + * @face: A face object + * @glyph_count: The glyph-count value to assign * + * Sets the glyph count for a face object to the specified value. * * Since: 0.9.7 **/ @@ -485,11 +507,11 @@ hb_face_set_glyph_count (hb_face_t *face, /** * hb_face_get_glyph_count: - * @face: a face. - * + * @face: A face object * + * Fetches the glyph-count value of the specified face object. * - * Return value: + * Return value: The glyph-count value of @face * * Since: 0.9.7 **/ @@ -501,14 +523,16 @@ hb_face_get_glyph_count (const hb_face_t *face) /** * hb_face_get_table_tags: - * @face: a face. - * @start_offset: index of first tag to return. - * @table_count: input length of @table_tags array, output number of items written. - * @table_tags: array to write tags into. + * @face: A face object + * @start_offset: The index of first table tag to retrieve + * @table_count: (inout): Input = the maximum number of table tags to return; + * Output = the actual number of table tags returned (may be zero) + * @table_tags: (out) (array length=table_count): The array of table tags found * - * Retrieves table tags for a face, if possible. + * Fetches a list of all table tags for a face, if possible. The list returned will + * begin at the offset provided * - * Return value: total number of tables, or 0 if not possible to list. + * Return value: Total number of tables, or zero if it is not possible to list * * Since: 1.6.0 **/ @@ -542,8 +566,11 @@ hb_face_get_table_tags (const hb_face_t *face, #ifndef HB_NO_FACE_COLLECT_UNICODES /** * hb_face_collect_unicodes: - * @face: font face. - * @out: set to add Unicode characters covered by @face to. + * @face: A face object + * @out: The set to add Unicode characters to + * + * Collects all of the Unicode characters covered by @face and adds + * them to the #hb_set_t set @out. * * Since: 1.9.0 */ @@ -555,10 +582,11 @@ hb_face_collect_unicodes (hb_face_t *face, } /** * hb_face_collect_variation_selectors: - * @face: font face. - * @out: set to add Variation Selector characters covered by @face to. - * + * @face: A face object + * @out: The set to add Variation Selector characters to * + * Collects all Unicode "Variation Selector" characters covered by @face and adds + * them to the #hb_set_t set @out. * * Since: 1.9.0 */ @@ -570,10 +598,12 @@ hb_face_collect_variation_selectors (hb_face_t *face, } /** * hb_face_collect_variation_unicodes: - * @face: font face. - * @out: set to add Unicode characters for @variation_selector covered by @face to. - * + * @face: A face object + * @variation_selector: The Variation Selector to query + * @out: The set to add Unicode characters to * + * Collects all Unicode characters for @variation_selector covered by @face and adds + * them to the #hb_set_t set @out. * * Since: 1.9.0 */ @@ -708,6 +738,9 @@ hb_face_builder_create () /** * hb_face_builder_add_table: + * @face: A face object created with hb_face_builder_create() + * @tag: The #hb_tag_t of the table to add + * @blob: The blob containing the table data to add * * Add table for @tag with data provided by @blob to the face. @face must * be created using hb_face_builder_create(). diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.h index e8ff090d55f..3b18f7eef9b 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.h +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-face.h @@ -46,6 +46,12 @@ hb_face_count (hb_blob_t *blob); * hb_face_t */ +/** + * hb_face_t: + * + * Data type for holding font faces. + * + **/ typedef struct hb_face_t hb_face_t; HB_EXTERN hb_face_t * diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.h index e1a5719f1dd..5c6d5689721 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.h +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font.h @@ -82,8 +82,7 @@ hb_font_funcs_is_immutable (hb_font_funcs_t *ffuncs); /* font and glyph extents */ /* Note that typically ascender is positive and descender negative in coordinate systems that grow up. */ -typedef struct hb_font_extents_t -{ +typedef struct hb_font_extents_t { hb_position_t ascender; /* typographic ascender. */ hb_position_t descender; /* typographic descender. */ hb_position_t line_gap; /* suggested line spacing gap. */ @@ -100,8 +99,7 @@ typedef struct hb_font_extents_t } hb_font_extents_t; /* Note that height is negative in coordinate systems that grow up. */ -typedef struct hb_glyph_extents_t -{ +typedef struct hb_glyph_extents_t { hb_position_t x_bearing; /* left side of glyph from origin. */ hb_position_t y_bearing; /* top side of glyph from origin. */ hb_position_t width; /* distance from left to right side. */ diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gdi.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gdi.cc index f6306ef89fa..3a67cef1601 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gdi.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gdi.cc @@ -28,6 +28,16 @@ #include "hb-gdi.h" + +/** + * SECTION:hb-gdi + * @title: hb-gdi + * @short_description: GDI integration + * @include: hb-gdi.h + * + * Functions for using HarfBuzz with GDI fonts. + **/ + static hb_blob_t * _hb_gdi_reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data) { diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-enums.cc.tmpl b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-enums.cc.tmpl index 2ffd1c9d7bb..87a11dd407e 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-enums.cc.tmpl +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-enums.cc.tmpl @@ -43,7 +43,7 @@ /*** END file-header ***/ /*** BEGIN file-production ***/ -/* enumerations from "@filename@" */ +/* enumerations from "@basename@" */ /*** END file-production ***/ /*** BEGIN file-tail ***/ diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-null.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-null.hh index 9853939b077..d09f858cde3 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-null.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-null.hh @@ -177,6 +177,7 @@ struct hb_nonnull_ptr_t T * get () const { return v ? v : const_cast<T *> (&Null (T)); } T * get_raw () const { return v; } + private: T *v; }; 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 50558cf8d3d..99634b76f05 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 @@ -433,8 +433,6 @@ struct UnsizedArrayOf { return hb_array (arrayZ, len); } hb_array_t<const Type> as_array (unsigned int len) const { return hb_array (arrayZ, len); } - operator hb_array_t< Type> () { return as_array (); } - operator hb_array_t<const Type> () const { return as_array (); } template <typename T> Type &lsearch (unsigned int len, const T &x, Type ¬_found = Crap (Type)) diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color.h index 63ef20a1a08..4f37a4386ff 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color.h +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color.h @@ -100,8 +100,7 @@ hb_ot_color_has_layers (hb_face_t *face); * * Since: 2.1.0 **/ -typedef struct hb_ot_color_layer_t -{ +typedef struct hb_ot_color_layer_t { hb_codepoint_t glyph; unsigned int color_index; } hb_ot_color_layer_t; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-deprecated.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-deprecated.h index bc72f8a7016..2e75deef2d6 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-deprecated.h +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-deprecated.h @@ -82,8 +82,7 @@ hb_ot_tag_from_language (hb_language_t language); * Since: 1.4.2 * Deprecated: 2.2.0 */ -typedef struct hb_ot_var_axis_t -{ +typedef struct hb_ot_var_axis_t { hb_tag_t tag; hb_ot_name_id_t name_id; float min_value; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc index a1dc88603a2..fae7b5b65af 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc @@ -306,6 +306,9 @@ _hb_ot_get_font_funcs () /** * hb_ot_font_set_funcs: + * @font: #hb_font_t to work upon + * + * Sets the font functions to use when working with @font. * * Since: 0.9.28 **/ 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 02fe14fa062..4df0d942ceb 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 @@ -379,12 +379,20 @@ struct Axis const BaseCoord **coord) const { const BaseScript &base_script = (this+baseScriptList).get_base_script (script_tag); - if (!base_script.has_data ()) return false; + if (!base_script.has_data ()) + { + *coord = nullptr; + return false; + } if (likely (coord)) { unsigned int tag_index = 0; - (this+baseTagList).bfind (baseline_tag, &tag_index); + if (!(this+baseTagList).bfind (baseline_tag, &tag_index)) + { + *coord = nullptr; + return false; + } *coord = &base_script.get_base_coord (tag_index); } @@ -398,7 +406,11 @@ struct Axis const BaseCoord **max_coord) const { const BaseScript &base_script = (this+baseScriptList).get_base_script (script_tag); - if (!base_script.has_data ()) return false; + if (!base_script.has_data ()) + { + *min_coord = *max_coord = nullptr; + return false; + } base_script.get_min_max (language_tag).get_min_max (feature_tag, min_coord, max_coord); 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 3140dd6328d..6ab950a322f 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 @@ -2537,7 +2537,10 @@ struct VariationStore for (unsigned i = 0; i < inner_maps.length; i++) inner_maps[i].fini (); - return_trace (bool (varstore_prime->dataSets)); + + return_trace ( + !c->serializer->in_error() + && varstore_prime->dataSets); } unsigned int get_region_index_count (unsigned int ivs) const 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 03a578cec08..cb95e6dcd56 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 @@ -1859,7 +1859,7 @@ struct ContextFormat2 const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? c->plan->gsub_lookups : c->plan->gpos_lookups; bool ret = true; - unsigned non_zero_index = 0, index = 0; + int non_zero_index = 0, index = 0; for (const hb_pair_t<unsigned, const OffsetTo<RuleSet>&> _ : + hb_enumerate (ruleSet) | hb_filter (klass_map, hb_first)) { @@ -3378,7 +3378,11 @@ struct GSUBGPOS this->accels = (hb_ot_layout_lookup_accelerator_t *) calloc (this->lookup_count, sizeof (hb_ot_layout_lookup_accelerator_t)); if (unlikely (!this->accels)) + { this->lookup_count = 0; + this->table.destroy (); + this->table = hb_blob_get_empty (); + } for (unsigned int i = 0; i < this->lookup_count; i++) this->accels[i].init (table->get_lookup (i)); 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 46408bb9d3c..f25f0f9e23e 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 @@ -76,7 +76,7 @@ * Tests whether a face includes any kerning data in the 'kern' table. * Does NOT test for kerning lookups in the GPOS table. * - * Return value: true if data found, false otherwise + * Return value: %true if data found, false otherwise * **/ bool @@ -92,7 +92,7 @@ hb_ot_layout_has_kerning (hb_face_t *face) * Tests whether a face includes any state-machine kerning in the 'kern' table. * Does NOT examine the GPOS table. * - * Return value: true if data found, false otherwise + * Return value: %true if data found, false otherwise * **/ bool @@ -112,7 +112,7 @@ hb_ot_layout_has_machine_kerning (hb_face_t *face) * * Does NOT examine the GPOS table. * - * Return value: true is data found, false otherwise + * Return value: %true is data found, false otherwise * **/ bool @@ -268,7 +268,7 @@ _hb_ot_layout_set_glyph_props (hb_font_t *font, * * Tests whether a face has any glyph classes defined in its GDEF table. * - * Return value: true if data found, false otherwise + * Return value: %true if data found, false otherwise * **/ hb_bool_t @@ -444,7 +444,7 @@ hb_ot_layout_table_get_script_tags (hb_face_t *face, * Fetches the index if a given script tag in the specified face's GSUB table * or GPOS table. * - * Return value: true if the script is found, false otherwise + * Return value: %true if the script is found, false otherwise * **/ hb_bool_t @@ -598,7 +598,7 @@ hb_ot_layout_table_get_feature_tags (hb_face_t *face, * Fetches the index for a given feature tag in the specified face's GSUB table * or GPOS table. * - * Return value: true if the feature is found, false otherwise + * Return value: %true if the feature is found, false otherwise **/ bool hb_ot_layout_table_find_feature (hb_face_t *face, @@ -663,7 +663,7 @@ hb_ot_layout_script_get_language_tags (hb_face_t *face, * Fetches the index of a given language tag in the specified face's GSUB table * or GPOS table, underneath the specified script tag. * - * Return value: true if the language tag is found, false otherwise + * Return value: %true if the language tag is found, false otherwise * * Since: ?? * Deprecated: ?? @@ -697,7 +697,7 @@ hb_ot_layout_script_find_language (hb_face_t *face, * Fetches the index of a given language tag in the specified face's GSUB table * or GPOS table, underneath the specified script index. * - * Return value: true if the language tag is found, false otherwise + * Return value: %true if the language tag is found, false otherwise * * Since: 2.0.0 **/ @@ -739,7 +739,7 @@ hb_ot_layout_script_select_language (hb_face_t *face, * Fetches the index of a requested feature in the given face's GSUB or GPOS table, * underneath the specified script and language. * - * Return value: true if the feature is found, false otherwise + * Return value: %true if the feature is found, false otherwise * **/ hb_bool_t @@ -770,7 +770,7 @@ hb_ot_layout_language_get_required_feature_index (hb_face_t *face, * Fetches the tag of a requested feature index in the given face's GSUB or GPOS table, * underneath the specified script and language. * - * Return value: true if the feature is found, false otherwise + * Return value: %true if the feature is found, false otherwise * * Since: 0.9.30 **/ @@ -877,7 +877,7 @@ hb_ot_layout_language_get_feature_tags (hb_face_t *face, * Fetches the index of a given feature tag in the specified face's GSUB table * or GPOS table, underneath the specified script and language. * - * Return value: true if the feature is found, false otherwise + * Return value: %true if the feature is found, false otherwise * **/ hb_bool_t @@ -1196,7 +1196,7 @@ hb_ot_layout_collect_lookups (hb_face_t *face, * @glyphs_before: (out): Array of glyphs preceding the substitution range * @glyphs_input: (out): Array of input glyphs that would be substituted by the lookup * @glyphs_after: (out): Array of glyphs following the substitution range - * @glyphs_output: (out): Array of glyphs that would be the substitued output of the lookup + * @glyphs_output: (out): Array of glyphs that would be the substituted output of the lookup * * Fetches a list of all glyphs affected by the specified lookup in the * specified face's GSUB table or GPOS table. @@ -1245,7 +1245,7 @@ hb_ot_layout_lookup_collect_glyphs (hb_face_t *face, * @face: #hb_face_t to work upon * @table_tag: HB_OT_TAG_GSUB or HB_OT_TAG_GPOS * @coords: The variation coordinates to query - * @num_coords: The number of variation coorinates + * @num_coords: The number of variation coordinates * @variations_index: (out): The array of feature variations found for the query * * Fetches a list of feature variations in the specified face's GSUB table @@ -1310,7 +1310,7 @@ hb_ot_layout_feature_with_variations_get_lookups (hb_face_t *face, * * Tests whether the specified face includes any GSUB substitutions. * - * Return value: true if data found, false otherwise + * Return value: %true if data found, false otherwise * **/ hb_bool_t @@ -1331,7 +1331,7 @@ hb_ot_layout_has_substitution (hb_face_t *face) * Tests whether a specified lookup in the specified face would * trigger a substitution on the given glyph sequence. * - * Return value: true if a substitution would be triggered, false otherwise + * Return value: %true if a substitution would be triggered, false otherwise * * Since: 0.9.7 **/ @@ -1488,7 +1488,7 @@ hb_ot_layout_lookups_substitute_closure (hb_face_t *face, * hb_ot_layout_has_positioning: * @face: #hb_face_t to work upon * - * Return value: true if the face has GPOS data, false otherwise + * Return value: %true if the face has GPOS data, false otherwise * **/ hb_bool_t @@ -1561,7 +1561,7 @@ hb_ot_layout_position_finish_offsets (hb_font_t *font, hb_buffer_t *buffer) * For more information on this distinction, see the [`size` feature documentation]( * https://docs.microsoft.com/en-us/typography/opentype/spec/features_pt#tag-size). * - * Return value: true if data found, false otherwise + * Return value: %true if data found, false otherwise * * Since: 0.9.10 **/ @@ -1625,7 +1625,7 @@ hb_ot_layout_get_size_params (hb_face_t *face, * Fetches name indices from feature parameters for "Stylistic Set" ('ssXX') or * "Character Variant" ('cvXX') features. * - * Return value: true if data found, false otherwise + * Return value: %true if data found, false otherwise * * Since: 2.0.0 **/ @@ -1881,7 +1881,7 @@ void hb_ot_map_t::substitute (const hb_ot_shape_plan_t *plan, hb_font_t *font, h GSUBProxy proxy (font->face); if (!buffer->message (font, "start table GSUB")) return; apply (proxy, plan, font, buffer); - (void)buffer->message (font, "end table GSUB"); + (void) buffer->message (font, "end table GSUB"); } void hb_ot_map_t::position (const hb_ot_shape_plan_t *plan, hb_font_t *font, hb_buffer_t *buffer) const @@ -1889,7 +1889,7 @@ void hb_ot_map_t::position (const hb_ot_shape_plan_t *plan, hb_font_t *font, hb_ GPOSProxy proxy (font->face); if (!buffer->message (font, "start table GPOS")) return; apply (proxy, plan, font, buffer); - (void)buffer->message (font, "end table GPOS"); + (void) buffer->message (font, "end table GPOS"); } void diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map.hh index 7629a869bd7..5f2afae281b 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map.hh @@ -140,12 +140,12 @@ struct hb_ot_map_t void get_stage_lookups (unsigned int table_index, unsigned int stage, const struct lookup_map_t **plookups, unsigned int *lookup_count) const { - if (unlikely (stage == UINT_MAX)) { + if (unlikely (stage > stages[table_index].length)) + { *plookups = nullptr; *lookup_count = 0; return; } - assert (stage <= stages[table_index].length); unsigned int start = stage ? stages[table_index][stage - 1].last_lookup : 0; unsigned int end = stage < stages[table_index].length ? stages[table_index][stage].last_lookup : lookups[table_index].length; *plookups = end == start ? nullptr : &lookups[table_index][start]; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-metrics.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-metrics.cc index 181ac4d57e4..3065ea2adf3 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-metrics.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-metrics.cc @@ -33,6 +33,15 @@ #include "hb-ot-face.hh" +/** + * SECTION:hb-ot-metrics + * @title: hb-ot-metrics + * @short_description: OpenType Metrics + * @include: hb-ot.h + * + * Functions for fetching metrics from fonts. + **/ + static float _fix_ascender_descender (float value, hb_ot_metrics_tag_t metrics_tag) { diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-name.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-name.h index 3b4ad581c7e..6f3fcd24275 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-name.h +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-name.h @@ -88,8 +88,7 @@ typedef unsigned int hb_ot_name_id_t; * * Since: 2.1.0 **/ -typedef struct hb_ot_name_entry_t -{ +typedef struct hb_ot_name_entry_t { hb_ot_name_id_t name_id; /*< private >*/ hb_var_int_t var; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.cc index 34972f81e26..652ef47040f 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic.cc @@ -1006,11 +1006,14 @@ initial_reordering_indic (const hb_ot_shape_plan_t *plan, hb_font_t *font, hb_buffer_t *buffer) { + if (!buffer->message (font, "start reordering indic initial")) + return; update_consonant_positions_indic (plan, font, buffer); insert_dotted_circles_indic (plan, font, buffer); foreach_syllable (buffer, start, end) initial_reordering_syllable_indic (plan, font->face, buffer, start, end); + (void) buffer->message (font, "end reordering indic initial"); } static void @@ -1485,8 +1488,11 @@ final_reordering_indic (const hb_ot_shape_plan_t *plan, unsigned int count = buffer->len; if (unlikely (!count)) return; - foreach_syllable (buffer, start, end) - final_reordering_syllable_indic (plan, buffer, start, end); + if (buffer->message (font, "start reordering indic final")) { + foreach_syllable (buffer, start, end) + final_reordering_syllable_indic (plan, buffer, start, end); + (void) buffer->message (font, "end reordering indic final"); + } HB_BUFFER_DEALLOCATE_VAR (buffer, indic_category); HB_BUFFER_DEALLOCATE_VAR (buffer, indic_position); diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer.cc index 3da8374899b..d6fcd7c8142 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-khmer.cc @@ -389,11 +389,13 @@ reorder_khmer (const hb_ot_shape_plan_t *plan, hb_font_t *font, hb_buffer_t *buffer) { - insert_dotted_circles_khmer (plan, font, buffer); - - foreach_syllable (buffer, start, end) - reorder_syllable_khmer (plan, font->face, buffer, start, end); + if (buffer->message (font, "start reordering khmer")) { + insert_dotted_circles_khmer (plan, font, buffer); + foreach_syllable (buffer, start, end) + reorder_syllable_khmer (plan, font->face, buffer, start, end); + (void) buffer->message (font, "end reordering khmer"); + } HB_BUFFER_DEALLOCATE_VAR (buffer, khmer_category); } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-machine-index.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-machine-index.hh new file mode 100644 index 00000000000..9ec1f3eb7c7 --- /dev/null +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-machine-index.hh @@ -0,0 +1,69 @@ +/* + * Copyright © 2019,2020 David Corbett + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + */ + +#ifndef HB_OT_SHAPE_COMPLEX_MACHINE_INDEX_HH +#define HB_OT_SHAPE_COMPLEX_MACHINE_INDEX_HH + +#include "hb.hh" + + +template <typename Iter> +struct machine_index_t : + hb_iter_with_fallback_t<machine_index_t<Iter>, + typename Iter::item_t> +{ + machine_index_t (const Iter& it) : it (it) {} + machine_index_t (const machine_index_t& o) : it (o.it) {} + + static constexpr bool is_random_access_iterator = Iter::is_random_access_iterator; + static constexpr bool is_sorted_iterator = Iter::is_sorted_iterator; + + typename Iter::item_t __item__ () const { return *it; } + typename Iter::item_t __item_at__ (unsigned i) const { return it[i]; } + unsigned __len__ () const { return it.len (); } + void __next__ () { ++it; } + void __forward__ (unsigned n) { it += n; } + void __prev__ () { --it; } + void __rewind__ (unsigned n) { it -= n; } + void operator = (unsigned n) + { unsigned index = (*it).first; if (index < n) it += n - index; else if (index > n) it -= index - n; } + void operator = (const machine_index_t& o) { *this = (*o.it).first; } + bool operator == (const machine_index_t& o) const { return (*it).first == (*o.it).first; } + bool operator != (const machine_index_t& o) const { return !(*this == o); } + + private: + Iter it; +}; +struct +{ + template <typename Iter, + hb_requires (hb_is_iterable (Iter))> + machine_index_t<hb_iter_type<Iter>> + operator () (Iter&& it) const + { return machine_index_t<hb_iter_type<Iter>> (hb_iter (it)); } +} +HB_FUNCOBJ (machine_index); + + +#endif /* HB_OT_SHAPE_COMPLEX_MACHINE_INDEX_HH */ diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.cc index fc3490d7168..fe096ef28a2 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-myanmar.cc @@ -97,12 +97,6 @@ collect_features_myanmar (hb_ot_shape_planner_t *plan) map->enable_feature (myanmar_other_features[i], F_MANUAL_ZWJ); } -static void -override_features_myanmar (hb_ot_shape_planner_t *plan) -{ - plan->map.disable_feature (HB_TAG('l','i','g','a')); -} - enum myanmar_syllable_type_t { myanmar_consonant_syllable, @@ -333,10 +327,13 @@ reorder_myanmar (const hb_ot_shape_plan_t *plan, hb_font_t *font, hb_buffer_t *buffer) { - insert_dotted_circles_myanmar (plan, font, buffer); + if (buffer->message (font, "start reordering myanmar")) { + insert_dotted_circles_myanmar (plan, font, buffer); - foreach_syllable (buffer, start, end) - reorder_syllable_myanmar (plan, font->face, buffer, start, end); + foreach_syllable (buffer, start, end) + reorder_syllable_myanmar (plan, font->face, buffer, start, end); + (void) buffer->message (font, "end reordering myanmar"); + } HB_BUFFER_DEALLOCATE_VAR (buffer, myanmar_category); HB_BUFFER_DEALLOCATE_VAR (buffer, myanmar_position); @@ -346,7 +343,7 @@ reorder_myanmar (const hb_ot_shape_plan_t *plan, const hb_ot_complex_shaper_t _hb_ot_complex_shaper_myanmar = { collect_features_myanmar, - override_features_myanmar, + nullptr, /* override_features */ nullptr, /* data_create */ nullptr, /* data_destroy */ nullptr, /* preprocess_text */ diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.hh index 462342c618e..144e7d3a40a 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.hh @@ -32,367 +32,326 @@ #define HB_OT_SHAPE_COMPLEX_USE_MACHINE_HH #include "hb.hh" +#include "hb-ot-shape-complex-machine-index.hh" -#line 38 "hb-ot-shape-complex-use-machine.hh" +#line 39 "hb-ot-shape-complex-use-machine.hh" static const unsigned char _use_syllable_machine_trans_keys[] = { - 12u, 48u, 1u, 15u, 1u, 1u, 12u, 48u, 1u, 1u, 0u, 48u, 21u, 21u, 11u, 48u, - 11u, 48u, 1u, 15u, 1u, 1u, 11u, 48u, 22u, 48u, 23u, 48u, 24u, 47u, 25u, 47u, - 26u, 47u, 45u, 46u, 46u, 46u, 24u, 48u, 24u, 48u, 24u, 48u, 1u, 1u, 24u, 48u, - 23u, 48u, 23u, 48u, 23u, 48u, 22u, 48u, 22u, 48u, 22u, 48u, 22u, 48u, 11u, 48u, - 1u, 48u, 11u, 48u, 13u, 21u, 4u, 4u, 13u, 13u, 11u, 48u, 11u, 48u, 41u, 42u, - 42u, 42u, 11u, 48u, 11u, 48u, 22u, 48u, 23u, 48u, 24u, 47u, 25u, 47u, 26u, 47u, - 45u, 46u, 46u, 46u, 24u, 48u, 24u, 48u, 24u, 48u, 24u, 48u, 23u, 48u, 23u, 48u, - 23u, 48u, 22u, 48u, 22u, 48u, 22u, 48u, 22u, 48u, 11u, 48u, 1u, 48u, 1u, 15u, - 4u, 4u, 13u, 21u, 13u, 13u, 12u, 48u, 1u, 48u, 11u, 48u, 41u, 42u, 42u, 42u, - 21u, 42u, 1u, 5u, 0 + 1u, 1u, 1u, 1u, 0u, 51u, 11u, 48u, 11u, 48u, 1u, 1u, 22u, 48u, 23u, 48u, + 24u, 47u, 25u, 47u, 26u, 47u, 45u, 46u, 46u, 46u, 24u, 48u, 24u, 48u, 24u, 48u, + 1u, 1u, 24u, 48u, 23u, 48u, 23u, 48u, 23u, 48u, 22u, 48u, 22u, 48u, 22u, 48u, + 11u, 48u, 1u, 48u, 13u, 13u, 4u, 4u, 11u, 48u, 41u, 42u, 42u, 42u, 11u, 48u, + 22u, 48u, 23u, 48u, 24u, 47u, 25u, 47u, 26u, 47u, 45u, 46u, 46u, 46u, 24u, 48u, + 24u, 48u, 24u, 48u, 24u, 48u, 23u, 48u, 23u, 48u, 23u, 48u, 22u, 48u, 22u, 48u, + 22u, 48u, 11u, 48u, 1u, 48u, 1u, 1u, 4u, 4u, 13u, 13u, 1u, 48u, 11u, 48u, + 41u, 42u, 42u, 42u, 1u, 5u, 50u, 52u, 49u, 52u, 49u, 51u, 0 }; static const char _use_syllable_machine_key_spans[] = { - 37, 15, 1, 37, 1, 49, 1, 38, - 38, 15, 1, 38, 27, 26, 24, 23, - 22, 2, 1, 25, 25, 25, 1, 25, - 26, 26, 26, 27, 27, 27, 27, 38, - 48, 38, 9, 1, 1, 38, 38, 2, - 1, 38, 38, 27, 26, 24, 23, 22, - 2, 1, 25, 25, 25, 25, 26, 26, - 26, 27, 27, 27, 27, 38, 48, 15, - 1, 9, 1, 37, 48, 38, 2, 1, - 22, 5 + 1, 1, 52, 38, 38, 1, 27, 26, + 24, 23, 22, 2, 1, 25, 25, 25, + 1, 25, 26, 26, 26, 27, 27, 27, + 38, 48, 1, 1, 38, 2, 1, 38, + 27, 26, 24, 23, 22, 2, 1, 25, + 25, 25, 25, 26, 26, 26, 27, 27, + 27, 38, 48, 1, 1, 1, 48, 38, + 2, 1, 5, 3, 4, 3 }; static const short _use_syllable_machine_index_offsets[] = { - 0, 38, 54, 56, 94, 96, 146, 148, - 187, 226, 242, 244, 283, 311, 338, 363, - 387, 410, 413, 415, 441, 467, 493, 495, - 521, 548, 575, 602, 630, 658, 686, 714, - 753, 802, 841, 851, 853, 855, 894, 933, - 936, 938, 977, 1016, 1044, 1071, 1096, 1120, - 1143, 1146, 1148, 1174, 1200, 1226, 1252, 1279, - 1306, 1333, 1361, 1389, 1417, 1445, 1484, 1533, - 1549, 1551, 1561, 1563, 1601, 1650, 1689, 1692, - 1694, 1717 + 0, 2, 4, 57, 96, 135, 137, 165, + 192, 217, 241, 264, 267, 269, 295, 321, + 347, 349, 375, 402, 429, 456, 484, 512, + 540, 579, 628, 630, 632, 671, 674, 676, + 715, 743, 770, 795, 819, 842, 845, 847, + 873, 899, 925, 951, 978, 1005, 1032, 1060, + 1088, 1116, 1155, 1204, 1206, 1208, 1210, 1259, + 1298, 1301, 1303, 1309, 1313, 1318 }; static const char _use_syllable_machine_indicies[] = { - 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 3, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 4, 2, 3, 2, - 6, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, - 6, 5, 5, 5, 6, 5, 7, 5, - 8, 9, 10, 8, 11, 12, 10, 10, - 10, 10, 10, 3, 13, 14, 10, 15, - 8, 8, 16, 17, 10, 10, 18, 19, - 20, 21, 22, 23, 24, 18, 25, 26, - 27, 28, 29, 30, 10, 31, 32, 33, - 10, 34, 35, 36, 37, 38, 39, 40, - 13, 10, 42, 41, 44, 1, 43, 43, - 45, 43, 43, 43, 43, 43, 46, 47, - 48, 49, 50, 51, 52, 53, 47, 54, - 46, 55, 56, 57, 58, 43, 59, 60, - 61, 43, 43, 43, 43, 62, 63, 64, - 65, 1, 43, 44, 1, 43, 43, 45, - 43, 43, 43, 43, 43, 66, 47, 48, - 49, 50, 51, 52, 53, 47, 54, 55, - 55, 56, 57, 58, 43, 59, 60, 61, - 43, 43, 43, 43, 62, 63, 64, 65, - 1, 43, 44, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 67, - 68, 67, 44, 67, 44, 1, 43, 43, - 45, 43, 43, 43, 43, 43, 43, 47, - 48, 49, 50, 51, 52, 53, 47, 54, - 55, 55, 56, 57, 58, 43, 59, 60, - 61, 43, 43, 43, 43, 62, 63, 64, - 65, 1, 43, 47, 48, 49, 50, 51, - 43, 43, 43, 43, 43, 43, 56, 57, - 58, 43, 59, 60, 61, 43, 43, 43, - 43, 48, 63, 64, 65, 69, 43, 48, - 49, 50, 51, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 59, 60, 61, - 43, 43, 43, 43, 43, 63, 64, 65, - 69, 43, 49, 50, 51, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 63, - 64, 65, 43, 50, 51, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 63, - 64, 65, 43, 51, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 63, 64, - 65, 43, 63, 64, 43, 64, 43, 49, - 50, 51, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 59, 60, 61, 43, - 43, 43, 43, 43, 63, 64, 65, 69, - 43, 49, 50, 51, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 60, - 61, 43, 43, 43, 43, 43, 63, 64, - 65, 69, 43, 49, 50, 51, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 61, 43, 43, 43, 43, 43, - 63, 64, 65, 69, 43, 71, 70, 49, - 50, 51, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 63, 64, 65, 69, - 43, 48, 49, 50, 51, 43, 43, 43, - 43, 43, 43, 56, 57, 58, 43, 59, - 60, 61, 43, 43, 43, 43, 48, 63, - 64, 65, 69, 43, 48, 49, 50, 51, - 43, 43, 43, 43, 43, 43, 43, 57, - 58, 43, 59, 60, 61, 43, 43, 43, - 43, 48, 63, 64, 65, 69, 43, 48, - 49, 50, 51, 43, 43, 43, 43, 43, - 43, 43, 43, 58, 43, 59, 60, 61, - 43, 43, 43, 43, 48, 63, 64, 65, - 69, 43, 47, 48, 49, 50, 51, 43, - 53, 47, 43, 43, 43, 56, 57, 58, - 43, 59, 60, 61, 43, 43, 43, 43, - 48, 63, 64, 65, 69, 43, 47, 48, - 49, 50, 51, 43, 72, 47, 43, 43, - 43, 56, 57, 58, 43, 59, 60, 61, - 43, 43, 43, 43, 48, 63, 64, 65, - 69, 43, 47, 48, 49, 50, 51, 43, - 43, 47, 43, 43, 43, 56, 57, 58, - 43, 59, 60, 61, 43, 43, 43, 43, - 48, 63, 64, 65, 69, 43, 47, 48, - 49, 50, 51, 52, 53, 47, 43, 43, - 43, 56, 57, 58, 43, 59, 60, 61, - 43, 43, 43, 43, 48, 63, 64, 65, - 69, 43, 44, 1, 43, 43, 45, 43, - 43, 43, 43, 43, 43, 47, 48, 49, - 50, 51, 52, 53, 47, 54, 43, 55, - 56, 57, 58, 43, 59, 60, 61, 43, - 43, 43, 43, 62, 63, 64, 65, 1, - 43, 44, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 68, - 67, 67, 67, 67, 67, 67, 67, 48, - 49, 50, 51, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 59, 60, 61, - 67, 67, 67, 67, 67, 63, 64, 65, - 69, 67, 44, 1, 43, 43, 45, 43, - 43, 43, 43, 43, 43, 47, 48, 49, - 50, 51, 52, 53, 47, 54, 46, 55, - 56, 57, 58, 43, 59, 60, 61, 43, - 43, 43, 43, 62, 63, 64, 65, 1, - 43, 74, 73, 73, 73, 73, 73, 73, - 73, 75, 73, 11, 76, 74, 73, 44, - 1, 43, 43, 45, 43, 43, 43, 43, - 43, 77, 47, 48, 49, 50, 51, 52, - 53, 47, 54, 46, 55, 56, 57, 58, - 43, 59, 60, 61, 43, 78, 79, 43, - 62, 63, 64, 65, 1, 43, 44, 1, - 43, 43, 45, 43, 43, 43, 43, 43, - 43, 47, 48, 49, 50, 51, 52, 53, - 47, 54, 46, 55, 56, 57, 58, 43, - 59, 60, 61, 43, 78, 79, 43, 62, - 63, 64, 65, 1, 43, 78, 79, 80, - 79, 80, 3, 6, 81, 81, 82, 81, - 81, 81, 81, 81, 83, 18, 19, 20, - 21, 22, 23, 24, 18, 25, 27, 27, - 28, 29, 30, 81, 31, 32, 33, 81, - 81, 81, 81, 37, 38, 39, 40, 6, - 81, 3, 6, 81, 81, 82, 81, 81, - 81, 81, 81, 81, 18, 19, 20, 21, - 22, 23, 24, 18, 25, 27, 27, 28, - 29, 30, 81, 31, 32, 33, 81, 81, - 81, 81, 37, 38, 39, 40, 6, 81, - 18, 19, 20, 21, 22, 81, 81, 81, - 81, 81, 81, 28, 29, 30, 81, 31, - 32, 33, 81, 81, 81, 81, 19, 38, - 39, 40, 84, 81, 19, 20, 21, 22, - 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 31, 32, 33, 81, 81, 81, - 81, 81, 38, 39, 40, 84, 81, 20, - 21, 22, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 38, 39, 40, 81, - 21, 22, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 38, 39, 40, 81, - 22, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 38, 39, 40, 81, 38, - 39, 81, 39, 81, 20, 21, 22, 81, - 81, 81, 81, 81, 81, 81, 81, 81, - 81, 31, 32, 33, 81, 81, 81, 81, - 81, 38, 39, 40, 84, 81, 20, 21, - 22, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 32, 33, 81, 81, - 81, 81, 81, 38, 39, 40, 84, 81, - 20, 21, 22, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 33, - 81, 81, 81, 81, 81, 38, 39, 40, - 84, 81, 20, 21, 22, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 38, - 39, 40, 84, 81, 19, 20, 21, 22, - 81, 81, 81, 81, 81, 81, 28, 29, - 30, 81, 31, 32, 33, 81, 81, 81, - 81, 19, 38, 39, 40, 84, 81, 19, - 20, 21, 22, 81, 81, 81, 81, 81, - 81, 81, 29, 30, 81, 31, 32, 33, - 81, 81, 81, 81, 19, 38, 39, 40, - 84, 81, 19, 20, 21, 22, 81, 81, - 81, 81, 81, 81, 81, 81, 30, 81, - 31, 32, 33, 81, 81, 81, 81, 19, - 38, 39, 40, 84, 81, 18, 19, 20, - 21, 22, 81, 24, 18, 81, 81, 81, - 28, 29, 30, 81, 31, 32, 33, 81, - 81, 81, 81, 19, 38, 39, 40, 84, - 81, 18, 19, 20, 21, 22, 81, 85, - 18, 81, 81, 81, 28, 29, 30, 81, - 31, 32, 33, 81, 81, 81, 81, 19, - 38, 39, 40, 84, 81, 18, 19, 20, - 21, 22, 81, 81, 18, 81, 81, 81, - 28, 29, 30, 81, 31, 32, 33, 81, - 81, 81, 81, 19, 38, 39, 40, 84, - 81, 18, 19, 20, 21, 22, 23, 24, - 18, 81, 81, 81, 28, 29, 30, 81, - 31, 32, 33, 81, 81, 81, 81, 19, - 38, 39, 40, 84, 81, 3, 6, 81, - 81, 82, 81, 81, 81, 81, 81, 81, - 18, 19, 20, 21, 22, 23, 24, 18, - 25, 81, 27, 28, 29, 30, 81, 31, - 32, 33, 81, 81, 81, 81, 37, 38, - 39, 40, 6, 81, 3, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 4, 81, 81, 81, 81, 81, - 81, 81, 19, 20, 21, 22, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, - 31, 32, 33, 81, 81, 81, 81, 81, - 38, 39, 40, 84, 81, 3, 86, 86, - 86, 86, 86, 86, 86, 86, 86, 86, - 86, 86, 86, 4, 86, 87, 81, 14, - 81, 81, 81, 81, 81, 81, 81, 88, - 81, 14, 81, 6, 86, 86, 86, 86, - 86, 86, 86, 86, 86, 86, 86, 86, - 86, 86, 86, 86, 86, 86, 86, 86, - 86, 86, 86, 86, 86, 86, 86, 86, - 86, 86, 86, 6, 86, 86, 86, 6, - 86, 9, 81, 81, 81, 9, 81, 81, - 81, 81, 81, 3, 6, 14, 81, 82, - 81, 81, 81, 81, 81, 81, 18, 19, - 20, 21, 22, 23, 24, 18, 25, 26, - 27, 28, 29, 30, 81, 31, 32, 33, - 81, 34, 35, 81, 37, 38, 39, 40, - 6, 81, 3, 6, 81, 81, 82, 81, - 81, 81, 81, 81, 81, 18, 19, 20, - 21, 22, 23, 24, 18, 25, 26, 27, - 28, 29, 30, 81, 31, 32, 33, 81, - 81, 81, 81, 37, 38, 39, 40, 6, - 81, 34, 35, 81, 35, 81, 78, 80, - 80, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 78, 79, 80, 9, 86, 86, - 86, 9, 86, 0 + 1, 0, 2, 0, 3, 4, 5, 5, + 6, 7, 5, 5, 5, 5, 5, 1, + 8, 9, 5, 5, 5, 5, 10, 11, + 5, 5, 12, 13, 14, 15, 16, 17, + 18, 12, 19, 20, 21, 22, 23, 24, + 5, 25, 26, 27, 5, 28, 29, 30, + 31, 32, 33, 34, 8, 35, 5, 36, + 5, 38, 39, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 40, 41, 42, 43, + 44, 45, 46, 40, 47, 4, 48, 49, + 50, 51, 37, 52, 53, 54, 37, 37, + 37, 37, 55, 56, 57, 58, 39, 37, + 38, 39, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 40, 41, 42, 43, 44, + 45, 46, 40, 47, 48, 48, 49, 50, + 51, 37, 52, 53, 54, 37, 37, 37, + 37, 55, 56, 57, 58, 39, 37, 38, + 59, 40, 41, 42, 43, 44, 37, 37, + 37, 37, 37, 37, 49, 50, 51, 37, + 52, 53, 54, 37, 37, 37, 37, 41, + 56, 57, 58, 60, 37, 41, 42, 43, + 44, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 52, 53, 54, 37, 37, + 37, 37, 37, 56, 57, 58, 60, 37, + 42, 43, 44, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 56, 57, 58, + 37, 43, 44, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 56, 57, 58, + 37, 44, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 56, 57, 58, 37, + 56, 57, 37, 57, 37, 42, 43, 44, + 37, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 52, 53, 54, 37, 37, 37, + 37, 37, 56, 57, 58, 60, 37, 42, + 43, 44, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 53, 54, 37, + 37, 37, 37, 37, 56, 57, 58, 60, + 37, 42, 43, 44, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 37, 37, 37, + 54, 37, 37, 37, 37, 37, 56, 57, + 58, 60, 37, 62, 61, 42, 43, 44, + 37, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 56, 57, 58, 60, 37, 41, + 42, 43, 44, 37, 37, 37, 37, 37, + 37, 49, 50, 51, 37, 52, 53, 54, + 37, 37, 37, 37, 41, 56, 57, 58, + 60, 37, 41, 42, 43, 44, 37, 37, + 37, 37, 37, 37, 37, 50, 51, 37, + 52, 53, 54, 37, 37, 37, 37, 41, + 56, 57, 58, 60, 37, 41, 42, 43, + 44, 37, 37, 37, 37, 37, 37, 37, + 37, 51, 37, 52, 53, 54, 37, 37, + 37, 37, 41, 56, 57, 58, 60, 37, + 40, 41, 42, 43, 44, 37, 46, 40, + 37, 37, 37, 49, 50, 51, 37, 52, + 53, 54, 37, 37, 37, 37, 41, 56, + 57, 58, 60, 37, 40, 41, 42, 43, + 44, 37, 37, 40, 37, 37, 37, 49, + 50, 51, 37, 52, 53, 54, 37, 37, + 37, 37, 41, 56, 57, 58, 60, 37, + 40, 41, 42, 43, 44, 45, 46, 40, + 37, 37, 37, 49, 50, 51, 37, 52, + 53, 54, 37, 37, 37, 37, 41, 56, + 57, 58, 60, 37, 38, 39, 37, 37, + 37, 37, 37, 37, 37, 37, 37, 40, + 41, 42, 43, 44, 45, 46, 40, 47, + 37, 48, 49, 50, 51, 37, 52, 53, + 54, 37, 37, 37, 37, 55, 56, 57, + 58, 39, 37, 38, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, + 59, 41, 42, 43, 44, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 52, + 53, 54, 59, 59, 59, 59, 59, 56, + 57, 58, 60, 59, 64, 63, 6, 65, + 38, 39, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 40, 41, 42, 43, 44, + 45, 46, 40, 47, 4, 48, 49, 50, + 51, 37, 52, 53, 54, 37, 11, 66, + 37, 55, 56, 57, 58, 39, 37, 11, + 66, 67, 66, 67, 1, 69, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 12, + 13, 14, 15, 16, 17, 18, 12, 19, + 21, 21, 22, 23, 24, 68, 25, 26, + 27, 68, 68, 68, 68, 31, 32, 33, + 34, 69, 68, 12, 13, 14, 15, 16, + 68, 68, 68, 68, 68, 68, 22, 23, + 24, 68, 25, 26, 27, 68, 68, 68, + 68, 13, 32, 33, 34, 70, 68, 13, + 14, 15, 16, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 25, 26, 27, + 68, 68, 68, 68, 68, 32, 33, 34, + 70, 68, 14, 15, 16, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 32, + 33, 34, 68, 15, 16, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 32, + 33, 34, 68, 16, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 32, 33, + 34, 68, 32, 33, 68, 33, 68, 14, + 15, 16, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 25, 26, 27, 68, + 68, 68, 68, 68, 32, 33, 34, 70, + 68, 14, 15, 16, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 26, + 27, 68, 68, 68, 68, 68, 32, 33, + 34, 70, 68, 14, 15, 16, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 27, 68, 68, 68, 68, 68, + 32, 33, 34, 70, 68, 14, 15, 16, + 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 32, 33, 34, 70, 68, 13, + 14, 15, 16, 68, 68, 68, 68, 68, + 68, 22, 23, 24, 68, 25, 26, 27, + 68, 68, 68, 68, 13, 32, 33, 34, + 70, 68, 13, 14, 15, 16, 68, 68, + 68, 68, 68, 68, 68, 23, 24, 68, + 25, 26, 27, 68, 68, 68, 68, 13, + 32, 33, 34, 70, 68, 13, 14, 15, + 16, 68, 68, 68, 68, 68, 68, 68, + 68, 24, 68, 25, 26, 27, 68, 68, + 68, 68, 13, 32, 33, 34, 70, 68, + 12, 13, 14, 15, 16, 68, 18, 12, + 68, 68, 68, 22, 23, 24, 68, 25, + 26, 27, 68, 68, 68, 68, 13, 32, + 33, 34, 70, 68, 12, 13, 14, 15, + 16, 68, 68, 12, 68, 68, 68, 22, + 23, 24, 68, 25, 26, 27, 68, 68, + 68, 68, 13, 32, 33, 34, 70, 68, + 12, 13, 14, 15, 16, 17, 18, 12, + 68, 68, 68, 22, 23, 24, 68, 25, + 26, 27, 68, 68, 68, 68, 13, 32, + 33, 34, 70, 68, 1, 69, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 12, + 13, 14, 15, 16, 17, 18, 12, 19, + 68, 21, 22, 23, 24, 68, 25, 26, + 27, 68, 68, 68, 68, 31, 32, 33, + 34, 69, 68, 1, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, + 68, 13, 14, 15, 16, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 25, + 26, 27, 68, 68, 68, 68, 68, 32, + 33, 34, 70, 68, 1, 71, 72, 68, + 9, 68, 4, 68, 68, 68, 4, 68, + 68, 68, 68, 68, 1, 69, 9, 68, + 68, 68, 68, 68, 68, 68, 68, 12, + 13, 14, 15, 16, 17, 18, 12, 19, + 20, 21, 22, 23, 24, 68, 25, 26, + 27, 68, 28, 29, 68, 31, 32, 33, + 34, 69, 68, 1, 69, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 12, 13, + 14, 15, 16, 17, 18, 12, 19, 20, + 21, 22, 23, 24, 68, 25, 26, 27, + 68, 68, 68, 68, 31, 32, 33, 34, + 69, 68, 28, 29, 68, 29, 68, 4, + 71, 71, 71, 4, 71, 74, 73, 35, + 73, 35, 74, 73, 74, 73, 35, 73, + 36, 73, 0 }; static const char _use_syllable_machine_trans_targs[] = { - 5, 9, 5, 41, 2, 5, 1, 53, - 6, 7, 5, 34, 37, 63, 64, 67, - 68, 72, 43, 44, 45, 46, 47, 57, - 58, 60, 69, 61, 54, 55, 56, 50, - 51, 52, 70, 71, 73, 62, 48, 49, - 5, 5, 5, 5, 8, 0, 33, 12, - 13, 14, 15, 16, 27, 28, 30, 31, - 24, 25, 26, 19, 20, 21, 32, 17, - 18, 5, 11, 5, 10, 22, 5, 23, - 29, 5, 35, 36, 5, 38, 39, 40, - 5, 5, 3, 42, 4, 59, 5, 65, - 66 + 2, 31, 42, 2, 3, 2, 26, 28, + 51, 52, 54, 29, 32, 33, 34, 35, + 36, 46, 47, 48, 55, 49, 43, 44, + 45, 39, 40, 41, 56, 57, 58, 50, + 37, 38, 2, 59, 61, 2, 4, 5, + 6, 7, 8, 9, 10, 21, 22, 23, + 24, 18, 19, 20, 13, 14, 15, 25, + 11, 12, 2, 2, 16, 2, 17, 2, + 27, 2, 30, 2, 2, 0, 1, 2, + 53, 2, 60 }; static const char _use_syllable_machine_trans_actions[] = { - 1, 0, 2, 3, 0, 4, 0, 5, - 0, 5, 8, 0, 5, 9, 0, 9, - 3, 0, 5, 5, 0, 0, 0, 5, - 5, 5, 3, 3, 5, 5, 5, 5, - 5, 5, 0, 0, 0, 3, 0, 0, - 10, 11, 12, 13, 5, 0, 5, 0, - 0, 0, 0, 0, 0, 0, 0, 5, + 1, 2, 2, 5, 0, 6, 0, 0, + 0, 0, 2, 0, 2, 2, 0, 0, + 0, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 0, 0, 0, 2, + 0, 0, 7, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 14, 5, 15, 0, 0, 16, 0, - 0, 17, 0, 0, 18, 5, 0, 0, - 19, 20, 0, 3, 0, 5, 21, 0, - 0 + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 9, 10, 0, 11, 0, 12, + 0, 13, 0, 14, 15, 0, 0, 16, + 0, 17, 0 }; static const char _use_syllable_machine_to_state_actions[] = { - 0, 0, 0, 0, 0, 6, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0 + 0, 0, 0, 0, 0, 0 }; static const char _use_syllable_machine_from_state_actions[] = { - 0, 0, 0, 0, 0, 7, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0 + 0, 0, 0, 0, 0, 0 }; static const short _use_syllable_machine_eof_trans[] = { - 1, 3, 3, 6, 6, 0, 42, 44, - 44, 68, 68, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 71, 44, - 44, 44, 44, 44, 44, 44, 44, 44, - 68, 44, 74, 77, 74, 44, 44, 81, - 81, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 87, - 82, 82, 82, 87, 82, 82, 82, 82, - 81, 87 + 1, 1, 0, 38, 38, 60, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, + 62, 38, 38, 38, 38, 38, 38, 38, + 38, 60, 64, 66, 38, 68, 68, 69, + 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 72, 69, 69, 69, 69, + 69, 69, 72, 74, 74, 74 }; -static const int use_syllable_machine_start = 5; -static const int use_syllable_machine_first_final = 5; +static const int use_syllable_machine_start = 2; +static const int use_syllable_machine_first_final = 2; static const int use_syllable_machine_error = -1; -static const int use_syllable_machine_en_main = 5; +static const int use_syllable_machine_en_main = 2; -#line 38 "hb-ot-shape-complex-use-machine.rl" +#line 39 "hb-ot-shape-complex-use-machine.rl" -#line 162 "hb-ot-shape-complex-use-machine.rl" +#line 154 "hb-ot-shape-complex-use-machine.rl" #define found_syllable(syllable_type) \ HB_STMT_START { \ - if (0) fprintf (stderr, "syllable %d..%d %s\n", ts, te, #syllable_type); \ - for (unsigned int i = ts; i < te; i++) \ + if (0) fprintf (stderr, "syllable %d..%d %s\n", (*ts).second.first, (*te).second.first, #syllable_type); \ + for (unsigned i = (*ts).second.first; i < (*te).second.first; ++i) \ info[i].syllable() = (syllable_serial << 4) | use_##syllable_type; \ syllable_serial++; \ if (unlikely (syllable_serial == 16)) syllable_serial = 1; \ } HB_STMT_END +static bool +not_standard_default_ignorable (const hb_glyph_info_t &i) +{ return !(i.use_category() == USE_O && _hb_glyph_info_is_default_ignorable (&i)); } + static void find_syllables_use (hb_buffer_t *buffer) { - unsigned int p, pe, eof, ts, te, act; - int cs; hb_glyph_info_t *info = buffer->info; + auto p = + + hb_iter (info, buffer->len) + | hb_enumerate + | hb_filter ([] (const hb_glyph_info_t &i) { return not_standard_default_ignorable (i); }, + hb_second) + | hb_filter ([&] (const hb_pair_t<unsigned, const hb_glyph_info_t &> p) + { + if (p.second.use_category() == USE_ZWNJ) + for (unsigned i = p.first + 1; i < buffer->len; ++i) + if (not_standard_default_ignorable (info[i])) + return !_hb_glyph_info_is_unicode_mark (&info[i]); + return true; + }) + | hb_enumerate + | machine_index + ; + auto pe = p + p.len (); + auto eof = +pe; + auto ts = +p; + auto te = +p; + unsigned int act HB_UNUSED; + int cs; -#line 396 "hb-ot-shape-complex-use-machine.hh" +#line 355 "hb-ot-shape-complex-use-machine.hh" { cs = use_syllable_machine_start; ts = 0; @@ -400,15 +359,12 @@ find_syllables_use (hb_buffer_t *buffer) act = 0; } -#line 182 "hb-ot-shape-complex-use-machine.rl" - +#line 198 "hb-ot-shape-complex-use-machine.rl" - p = 0; - pe = eof = buffer->len; unsigned int syllable_serial = 1; -#line 412 "hb-ot-shape-complex-use-machine.hh" +#line 368 "hb-ot-shape-complex-use-machine.hh" { int _slen; int _trans; @@ -418,20 +374,20 @@ find_syllables_use (hb_buffer_t *buffer) goto _test_eof; _resume: switch ( _use_syllable_machine_from_state_actions[cs] ) { - case 7: + case 4: #line 1 "NONE" {ts = p;} break; -#line 426 "hb-ot-shape-complex-use-machine.hh" +#line 382 "hb-ot-shape-complex-use-machine.hh" } _keys = _use_syllable_machine_trans_keys + (cs<<1); _inds = _use_syllable_machine_indicies + _use_syllable_machine_index_offsets[cs]; _slen = _use_syllable_machine_key_spans[cs]; - _trans = _inds[ _slen > 0 && _keys[0] <=( info[p].use_category()) && - ( info[p].use_category()) <= _keys[1] ? - ( info[p].use_category()) - _keys[0] : _slen ]; + _trans = _inds[ _slen > 0 && _keys[0] <=( (*p).second.second.use_category()) && + ( (*p).second.second.use_category()) <= _keys[1] ? + ( (*p).second.second.use_category()) - _keys[0] : _slen ]; _eof_trans: cs = _use_syllable_machine_trans_targs[_trans]; @@ -440,104 +396,76 @@ _eof_trans: goto _again; switch ( _use_syllable_machine_trans_actions[_trans] ) { - case 5: + case 2: #line 1 "NONE" {te = p+1;} break; - case 12: -#line 150 "hb-ot-shape-complex-use-machine.rl" + case 5: +#line 141 "hb-ot-shape-complex-use-machine.rl" {te = p+1;{ found_syllable (independent_cluster); }} break; - case 14: -#line 153 "hb-ot-shape-complex-use-machine.rl" + case 9: +#line 144 "hb-ot-shape-complex-use-machine.rl" {te = p+1;{ found_syllable (standard_cluster); }} break; - case 10: -#line 157 "hb-ot-shape-complex-use-machine.rl" + case 7: +#line 149 "hb-ot-shape-complex-use-machine.rl" {te = p+1;{ found_syllable (broken_cluster); }} break; - case 8: -#line 158 "hb-ot-shape-complex-use-machine.rl" - {te = p+1;{ found_syllable (non_cluster); }} - break; - case 11: + case 6: #line 150 "hb-ot-shape-complex-use-machine.rl" - {te = p;p--;{ found_syllable (independent_cluster); }} + {te = p+1;{ found_syllable (non_cluster); }} break; - case 15: -#line 151 "hb-ot-shape-complex-use-machine.rl" + case 10: +#line 142 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (virama_terminated_cluster); }} break; - case 16: -#line 152 "hb-ot-shape-complex-use-machine.rl" + case 11: +#line 143 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (sakot_terminated_cluster); }} break; - case 13: -#line 153 "hb-ot-shape-complex-use-machine.rl" + case 8: +#line 144 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (standard_cluster); }} break; - case 18: -#line 154 "hb-ot-shape-complex-use-machine.rl" + case 13: +#line 145 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (number_joiner_terminated_cluster); }} break; - case 17: -#line 155 "hb-ot-shape-complex-use-machine.rl" + case 12: +#line 146 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (numeral_cluster); }} break; - case 19: -#line 156 "hb-ot-shape-complex-use-machine.rl" + case 14: +#line 147 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (symbol_cluster); }} break; - case 20: -#line 157 "hb-ot-shape-complex-use-machine.rl" + case 17: +#line 148 "hb-ot-shape-complex-use-machine.rl" + {te = p;p--;{ found_syllable (hieroglyph_cluster); }} + break; + case 15: +#line 149 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (broken_cluster); }} break; - case 21: -#line 158 "hb-ot-shape-complex-use-machine.rl" + case 16: +#line 150 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (non_cluster); }} break; case 1: -#line 153 "hb-ot-shape-complex-use-machine.rl" - {{p = ((te))-1;}{ found_syllable (standard_cluster); }} - break; - case 4: -#line 157 "hb-ot-shape-complex-use-machine.rl" +#line 149 "hb-ot-shape-complex-use-machine.rl" {{p = ((te))-1;}{ found_syllable (broken_cluster); }} break; - case 2: -#line 1 "NONE" - { switch( act ) { - case 8: - {{p = ((te))-1;} found_syllable (broken_cluster); } - break; - case 9: - {{p = ((te))-1;} found_syllable (non_cluster); } - break; - } - } - break; - case 3: -#line 1 "NONE" - {te = p+1;} -#line 157 "hb-ot-shape-complex-use-machine.rl" - {act = 8;} - break; - case 9: -#line 1 "NONE" - {te = p+1;} -#line 158 "hb-ot-shape-complex-use-machine.rl" - {act = 9;} - break; -#line 532 "hb-ot-shape-complex-use-machine.hh" +#line 460 "hb-ot-shape-complex-use-machine.hh" } _again: switch ( _use_syllable_machine_to_state_actions[cs] ) { - case 6: + case 3: #line 1 "NONE" {ts = 0;} break; -#line 541 "hb-ot-shape-complex-use-machine.hh" +#line 469 "hb-ot-shape-complex-use-machine.hh" } if ( ++p != pe ) @@ -553,7 +481,7 @@ _again: } -#line 190 "hb-ot-shape-complex-use-machine.rl" +#line 203 "hb-ot-shape-complex-use-machine.rl" } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.rl b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.rl index 9b75b5c6e24..364ba0d1bbc 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.rl +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-machine.rl @@ -30,6 +30,7 @@ #define HB_OT_SHAPE_COMPLEX_USE_MACHINE_HH #include "hb.hh" +#include "hb-ot-shape-complex-machine-index.hh" %%{ machine use_syllable_machine; @@ -44,31 +45,22 @@ O = 0; # OTHER B = 1; # BASE -IND = 3; # BASE_IND N = 4; # BASE_NUM GB = 5; # BASE_OTHER -CGJ = 6; # CGJ -#F = 7; # CONS_FINAL -#FM = 8; # CONS_FINAL_MOD -#M = 9; # CONS_MED -#CM = 10; # CONS_MOD SUB = 11; # CONS_SUB H = 12; # HALANT HN = 13; # HALANT_NUM ZWNJ = 14; # Zero width non-joiner -ZWJ = 15; # Zero width joiner -WJ = 16; # Word joiner -Rsv = 17; # Reserved characters R = 18; # REPHA S = 19; # SYM -#SM = 20; # SYM_MOD -VS = 21; # VARIATION_SELECTOR -#V = 36; # VOWEL -#VM = 40; # VOWEL_MOD CS = 43; # CONS_WITH_STACKER HVM = 44; # HALANT_OR_VOWEL_MODIFIER Sk = 48; # SAKOT +G = 49; # HIEROGLYPH +J = 50; # HIEROGLYPH_JOINER +SB = 51; # HIEROGLYPH_SEGMENT_BEGIN +SE = 52; # HIEROGLYPH_SEGMENT_END FAbv = 24; # CONS_FINAL_ABOVE FBlw = 25; # CONS_FINAL_BELOW @@ -95,16 +87,14 @@ FMPst = 47; # CONS_FINAL_MOD UIPC = Not_Applicable h = H | HVM | Sk; -# Override: Adhoc ZWJ placement. https://github.com/harfbuzz/harfbuzz/issues/542#issuecomment-353169729 -consonant_modifiers = CMAbv* CMBlw* ((ZWJ?.h.ZWJ? B | SUB) VS? CMAbv? CMBlw*)*; -# Override: Allow two MBlw. https://github.com/harfbuzz/harfbuzz/issues/376 -medial_consonants = MPre? MAbv? MBlw?.MBlw? MPst?; +consonant_modifiers = CMAbv* CMBlw* ((h B | SUB) CMAbv? CMBlw*)*; +medial_consonants = MPre? MAbv? MBlw? MPst?; dependent_vowels = VPre* VAbv* VBlw* VPst*; vowel_modifiers = HVM? VMPre* VMAbv* VMBlw* VMPst*; final_consonants = FAbv* FBlw* FPst*; final_modifiers = FMAbv* FMBlw* | FMPst?; -complex_syllable_start = (R | CS)? (B | GB) VS?; +complex_syllable_start = (R | CS)? (B | GB); complex_syllable_middle = consonant_modifiers medial_consonants @@ -117,14 +107,14 @@ complex_syllable_tail = final_consonants final_modifiers ; -number_joiner_terminated_cluster_tail = (HN N VS?)* HN; -numeral_cluster_tail = (HN N VS?)+; +number_joiner_terminated_cluster_tail = (HN N)* HN; +numeral_cluster_tail = (HN N)+; symbol_cluster_tail = SMAbv+ SMBlw* | SMBlw+; virama_terminated_cluster = complex_syllable_start consonant_modifiers - ZWJ?.h.ZWJ? + h ; sakot_terminated_cluster = complex_syllable_start @@ -140,10 +130,11 @@ broken_cluster = (complex_syllable_tail | number_joiner_terminated_cluster_tail | numeral_cluster_tail | symbol_cluster_tail) ; -number_joiner_terminated_cluster = N VS? number_joiner_terminated_cluster_tail; -numeral_cluster = N VS? numeral_cluster_tail?; -symbol_cluster = (S | GB) VS? symbol_cluster_tail?; -independent_cluster = (IND | O | Rsv | WJ) VS?; +number_joiner_terminated_cluster = N number_joiner_terminated_cluster_tail; +numeral_cluster = N numeral_cluster_tail?; +symbol_cluster = (S | GB) symbol_cluster_tail?; +hieroglyph_cluster = SB+ | SB* G SE* (J SE* (G SE*)?)*; +independent_cluster = O; other = any; main := |* @@ -154,6 +145,7 @@ main := |* number_joiner_terminated_cluster => { found_syllable (number_joiner_terminated_cluster); }; numeral_cluster => { found_syllable (numeral_cluster); }; symbol_cluster => { found_syllable (symbol_cluster); }; + hieroglyph_cluster => { found_syllable (hieroglyph_cluster); }; broken_cluster => { found_syllable (broken_cluster); }; other => { found_syllable (non_cluster); }; *|; @@ -163,27 +155,48 @@ main := |* #define found_syllable(syllable_type) \ HB_STMT_START { \ - if (0) fprintf (stderr, "syllable %d..%d %s\n", ts, te, #syllable_type); \ - for (unsigned int i = ts; i < te; i++) \ + if (0) fprintf (stderr, "syllable %d..%d %s\n", (*ts).second.first, (*te).second.first, #syllable_type); \ + for (unsigned i = (*ts).second.first; i < (*te).second.first; ++i) \ info[i].syllable() = (syllable_serial << 4) | use_##syllable_type; \ syllable_serial++; \ if (unlikely (syllable_serial == 16)) syllable_serial = 1; \ } HB_STMT_END +static bool +not_standard_default_ignorable (const hb_glyph_info_t &i) +{ return !(i.use_category() == USE_O && _hb_glyph_info_is_default_ignorable (&i)); } + static void find_syllables_use (hb_buffer_t *buffer) { - unsigned int p, pe, eof, ts, te, act; - int cs; hb_glyph_info_t *info = buffer->info; + auto p = + + hb_iter (info, buffer->len) + | hb_enumerate + | hb_filter ([] (const hb_glyph_info_t &i) { return not_standard_default_ignorable (i); }, + hb_second) + | hb_filter ([&] (const hb_pair_t<unsigned, const hb_glyph_info_t &> p) + { + if (p.second.use_category() == USE_ZWNJ) + for (unsigned i = p.first + 1; i < buffer->len; ++i) + if (not_standard_default_ignorable (info[i])) + return !_hb_glyph_info_is_unicode_mark (&info[i]); + return true; + }) + | hb_enumerate + | machine_index + ; + auto pe = p + p.len (); + auto eof = +pe; + auto ts = +p; + auto te = +p; + unsigned int act HB_UNUSED; + int cs; %%{ write init; - getkey info[p].use_category(); + getkey (*p).second.second.use_category(); }%% - p = 0; - pe = eof = buffer->len; - unsigned int syllable_serial = 1; %%{ write exec; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-table.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-table.cc index aa9c350862f..df3652b18a6 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-table.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use-table.cc @@ -2,7 +2,7 @@ /* * The following table is generated by running: * - * ./gen-use-table.py IndicSyllabicCategory.txt IndicPositionalCategory.txt UnicodeData.txt Blocks.txt + * ./gen-use-table.py IndicSyllabicCategory.txt IndicPositionalCategory.txt UnicodeData.txt ArabicShaping.txt Blocks.txt IndicSyllabicCategory-Additional.txt IndicPositionalCategory-Additional.txt * * on files with these headers: * @@ -10,8 +10,24 @@ * # Date: 2019-07-22, 19:55:00 GMT [KW, RP] * # IndicPositionalCategory-13.0.0.txt * # Date: 2019-07-23, 00:01:00 GMT [KW, RP] + * # ArabicShaping-13.0.0.txt + * # Date: 2020-01-31, 23:55:00 GMT [KW, RP] * # Blocks-13.0.0.txt * # Date: 2019-07-10, 19:06:00 GMT [KW] + * # Override values For Indic_Syllabic_Category + * # Not derivable + * # Initial version based on Unicode 7.0 by Andrew Glass 2014-03-17 + * # Updated for Unicode 10.0 by Andrew Glass 2017-07-25 + * # Updated for Unicode 12.1 by Andrew Glass 2019-05-24 + * # Updated for Unicode 13.0 by Andrew Glass 2020-07-28 + * # Override values For Indic_Positional_Category + * # Not derivable + * # Initial version based on Unicode 7.0 by Andrew Glass 2014-03-17 + * # Updated for Unicode 10.0 by Andrew Glass 2017-07-25 + * # Ammended for Unicode 10.0 by Andrew Glass 2018-09-21 + * # Updated for L2/19-083 by Andrew Glass 2019-05-06 + * # Updated for Unicode 12.1 by Andrew Glass 2019-05-30 + * # Updated for Unicode 13.0 by Andrew Glass 2020-07-28 * UnicodeData.txt does not have a header. */ @@ -24,23 +40,21 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-macros" #define B USE_B /* BASE */ -#define CGJ USE_CGJ /* CGJ */ #define CS USE_CS /* CONS_WITH_STACKER */ +#define G USE_G /* HIEROGLYPH */ #define GB USE_GB /* BASE_OTHER */ #define H USE_H /* HALANT */ #define HN USE_HN /* HALANT_NUM */ #define HVM USE_HVM /* HALANT_OR_VOWEL_MODIFIER */ -#define IND USE_IND /* BASE_IND */ +#define J USE_J /* HIEROGLYPH_JOINER */ #define N USE_N /* BASE_NUM */ #define O USE_O /* OTHER */ #define R USE_R /* REPHA */ -#define Rsv USE_Rsv /* Reserved */ #define S USE_S /* SYM */ +#define SB USE_SB /* HIEROGLYPH_SEGMENT_BEGIN */ +#define SE USE_SE /* HIEROGLYPH_SEGMENT_END */ #define SUB USE_SUB /* CONS_SUB */ #define Sk USE_Sk /* SAKOT */ -#define VS USE_VS /* VARIATION_SELECTOR */ -#define WJ USE_WJ /* Word_Joiner */ -#define ZWJ USE_ZWJ /* ZWJ */ #define ZWNJ USE_ZWNJ /* ZWNJ */ #define CMAbv USE_CMAbv #define CMBlw USE_CMBlw @@ -86,13 +100,31 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* 00C0 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, /* 00D0 */ O, O, O, O, O, O, O, GB, -#define use_offset_0x0348u 80 +#define use_offset_0x0640u 80 - /* Combining Diacritical Marks */ - O, O, O, O, O, O, O, CGJ, + /* Arabic */ -#define use_offset_0x0900u 88 + /* 0640 */ B, O, O, O, O, O, O, O, + +#define use_offset_0x07c8u 88 + + + /* NKo */ + O, O, B, B, B, B, B, B, + /* 07D0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 07E0 */ B, B, B, B, B, B, B, B, B, B, B, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, + /* 07F0 */ VMAbv, VMAbv, VMAbv, VMAbv, O, O, O, O, O, O, B, O, O, VMAbv, O, O, + +#define use_offset_0x0840u 144 + + + /* Mandaic */ + + /* 0840 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 0850 */ B, B, B, B, B, B, B, B, B, CMBlw, CMBlw, CMBlw, O, O, O, O, + +#define use_offset_0x0900u 176 /* Devanagari */ @@ -112,7 +144,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* 0990 */ B, O, O, B, B, B, B, B, B, B, B, B, B, B, B, B, /* 09A0 */ B, B, B, B, B, B, B, B, B, O, B, B, B, B, B, B, /* 09B0 */ B, O, B, O, O, O, B, B, B, B, O, O, CMBlw, B, VPst, VPre, - /* 09C0 */ VPst, VBlw, VBlw, VBlw, VBlw, O, O, VPre, VPre, O, O, VPst, VPst, H, IND, O, + /* 09C0 */ VPst, VBlw, VBlw, VBlw, VBlw, O, O, VPre, VPre, O, O, VPre, VPre, H, O, O, /* 09D0 */ O, O, O, O, O, O, O, VPst, O, O, O, O, B, B, O, B, /* 09E0 */ B, B, VBlw, VBlw, O, O, B, B, B, B, B, B, B, B, B, B, /* 09F0 */ B, B, O, O, O, O, O, O, O, O, O, O, B, O, FMAbv, O, @@ -145,18 +177,18 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* 0B10 */ B, O, O, B, B, B, B, B, B, B, B, B, B, B, B, B, /* 0B20 */ B, B, B, B, B, B, B, B, B, O, B, B, B, B, B, B, /* 0B30 */ B, O, B, B, O, B, B, B, B, B, O, O, CMBlw, B, VPst, VAbv, - /* 0B40 */ VPst, VBlw, VBlw, VBlw, VBlw, O, O, VPre, VPst, O, O, VPst, VPst, H, O, O, + /* 0B40 */ VPst, VBlw, VBlw, VBlw, VBlw, O, O, VPre, VPre, O, O, VPre, VPre, H, O, O, /* 0B50 */ O, O, O, O, O, VAbv, VAbv, VAbv, O, O, O, O, B, B, O, B, /* 0B60 */ B, B, VBlw, VBlw, O, O, B, B, B, B, B, B, B, B, B, B, /* 0B70 */ O, B, O, O, O, O, O, O, O, O, O, O, O, O, O, O, /* Tamil */ - /* 0B80 */ O, O, VMAbv, IND, O, B, B, B, B, B, B, O, O, O, B, B, + /* 0B80 */ O, O, VMAbv, O, O, B, B, B, B, B, B, O, O, O, B, B, /* 0B90 */ B, O, B, B, B, B, O, O, O, B, B, O, B, O, B, B, /* 0BA0 */ O, O, O, B, B, O, O, O, B, B, B, O, O, O, B, B, /* 0BB0 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, VPst, VPst, - /* 0BC0 */ VAbv, VPst, VPst, O, O, O, VPre, VPre, VPre, O, VPst, VPst, VPst, H, O, O, + /* 0BC0 */ VAbv, VPst, VPst, O, O, O, VPre, VPre, VPre, O, VPre, VPre, VPre, H, O, O, /* 0BD0 */ O, O, O, O, O, O, O, VPst, O, O, O, O, O, O, O, O, /* 0BE0 */ O, O, O, O, O, O, B, B, B, B, B, B, B, B, B, B, /* 0BF0 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, @@ -189,10 +221,10 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* 0D10 */ B, O, B, B, B, B, B, B, B, B, B, B, B, B, B, B, /* 0D20 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, /* 0D30 */ B, B, B, B, B, B, B, B, B, B, B, VAbv, VAbv, B, VPst, VPst, - /* 0D40 */ VPst, VPst, VPst, VBlw, VBlw, O, VPre, VPre, VPre, O, VPst, VPst, VPst, H, R, O, - /* 0D50 */ O, O, O, O, IND, IND, IND, VPst, O, O, O, O, O, O, O, B, + /* 0D40 */ VPst, VPst, VPst, VBlw, VBlw, O, VPre, VPre, VPre, O, VPre, VPre, VPre, H, R, O, + /* 0D50 */ O, O, O, O, O, O, O, VPst, O, O, O, O, O, O, O, B, /* 0D60 */ B, B, VBlw, VBlw, O, O, B, B, B, B, B, B, B, B, B, B, - /* 0D70 */ O, O, O, O, O, O, O, O, O, O, IND, IND, IND, IND, IND, IND, + /* 0D70 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, /* Sinhala */ @@ -201,28 +233,30 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* 0DA0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, /* 0DB0 */ B, B, O, B, B, B, B, B, B, B, B, B, O, B, O, O, /* 0DC0 */ B, B, B, B, B, B, B, O, O, O, H, O, O, O, O, VPst, - /* 0DD0 */ VPst, VPst, VAbv, VAbv, VBlw, O, VBlw, O, VPst, VPre, VPst, VPre, VPst, VPst, VPst, VPst, + /* 0DD0 */ VPst, VPst, VAbv, VAbv, VBlw, O, VBlw, O, VPst, VPre, VPre, VPre, VPre, VPre, VPre, VPst, /* 0DE0 */ O, O, O, O, O, O, B, B, B, B, B, B, B, B, B, B, /* 0DF0 */ O, O, VPst, VPst, O, O, O, O, -#define use_offset_0x0f18u 1360 +#define use_offset_0x0f00u 1448 /* Tibetan */ - VBlw, VBlw, O, O, O, O, O, O, + + /* 0F00 */ B, B, O, O, B, B, B, O, O, O, O, O, O, O, O, O, + /* 0F10 */ O, O, O, O, O, O, O, O, VBlw, VBlw, O, O, O, O, O, O, /* 0F20 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, - /* 0F30 */ B, B, B, B, O, FMBlw, O, FMBlw, O, CMAbv, O, O, O, O, VPst, VPre, + /* 0F30 */ B, B, B, B, O, FBlw, O, FBlw, O, CMAbv, O, O, O, O, VPst, VPre, /* 0F40 */ B, B, B, B, B, B, B, B, O, B, B, B, B, B, B, B, /* 0F50 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, /* 0F60 */ B, B, B, B, B, B, B, B, B, B, B, B, B, O, O, O, - /* 0F70 */ O, VBlw, VBlw, VAbv, VBlw, VBlw, VAbv, VAbv, VAbv, VAbv, VBlw, VBlw, VBlw, VBlw, VMAbv, VMPst, - /* 0F80 */ VBlw, VAbv, VMAbv, VMAbv, VBlw, IND, VMAbv, VMAbv, B, B, B, B, B, SUB, SUB, SUB, + /* 0F70 */ O, CMBlw, VBlw, VAbv, VAbv, VBlw, VAbv, VAbv, VAbv, VAbv, VBlw, VBlw, VBlw, VBlw, VMAbv, O, + /* 0F80 */ VBlw, VAbv, VMAbv, VMAbv, VBlw, O, VMAbv, VMAbv, B, B, B, B, B, SUB, SUB, SUB, /* 0F90 */ SUB, SUB, SUB, SUB, SUB, SUB, SUB, SUB, O, SUB, SUB, SUB, SUB, SUB, SUB, SUB, /* 0FA0 */ SUB, SUB, SUB, SUB, SUB, SUB, SUB, SUB, SUB, SUB, SUB, SUB, SUB, SUB, SUB, SUB, /* 0FB0 */ SUB, SUB, SUB, SUB, SUB, SUB, SUB, SUB, SUB, SUB, SUB, SUB, SUB, O, O, O, - /* 0FC0 */ O, O, O, O, O, O, FMBlw, O, + /* 0FC0 */ O, O, O, O, O, O, FBlw, O, -#define use_offset_0x1000u 1536 +#define use_offset_0x1000u 1648 /* Myanmar */ @@ -238,7 +272,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* 1080 */ B, B, MBlw, VPst, VPre, VAbv, VAbv, VMPst, VMPst, VMPst, VMPst, VMPst, VMPst, VMBlw, B, VMPst, /* 1090 */ B, B, B, B, B, B, B, B, B, B, VMPst, VMPst, VPst, VAbv, O, O, -#define use_offset_0x1700u 1696 +#define use_offset_0x1700u 1808 /* Tagalog */ @@ -266,12 +300,27 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* 1780 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, /* 1790 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, /* 17A0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, - /* 17B0 */ B, B, B, B, O, O, VPst, VAbv, VAbv, VAbv, VAbv, VBlw, VBlw, VBlw, VPst, VPst, - /* 17C0 */ VPst, VPre, VPre, VPre, VPst, VPst, VMAbv, VMPst, VPst, VMAbv, VMAbv, FMAbv, FAbv, CMAbv, FMAbv, FMAbv, + /* 17B0 */ B, B, B, B, O, O, VPst, VAbv, VAbv, VAbv, VAbv, VBlw, VBlw, VBlw, VPre, VPre, + /* 17C0 */ VPre, VPre, VPre, VPre, VPre, VPre, VMAbv, VMPst, VPst, VMAbv, VMAbv, FMAbv, FAbv, CMAbv, FMAbv, VMAbv, /* 17D0 */ FMAbv, VAbv, H, FMAbv, O, O, O, O, O, O, O, O, B, FMAbv, O, O, /* 17E0 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O, + /* 17F0 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, -#define use_offset_0x1900u 1936 + /* Mongolian */ + + /* 1800 */ B, O, O, O, O, O, O, B, O, O, B, O, O, O, O, O, + /* 1810 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, + /* 1820 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 1830 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 1840 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 1850 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 1860 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 1870 */ B, B, B, B, B, B, B, B, B, O, O, O, O, O, O, O, + /* 1880 */ GB, GB, GB, GB, GB, CMAbv, CMAbv, B, B, B, B, B, B, B, B, B, + /* 1890 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18A0 */ B, B, B, B, B, B, B, B, B, CMBlw, B, O, O, O, O, O, + +#define use_offset_0x1900u 2240 /* Limbu */ @@ -279,7 +328,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* 1900 */ GB, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, /* 1910 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, O, /* 1920 */ VAbv, VAbv, VBlw, VPst, VPst, VAbv, VAbv, VAbv, VAbv, SUB, SUB, SUB, O, O, O, O, - /* 1930 */ FPst, FPst, VMBlw, FPst, FPst, FPst, FPst, FPst, FPst, FBlw, VAbv, FMBlw, O, O, O, O, + /* 1930 */ FPst, FPst, VMBlw, FPst, FPst, FPst, FPst, FPst, FPst, FBlw, VMAbv, FMBlw, O, O, O, O, /* 1940 */ O, O, O, O, O, O, B, B, B, B, B, B, B, B, B, B, /* Tai Le */ @@ -302,7 +351,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* Buginese */ /* 1A00 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, - /* 1A10 */ B, B, B, B, B, B, B, VAbv, VBlw, VPre, VPst, VAbv, O, O, O, O, + /* 1A10 */ B, B, B, B, B, B, B, VAbv, VAbv, VPre, VPst, VAbv, O, O, O, O, /* Tai Tham */ @@ -311,11 +360,11 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* 1A40 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, /* 1A50 */ B, B, B, B, B, MPre, MBlw, SUB, FAbv, FAbv, MAbv, SUB, SUB, SUB, SUB, O, /* 1A60 */ Sk, VPst, VAbv, VPst, VPst, VAbv, VAbv, VAbv, VAbv, VBlw, VBlw, VAbv, VBlw, VPst, VPre, VPre, - /* 1A70 */ VPre, VPre, VPre, VAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VAbv, FMAbv, FMAbv, O, O, FMBlw, + /* 1A70 */ VPre, VPre, VPre, VAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VAbv, VMAbv, VMAbv, O, O, VMBlw, /* 1A80 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O, /* 1A90 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O, -#define use_offset_0x1b00u 2352 +#define use_offset_0x1b00u 2656 /* Balinese */ @@ -324,7 +373,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* 1B10 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, /* 1B20 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, /* 1B30 */ B, B, B, B, CMAbv, VPst, VAbv, VAbv, VBlw, VBlw, VBlw, VBlw, VAbv, VAbv, VPre, VPre, - /* 1B40 */ VPst, VPst, VAbv, VAbv, H, B, B, B, B, B, B, B, O, O, O, O, + /* 1B40 */ VPre, VPre, VAbv, VAbv, H, B, B, B, B, B, B, B, O, O, O, O, /* 1B50 */ B, B, B, B, B, B, B, B, B, B, O, GB, GB, O, O, GB, /* 1B60 */ O, S, GB, S, S, S, S, S, GB, S, S, SMAbv, SMBlw, SMAbv, SMAbv, SMAbv, /* 1B70 */ SMAbv, SMAbv, SMAbv, SMAbv, O, O, O, O, O, O, O, O, O, O, O, O, @@ -351,51 +400,61 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* 1C30 */ FAbv, FAbv, FAbv, FAbv, VMPre, VMPre, FMAbv, CMBlw, O, O, O, O, O, O, O, O, /* 1C40 */ B, B, B, B, B, B, B, B, B, B, O, O, O, B, B, B, -#define use_offset_0x1cd0u 2688 +#define use_offset_0x1cd0u 2992 /* Vedic Extensions */ /* 1CD0 */ VMAbv, VMAbv, VMAbv, O, VMBlw, VMBlw, VMBlw, VMBlw, VMBlw, VMBlw, VMAbv, VMAbv, VMBlw, VMBlw, VMBlw, VMBlw, /* 1CE0 */ VMAbv, VMPst, VMBlw, VMBlw, VMBlw, VMBlw, VMBlw, VMBlw, VMBlw, O, O, O, O, VMBlw, O, O, - /* 1CF0 */ O, O, IND, IND, VMAbv, CS, CS, VMPst, VMAbv, VMAbv, GB, O, O, O, O, O, + /* 1CF0 */ O, O, O, O, VMAbv, CS, CS, VMPst, VMAbv, VMAbv, GB, O, O, O, O, O, -#define use_offset_0x1df8u 2736 +#define use_offset_0x1df8u 3040 /* Combining Diacritical Marks Supplement */ O, O, O, FMAbv, O, O, O, O, -#define use_offset_0x2008u 2744 +#define use_offset_0x2008u 3048 /* General Punctuation */ - O, O, O, O, ZWNJ, ZWJ, O, O, + O, O, O, O, ZWNJ, O, O, O, /* 2010 */ GB, GB, GB, GB, GB, O, O, O, -#define use_offset_0x2060u 2760 +#define use_offset_0x2070u 3064 - /* 2060 */ WJ, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, /* Superscripts and Subscripts */ /* 2070 */ O, O, O, O, FMPst, O, O, O, O, O, O, O, O, O, O, O, /* 2080 */ O, O, FMPst, FMPst, FMPst, O, O, O, -#define use_offset_0x20f0u 2800 +#define use_offset_0x20f0u 3088 /* Combining Diacritical Marks for Symbols */ /* 20F0 */ VMAbv, O, O, O, O, O, O, O, -#define use_offset_0x25c8u 2808 +#define use_offset_0x25c8u 3096 /* Geometric Shapes */ - O, O, O, O, GB, O, O, O, + O, O, O, O, B, O, O, O, + +#define use_offset_0x2d30u 3104 + -#define use_offset_0xa800u 2816 + /* Tifinagh */ + + /* 2D30 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 2D40 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 2D50 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 2D60 */ B, B, B, B, B, B, B, B, O, O, O, O, O, O, O, B, + /* 2D70 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, H, + +#define use_offset_0xa800u 3184 /* Syloti Nagri */ @@ -445,7 +504,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* A980 */ VMAbv, VMAbv, FAbv, VMPst, B, B, B, B, B, B, B, B, B, B, B, B, /* A990 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, /* A9A0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, - /* A9B0 */ B, B, B, CMAbv, VPst, VPst, VAbv, VAbv, VBlw, VBlw, VPre, VPre, VAbv, MBlw, MBlw, MBlw, + /* A9B0 */ B, B, B, CMAbv, VPst, VPst, VAbv, VAbv, VBlw, VBlw, VPre, VPre, VAbv, MBlw, MPst, MBlw, /* A9C0 */ H, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, /* A9D0 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O, @@ -459,7 +518,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* AA00 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, /* AA10 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, /* AA20 */ B, B, B, B, B, B, B, B, B, VMAbv, VAbv, VAbv, VAbv, VBlw, VAbv, VPre, - /* AA30 */ VPre, VAbv, VBlw, MPst, MPre, MBlw, MBlw, O, O, O, O, O, O, O, O, O, + /* AA30 */ VPre, VAbv, VBlw, MPst, MPre, MAbv, MBlw, O, O, O, O, O, O, O, O, O, /* AA40 */ B, B, B, FAbv, B, B, B, B, B, B, B, B, FAbv, FPst, O, O, /* AA50 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O, @@ -482,7 +541,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* AAE0 */ B, B, B, B, B, B, B, B, B, B, B, VPre, VBlw, VAbv, VPre, VPst, /* AAF0 */ O, O, O, O, O, VMPst, H, O, -#define use_offset_0xabc0u 3576 +#define use_offset_0xabc0u 3944 /* Meetei Mayek */ @@ -492,26 +551,74 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* ABE0 */ B, B, B, VPst, VPst, VAbv, VPst, VPst, VBlw, VPst, VPst, O, VMPst, VBlw, O, O, /* ABF0 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O, -#define use_offset_0xfe00u 3640 - - - /* Variation Selectors */ - - /* FE00 */ VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, - -#define use_offset_0x10a00u 3656 +#define use_offset_0x10a00u 4008 /* Kharoshthi */ - /* 10A00 */ B, VBlw, VBlw, VBlw, O, VAbv, VBlw, O, O, O, O, O, VBlw, VBlw, VMBlw, VMAbv, + /* 10A00 */ B, VBlw, VBlw, VBlw, O, VAbv, VBlw, O, O, O, O, O, VPst, VMBlw, VMBlw, VMAbv, /* 10A10 */ B, B, B, B, O, B, B, B, O, B, B, B, B, B, B, B, /* 10A20 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, /* 10A30 */ B, B, B, B, B, B, O, O, CMAbv, CMBlw, CMBlw, O, O, O, O, H, /* 10A40 */ B, B, B, B, B, B, B, B, B, O, O, O, O, O, O, O, -#define use_offset_0x11000u 3736 +#define use_offset_0x10ac0u 4088 + + + /* Manichaean */ + + /* 10AC0 */ B, B, B, B, B, B, B, B, O, B, B, B, B, B, B, B, + /* 10AD0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 10AE0 */ B, B, B, B, B, CMBlw, CMBlw, O, + +#define use_offset_0x10b80u 4128 + + + /* Psalter Pahlavi */ + + /* 10B80 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 10B90 */ B, B, O, O, O, O, O, O, O, O, O, O, O, O, O, O, + /* 10BA0 */ O, O, O, O, O, O, O, O, O, B, B, B, B, B, B, O, + +#define use_offset_0x10d00u 4176 + + + /* Hanifi Rohingya */ + + /* 10D00 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 10D10 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 10D20 */ B, B, B, B, VMAbv, VMAbv, VMAbv, CMAbv, O, O, O, O, O, O, O, O, + /* 10D30 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O, + +#define use_offset_0x10e80u 4240 + + + /* Yezidi */ + + /* 10E80 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 10E90 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 10EA0 */ B, B, B, B, B, B, B, B, B, B, O, VAbv, VAbv, O, O, O, + /* 10EB0 */ B, B, O, O, O, O, O, O, +#define use_offset_0x10f30u 4296 + + + /* Sogdian */ + + /* 10F30 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 10F40 */ B, B, B, B, B, B, VMBlw, VMBlw, VMBlw, VMBlw, VMBlw, VMBlw, VMBlw, VMBlw, VMBlw, VMBlw, + /* 10F50 */ VMBlw, B, B, B, B, O, O, O, + +#define use_offset_0x10fb0u 4336 + + + /* Chorasmian */ + + /* 10FB0 */ B, O, B, B, B, B, B, O, B, B, B, B, B, B, B, B, + /* 10FC0 */ O, B, B, B, B, O, O, O, O, B, B, B, O, O, O, O, + /* 10FD0 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, + /* 10FE0 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, + /* 10FF0 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, /* Brahmi */ @@ -531,7 +638,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* 110A0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, /* 110B0 */ VPst, VPre, VPst, VBlw, VBlw, VAbv, VAbv, VPst, VPst, H, CMBlw, O, O, O, O, O, -#define use_offset_0x11100u 3928 +#define use_offset_0x11100u 4608 /* Chakma */ @@ -539,7 +646,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* 11100 */ VMAbv, VMAbv, VMAbv, B, B, B, B, B, B, B, B, B, B, B, B, B, /* 11110 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, /* 11120 */ B, B, B, B, B, B, B, VBlw, VBlw, VBlw, VAbv, VAbv, VPre, VBlw, VAbv, VAbv, - /* 11130 */ VBlw, VAbv, VAbv, H, CMBlw, O, B, B, B, B, B, B, B, B, B, B, + /* 11130 */ VBlw, VAbv, VAbv, H, CMAbv, O, B, B, B, B, B, B, B, B, B, B, /* 11140 */ O, O, O, O, B, VPst, VPst, B, O, O, O, O, O, O, O, O, /* Mahajani */ @@ -555,7 +662,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* 111A0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, /* 111B0 */ B, B, B, VPst, VPre, VPst, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VAbv, VAbv, VAbv, VAbv, /* 111C0 */ H, B, R, R, O, O, O, O, GB, FMBlw, CMBlw, VAbv, VBlw, O, VPre, VMAbv, - /* 111D0 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O, + /* 111D0 */ B, B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, /* Sinhala Archaic Numbers */ @@ -569,7 +676,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* 11220 */ B, B, B, B, B, B, B, B, B, B, B, B, VPst, VPst, VPst, VBlw, /* 11230 */ VAbv, VAbv, VAbv, VAbv, VMAbv, H, CMAbv, CMAbv, O, O, O, O, O, O, VMAbv, O, -#define use_offset_0x11280u 4248 +#define use_offset_0x11280u 4928 /* Multani */ @@ -592,12 +699,12 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* 11310 */ B, O, O, B, B, B, B, B, B, B, B, B, B, B, B, B, /* 11320 */ B, B, B, B, B, B, B, B, B, O, B, B, B, B, B, B, /* 11330 */ B, O, B, B, O, B, B, B, B, B, O, CMBlw, CMBlw, B, VPst, VPst, - /* 11340 */ VAbv, VPst, VPst, VPst, VPst, O, O, VPre, VPre, O, O, VPst, VPst, HVM, O, O, + /* 11340 */ VAbv, VPst, VPst, VPst, VPst, O, O, VPre, VPre, O, O, VPre, VPre, HVM, O, O, /* 11350 */ O, O, O, O, O, O, O, VPst, O, O, O, O, O, O, B, B, /* 11360 */ B, B, VPst, VPst, O, O, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, O, O, O, /* 11370 */ VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, O, O, O, -#define use_offset_0x11400u 4496 +#define use_offset_0x11400u 5176 /* Newa */ @@ -616,11 +723,11 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* 11480 */ O, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, /* 11490 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, /* 114A0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, - /* 114B0 */ VPst, VPre, VPst, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VPre, VAbv, VPst, VPst, VPst, VPst, VMAbv, + /* 114B0 */ VPst, VPre, VPst, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VPre, VAbv, VPre, VPre, VPst, VPre, VMAbv, /* 114C0 */ VMAbv, VMAbv, H, CMBlw, B, O, O, O, O, O, O, O, O, O, O, O, /* 114D0 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O, -#define use_offset_0x11580u 4720 +#define use_offset_0x11580u 5400 /* Siddham */ @@ -628,7 +735,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* 11580 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, /* 11590 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, /* 115A0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, VPst, - /* 115B0 */ VPre, VPst, VBlw, VBlw, VBlw, VBlw, O, O, VPre, VPst, VPst, VPst, VMAbv, VMAbv, VMPst, H, + /* 115B0 */ VPre, VPst, VBlw, VBlw, VBlw, VBlw, O, O, VPre, VPre, VPre, VPre, VMAbv, VMAbv, VMPst, H, /* 115C0 */ CMBlw, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, /* 115D0 */ O, O, O, O, O, O, O, O, B, B, B, B, VBlw, VBlw, O, O, /* 115E0 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, @@ -660,10 +767,10 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* 11700 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, /* 11710 */ B, B, B, B, B, B, B, B, B, B, B, O, O, MBlw, MPre, MAbv, - /* 11720 */ VPst, VPst, VAbv, VAbv, VBlw, VBlw, VPre, VAbv, VBlw, VAbv, VAbv, VAbv, O, O, O, O, + /* 11720 */ VPst, VPst, VAbv, VAbv, VBlw, VBlw, VPre, VAbv, VBlw, VAbv, VAbv, VMAbv, O, O, O, O, /* 11730 */ B, B, B, B, B, B, B, B, B, B, B, B, O, O, O, O, -#define use_offset_0x11800u 5168 +#define use_offset_0x11800u 5848 /* Dogra */ @@ -673,7 +780,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* 11820 */ B, B, B, B, B, B, B, B, B, B, B, B, VPst, VPre, VPst, VBlw, /* 11830 */ VBlw, VBlw, VBlw, VAbv, VAbv, VAbv, VAbv, VMAbv, VMPst, H, CMBlw, O, O, O, O, O, -#define use_offset_0x11900u 5232 +#define use_offset_0x11900u 5912 /* Dives Akuru */ @@ -681,11 +788,11 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* 11900 */ B, B, B, B, B, B, B, O, O, B, O, O, B, B, B, B, /* 11910 */ B, B, B, B, O, B, B, O, B, B, B, B, B, B, B, B, /* 11920 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, - /* 11930 */ VPst, VPst, VPst, VPst, VPst, VPre, O, VPre, VPst, O, O, VMAbv, VMAbv, VPst, H, R, - /* 11940 */ MPst, R, MBlw, CMBlw, O, O, O, O, O, O, O, O, O, O, O, O, + /* 11930 */ VPst, VPst, VPst, VPst, VPst, VPre, O, VPre, VPre, O, O, VMAbv, VMAbv, VPst, H, R, + /* 11940 */ MPst, R, MPst, CMBlw, O, O, O, O, O, O, O, O, O, O, O, O, /* 11950 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O, -#define use_offset_0x119a0u 5328 +#define use_offset_0x119a0u 6008 /* Nandinagari */ @@ -713,7 +820,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* 11A80 */ B, B, B, B, R, R, R, R, R, R, FBlw, FBlw, FBlw, FBlw, FBlw, FBlw, /* 11A90 */ FBlw, FBlw, FBlw, FBlw, FBlw, FBlw, VMAbv, VMPst, CMAbv, H, O, O, O, B, O, O, -#define use_offset_0x11c00u 5584 +#define use_offset_0x11c00u 6264 /* Bhaiksuki */ @@ -734,7 +841,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* 11CA0 */ SUB, SUB, SUB, SUB, SUB, SUB, SUB, SUB, O, SUB, SUB, SUB, SUB, SUB, SUB, SUB, /* 11CB0 */ VBlw, VPre, VBlw, VAbv, VPst, VMAbv, VMAbv, O, -#define use_offset_0x11d00u 5768 +#define use_offset_0x11d00u 6448 /* Masaram Gondi */ @@ -754,7 +861,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* 11D90 */ VAbv, VAbv, O, VPst, VPst, VMAbv, VMPst, H, O, O, O, O, O, O, O, O, /* 11DA0 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O, -#define use_offset_0x11ee0u 5944 +#define use_offset_0x11ee0u 6624 /* Makasar */ @@ -762,7 +869,202 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = { /* 11EE0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, /* 11EF0 */ B, B, GB, VAbv, VBlw, VPre, VPst, O, -}; /* Table items: 5968; occupancy: 74% */ +#define use_offset_0x13000u 6648 + + + /* Egyptian Hieroglyphs */ + + /* 13000 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13010 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13020 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13030 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13040 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13050 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13060 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13070 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13080 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13090 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 130A0 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 130B0 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 130C0 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 130D0 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 130E0 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 130F0 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13100 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13110 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13120 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13130 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13140 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13150 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13160 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13170 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13180 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13190 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 131A0 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 131B0 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 131C0 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 131D0 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 131E0 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 131F0 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13200 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13210 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13220 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13230 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13240 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13250 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13260 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13270 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13280 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13290 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 132A0 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 132B0 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 132C0 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 132D0 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 132E0 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 132F0 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13300 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13310 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13320 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13330 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13340 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13350 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13360 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13370 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13380 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13390 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 133A0 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 133B0 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 133C0 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 133D0 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 133E0 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 133F0 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13400 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13410 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, + /* 13420 */ G, G, G, G, G, G, G, G, G, G, G, G, G, G, G, O, + + /* Egyptian Hieroglyph Format Controls */ + + /* 13430 */ J, J, J, J, J, J, J, SB, SE, O, O, O, O, O, O, O, + +#define use_offset_0x16b00u 7736 + + + /* Pahawh Hmong */ + + /* 16B00 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 16B10 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 16B20 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 16B30 */ VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, O, + +#define use_offset_0x16f00u 7792 + + + /* Miao */ + + /* 16F00 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 16F10 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 16F20 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 16F30 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 16F40 */ B, B, B, B, B, B, B, B, B, B, B, O, O, O, O, CMBlw, + /* 16F50 */ O, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, + /* 16F60 */ VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, + /* 16F70 */ VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, + /* 16F80 */ VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, O, O, O, O, O, O, O, VMBlw, + /* 16F90 */ VMBlw, VMBlw, VMBlw, O, O, O, O, O, + +#define use_offset_0x16fe0u 7944 + + + /* Ideographic Symbols and Punctuation */ + + /* 16FE0 */ O, O, O, O, B, O, O, O, + +#define use_offset_0x18b00u 7952 + + + /* Khitan Small Script */ + + /* 18B00 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18B10 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18B20 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18B30 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18B40 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18B50 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18B60 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18B70 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18B80 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18B90 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18BA0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18BB0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18BC0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18BD0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18BE0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18BF0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18C00 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18C10 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18C20 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18C30 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18C40 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18C50 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18C60 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18C70 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18C80 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18C90 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18CA0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18CB0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18CC0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 18CD0 */ B, B, B, B, B, B, O, O, + +#define use_offset_0x1bc00u 8424 + + + /* Duployan */ + + /* 1BC00 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 1BC10 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 1BC20 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 1BC30 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 1BC40 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 1BC50 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 1BC60 */ B, B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, + /* 1BC70 */ B, B, B, B, B, B, B, B, B, B, B, B, B, O, O, O, + /* 1BC80 */ B, B, B, B, B, B, B, B, B, O, O, O, O, O, O, O, + /* 1BC90 */ B, B, B, B, B, B, B, B, B, B, O, O, O, CMBlw, CMBlw, O, + +#define use_offset_0x1e100u 8584 + + + /* Nyiakeng Puachue Hmong */ + + /* 1E100 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 1E110 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 1E120 */ B, B, B, B, B, B, B, B, B, B, B, B, B, O, O, O, + /* 1E130 */ VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, B, B, B, B, B, B, B, O, O, + /* 1E140 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, B, B, + +#define use_offset_0x1e2c0u 8664 + + + /* Wancho */ + + /* 1E2C0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 1E2D0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 1E2E0 */ B, B, B, B, B, B, B, B, B, B, B, B, VMAbv, VMAbv, VMAbv, VMAbv, + /* 1E2F0 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O, + +#define use_offset_0x1e900u 8728 + + + /* Adlam */ + + /* 1E900 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 1E910 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 1E920 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 1E930 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, + /* 1E940 */ B, B, B, B, CMAbv, CMAbv, CMAbv, CMAbv, CMAbv, CMAbv, CMAbv, B, O, O, O, O, + /* 1E950 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O, + +}; /* Table items: 8824; occupancy: 79% */ USE_TABLE_ELEMENT_TYPE hb_use_get_category (hb_codepoint_t u) @@ -772,14 +1074,16 @@ hb_use_get_category (hb_codepoint_t u) case 0x0u: if (hb_in_range<hb_codepoint_t> (u, 0x0028u, 0x003Fu)) return use_table[u - 0x0028u + use_offset_0x0028u]; if (hb_in_range<hb_codepoint_t> (u, 0x00A0u, 0x00D7u)) return use_table[u - 0x00A0u + use_offset_0x00a0u]; - if (hb_in_range<hb_codepoint_t> (u, 0x0348u, 0x034Fu)) return use_table[u - 0x0348u + use_offset_0x0348u]; + if (hb_in_range<hb_codepoint_t> (u, 0x0640u, 0x0647u)) return use_table[u - 0x0640u + use_offset_0x0640u]; + if (hb_in_range<hb_codepoint_t> (u, 0x07C8u, 0x07FFu)) return use_table[u - 0x07C8u + use_offset_0x07c8u]; + if (hb_in_range<hb_codepoint_t> (u, 0x0840u, 0x085Fu)) return use_table[u - 0x0840u + use_offset_0x0840u]; if (hb_in_range<hb_codepoint_t> (u, 0x0900u, 0x0DF7u)) return use_table[u - 0x0900u + use_offset_0x0900u]; - if (hb_in_range<hb_codepoint_t> (u, 0x0F18u, 0x0FC7u)) return use_table[u - 0x0F18u + use_offset_0x0f18u]; + if (hb_in_range<hb_codepoint_t> (u, 0x0F00u, 0x0FC7u)) return use_table[u - 0x0F00u + use_offset_0x0f00u]; break; case 0x1u: if (hb_in_range<hb_codepoint_t> (u, 0x1000u, 0x109Fu)) return use_table[u - 0x1000u + use_offset_0x1000u]; - if (hb_in_range<hb_codepoint_t> (u, 0x1700u, 0x17EFu)) return use_table[u - 0x1700u + use_offset_0x1700u]; + if (hb_in_range<hb_codepoint_t> (u, 0x1700u, 0x18AFu)) return use_table[u - 0x1700u + use_offset_0x1700u]; if (hb_in_range<hb_codepoint_t> (u, 0x1900u, 0x1A9Fu)) return use_table[u - 0x1900u + use_offset_0x1900u]; if (hb_in_range<hb_codepoint_t> (u, 0x1B00u, 0x1C4Fu)) return use_table[u - 0x1B00u + use_offset_0x1b00u]; if (hb_in_range<hb_codepoint_t> (u, 0x1CD0u, 0x1CFFu)) return use_table[u - 0x1CD0u + use_offset_0x1cd0u]; @@ -788,9 +1092,10 @@ hb_use_get_category (hb_codepoint_t u) case 0x2u: if (hb_in_range<hb_codepoint_t> (u, 0x2008u, 0x2017u)) return use_table[u - 0x2008u + use_offset_0x2008u]; - if (hb_in_range<hb_codepoint_t> (u, 0x2060u, 0x2087u)) return use_table[u - 0x2060u + use_offset_0x2060u]; + if (hb_in_range<hb_codepoint_t> (u, 0x2070u, 0x2087u)) return use_table[u - 0x2070u + use_offset_0x2070u]; if (hb_in_range<hb_codepoint_t> (u, 0x20F0u, 0x20F7u)) return use_table[u - 0x20F0u + use_offset_0x20f0u]; if (hb_in_range<hb_codepoint_t> (u, 0x25C8u, 0x25CFu)) return use_table[u - 0x25C8u + use_offset_0x25c8u]; + if (hb_in_range<hb_codepoint_t> (u, 0x2D30u, 0x2D7Fu)) return use_table[u - 0x2D30u + use_offset_0x2d30u]; break; case 0xAu: @@ -798,16 +1103,18 @@ hb_use_get_category (hb_codepoint_t u) if (hb_in_range<hb_codepoint_t> (u, 0xABC0u, 0xABFFu)) return use_table[u - 0xABC0u + use_offset_0xabc0u]; break; - case 0xFu: - if (hb_in_range<hb_codepoint_t> (u, 0xFE00u, 0xFE0Fu)) return use_table[u - 0xFE00u + use_offset_0xfe00u]; - break; - case 0x10u: if (hb_in_range<hb_codepoint_t> (u, 0x10A00u, 0x10A4Fu)) return use_table[u - 0x10A00u + use_offset_0x10a00u]; + if (hb_in_range<hb_codepoint_t> (u, 0x10AC0u, 0x10AE7u)) return use_table[u - 0x10AC0u + use_offset_0x10ac0u]; + if (hb_in_range<hb_codepoint_t> (u, 0x10B80u, 0x10BAFu)) return use_table[u - 0x10B80u + use_offset_0x10b80u]; + if (hb_in_range<hb_codepoint_t> (u, 0x10D00u, 0x10D3Fu)) return use_table[u - 0x10D00u + use_offset_0x10d00u]; + if (hb_in_range<hb_codepoint_t> (u, 0x10E80u, 0x10EB7u)) return use_table[u - 0x10E80u + use_offset_0x10e80u]; + if (hb_in_range<hb_codepoint_t> (u, 0x10F30u, 0x10F57u)) return use_table[u - 0x10F30u + use_offset_0x10f30u]; + if (hb_in_range<hb_codepoint_t> (u, 0x10FB0u, 0x110BFu)) return use_table[u - 0x10FB0u + use_offset_0x10fb0u]; break; case 0x11u: - if (hb_in_range<hb_codepoint_t> (u, 0x11000u, 0x110BFu)) return use_table[u - 0x11000u + use_offset_0x11000u]; + if (hb_in_range<hb_codepoint_t> (u, 0x10FB0u, 0x110BFu)) return use_table[u - 0x10FB0u + use_offset_0x10fb0u]; if (hb_in_range<hb_codepoint_t> (u, 0x11100u, 0x1123Fu)) return use_table[u - 0x11100u + use_offset_0x11100u]; if (hb_in_range<hb_codepoint_t> (u, 0x11280u, 0x11377u)) return use_table[u - 0x11280u + use_offset_0x11280u]; if (hb_in_range<hb_codepoint_t> (u, 0x11400u, 0x114DFu)) return use_table[u - 0x11400u + use_offset_0x11400u]; @@ -820,6 +1127,30 @@ hb_use_get_category (hb_codepoint_t u) if (hb_in_range<hb_codepoint_t> (u, 0x11EE0u, 0x11EF7u)) return use_table[u - 0x11EE0u + use_offset_0x11ee0u]; break; + case 0x13u: + if (hb_in_range<hb_codepoint_t> (u, 0x13000u, 0x1343Fu)) return use_table[u - 0x13000u + use_offset_0x13000u]; + break; + + case 0x16u: + if (hb_in_range<hb_codepoint_t> (u, 0x16B00u, 0x16B37u)) return use_table[u - 0x16B00u + use_offset_0x16b00u]; + if (hb_in_range<hb_codepoint_t> (u, 0x16F00u, 0x16F97u)) return use_table[u - 0x16F00u + use_offset_0x16f00u]; + if (hb_in_range<hb_codepoint_t> (u, 0x16FE0u, 0x16FE7u)) return use_table[u - 0x16FE0u + use_offset_0x16fe0u]; + break; + + case 0x18u: + if (hb_in_range<hb_codepoint_t> (u, 0x18B00u, 0x18CD7u)) return use_table[u - 0x18B00u + use_offset_0x18b00u]; + break; + + case 0x1Bu: + if (hb_in_range<hb_codepoint_t> (u, 0x1BC00u, 0x1BC9Fu)) return use_table[u - 0x1BC00u + use_offset_0x1bc00u]; + break; + + case 0x1Eu: + if (hb_in_range<hb_codepoint_t> (u, 0x1E100u, 0x1E14Fu)) return use_table[u - 0x1E100u + use_offset_0x1e100u]; + if (hb_in_range<hb_codepoint_t> (u, 0x1E2C0u, 0x1E2FFu)) return use_table[u - 0x1E2C0u + use_offset_0x1e2c0u]; + if (hb_in_range<hb_codepoint_t> (u, 0x1E900u, 0x1E95Fu)) return use_table[u - 0x1E900u + use_offset_0x1e900u]; + break; + default: break; } @@ -827,23 +1158,21 @@ hb_use_get_category (hb_codepoint_t u) } #undef B -#undef CGJ #undef CS +#undef G #undef GB #undef H #undef HN #undef HVM -#undef IND +#undef J #undef N #undef O #undef R -#undef Rsv #undef S +#undef SB +#undef SE #undef SUB #undef Sk -#undef VS -#undef WJ -#undef ZWJ #undef ZWNJ #undef CMAbv #undef CMBlw diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use.cc index a1e25bdd806..8ac569d8bf4 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use.cc @@ -194,6 +194,7 @@ enum use_syllable_type_t { use_number_joiner_terminated_cluster, use_numeral_cluster, use_symbol_cluster, + use_hieroglyph_cluster, use_broken_cluster, use_non_cluster, }; @@ -275,6 +276,7 @@ setup_topographical_masks (const hb_ot_shape_plan_t *plan, { case use_independent_cluster: case use_symbol_cluster: + case use_hieroglyph_cluster: case use_non_cluster: /* These don't join. Nothing to do. */ last_form = _USE_NONE; @@ -385,8 +387,7 @@ reorder_syllable_use (hb_buffer_t *buffer, unsigned int start, unsigned int end) hb_glyph_info_t *info = buffer->info; -#define POST_BASE_FLAGS64 (FLAG64 (USE_FM) | \ - FLAG64 (USE_FAbv) | \ +#define POST_BASE_FLAGS64 (FLAG64 (USE_FAbv) | \ FLAG64 (USE_FBlw) | \ FLAG64 (USE_FPst) | \ FLAG64 (USE_MAbv) | \ @@ -516,10 +517,14 @@ reorder_use (const hb_ot_shape_plan_t *plan, hb_font_t *font, hb_buffer_t *buffer) { - insert_dotted_circles_use (plan, font, buffer); + if (buffer->message (font, "start reordering USE")) { + insert_dotted_circles_use (plan, font, buffer); - foreach_syllable (buffer, start, end) - reorder_syllable_use (buffer, start, end); + foreach_syllable (buffer, start, end) + reorder_syllable_use (buffer, start, end); + + (void) buffer->message (font, "end reordering USE"); + } HB_BUFFER_DEALLOCATE_VAR (buffer, use_category); } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use.hh index ce6645ecd31..788fb6b6aca 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-use.hh @@ -46,34 +46,25 @@ enum use_category_t { USE_O = 0, /* OTHER */ USE_B = 1, /* BASE */ - USE_IND = 3, /* BASE_IND */ USE_N = 4, /* BASE_NUM */ USE_GB = 5, /* BASE_OTHER */ - USE_CGJ = 6, /* CGJ */ -// USE_F = 7, /* CONS_FINAL */ - USE_FM = 8, /* CONS_FINAL_MOD */ -// USE_M = 9, /* CONS_MED */ -// USE_CM = 10, /* CONS_MOD */ USE_SUB = 11, /* CONS_SUB */ USE_H = 12, /* HALANT */ USE_HN = 13, /* HALANT_NUM */ USE_ZWNJ = 14, /* Zero width non-joiner */ - USE_ZWJ = 15, /* Zero width joiner */ - USE_WJ = 16, /* Word joiner */ - USE_Rsv = 17, /* Reserved characters */ USE_R = 18, /* REPHA */ USE_S = 19, /* SYM */ -// USE_SM = 20, /* SYM_MOD */ - USE_VS = 21, /* VARIATION_SELECTOR */ -// USE_V = 36, /* VOWEL */ -// USE_VM = 40, /* VOWEL_MOD */ USE_CS = 43, /* CONS_WITH_STACKER */ /* https://github.com/harfbuzz/harfbuzz/issues/1102 */ USE_HVM = 44, /* HALANT_OR_VOWEL_MODIFIER */ USE_Sk = 48, /* SAKOT */ + USE_G = 49, /* HIEROGLYPH */ + USE_J = 50, /* HIEROGLYPH_JOINER */ + USE_SB = 51, /* HIEROGLYPH_SEGMENT_BEGIN */ + USE_SE = 52, /* HIEROGLYPH_SEGMENT_END */ USE_FAbv = 24, /* CONS_FINAL_ABOVE */ USE_FBlw = 25, /* CONS_FINAL_BELOW */ diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-vowel-constraints.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-vowel-constraints.cc index c3368c6ec2f..1af546e4fac 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-vowel-constraints.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-vowel-constraints.cc @@ -320,7 +320,7 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED, switch (buffer->cur (1).codepoint) { case 0x0DCAu: case 0x0DD9u: case 0x0DDAu: case 0x0DDCu: - case 0x0DDDu: + case 0x0DDDu: case 0x0DDEu: matched = true; break; } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex.hh index 61f4c0e1586..a1a7a6a47b6 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex.hh @@ -341,6 +341,7 @@ hb_ot_shape_complex_categorize (const hb_ot_shape_planner_t *planner) /* Unicode-6.1 additions */ case HB_SCRIPT_CHAKMA: + case HB_SCRIPT_MIAO: case HB_SCRIPT_SHARADA: case HB_SCRIPT_TAKRI: @@ -359,6 +360,7 @@ hb_ot_shape_complex_categorize (const hb_ot_shape_planner_t *planner) /* Unicode-8.0 additions */ case HB_SCRIPT_AHOM: + case HB_SCRIPT_MULTANI: /* Unicode-9.0 additions */ //case HB_SCRIPT_ADLAM: @@ -376,10 +378,15 @@ hb_ot_shape_complex_categorize (const hb_ot_shape_planner_t *planner) case HB_SCRIPT_GUNJALA_GONDI: //case HB_SCRIPT_HANIFI_ROHINGYA: case HB_SCRIPT_MAKASAR: + case HB_SCRIPT_MEDEFAIDRIN: + case HB_SCRIPT_OLD_SOGDIAN: //case HB_SCRIPT_SOGDIAN: /* Unicode-12.0 additions */ + case HB_SCRIPT_ELYMAIC: case HB_SCRIPT_NANDINAGARI: + case HB_SCRIPT_NYIAKENG_PUACHUE_HMONG: + case HB_SCRIPT_WANCHO: /* Unicode-13.0 additions */ case HB_SCRIPT_CHORASMIAN: diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback.cc index 42bf524d164..7d00a35ab97 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-fallback.cc @@ -301,7 +301,7 @@ position_mark (const hb_ot_shape_plan_t *plan HB_UNUSED, /* Don't shift down "above" marks too much. */ if ((y_gap > 0) != (pos.y_offset > 0)) { - unsigned int correction = -pos.y_offset / 2; + int correction = -pos.y_offset / 2; base_extents.y_bearing += correction; base_extents.height -= correction; pos.y_offset += correction; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-normalize.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-normalize.cc index 50b5829c4aa..3eabae1b45b 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-normalize.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-normalize.cc @@ -373,7 +373,7 @@ _hb_ot_shape_normalize (const hb_ot_shape_plan_t *plan, /* Second round, reorder (inplace) */ - if (!all_simple) + if (!all_simple && buffer->message(font, "start reorder")) { count = buffer->len; for (unsigned int i = 0; i < count; i++) @@ -399,6 +399,7 @@ _hb_ot_shape_normalize (const hb_ot_shape_plan_t *plan, i = end; } + (void) buffer->message(font, "end reorder"); } if (buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_CGJ) { @@ -408,7 +409,7 @@ _hb_ot_shape_normalize (const hb_ot_shape_plan_t *plan, */ for (unsigned int i = 1; i + 1 < buffer->len; i++) if (buffer->info[i].codepoint == 0x034Fu/*CGJ*/ && - info_cc(buffer->info[i-1]) <= info_cc(buffer->info[i+1])) + (info_cc(buffer->info[i+1]) == 0 || info_cc(buffer->info[i-1]) <= info_cc(buffer->info[i+1]))) { _hb_glyph_info_unhide (&buffer->info[i]); } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc index fe0444987a0..7d90558458d 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc @@ -896,8 +896,11 @@ hb_ot_substitute_post (const hb_ot_shape_context_t *c) hb_aat_layout_remove_deleted_glyphs (c->buffer); #endif - if (c->plan->shaper->postprocess_glyphs) + if (c->plan->shaper->postprocess_glyphs && + c->buffer->message(c->font, "start postprocess-glyphs")) { c->plan->shaper->postprocess_glyphs (c->plan, c->buffer, c->font); + (void) c->buffer->message(c->font, "end postprocess-glyphs"); + } } @@ -1120,8 +1123,11 @@ hb_ot_shape_internal (hb_ot_shape_context_t *c) hb_ensure_native_direction (c->buffer); - if (c->plan->shaper->preprocess_text) + if (c->plan->shaper->preprocess_text && + c->buffer->message(c->font, "start preprocess-text")) { c->plan->shaper->preprocess_text (c->plan, c->buffer, c->font); + (void) c->buffer->message(c->font, "end preprocess-text"); + } hb_ot_substitute_pre (c); hb_ot_position (c); @@ -1155,6 +1161,12 @@ _hb_ot_shape (hb_shape_plan_t *shape_plan, /** * hb_ot_shape_plan_collect_lookups: + * @shape_plan: #hb_shape_plan_t to query + * @table_tag: GSUB or GPOS + * @lookup_indexes: (out): The #hb_set_t set of lookups returned + * + * Computes the complete set of GSUB or GPOS lookups that are applicable + * under a given @shape_plan. * * Since: 0.9.7 **/ @@ -1189,6 +1201,15 @@ add_char (hb_font_t *font, /** * hb_ot_shape_glyphs_closure: + * @font: #hb_font_t to work upon + * @buffer: The input buffer to compute from + * @features: (array length=num_features): The features enabled on the buffer + * @num_features: The number of features enabled on the buffer + * @glyphs: (out): The #hb_set_t set of glyphs comprising the transitive closure of the query + * + * Computes the transitive closure of glyphs needed for a specified + * input buffer under the given font and feature list. The closure is + * computed as a set, not as a list. * * Since: 0.9.2 **/ diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-tag-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-tag-table.hh index 99937d9f69e..f1c391cf0ef 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-tag-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-tag-table.hh @@ -6,8 +6,8 @@ * * on files with these headers: * - * <meta name="updated_at" content="2019-05-22 06:05 PM" /> - * File-Date: 2020-05-12 + * <meta name="updated_at" content="2020-11-17 08:21 AM" /> + * File-Date: 2020-09-29 */ #ifndef HB_OT_TAG_TABLE_HH @@ -19,14 +19,18 @@ static const LangTag ot_languages[] = { {"aao", HB_TAG('A','R','A',' ')}, /* Algerian Saharan Arabic -> Arabic */ {"aat", HB_TAG('S','Q','I',' ')}, /* Arvanitika Albanian -> Albanian */ {"ab", HB_TAG('A','B','K',' ')}, /* Abkhazian */ + {"aba", HB_TAG_NONE }, /* Abé != Abaza */ {"abh", HB_TAG('A','R','A',' ')}, /* Tajiki Arabic -> Arabic */ {"abq", HB_TAG('A','B','A',' ')}, /* Abaza */ + {"abs", HB_TAG('C','P','P',' ')}, /* Ambonese Malay -> Creoles */ {"abv", HB_TAG('A','R','A',' ')}, /* Baharna Arabic -> Arabic */ {"acf", HB_TAG('F','A','N',' ')}, /* Saint Lucian Creole French -> French Antillean */ + {"acf", HB_TAG('C','P','P',' ')}, /* Saint Lucian Creole French -> Creoles */ /*{"ach", HB_TAG('A','C','H',' ')},*/ /* Acoli -> Acholi */ {"acm", HB_TAG('A','R','A',' ')}, /* Mesopotamian Arabic -> Arabic */ {"acq", HB_TAG('A','R','A',' ')}, /* Ta'izzi-Adeni Arabic -> Arabic */ -/*{"acr", HB_TAG('A','C','R',' ')},*/ /* Achi */ + {"acr", HB_TAG('A','C','R',' ')}, /* Achi */ + {"acr", HB_TAG('M','Y','N',' ')}, /* Achi -> Mayan */ {"acw", HB_TAG('A','R','A',' ')}, /* Hijazi Arabic -> Arabic */ {"acx", HB_TAG('A','R','A',' ')}, /* Omani Arabic -> Arabic */ {"acy", HB_TAG('A','R','A',' ')}, /* Cypriot Arabic -> Arabic */ @@ -38,15 +42,21 @@ static const LangTag ot_languages[] = { {"aec", HB_TAG('A','R','A',' ')}, /* Saidi Arabic -> Arabic */ {"af", HB_TAG('A','F','K',' ')}, /* Afrikaans */ {"afb", HB_TAG('A','R','A',' ')}, /* Gulf Arabic -> Arabic */ + {"afk", HB_TAG_NONE }, /* Nanubae != Afrikaans */ + {"afs", HB_TAG('C','P','P',' ')}, /* Afro-Seminole Creole -> Creoles */ + {"agu", HB_TAG('M','Y','N',' ')}, /* Aguacateco -> Mayan */ + {"agw", HB_TAG_NONE }, /* Kahua != Agaw */ {"ahg", HB_TAG('A','G','W',' ')}, /* Qimant -> Agaw */ {"aht", HB_TAG('A','T','H',' ')}, /* Ahtena -> Athapaskan */ + {"aig", HB_TAG('C','P','P',' ')}, /* Antigua and Barbuda Creole English -> Creoles */ {"aii", HB_TAG('S','W','A',' ')}, /* Assyrian Neo-Aramaic -> Swadaya Aramaic */ {"aii", HB_TAG('S','Y','R',' ')}, /* Assyrian Neo-Aramaic -> Syriac */ /*{"aio", HB_TAG('A','I','O',' ')},*/ /* Aiton */ {"aiw", HB_TAG('A','R','I',' ')}, /* Aari */ {"ajp", HB_TAG('A','R','A',' ')}, /* South Levantine Arabic -> Arabic */ {"ak", HB_TAG('A','K','A',' ')}, /* Akan [macrolanguage] */ - {"ak", HB_TAG('T','W','I',' ')}, /* Akan [macrolanguage] -> Twi */ + {"akb", HB_TAG('A','K','B',' ')}, /* Batak Angkola */ + {"akb", HB_TAG('B','T','K',' ')}, /* Batak Angkola -> Batak */ {"aln", HB_TAG('S','Q','I',' ')}, /* Gheg Albanian -> Albanian */ {"als", HB_TAG('S','Q','I',' ')}, /* Tosk Albanian -> Albanian */ /*{"alt", HB_TAG('A','L','T',' ')},*/ /* Southern Altai -> Altai */ @@ -55,6 +65,8 @@ static const LangTag ot_languages[] = { {"amw", HB_TAG('S','Y','R',' ')}, /* Western Neo-Aramaic -> Syriac */ {"an", HB_TAG('A','R','G',' ')}, /* Aragonese */ /*{"ang", HB_TAG('A','N','G',' ')},*/ /* Old English (ca. 450-1100) -> Anglo-Saxon */ + {"aoa", HB_TAG('C','P','P',' ')}, /* Angolar -> Creoles */ + {"apa", HB_TAG('A','T','H',' ')}, /* Apache [family] -> Athapaskan */ {"apc", HB_TAG('A','R','A',' ')}, /* North Levantine Arabic -> Arabic */ {"apd", HB_TAG('A','R','A',' ')}, /* Sudanese Arabic -> Arabic */ {"apj", HB_TAG('A','T','H',' ')}, /* Jicarilla Apache -> Athapaskan */ @@ -64,16 +76,20 @@ static const LangTag ot_languages[] = { {"apw", HB_TAG('A','T','H',' ')}, /* Western Apache -> Athapaskan */ {"ar", HB_TAG('A','R','A',' ')}, /* Arabic [macrolanguage] */ {"arb", HB_TAG('A','R','A',' ')}, /* Standard Arabic -> Arabic */ + {"ari", HB_TAG_NONE }, /* Arikara != Aari */ + {"ark", HB_TAG_NONE }, /* Arikapú != Rakhine */ {"arn", HB_TAG('M','A','P',' ')}, /* Mapudungun */ {"arq", HB_TAG('A','R','A',' ')}, /* Algerian Arabic -> Arabic */ {"ars", HB_TAG('A','R','A',' ')}, /* Najdi Arabic -> Arabic */ {"ary", HB_TAG('M','O','R',' ')}, /* Moroccan Arabic -> Moroccan */ + {"ary", HB_TAG('A','R','A',' ')}, /* Moroccan Arabic -> Arabic */ {"arz", HB_TAG('A','R','A',' ')}, /* Egyptian Arabic -> Arabic */ {"as", HB_TAG('A','S','M',' ')}, /* Assamese */ /*{"ast", HB_TAG('A','S','T',' ')},*/ /* Asturian */ /*{"ath", HB_TAG('A','T','H',' ')},*/ /* Athapascan [family] -> Athapaskan */ {"atj", HB_TAG('R','C','R',' ')}, /* Atikamekw -> R-Cree */ {"atv", HB_TAG('A','L','T',' ')}, /* Northern Altai -> Altai */ + {"auj", HB_TAG('B','B','R',' ')}, /* Awjilah -> Berber */ {"auz", HB_TAG('A','R','A',' ')}, /* Uzbeki Arabic -> Arabic */ {"av", HB_TAG('A','V','R',' ')}, /* Avaric -> Avar */ {"avl", HB_TAG('A','R','A',' ')}, /* Eastern Egyptian Bedawi Arabic -> Arabic */ @@ -86,17 +102,29 @@ static const LangTag ot_languages[] = { {"ayp", HB_TAG('A','R','A',' ')}, /* North Mesopotamian Arabic -> Arabic */ {"ayr", HB_TAG('A','Y','M',' ')}, /* Central Aymara -> Aymara */ {"az", HB_TAG('A','Z','E',' ')}, /* Azerbaijani [macrolanguage] */ -/*{"azb", HB_TAG('A','Z','B',' ')},*/ /* South Azerbaijani -> Torki */ + {"azb", HB_TAG('A','Z','B',' ')}, /* South Azerbaijani -> Torki */ + {"azb", HB_TAG('A','Z','E',' ')}, /* South Azerbaijani -> Azerbaijani */ + {"azd", HB_TAG('N','A','H',' ')}, /* Eastern Durango Nahuatl -> Nahuatl */ {"azj", HB_TAG('A','Z','E',' ')}, /* North Azerbaijani -> Azerbaijani */ + {"azn", HB_TAG('N','A','H',' ')}, /* Western Durango Nahuatl -> Nahuatl */ + {"azz", HB_TAG('N','A','H',' ')}, /* Highland Puebla Nahuatl -> Nahuatl */ {"ba", HB_TAG('B','S','H',' ')}, /* Bashkir */ {"bad", HB_TAG('B','A','D','0')}, /* Banda [family] */ + {"bag", HB_TAG_NONE }, /* Tuki != Baghelkhandi */ + {"bah", HB_TAG('C','P','P',' ')}, /* Bahamas Creole English -> Creoles */ {"bai", HB_TAG('B','M','L',' ')}, /* Bamileke [family] */ {"bal", HB_TAG('B','L','I',' ')}, /* Baluchi [macrolanguage] */ /*{"ban", HB_TAG('B','A','N',' ')},*/ /* Balinese */ /*{"bar", HB_TAG('B','A','R',' ')},*/ /* Bavarian */ -/*{"bbc", HB_TAG('B','B','C',' ')},*/ /* Batak Toba */ + {"bau", HB_TAG_NONE }, /* Bada (Nigeria) != Baulé */ + {"bbc", HB_TAG('B','B','C',' ')}, /* Batak Toba */ + {"bbc", HB_TAG('B','T','K',' ')}, /* Batak Toba -> Batak */ + {"bbj", HB_TAG('B','M','L',' ')}, /* Ghomálá' -> Bamileke */ + {"bbp", HB_TAG('B','A','D','0')}, /* West Central Banda -> Banda */ + {"bbr", HB_TAG_NONE }, /* Girawa != Berber */ {"bbz", HB_TAG('A','R','A',' ')}, /* Babalia Creole Arabic (retired code) -> Arabic */ {"bcc", HB_TAG('B','L','I',' ')}, /* Southern Balochi -> Baluchi */ + {"bch", HB_TAG_NONE }, /* Bariai != Bench */ {"bci", HB_TAG('B','A','U',' ')}, /* Baoulé -> Baulé */ {"bcl", HB_TAG('B','I','K',' ')}, /* Central Bikol -> Bikol */ {"bcq", HB_TAG('B','C','H',' ')}, /* Bench */ @@ -107,6 +135,8 @@ static const LangTag ot_languages[] = { {"beb", HB_TAG('B','T','I',' ')}, /* Bebele -> Beti */ /*{"bem", HB_TAG('B','E','M',' ')},*/ /* Bemba (Zambia) */ {"ber", HB_TAG('B','B','R',' ')}, /* Berber [family] */ + {"bew", HB_TAG('C','P','P',' ')}, /* Betawi -> Creoles */ + {"bfl", HB_TAG('B','A','D','0')}, /* Banda-Ndélé -> Banda */ {"bfq", HB_TAG('B','A','D',' ')}, /* Badaga */ {"bft", HB_TAG('B','L','T',' ')}, /* Balti */ {"bfu", HB_TAG('L','A','H',' ')}, /* Gahri -> Lahuli */ @@ -115,7 +145,8 @@ static const LangTag ot_languages[] = { /*{"bgc", HB_TAG('B','G','C',' ')},*/ /* Haryanvi */ {"bgn", HB_TAG('B','L','I',' ')}, /* Western Balochi -> Baluchi */ {"bgp", HB_TAG('B','L','I',' ')}, /* Eastern Balochi -> Baluchi */ -/*{"bgq", HB_TAG('B','G','Q',' ')},*/ /* Bagri */ + {"bgq", HB_TAG('B','G','Q',' ')}, /* Bagri */ + {"bgq", HB_TAG('R','A','J',' ')}, /* Bagri -> Rajasthani */ {"bgr", HB_TAG('Q','I','N',' ')}, /* Bawm Chin -> Chin */ {"bhb", HB_TAG('B','H','I',' ')}, /* Bhili */ /*{"bhi", HB_TAG('B','H','I',' ')},*/ /* Bhilali -> Bhili */ @@ -123,58 +154,107 @@ static const LangTag ot_languages[] = { /*{"bho", HB_TAG('B','H','O',' ')},*/ /* Bhojpuri */ {"bhr", HB_TAG('M','L','G',' ')}, /* Bara Malagasy -> Malagasy */ {"bi", HB_TAG('B','I','S',' ')}, /* Bislama */ + {"bi", HB_TAG('C','P','P',' ')}, /* Bislama -> Creoles */ /*{"bik", HB_TAG('B','I','K',' ')},*/ /* Bikol [macrolanguage] */ + {"bil", HB_TAG_NONE }, /* Bile != Bilen */ {"bin", HB_TAG('E','D','O',' ')}, /* Edo */ + {"biu", HB_TAG('Q','I','N',' ')}, /* Biete -> Chin */ /*{"bjj", HB_TAG('B','J','J',' ')},*/ /* Kanauji */ {"bjn", HB_TAG('M','L','Y',' ')}, /* Banjar -> Malay */ + {"bjo", HB_TAG('B','A','D','0')}, /* Mid-Southern Banda -> Banda */ {"bjq", HB_TAG('M','L','G',' ')}, /* Southern Betsimisaraka Malagasy (retired code) -> Malagasy */ + {"bjs", HB_TAG('C','P','P',' ')}, /* Bajan -> Creoles */ {"bjt", HB_TAG('B','L','N',' ')}, /* Balanta-Ganja -> Balante */ + {"bkf", HB_TAG_NONE }, /* Beeke != Blackfoot */ + {"bko", HB_TAG('B','M','L',' ')}, /* Kwa' -> Bamileke */ {"bla", HB_TAG('B','K','F',' ')}, /* Siksika -> Blackfoot */ {"ble", HB_TAG('B','L','N',' ')}, /* Balanta-Kentohe -> Balante */ -/*{"blk", HB_TAG('B','L','K',' ')},*/ /* Pa’o Karen */ + {"bli", HB_TAG_NONE }, /* Bolia != Baluchi */ + {"blk", HB_TAG('B','L','K',' ')}, /* Pa’o Karen */ + {"blk", HB_TAG('K','R','N',' ')}, /* Pa'o Karen -> Karen */ {"bln", HB_TAG('B','I','K',' ')}, /* Southern Catanduanes Bikol -> Bikol */ + {"blt", HB_TAG_NONE }, /* Tai Dam != Balti */ {"bm", HB_TAG('B','M','B',' ')}, /* Bambara (Bamanankan) */ + {"bmb", HB_TAG_NONE }, /* Bembe != Bambara (Bamanankan) */ + {"bml", HB_TAG_NONE }, /* Bomboli != Bamileke */ {"bmm", HB_TAG('M','L','G',' ')}, /* Northern Betsimisaraka Malagasy -> Malagasy */ {"bn", HB_TAG('B','E','N',' ')}, /* Bengali */ {"bo", HB_TAG('T','I','B',' ')}, /* Tibetan */ + {"bpd", HB_TAG('B','A','D','0')}, /* Banda-Banda -> Banda */ + {"bpl", HB_TAG('C','P','P',' ')}, /* Broome Pearling Lugger Pidgin -> Creoles */ + {"bpq", HB_TAG('C','P','P',' ')}, /* Banda Malay -> Creoles */ /*{"bpy", HB_TAG('B','P','Y',' ')},*/ /* Bishnupriya -> Bishnupriya Manipuri */ {"bqi", HB_TAG('L','R','C',' ')}, /* Bakhtiari -> Luri */ + {"bqk", HB_TAG('B','A','D','0')}, /* Banda-Mbrès -> Banda */ {"br", HB_TAG('B','R','E',' ')}, /* Breton */ {"bra", HB_TAG('B','R','I',' ')}, /* Braj -> Braj Bhasha */ + {"brc", HB_TAG('C','P','P',' ')}, /* Berbice Creole Dutch -> Creoles */ /*{"brh", HB_TAG('B','R','H',' ')},*/ /* Brahui */ + {"bri", HB_TAG_NONE }, /* Mokpwe != Braj Bhasha */ + {"brm", HB_TAG_NONE }, /* Barambu != Burmese */ /*{"brx", HB_TAG('B','R','X',' ')},*/ /* Bodo (India) */ {"bs", HB_TAG('B','O','S',' ')}, /* Bosnian */ + {"bsh", HB_TAG_NONE }, /* Kati != Bashkir */ /*{"bsk", HB_TAG('B','S','K',' ')},*/ /* Burushaski */ {"btb", HB_TAG('B','T','I',' ')}, /* Beti (Cameroon) (retired code) */ + {"btd", HB_TAG('B','T','D',' ')}, /* Batak Dairi (Pakpak) */ + {"btd", HB_TAG('B','T','K',' ')}, /* Batak Dairi -> Batak */ + {"bti", HB_TAG_NONE }, /* Burate != Beti */ {"btj", HB_TAG('M','L','Y',' ')}, /* Bacanese Malay -> Malay */ +/*{"btk", HB_TAG('B','T','K',' ')},*/ /* Batak [family] */ + {"btm", HB_TAG('B','T','M',' ')}, /* Batak Mandailing */ + {"btm", HB_TAG('B','T','K',' ')}, /* Batak Mandailing -> Batak */ {"bto", HB_TAG('B','I','K',' ')}, /* Rinconada Bikol -> Bikol */ -/*{"bts", HB_TAG('B','T','S',' ')},*/ /* Batak Simalungun */ + {"bts", HB_TAG('B','T','S',' ')}, /* Batak Simalungun */ + {"bts", HB_TAG('B','T','K',' ')}, /* Batak Simalungun -> Batak */ + {"btx", HB_TAG('B','T','X',' ')}, /* Batak Karo */ + {"btx", HB_TAG('B','T','K',' ')}, /* Batak Karo -> Batak */ + {"btz", HB_TAG('B','T','Z',' ')}, /* Batak Alas-Kluet */ + {"btz", HB_TAG('B','T','K',' ')}, /* Batak Alas-Kluet -> Batak */ /*{"bug", HB_TAG('B','U','G',' ')},*/ /* Buginese -> Bugis */ {"bum", HB_TAG('B','T','I',' ')}, /* Bulu (Cameroon) -> Beti */ {"bve", HB_TAG('M','L','Y',' ')}, /* Berau Malay -> Malay */ {"bvu", HB_TAG('M','L','Y',' ')}, /* Bukit Malay -> Malay */ + {"bwe", HB_TAG('K','R','N',' ')}, /* Bwe Karen -> Karen */ {"bxk", HB_TAG('L','U','H',' ')}, /* Bukusu -> Luyia */ + {"bxo", HB_TAG('C','P','P',' ')}, /* Barikanchi -> Creoles */ {"bxp", HB_TAG('B','T','I',' ')}, /* Bebil -> Beti */ {"bxr", HB_TAG('R','B','U',' ')}, /* Russia Buriat -> Russian Buriat */ {"byn", HB_TAG('B','I','L',' ')}, /* Bilin -> Bilen */ -/*{"byv", HB_TAG('B','Y','V',' ')},*/ /* Medumba */ + {"byv", HB_TAG('B','Y','V',' ')}, /* Medumba */ + {"byv", HB_TAG('B','M','L',' ')}, /* Medumba -> Bamileke */ {"bzc", HB_TAG('M','L','G',' ')}, /* Southern Betsimisaraka Malagasy -> Malagasy */ + {"bzj", HB_TAG('C','P','P',' ')}, /* Belize Kriol English -> Creoles */ + {"bzk", HB_TAG('C','P','P',' ')}, /* Nicaragua Creole English -> Creoles */ {"ca", HB_TAG('C','A','T',' ')}, /* Catalan */ + {"caa", HB_TAG('M','Y','N',' ')}, /* Chortà -> Mayan */ + {"cac", HB_TAG('M','Y','N',' ')}, /* Chuj -> Mayan */ {"caf", HB_TAG('C','R','R',' ')}, /* Southern Carrier -> Carrier */ {"caf", HB_TAG('A','T','H',' ')}, /* Southern Carrier -> Athapaskan */ -/*{"cak", HB_TAG('C','A','K',' ')},*/ /* Kaqchikel */ -/*{"cbk", HB_TAG('C','B','K',' ')},*/ /* Chavacano -> Zamboanga Chavacano */ + {"cak", HB_TAG('C','A','K',' ')}, /* Kaqchikel */ + {"cak", HB_TAG('M','Y','N',' ')}, /* Kaqchikel -> Mayan */ + {"cbk", HB_TAG('C','B','K',' ')}, /* Chavacano -> Zamboanga Chavacano */ + {"cbk", HB_TAG('C','P','P',' ')}, /* Chavacano -> Creoles */ {"cbl", HB_TAG('Q','I','N',' ')}, /* Bualkhaw Chin -> Chin */ + {"ccl", HB_TAG('C','P','P',' ')}, /* Cutchi-Swahili -> Creoles */ + {"ccm", HB_TAG('C','P','P',' ')}, /* Malaccan Creole Malay -> Creoles */ {"cco", HB_TAG('C','C','H','N')}, /* Comaltepec Chinantec -> Chinantec */ {"ccq", HB_TAG('A','R','K',' ')}, /* Chaungtha (retired code) -> Rakhine */ - {"cdo", HB_TAG('Z','H','S',' ')}, /* Min Dong Chinese -> Chinese Simplified */ + {"cdo", HB_TAG('Z','H','S',' ')}, /* Min Dong Chinese -> Chinese, Simplified */ {"ce", HB_TAG('C','H','E',' ')}, /* Chechen */ /*{"ceb", HB_TAG('C','E','B',' ')},*/ /* Cebuano */ + {"cek", HB_TAG('Q','I','N',' ')}, /* Eastern Khumi Chin -> Chin */ + {"cey", HB_TAG('Q','I','N',' ')}, /* Ekai Chin -> Chin */ {"cfm", HB_TAG('H','A','L',' ')}, /* Halam (Falam Chin) */ + {"cfm", HB_TAG('Q','I','N',' ')}, /* Falam Chin -> Chin */ /*{"cgg", HB_TAG('C','G','G',' ')},*/ /* Chiga */ {"ch", HB_TAG('C','H','A',' ')}, /* Chamorro */ + {"chf", HB_TAG('M','Y','N',' ')}, /* Tabasco Chontal -> Mayan */ + {"chg", HB_TAG_NONE }, /* Chagatai != Chaha Gurage */ + {"chh", HB_TAG_NONE }, /* Chinook != Chattisgarhi */ {"chj", HB_TAG('C','C','H','N')}, /* Ojitlán Chinantec -> Chinantec */ {"chk", HB_TAG('C','H','K','0')}, /* Chuukese */ + {"chn", HB_TAG('C','P','P',' ')}, /* Chinook jargon -> Creoles */ /*{"cho", HB_TAG('C','H','O',' ')},*/ /* Choctaw */ {"chp", HB_TAG('C','H','P',' ')}, /* Chipewyan */ {"chp", HB_TAG('S','A','Y',' ')}, /* Chipewyan -> Sayisi */ @@ -186,59 +266,85 @@ static const LangTag ot_languages[] = { {"ciw", HB_TAG('O','J','B',' ')}, /* Chippewa -> Ojibway */ /*{"cja", HB_TAG('C','J','A',' ')},*/ /* Western Cham */ /*{"cjm", HB_TAG('C','J','M',' ')},*/ /* Eastern Cham */ - {"cjy", HB_TAG('Z','H','S',' ')}, /* Jinyu Chinese -> Chinese Simplified */ + {"cjy", HB_TAG('Z','H','S',' ')}, /* Jinyu Chinese -> Chinese, Simplified */ {"cka", HB_TAG('Q','I','N',' ')}, /* Khumi Awa Chin (retired code) -> Chin */ {"ckb", HB_TAG('K','U','R',' ')}, /* Central Kurdish -> Kurdish */ + {"ckn", HB_TAG('Q','I','N',' ')}, /* Kaang Chin -> Chin */ + {"cks", HB_TAG('C','P','P',' ')}, /* Tayo -> Creoles */ {"ckt", HB_TAG('C','H','K',' ')}, /* Chukot -> Chukchi */ + {"ckz", HB_TAG('M','Y','N',' ')}, /* Cakchiquel-Quiché Mixed Language -> Mayan */ {"clc", HB_TAG('A','T','H',' ')}, /* Chilcotin -> Athapaskan */ {"cld", HB_TAG('S','Y','R',' ')}, /* Chaldean Neo-Aramaic -> Syriac */ {"cle", HB_TAG('C','C','H','N')}, /* Lealao Chinantec -> Chinantec */ - {"cmn", HB_TAG('Z','H','S',' ')}, /* Mandarin Chinese -> Chinese Simplified */ + {"clj", HB_TAG('Q','I','N',' ')}, /* Laitu Chin -> Chin */ + {"clt", HB_TAG('Q','I','N',' ')}, /* Lautu Chin -> Chin */ + {"cmn", HB_TAG('Z','H','S',' ')}, /* Mandarin Chinese -> Chinese, Simplified */ {"cmr", HB_TAG('Q','I','N',' ')}, /* Mro-Khimi Chin -> Chin */ {"cnb", HB_TAG('Q','I','N',' ')}, /* Chinbon Chin -> Chin */ {"cnh", HB_TAG('Q','I','N',' ')}, /* Hakha Chin -> Chin */ {"cnk", HB_TAG('Q','I','N',' ')}, /* Khumi Chin -> Chin */ {"cnl", HB_TAG('C','C','H','N')}, /* Lalana Chinantec -> Chinantec */ - {"cnp", HB_TAG('Z','H','S',' ')}, /* Northern Ping Chinese -> Chinese Simplified */ + {"cnp", HB_TAG('Z','H','S',' ')}, /* Northern Ping Chinese -> Chinese, Simplified */ + {"cnr", HB_TAG('S','R','B',' ')}, /* Montenegrin -> Serbian */ {"cnt", HB_TAG('C','C','H','N')}, /* Tepetotutla Chinantec -> Chinantec */ + {"cnu", HB_TAG('B','B','R',' ')}, /* Chenoua -> Berber */ {"cnw", HB_TAG('Q','I','N',' ')}, /* Ngawn Chin -> Chin */ {"co", HB_TAG('C','O','S',' ')}, /* Corsican */ {"coa", HB_TAG('M','L','Y',' ')}, /* Cocos Islands Malay -> Malay */ + {"cob", HB_TAG('M','Y','N',' ')}, /* Chicomuceltec -> Mayan */ /*{"cop", HB_TAG('C','O','P',' ')},*/ /* Coptic */ {"coq", HB_TAG('A','T','H',' ')}, /* Coquille -> Athapaskan */ {"cpa", HB_TAG('C','C','H','N')}, /* Palantla Chinantec -> Chinantec */ {"cpe", HB_TAG('C','P','P',' ')}, /* English-based creoles and pidgins [family] -> Creoles */ {"cpf", HB_TAG('C','P','P',' ')}, /* French-based creoles and pidgins [family] -> Creoles */ + {"cpi", HB_TAG('C','P','P',' ')}, /* Chinese Pidgin English -> Creoles */ /*{"cpp", HB_TAG('C','P','P',' ')},*/ /* Portuguese-based creoles and pidgins [family] -> Creoles */ - {"cpx", HB_TAG('Z','H','S',' ')}, /* Pu-Xian Chinese -> Chinese Simplified */ + {"cpx", HB_TAG('Z','H','S',' ')}, /* Pu-Xian Chinese -> Chinese, Simplified */ {"cqd", HB_TAG('H','M','N',' ')}, /* Chuanqiandian Cluster Miao -> Hmong */ {"cqu", HB_TAG('Q','U','H',' ')}, /* Chilean Quechua (retired code) -> Quechua (Bolivia) */ + {"cqu", HB_TAG('Q','U','Z',' ')}, /* Chilean Quechua (retired code) -> Quechua */ {"cr", HB_TAG('C','R','E',' ')}, /* Cree [macrolanguage] */ - {"cr", HB_TAG('Y','C','R',' ')}, /* Cree [macrolanguage] -> Y-Cree */ {"crh", HB_TAG('C','R','T',' ')}, /* Crimean Tatar */ + {"cri", HB_TAG('C','P','P',' ')}, /* Sãotomense -> Creoles */ {"crj", HB_TAG('E','C','R',' ')}, /* Southern East Cree -> Eastern Cree */ + {"crj", HB_TAG('Y','C','R',' ')}, /* Southern East Cree -> Y-Cree */ + {"crj", HB_TAG('C','R','E',' ')}, /* Southern East Cree -> Cree */ {"crk", HB_TAG('W','C','R',' ')}, /* Plains Cree -> West-Cree */ + {"crk", HB_TAG('Y','C','R',' ')}, /* Plains Cree -> Y-Cree */ + {"crk", HB_TAG('C','R','E',' ')}, /* Plains Cree -> Cree */ {"crl", HB_TAG('E','C','R',' ')}, /* Northern East Cree -> Eastern Cree */ + {"crl", HB_TAG('Y','C','R',' ')}, /* Northern East Cree -> Y-Cree */ + {"crl", HB_TAG('C','R','E',' ')}, /* Northern East Cree -> Cree */ {"crm", HB_TAG('M','C','R',' ')}, /* Moose Cree */ {"crm", HB_TAG('L','C','R',' ')}, /* Moose Cree -> L-Cree */ + {"crm", HB_TAG('C','R','E',' ')}, /* Moose Cree -> Cree */ {"crp", HB_TAG('C','P','P',' ')}, /* Creoles and pidgins [family] -> Creoles */ + {"crr", HB_TAG_NONE }, /* Carolina Algonquian != Carrier */ + {"crs", HB_TAG('C','P','P',' ')}, /* Seselwa Creole French -> Creoles */ + {"crt", HB_TAG_NONE }, /* Iyojwa'ja Chorote != Crimean Tatar */ {"crx", HB_TAG('C','R','R',' ')}, /* Carrier */ {"crx", HB_TAG('A','T','H',' ')}, /* Carrier -> Athapaskan */ {"cs", HB_TAG('C','S','Y',' ')}, /* Czech */ {"csa", HB_TAG('C','C','H','N')}, /* Chiltepec Chinantec -> Chinantec */ /*{"csb", HB_TAG('C','S','B',' ')},*/ /* Kashubian */ {"csh", HB_TAG('Q','I','N',' ')}, /* Asho Chin -> Chin */ + {"csj", HB_TAG('Q','I','N',' ')}, /* Songlai Chin -> Chin */ + {"csl", HB_TAG_NONE }, /* Chinese Sign Language != Church Slavonic */ {"cso", HB_TAG('C','C','H','N')}, /* Sochiapam Chinantec -> Chinantec */ - {"csp", HB_TAG('Z','H','S',' ')}, /* Southern Ping Chinese -> Chinese Simplified */ + {"csp", HB_TAG('Z','H','S',' ')}, /* Southern Ping Chinese -> Chinese, Simplified */ + {"csv", HB_TAG('Q','I','N',' ')}, /* Sumtu Chin -> Chin */ {"csw", HB_TAG('N','C','R',' ')}, /* Swampy Cree -> N-Cree */ {"csw", HB_TAG('N','H','C',' ')}, /* Swampy Cree -> Norway House Cree */ + {"csw", HB_TAG('C','R','E',' ')}, /* Swampy Cree -> Cree */ {"csy", HB_TAG('Q','I','N',' ')}, /* Siyin Chin -> Chin */ {"ctc", HB_TAG('A','T','H',' ')}, /* Chetco -> Athapaskan */ {"ctd", HB_TAG('Q','I','N',' ')}, /* Tedim Chin -> Chin */ {"cte", HB_TAG('C','C','H','N')}, /* Tepinapa Chinantec -> Chinantec */ /*{"ctg", HB_TAG('C','T','G',' ')},*/ /* Chittagonian */ + {"cth", HB_TAG('Q','I','N',' ')}, /* Thaiphum Chin -> Chin */ {"ctl", HB_TAG('C','C','H','N')}, /* Tlacoatzintepec Chinantec -> Chinantec */ {"cts", HB_TAG('B','I','K',' ')}, /* Northern Catanduanes Bikol -> Bikol */ + {"ctu", HB_TAG('M','Y','N',' ')}, /* Chol -> Mayan */ {"cu", HB_TAG('C','S','L',' ')}, /* Church Slavonic */ {"cuc", HB_TAG('C','C','H','N')}, /* Usila Chinantec -> Chinantec */ /*{"cuk", HB_TAG('C','U','K',' ')},*/ /* San Blas Kuna */ @@ -246,39 +352,50 @@ static const LangTag ot_languages[] = { {"cvn", HB_TAG('C','C','H','N')}, /* Valle Nacional Chinantec -> Chinantec */ {"cwd", HB_TAG('D','C','R',' ')}, /* Woods Cree */ {"cwd", HB_TAG('T','C','R',' ')}, /* Woods Cree -> TH-Cree */ + {"cwd", HB_TAG('C','R','E',' ')}, /* Woods Cree -> Cree */ {"cy", HB_TAG('W','E','L',' ')}, /* Welsh */ - {"czh", HB_TAG('Z','H','S',' ')}, /* Huizhou Chinese -> Chinese Simplified */ - {"czo", HB_TAG('Z','H','S',' ')}, /* Min Zhong Chinese -> Chinese Simplified */ + {"czh", HB_TAG('Z','H','S',' ')}, /* Huizhou Chinese -> Chinese, Simplified */ + {"czo", HB_TAG('Z','H','S',' ')}, /* Min Zhong Chinese -> Chinese, Simplified */ {"czt", HB_TAG('Q','I','N',' ')}, /* Zotung Chin -> Chin */ {"da", HB_TAG('D','A','N',' ')}, /* Danish */ {"dao", HB_TAG('Q','I','N',' ')}, /* Daai Chin -> Chin */ {"dap", HB_TAG('N','I','S',' ')}, /* Nisi (India) (retired code) */ /*{"dar", HB_TAG('D','A','R',' ')},*/ /* Dargwa */ /*{"dax", HB_TAG('D','A','X',' ')},*/ /* Dayi */ + {"dcr", HB_TAG('C','P','P',' ')}, /* Negerhollands -> Creoles */ {"de", HB_TAG('D','E','U',' ')}, /* German */ {"den", HB_TAG('S','L','A',' ')}, /* Slave (Athapascan) [macrolanguage] -> Slavey */ {"den", HB_TAG('A','T','H',' ')}, /* Slave (Athapascan) [macrolanguage] -> Athapaskan */ -/*{"dgo", HB_TAG('D','G','O',' ')},*/ /* Dogri */ + {"dep", HB_TAG('C','P','P',' ')}, /* Pidgin Delaware -> Creoles */ + {"dgo", HB_TAG('D','G','O',' ')}, /* Dogri (individual language) */ + {"dgo", HB_TAG('D','G','R',' ')}, /* Dogri (macrolanguage) */ {"dgr", HB_TAG('A','T','H',' ')}, /* Dogrib -> Athapaskan */ {"dhd", HB_TAG('M','A','W',' ')}, /* Dhundari -> Marwari */ /*{"dhg", HB_TAG('D','H','G',' ')},*/ /* Dhangu */ + {"dhv", HB_TAG_NONE }, /* Dehu != Divehi (Dhivehi, Maldivian) (deprecated) */ {"dib", HB_TAG('D','N','K',' ')}, /* South Central Dinka -> Dinka */ {"dik", HB_TAG('D','N','K',' ')}, /* Southwestern Dinka -> Dinka */ {"din", HB_TAG('D','N','K',' ')}, /* Dinka [macrolanguage] */ {"dip", HB_TAG('D','N','K',' ')}, /* Northeastern Dinka -> Dinka */ -/*{"diq", HB_TAG('D','I','Q',' ')},*/ /* Dimli */ + {"diq", HB_TAG('D','I','Q',' ')}, /* Dimli */ + {"diq", HB_TAG('Z','Z','A',' ')}, /* Dimli -> Zazaki */ {"diw", HB_TAG('D','N','K',' ')}, /* Northwestern Dinka -> Dinka */ {"dje", HB_TAG('D','J','R',' ')}, /* Zarma */ + {"djk", HB_TAG('C','P','P',' ')}, /* Eastern Maroon Creole -> Creoles */ {"djr", HB_TAG('D','J','R','0')}, /* Djambarrpuyngu */ {"dks", HB_TAG('D','N','K',' ')}, /* Southeastern Dinka -> Dinka */ {"dng", HB_TAG('D','U','N',' ')}, /* Dungan */ /*{"dnj", HB_TAG('D','N','J',' ')},*/ /* Dan */ - {"doi", HB_TAG('D','G','R',' ')}, /* Dogri [macrolanguage] */ + {"dnk", HB_TAG_NONE }, /* Dengka != Dinka */ + {"doi", HB_TAG('D','G','R',' ')}, /* Dogri (macrolanguage) [macrolanguage] */ {"drh", HB_TAG('M','N','G',' ')}, /* Darkhat (retired code) -> Mongolian */ + {"dri", HB_TAG_NONE }, /* C'Lela != Dari */ {"drw", HB_TAG('D','R','I',' ')}, /* Darwazi (retired code) -> Dari */ + {"drw", HB_TAG('F','A','R',' ')}, /* Darwazi (retired code) -> Persian */ {"dsb", HB_TAG('L','S','B',' ')}, /* Lower Sorbian */ {"dty", HB_TAG('N','E','P',' ')}, /* Dotyali -> Nepali */ /*{"duj", HB_TAG('D','U','J',' ')},*/ /* Dhuwal (retired code) */ + {"dun", HB_TAG_NONE }, /* Dusun Deyah != Dungan */ {"dup", HB_TAG('M','L','Y',' ')}, /* Duano -> Malay */ {"dv", HB_TAG('D','I','V',' ')}, /* Divehi (Dhivehi, Maldivian) */ {"dv", HB_TAG('D','H','V',' ')}, /* Divehi (Dhivehi, Maldivian) (deprecated) */ @@ -287,16 +404,20 @@ static const LangTag ot_languages[] = { {"dwy", HB_TAG('D','U','J',' ')}, /* Dhuwaya -> Dhuwal */ {"dyu", HB_TAG('J','U','L',' ')}, /* Dyula -> Jula */ {"dz", HB_TAG('D','Z','N',' ')}, /* Dzongkha */ + {"dzn", HB_TAG_NONE }, /* Dzando != Dzongkha */ + {"ecr", HB_TAG_NONE }, /* Eteocretan != Eastern Cree */ {"ee", HB_TAG('E','W','E',' ')}, /* Ewe */ /*{"efi", HB_TAG('E','F','I',' ')},*/ /* Efik */ {"ekk", HB_TAG('E','T','I',' ')}, /* Standard Estonian -> Estonian */ + {"eky", HB_TAG('K','R','N',' ')}, /* Eastern Kayah -> Karen */ {"el", HB_TAG('E','L','L',' ')}, /* Modern Greek (1453-) -> Greek */ {"emk", HB_TAG('E','M','K',' ')}, /* Eastern Maninkakan */ {"emk", HB_TAG('M','N','K',' ')}, /* Eastern Maninkakan -> Maninka */ + {"emy", HB_TAG('M','Y','N',' ')}, /* Epigraphic Mayan -> Mayan */ {"en", HB_TAG('E','N','G',' ')}, /* English */ {"enb", HB_TAG('K','A','L',' ')}, /* Markweeta -> Kalenjin */ - {"enf", HB_TAG('F','N','E',' ')}, /* Forest Enets -> Forest Nenets */ - {"enh", HB_TAG('T','N','E',' ')}, /* Tundra Enets -> Tundra Nenets */ + {"enf", HB_TAG('F','N','E',' ')}, /* Forest Enets */ + {"enh", HB_TAG('T','N','E',' ')}, /* Tundra Enets */ {"eo", HB_TAG('N','T','O',' ')}, /* Esperanto */ {"es", HB_TAG('E','S','P',' ')}, /* Spanish */ {"esg", HB_TAG('G','O','N',' ')}, /* Aheri Gondi -> Gondi */ @@ -306,13 +427,18 @@ static const LangTag ot_languages[] = { {"et", HB_TAG('E','T','I',' ')}, /* Estonian [macrolanguage] */ {"eto", HB_TAG('B','T','I',' ')}, /* Eton (Cameroon) -> Beti */ {"eu", HB_TAG('E','U','Q',' ')}, /* Basque */ + {"euq", HB_TAG_NONE }, /* Basque [family] != Basque */ {"eve", HB_TAG('E','V','N',' ')}, /* Even */ {"evn", HB_TAG('E','V','K',' ')}, /* Evenki */ {"ewo", HB_TAG('B','T','I',' ')}, /* Ewondo -> Beti */ {"eyo", HB_TAG('K','A','L',' ')}, /* Keiyo -> Kalenjin */ {"fa", HB_TAG('F','A','R',' ')}, /* Persian [macrolanguage] */ + {"fab", HB_TAG('C','P','P',' ')}, /* Fa d'Ambu -> Creoles */ {"fan", HB_TAG('F','A','N','0')}, /* Fang (Equatorial Guinea) */ -/*{"fat", HB_TAG('F','A','T',' ')},*/ /* Fanti */ + {"fan", HB_TAG('B','T','I',' ')}, /* Fang (Equatorial Guinea) -> Beti */ + {"far", HB_TAG_NONE }, /* Fataleka != Persian */ + {"fat", HB_TAG('F','A','T',' ')}, /* Fanti */ + {"fat", HB_TAG('A','K','A',' ')}, /* Fanti -> Akan */ {"fbl", HB_TAG('B','I','K',' ')}, /* West Albay Bikol -> Bikol */ {"ff", HB_TAG('F','U','L',' ')}, /* Fulah [macrolanguage] */ {"ffm", HB_TAG('F','U','L',' ')}, /* Maasina Fulfulde -> Fulah */ @@ -321,9 +447,13 @@ static const LangTag ot_languages[] = { {"fj", HB_TAG('F','J','I',' ')}, /* Fijian */ {"flm", HB_TAG('H','A','L',' ')}, /* Halam (Falam Chin) (retired code) */ {"flm", HB_TAG('Q','I','N',' ')}, /* Falam Chin (retired code) -> Chin */ -/*{"fmp", HB_TAG('F','M','P',' ')},*/ /* Fe’fe’ */ + {"fmp", HB_TAG('F','M','P',' ')}, /* Fe’fe’ */ + {"fmp", HB_TAG('B','M','L',' ')}, /* Fe'fe' -> Bamileke */ + {"fng", HB_TAG('C','P','P',' ')}, /* Fanagalo -> Creoles */ {"fo", HB_TAG('F','O','S',' ')}, /* Faroese */ /*{"fon", HB_TAG('F','O','N',' ')},*/ /* Fon */ + {"fos", HB_TAG_NONE }, /* Siraya != Faroese */ + {"fpe", HB_TAG('C','P','P',' ')}, /* Fernando Po Creole English -> Creoles */ {"fr", HB_TAG('F','R','A',' ')}, /* French */ /*{"frc", HB_TAG('F','R','C',' ')},*/ /* Cajun French */ /*{"frp", HB_TAG('F','R','P',' ')},*/ /* Arpitan */ @@ -331,60 +461,89 @@ static const LangTag ot_languages[] = { {"fuc", HB_TAG('F','U','L',' ')}, /* Pulaar -> Fulah */ {"fue", HB_TAG('F','U','L',' ')}, /* Borgu Fulfulde -> Fulah */ {"fuf", HB_TAG('F','T','A',' ')}, /* Pular -> Futa */ + {"fuf", HB_TAG('F','U','L',' ')}, /* Pular -> Fulah */ {"fuh", HB_TAG('F','U','L',' ')}, /* Western Niger Fulfulde -> Fulah */ {"fui", HB_TAG('F','U','L',' ')}, /* Bagirmi Fulfulde -> Fulah */ {"fuq", HB_TAG('F','U','L',' ')}, /* Central-Eastern Niger Fulfulde -> Fulah */ {"fur", HB_TAG('F','R','L',' ')}, /* Friulian */ -/*{"fuv", HB_TAG('F','U','V',' ')},*/ /* Nigerian Fulfulde */ + {"fuv", HB_TAG('F','U','V',' ')}, /* Nigerian Fulfulde */ + {"fuv", HB_TAG('F','U','L',' ')}, /* Nigerian Fulfulde -> Fulah */ {"fy", HB_TAG('F','R','I',' ')}, /* Western Frisian -> Frisian */ {"ga", HB_TAG('I','R','I',' ')}, /* Irish */ {"gaa", HB_TAG('G','A','D',' ')}, /* Ga */ + {"gac", HB_TAG('C','P','P',' ')}, /* Mixed Great Andamanese -> Creoles */ + {"gad", HB_TAG_NONE }, /* Gaddang != Ga */ + {"gae", HB_TAG_NONE }, /* Guarequena != Scottish Gaelic (Gaelic) */ /*{"gag", HB_TAG('G','A','G',' ')},*/ /* Gagauz */ - {"gan", HB_TAG('Z','H','S',' ')}, /* Gan Chinese -> Chinese Simplified */ + {"gal", HB_TAG_NONE }, /* Galolen != Galician */ + {"gan", HB_TAG('Z','H','S',' ')}, /* Gan Chinese -> Chinese, Simplified */ + {"gar", HB_TAG_NONE }, /* Galeya != Garshuni */ + {"gaw", HB_TAG_NONE }, /* Nobonob != Garhwali */ {"gax", HB_TAG('O','R','O',' ')}, /* Borana-Arsi-Guji Oromo -> Oromo */ {"gaz", HB_TAG('O','R','O',' ')}, /* West Central Oromo -> Oromo */ {"gbm", HB_TAG('G','A','W',' ')}, /* Garhwali */ {"gce", HB_TAG('A','T','H',' ')}, /* Galice -> Athapaskan */ + {"gcf", HB_TAG('C','P','P',' ')}, /* Guadeloupean Creole French -> Creoles */ + {"gcl", HB_TAG('C','P','P',' ')}, /* Grenadian Creole English -> Creoles */ + {"gcr", HB_TAG('C','P','P',' ')}, /* Guianese Creole French -> Creoles */ {"gd", HB_TAG('G','A','E',' ')}, /* Scottish Gaelic (Gaelic) */ {"gda", HB_TAG('R','A','J',' ')}, /* Gade Lohar -> Rajasthani */ /*{"gez", HB_TAG('G','E','Z',' ')},*/ /* Geez */ {"ggo", HB_TAG('G','O','N',' ')}, /* Southern Gondi (retired code) -> Gondi */ + {"gha", HB_TAG('B','B','R',' ')}, /* Ghadamès -> Berber */ + {"ghk", HB_TAG('K','R','N',' ')}, /* Geko Karen -> Karen */ + {"gho", HB_TAG('B','B','R',' ')}, /* Ghomara -> Berber */ + {"gib", HB_TAG('C','P','P',' ')}, /* Gibanawa -> Creoles */ /*{"gih", HB_TAG('G','I','H',' ')},*/ /* Githabul */ {"gil", HB_TAG('G','I','L','0')}, /* Kiribati (Gilbertese) */ {"gju", HB_TAG('R','A','J',' ')}, /* Gujari -> Rajasthani */ -/*{"gkp", HB_TAG('G','K','P',' ')},*/ /* Guinea Kpelle -> Kpelle (Guinea) */ + {"gkp", HB_TAG('G','K','P',' ')}, /* Guinea Kpelle -> Kpelle (Guinea) */ + {"gkp", HB_TAG('K','P','L',' ')}, /* Guinea Kpelle -> Kpelle */ {"gl", HB_TAG('G','A','L',' ')}, /* Galician */ {"gld", HB_TAG('N','A','N',' ')}, /* Nanai */ /*{"glk", HB_TAG('G','L','K',' ')},*/ /* Gilaki */ + {"gmz", HB_TAG_NONE }, /* Mgbolizhia != Gumuz */ {"gn", HB_TAG('G','U','A',' ')}, /* Guarani [macrolanguage] */ + {"gnb", HB_TAG('Q','I','N',' ')}, /* Gangte -> Chin */ /*{"gnn", HB_TAG('G','N','N',' ')},*/ /* Gumatj */ {"gno", HB_TAG('G','O','N',' ')}, /* Northern Gondi -> Gondi */ {"gnw", HB_TAG('G','U','A',' ')}, /* Western Bolivian Guaranà -> Guarani */ /*{"gog", HB_TAG('G','O','G',' ')},*/ /* Gogo */ {"gom", HB_TAG('K','O','K',' ')}, /* Goan Konkani -> Konkani */ /*{"gon", HB_TAG('G','O','N',' ')},*/ /* Gondi [macrolanguage] */ + {"goq", HB_TAG('C','P','P',' ')}, /* Gorap -> Creoles */ + {"gox", HB_TAG('B','A','D','0')}, /* Gobu -> Banda */ + {"gpe", HB_TAG('C','P','P',' ')}, /* Ghanaian Pidgin English -> Creoles */ + {"gro", HB_TAG_NONE }, /* Groma != Garo */ + {"grr", HB_TAG('B','B','R',' ')}, /* Taznatit -> Berber */ {"grt", HB_TAG('G','R','O',' ')}, /* Garo */ {"gru", HB_TAG('S','O','G',' ')}, /* Kistane -> Sodo Gurage */ {"gsw", HB_TAG('A','L','S',' ')}, /* Alsatian */ {"gu", HB_TAG('G','U','J',' ')}, /* Gujarati */ + {"gua", HB_TAG_NONE }, /* Shiki != Guarani */ /*{"guc", HB_TAG('G','U','C',' ')},*/ /* Wayuu */ /*{"guf", HB_TAG('G','U','F',' ')},*/ /* Gupapuyngu */ {"gug", HB_TAG('G','U','A',' ')}, /* Paraguayan Guaranà -> Guarani */ {"gui", HB_TAG('G','U','A',' ')}, /* Eastern Bolivian Guaranà -> Guarani */ {"guk", HB_TAG('G','M','Z',' ')}, /* Gumuz */ - {"guk", HB_TAG('G','U','K',' ')}, /* Gumuz (SIL fonts) */ + {"gul", HB_TAG('C','P','P',' ')}, /* Sea Island Creole English -> Creoles */ {"gun", HB_TAG('G','U','A',' ')}, /* Mbyá Guaranà -> Guarani */ /*{"guz", HB_TAG('G','U','Z',' ')},*/ /* Gusii */ {"gv", HB_TAG('M','N','X',' ')}, /* Manx */ {"gwi", HB_TAG('A','T','H',' ')}, /* Gwichʼin -> Athapaskan */ + {"gyn", HB_TAG('C','P','P',' ')}, /* Guyanese Creole English -> Creoles */ {"ha", HB_TAG('H','A','U',' ')}, /* Hausa */ {"haa", HB_TAG('A','T','H',' ')}, /* Han -> Athapaskan */ {"hae", HB_TAG('O','R','O',' ')}, /* Eastern Oromo -> Oromo */ - {"hak", HB_TAG('Z','H','S',' ')}, /* Hakka Chinese -> Chinese Simplified */ + {"hai", HB_TAG_NONE }, /* Haida [macrolanguage] != Haitian (Haitian Creole) */ + {"hak", HB_TAG('Z','H','S',' ')}, /* Hakka Chinese -> Chinese, Simplified */ + {"hal", HB_TAG_NONE }, /* Halang != Halam (Falam Chin) */ {"har", HB_TAG('H','R','I',' ')}, /* Harari */ /*{"haw", HB_TAG('H','A','W',' ')},*/ /* Hawaiian */ /*{"hay", HB_TAG('H','A','Y',' ')},*/ /* Haya */ /*{"haz", HB_TAG('H','A','Z',' ')},*/ /* Hazaragi */ + {"hbn", HB_TAG_NONE }, /* Heiban != Hammer-Banna */ + {"hca", HB_TAG('C','P','P',' ')}, /* Andaman Creole Hindi -> Creoles */ {"he", HB_TAG('I','W','R',' ')}, /* Hebrew */ {"hea", HB_TAG('H','M','N',' ')}, /* Northern Qiandong Miao -> Hmong */ {"hi", HB_TAG('H','I','N',' ')}, /* Hindi */ @@ -404,6 +563,7 @@ static const LangTag ot_languages[] = { /*{"hmn", HB_TAG('H','M','N',' ')},*/ /* Hmong [macrolanguage] */ {"hmp", HB_TAG('H','M','N',' ')}, /* Northern Mashan Hmong -> Hmong */ {"hmq", HB_TAG('H','M','N',' ')}, /* Eastern Qiandong Miao -> Hmong */ + {"hmr", HB_TAG('Q','I','N',' ')}, /* Hmar -> Chin */ {"hms", HB_TAG('H','M','N',' ')}, /* Southern Qiandong Miao -> Hmong */ {"hmw", HB_TAG('H','M','N',' ')}, /* Western Mashan Hmong -> Hmong */ {"hmy", HB_TAG('H','M','N',' ')}, /* Southern Guiyang Hmong -> Hmong */ @@ -413,17 +573,23 @@ static const LangTag ot_languages[] = { {"hnj", HB_TAG('H','M','N',' ')}, /* Hmong Njua -> Hmong */ {"hno", HB_TAG('H','N','D',' ')}, /* Northern Hindko -> Hindko */ {"ho", HB_TAG('H','M','O',' ')}, /* Hiri Motu */ + {"ho", HB_TAG('C','P','P',' ')}, /* Hiri Motu -> Creoles */ {"hoc", HB_TAG('H','O',' ',' ')}, /* Ho */ {"hoi", HB_TAG('A','T','H',' ')}, /* Holikachuk -> Athapaskan */ {"hoj", HB_TAG('H','A','R',' ')}, /* Hadothi -> Harauti */ + {"hoj", HB_TAG('R','A','J',' ')}, /* Hadothi -> Rajasthani */ {"hr", HB_TAG('H','R','V',' ')}, /* Croatian */ + {"hra", HB_TAG('Q','I','N',' ')}, /* Hrangkhol -> Chin */ {"hrm", HB_TAG('H','M','N',' ')}, /* Horned Miao -> Hmong */ {"hsb", HB_TAG('U','S','B',' ')}, /* Upper Sorbian */ - {"hsn", HB_TAG('Z','H','S',' ')}, /* Xiang Chinese -> Chinese Simplified */ + {"hsn", HB_TAG('Z','H','S',' ')}, /* Xiang Chinese -> Chinese, Simplified */ {"ht", HB_TAG('H','A','I',' ')}, /* Haitian (Haitian Creole) */ + {"ht", HB_TAG('C','P','P',' ')}, /* Haitian -> Creoles */ {"hu", HB_TAG('H','U','N',' ')}, /* Hungarian */ {"huj", HB_TAG('H','M','N',' ')}, /* Northern Guiyang Hmong -> Hmong */ {"hup", HB_TAG('A','T','H',' ')}, /* Hupa -> Athapaskan */ + {"hus", HB_TAG('M','Y','N',' ')}, /* Huastec -> Mayan */ + {"hwc", HB_TAG('C','P','P',' ')}, /* Hawai'i Creole English -> Creoles */ {"hy", HB_TAG('H','Y','E','0')}, /* Armenian -> Armenian East */ {"hy", HB_TAG('H','Y','E',' ')}, /* Armenian */ {"hyw", HB_TAG('H','Y','E',' ')}, /* Western Armenian -> Armenian */ @@ -431,38 +597,65 @@ static const LangTag ot_languages[] = { {"ia", HB_TAG('I','N','A',' ')}, /* Interlingua (International Auxiliary Language Association) */ /*{"iba", HB_TAG('I','B','A',' ')},*/ /* Iban */ /*{"ibb", HB_TAG('I','B','B',' ')},*/ /* Ibibio */ + {"iby", HB_TAG('I','J','O',' ')}, /* Ibani -> Ijo */ + {"icr", HB_TAG('C','P','P',' ')}, /* Islander Creole English -> Creoles */ {"id", HB_TAG('I','N','D',' ')}, /* Indonesian */ + {"id", HB_TAG('M','L','Y',' ')}, /* Indonesian -> Malay */ {"ida", HB_TAG('L','U','H',' ')}, /* Idakho-Isukha-Tiriki -> Luyia */ + {"idb", HB_TAG('C','P','P',' ')}, /* Indo-Portuguese -> Creoles */ {"ie", HB_TAG('I','L','E',' ')}, /* Interlingue */ {"ig", HB_TAG('I','B','O',' ')}, /* Igbo */ {"igb", HB_TAG('E','B','I',' ')}, /* Ebira */ + {"ihb", HB_TAG('C','P','P',' ')}, /* Iha Based Pidgin -> Creoles */ {"ii", HB_TAG('Y','I','M',' ')}, /* Sichuan Yi -> Yi Modern */ {"ijc", HB_TAG('I','J','O',' ')}, /* Izon -> Ijo */ + {"ije", HB_TAG('I','J','O',' ')}, /* Biseni -> Ijo */ + {"ijn", HB_TAG('I','J','O',' ')}, /* Kalabari -> Ijo */ /*{"ijo", HB_TAG('I','J','O',' ')},*/ /* Ijo [family] */ + {"ijs", HB_TAG('I','J','O',' ')}, /* Southeast Ijo -> Ijo */ {"ik", HB_TAG('I','P','K',' ')}, /* Inupiaq [macrolanguage] -> Inupiat */ {"ike", HB_TAG('I','N','U',' ')}, /* Eastern Canadian Inuktitut -> Inuktitut */ {"ikt", HB_TAG('I','N','U',' ')}, /* Inuinnaqtun -> Inuktitut */ /*{"ilo", HB_TAG('I','L','O',' ')},*/ /* Iloko -> Ilokano */ {"in", HB_TAG('I','N','D',' ')}, /* Indonesian (retired code) */ + {"in", HB_TAG('M','L','Y',' ')}, /* Indonesian (retired code) -> Malay */ {"ing", HB_TAG('A','T','H',' ')}, /* Degexit'an -> Athapaskan */ {"inh", HB_TAG('I','N','G',' ')}, /* Ingush */ {"io", HB_TAG('I','D','O',' ')}, /* Ido */ + {"iri", HB_TAG_NONE }, /* Rigwe != Irish */ {"is", HB_TAG('I','S','L',' ')}, /* Icelandic */ + {"ism", HB_TAG_NONE }, /* Masimasi != Inari Sami */ {"it", HB_TAG('I','T','A',' ')}, /* Italian */ + {"itz", HB_TAG('M','Y','N',' ')}, /* Itzá -> Mayan */ {"iu", HB_TAG('I','N','U',' ')}, /* Inuktitut [macrolanguage] */ {"iw", HB_TAG('I','W','R',' ')}, /* Hebrew (retired code) */ + {"ixl", HB_TAG('M','Y','N',' ')}, /* Ixil -> Mayan */ {"ja", HB_TAG('J','A','N',' ')}, /* Japanese */ + {"jac", HB_TAG('M','Y','N',' ')}, /* Popti' -> Mayan */ {"jak", HB_TAG('M','L','Y',' ')}, /* Jakun -> Malay */ -/*{"jam", HB_TAG('J','A','M',' ')},*/ /* Jamaican Creole English -> Jamaican Creole */ + {"jam", HB_TAG('J','A','M',' ')}, /* Jamaican Creole English -> Jamaican Creole */ + {"jam", HB_TAG('C','P','P',' ')}, /* Jamaican Creole English -> Creoles */ + {"jan", HB_TAG_NONE }, /* Jandai != Japanese */ {"jax", HB_TAG('M','L','Y',' ')}, /* Jambi Malay -> Malay */ + {"jbe", HB_TAG('B','B','R',' ')}, /* Judeo-Berber -> Berber */ + {"jbn", HB_TAG('B','B','R',' ')}, /* Nafusi -> Berber */ /*{"jbo", HB_TAG('J','B','O',' ')},*/ /* Lojban */ /*{"jct", HB_TAG('J','C','T',' ')},*/ /* Krymchak */ + {"jgo", HB_TAG('B','M','L',' ')}, /* Ngomba -> Bamileke */ {"ji", HB_TAG('J','I','I',' ')}, /* Yiddish (retired code) */ + {"jii", HB_TAG_NONE }, /* Jiiddu != Yiddish */ + {"jkm", HB_TAG('K','R','N',' ')}, /* Mobwa Karen -> Karen */ + {"jkp", HB_TAG('K','R','N',' ')}, /* Paku Karen -> Karen */ + {"jud", HB_TAG_NONE }, /* Worodougou != Ladino */ + {"jul", HB_TAG_NONE }, /* Jirel != Jula */ {"jv", HB_TAG('J','A','V',' ')}, /* Javanese */ + {"jvd", HB_TAG('C','P','P',' ')}, /* Javindo -> Creoles */ {"jw", HB_TAG('J','A','V',' ')}, /* Javanese (retired code) */ {"ka", HB_TAG('K','A','T',' ')}, /* Georgian */ {"kaa", HB_TAG('K','R','K',' ')}, /* Karakalpak */ {"kab", HB_TAG('K','A','B','0')}, /* Kabyle */ + {"kab", HB_TAG('B','B','R',' ')}, /* Kabyle -> Berber */ + {"kac", HB_TAG_NONE }, /* Kachin != Kachchi */ {"kam", HB_TAG('K','M','B',' ')}, /* Kamba (Kenya) */ {"kar", HB_TAG('K','R','N',' ')}, /* Karen [family] */ {"kbd", HB_TAG('K','A','B',' ')}, /* Kabardian */ @@ -470,83 +663,139 @@ static const LangTag ot_languages[] = { {"kca", HB_TAG('K','H','K',' ')}, /* Khanty -> Khanty-Kazim */ {"kca", HB_TAG('K','H','S',' ')}, /* Khanty -> Khanty-Shurishkar */ {"kca", HB_TAG('K','H','V',' ')}, /* Khanty -> Khanty-Vakhi */ + {"kcn", HB_TAG('C','P','P',' ')}, /* Nubi -> Creoles */ /*{"kde", HB_TAG('K','D','E',' ')},*/ /* Makonde */ {"kdr", HB_TAG('K','R','M',' ')}, /* Karaim */ {"kdt", HB_TAG('K','U','Y',' ')}, /* Kuy */ -/*{"kea", HB_TAG('K','E','A',' ')},*/ /* Kabuverdianu (Crioulo) */ -/*{"kek", HB_TAG('K','E','K',' ')},*/ /* Kekchi */ + {"kea", HB_TAG('K','E','A',' ')}, /* Kabuverdianu (Crioulo) */ + {"kea", HB_TAG('C','P','P',' ')}, /* Kabuverdianu -> Creoles */ + {"keb", HB_TAG_NONE }, /* Kélé != Kebena */ + {"kek", HB_TAG('K','E','K',' ')}, /* Kekchi */ + {"kek", HB_TAG('M','Y','N',' ')}, /* Kekchà -> Mayan */ {"kex", HB_TAG('K','K','N',' ')}, /* Kukna -> Kokni */ {"kfa", HB_TAG('K','O','D',' ')}, /* Kodava -> Kodagu */ {"kfr", HB_TAG('K','A','C',' ')}, /* Kachhi -> Kachchi */ {"kfx", HB_TAG('K','U','L',' ')}, /* Kullu Pahari -> Kulvi */ {"kfy", HB_TAG('K','M','N',' ')}, /* Kumaoni */ {"kg", HB_TAG('K','O','N','0')}, /* Kongo [macrolanguage] */ + {"kge", HB_TAG_NONE }, /* Komering != Khutsuri Georgian */ {"kha", HB_TAG('K','S','I',' ')}, /* Khasi */ {"khb", HB_TAG('X','B','D',' ')}, /* Lü */ {"khk", HB_TAG('M','N','G',' ')}, /* Halh Mongolian -> Mongolian */ + {"khn", HB_TAG_NONE }, /* Khandesi != Khamti Shan (Microsoft fonts) */ + {"khs", HB_TAG_NONE }, /* Kasua != Khanty-Shurishkar */ + {"kht", HB_TAG('K','H','T',' ')}, /* Khamti -> Khamti Shan */ {"kht", HB_TAG('K','H','N',' ')}, /* Khamti -> Khamti Shan (Microsoft fonts) */ - {"kht", HB_TAG('K','H','T',' ')}, /* Khamti -> Khamti Shan (OpenType spec and SIL fonts) */ + {"khv", HB_TAG_NONE }, /* Khvarshi != Khanty-Vakhi */ /*{"khw", HB_TAG('K','H','W',' ')},*/ /* Khowar */ {"ki", HB_TAG('K','I','K',' ')}, /* Kikuyu (Gikuyu) */ -/*{"kiu", HB_TAG('K','I','U',' ')},*/ /* Kirmanjki */ + {"kis", HB_TAG_NONE }, /* Kis != Kisii */ + {"kiu", HB_TAG('K','I','U',' ')}, /* Kirmanjki */ + {"kiu", HB_TAG('Z','Z','A',' ')}, /* Kirmanjki -> Zazaki */ {"kj", HB_TAG('K','U','A',' ')}, /* Kuanyama */ + {"kjb", HB_TAG('M','Y','N',' ')}, /* Q'anjob'al -> Mayan */ /*{"kjd", HB_TAG('K','J','D',' ')},*/ /* Southern Kiwai */ {"kjh", HB_TAG('K','H','A',' ')}, /* Khakas -> Khakass */ -/*{"kjp", HB_TAG('K','J','P',' ')},*/ /* Pwo Eastern Karen -> Eastern Pwo Karen */ + {"kjp", HB_TAG('K','J','P',' ')}, /* Pwo Eastern Karen -> Eastern Pwo Karen */ + {"kjp", HB_TAG('K','R','N',' ')}, /* Pwo Eastern Karen -> Karen */ + {"kjt", HB_TAG('K','R','N',' ')}, /* Phrae Pwo Karen -> Karen */ /*{"kjz", HB_TAG('K','J','Z',' ')},*/ /* Bumthangkha */ {"kk", HB_TAG('K','A','Z',' ')}, /* Kazakh */ + {"kkn", HB_TAG_NONE }, /* Kon Keu != Kokni */ {"kkz", HB_TAG('A','T','H',' ')}, /* Kaska -> Athapaskan */ {"kl", HB_TAG('G','R','N',' ')}, /* Greenlandic */ + {"klm", HB_TAG_NONE }, /* Migum != Kalmyk */ {"kln", HB_TAG('K','A','L',' ')}, /* Kalenjin [macrolanguage] */ {"km", HB_TAG('K','H','M',' ')}, /* Khmer */ {"kmb", HB_TAG('M','B','N',' ')}, /* Kimbundu -> Mbundu */ + {"kmn", HB_TAG_NONE }, /* Awtuw != Kumaoni */ + {"kmo", HB_TAG_NONE }, /* Kwoma != Komo */ {"kmr", HB_TAG('K','U','R',' ')}, /* Northern Kurdish -> Kurdish */ + {"kms", HB_TAG_NONE }, /* Kamasau != Komso */ + {"kmv", HB_TAG('C','P','P',' ')}, /* Karipúna Creole French -> Creoles */ {"kmw", HB_TAG('K','M','O',' ')}, /* Komo (Democratic Republic of Congo) */ /*{"kmz", HB_TAG('K','M','Z',' ')},*/ /* Khorasani Turkish -> Khorasani Turkic */ {"kn", HB_TAG('K','A','N',' ')}, /* Kannada */ {"knc", HB_TAG('K','N','R',' ')}, /* Central Kanuri -> Kanuri */ {"kng", HB_TAG('K','O','N','0')}, /* Koongo -> Kongo */ + {"knj", HB_TAG('M','Y','N',' ')}, /* Western Kanjobal -> Mayan */ {"knn", HB_TAG('K','O','K',' ')}, /* Konkani */ + {"knr", HB_TAG_NONE }, /* Kaningra != Kanuri */ {"ko", HB_TAG('K','O','R',' ')}, /* Korean */ + {"ko", HB_TAG('K','O','H',' ')}, /* Korean -> Korean Old Hangul */ + {"kod", HB_TAG_NONE }, /* Kodi != Kodagu */ + {"koh", HB_TAG_NONE }, /* Koyo != Korean Old Hangul */ {"koi", HB_TAG('K','O','P',' ')}, /* Komi-Permyak */ + {"koi", HB_TAG('K','O','M',' ')}, /* Komi-Permyak -> Komi */ /*{"kok", HB_TAG('K','O','K',' ')},*/ /* Konkani [macrolanguage] */ + {"kop", HB_TAG_NONE }, /* Waube != Komi-Permyak */ /*{"kos", HB_TAG('K','O','S',' ')},*/ /* Kosraean */ {"koy", HB_TAG('A','T','H',' ')}, /* Koyukon -> Athapaskan */ + {"koz", HB_TAG_NONE }, /* Korak != Komi-Zyrian */ {"kpe", HB_TAG('K','P','L',' ')}, /* Kpelle [macrolanguage] */ + {"kpl", HB_TAG_NONE }, /* Kpala != Kpelle */ + {"kpp", HB_TAG('K','R','N',' ')}, /* Paku Karen (retired code) -> Karen */ {"kpv", HB_TAG('K','O','Z',' ')}, /* Komi-Zyrian */ + {"kpv", HB_TAG('K','O','M',' ')}, /* Komi-Zyrian -> Komi */ {"kpy", HB_TAG('K','Y','K',' ')}, /* Koryak */ {"kqs", HB_TAG('K','I','S',' ')}, /* Northern Kissi -> Kisii */ {"kqy", HB_TAG('K','R','T',' ')}, /* Koorete */ {"kr", HB_TAG('K','N','R',' ')}, /* Kanuri [macrolanguage] */ {"krc", HB_TAG('K','A','R',' ')}, /* Karachay-Balkar -> Karachay */ {"krc", HB_TAG('B','A','L',' ')}, /* Karachay-Balkar -> Balkar */ -/*{"kri", HB_TAG('K','R','I',' ')},*/ /* Krio */ + {"kri", HB_TAG('K','R','I',' ')}, /* Krio */ + {"kri", HB_TAG('C','P','P',' ')}, /* Krio -> Creoles */ + {"krk", HB_TAG_NONE }, /* Kerek != Karakalpak */ /*{"krl", HB_TAG('K','R','L',' ')},*/ /* Karelian */ + {"krm", HB_TAG_NONE }, /* Krim (retired code) != Karaim */ + {"krn", HB_TAG_NONE }, /* Sapo != Karen */ {"krt", HB_TAG('K','N','R',' ')}, /* Tumari Kanuri -> Kanuri */ {"kru", HB_TAG('K','U','U',' ')}, /* Kurukh */ {"ks", HB_TAG('K','S','H',' ')}, /* Kashmiri */ {"ksh", HB_TAG('K','S','H','0')}, /* Kölsch -> Ripuarian */ + {"ksi", HB_TAG_NONE }, /* Krisa != Khasi */ + {"ksm", HB_TAG_NONE }, /* Kumba != Kildin Sami */ {"kss", HB_TAG('K','I','S',' ')}, /* Southern Kisi -> Kisii */ -/*{"ksw", HB_TAG('K','S','W',' ')},*/ /* S’gaw Karen */ + {"ksw", HB_TAG('K','S','W',' ')}, /* S’gaw Karen */ + {"ksw", HB_TAG('K','R','N',' ')}, /* S'gaw Karen -> Karen */ {"ktb", HB_TAG('K','E','B',' ')}, /* Kambaata -> Kebena */ {"ktu", HB_TAG('K','O','N',' ')}, /* Kituba (Democratic Republic of Congo) -> Kikongo */ {"ktw", HB_TAG('A','T','H',' ')}, /* Kato -> Athapaskan */ {"ku", HB_TAG('K','U','R',' ')}, /* Kurdish [macrolanguage] */ + {"kui", HB_TAG_NONE }, /* Kuikúro-Kalapálo != Kui */ + {"kul", HB_TAG_NONE }, /* Kulere != Kulvi */ /*{"kum", HB_TAG('K','U','M',' ')},*/ /* Kumyk */ {"kuu", HB_TAG('A','T','H',' ')}, /* Upper Kuskokwim -> Athapaskan */ + {"kuw", HB_TAG('B','A','D','0')}, /* Kpagua -> Banda */ + {"kuy", HB_TAG_NONE }, /* Kuuku-Ya'u != Kuy */ {"kv", HB_TAG('K','O','M',' ')}, /* Komi [macrolanguage] */ {"kvb", HB_TAG('M','L','Y',' ')}, /* Kubu -> Malay */ + {"kvl", HB_TAG('K','R','N',' ')}, /* Kayaw -> Karen */ + {"kvq", HB_TAG('K','R','N',' ')}, /* Geba Karen -> Karen */ {"kvr", HB_TAG('M','L','Y',' ')}, /* Kerinci -> Malay */ + {"kvt", HB_TAG('K','R','N',' ')}, /* Lahta Karen -> Karen */ + {"kvu", HB_TAG('K','R','N',' ')}, /* Yinbaw Karen -> Karen */ + {"kvy", HB_TAG('K','R','N',' ')}, /* Yintale Karen -> Karen */ {"kw", HB_TAG('C','O','R',' ')}, /* Cornish */ + {"kww", HB_TAG('C','P','P',' ')}, /* Kwinti -> Creoles */ {"kwy", HB_TAG('K','O','N','0')}, /* San Salvador Kongo -> Kongo */ {"kxc", HB_TAG('K','M','S',' ')}, /* Konso -> Komso */ {"kxd", HB_TAG('M','L','Y',' ')}, /* Brunei -> Malay */ + {"kxf", HB_TAG('K','R','N',' ')}, /* Manumanaw Karen -> Karen */ + {"kxk", HB_TAG('K','R','N',' ')}, /* Zayein Karen -> Karen */ {"kxl", HB_TAG('K','U','U',' ')}, /* Nepali Kurux (retired code) -> Kurukh */ {"kxu", HB_TAG('K','U','I',' ')}, /* Kui (India) (retired code) */ {"ky", HB_TAG('K','I','R',' ')}, /* Kirghiz (Kyrgyz) */ -/*{"kyu", HB_TAG('K','Y','U',' ')},*/ /* Western Kayah */ + {"kyk", HB_TAG_NONE }, /* Kamayo != Koryak */ + {"kyu", HB_TAG('K','Y','U',' ')}, /* Western Kayah */ + {"kyu", HB_TAG('K','R','N',' ')}, /* Western Kayah -> Karen */ {"la", HB_TAG('L','A','T',' ')}, /* Latin */ + {"lac", HB_TAG('M','Y','N',' ')}, /* Lacandon -> Mayan */ {"lad", HB_TAG('J','U','D',' ')}, /* Ladino */ + {"lah", HB_TAG_NONE }, /* Lahnda [macrolanguage] != Lahuli */ + {"lak", HB_TAG_NONE }, /* Laka (Nigeria) != Lak */ + {"lam", HB_TAG_NONE }, /* Lamba != Lambani */ + {"laz", HB_TAG_NONE }, /* Aribwatsa != Laz */ {"lb", HB_TAG('L','T','Z',' ')}, /* Luxembourgish */ {"lbe", HB_TAG('L','A','K',' ')}, /* Lak */ {"lbj", HB_TAG('L','D','K',' ')}, /* Ladakhi */ @@ -554,85 +803,128 @@ static const LangTag ot_languages[] = { {"lce", HB_TAG('M','L','Y',' ')}, /* Loncong -> Malay */ {"lcf", HB_TAG('M','L','Y',' ')}, /* Lubu -> Malay */ {"ldi", HB_TAG('K','O','N','0')}, /* Laari -> Kongo */ + {"ldk", HB_TAG_NONE }, /* Leelau != Ladakhi */ /*{"lez", HB_TAG('L','E','Z',' ')},*/ /* Lezghian -> Lezgi */ {"lg", HB_TAG('L','U','G',' ')}, /* Ganda */ {"li", HB_TAG('L','I','M',' ')}, /* Limburgish */ {"lif", HB_TAG('L','M','B',' ')}, /* Limbu */ /*{"lij", HB_TAG('L','I','J',' ')},*/ /* Ligurian */ + {"lir", HB_TAG('C','P','P',' ')}, /* Liberian English -> Creoles */ /*{"lis", HB_TAG('L','I','S',' ')},*/ /* Lisu */ {"liw", HB_TAG('M','L','Y',' ')}, /* Col -> Malay */ + {"liy", HB_TAG('B','A','D','0')}, /* Banda-Bambari -> Banda */ /*{"ljp", HB_TAG('L','J','P',' ')},*/ /* Lampung Api -> Lampung */ {"lkb", HB_TAG('L','U','H',' ')}, /* Kabras -> Luyia */ /*{"lki", HB_TAG('L','K','I',' ')},*/ /* Laki */ {"lko", HB_TAG('L','U','H',' ')}, /* Khayo -> Luyia */ {"lks", HB_TAG('L','U','H',' ')}, /* Kisa -> Luyia */ {"lld", HB_TAG('L','A','D',' ')}, /* Ladin */ + {"lma", HB_TAG_NONE }, /* East Limba != Low Mari */ + {"lmb", HB_TAG_NONE }, /* Merei != Limbu */ {"lmn", HB_TAG('L','A','M',' ')}, /* Lambadi -> Lambani */ /*{"lmo", HB_TAG('L','M','O',' ')},*/ /* Lombard */ + {"lmw", HB_TAG_NONE }, /* Lake Miwok != Lomwe */ {"ln", HB_TAG('L','I','N',' ')}, /* Lingala */ + {"lna", HB_TAG('B','A','D','0')}, /* Langbashe -> Banda */ + {"lnl", HB_TAG('B','A','D','0')}, /* South Central Banda -> Banda */ {"lo", HB_TAG('L','A','O',' ')}, /* Lao */ /*{"lom", HB_TAG('L','O','M',' ')},*/ /* Loma (Liberia) */ + {"lou", HB_TAG('C','P','P',' ')}, /* Louisiana Creole -> Creoles */ /*{"lrc", HB_TAG('L','R','C',' ')},*/ /* Northern Luri -> Luri */ {"lri", HB_TAG('L','U','H',' ')}, /* Marachi -> Luyia */ {"lrm", HB_TAG('L','U','H',' ')}, /* Marama -> Luyia */ + {"lrt", HB_TAG('C','P','P',' ')}, /* Larantuka Malay -> Creoles */ {"lsm", HB_TAG('L','U','H',' ')}, /* Saamia -> Luyia */ {"lt", HB_TAG('L','T','H',' ')}, /* Lithuanian */ {"ltg", HB_TAG('L','V','I',' ')}, /* Latgalian -> Latvian */ + {"lth", HB_TAG_NONE }, /* Thur != Lithuanian */ {"lto", HB_TAG('L','U','H',' ')}, /* Tsotso -> Luyia */ {"lts", HB_TAG('L','U','H',' ')}, /* Tachoni -> Luyia */ {"lu", HB_TAG('L','U','B',' ')}, /* Luba-Katanga */ /*{"lua", HB_TAG('L','U','A',' ')},*/ /* Luba-Lulua */ /*{"luo", HB_TAG('L','U','O',' ')},*/ /* Luo (Kenya and Tanzania) */ {"lus", HB_TAG('M','I','Z',' ')}, /* Lushai -> Mizo */ + {"lus", HB_TAG('Q','I','N',' ')}, /* Lushai -> Chin */ {"luy", HB_TAG('L','U','H',' ')}, /* Luyia [macrolanguage] */ {"luz", HB_TAG('L','R','C',' ')}, /* Southern Luri -> Luri */ {"lv", HB_TAG('L','V','I',' ')}, /* Latvian [macrolanguage] */ + {"lvi", HB_TAG_NONE }, /* Lavi != Latvian */ {"lvs", HB_TAG('L','V','I',' ')}, /* Standard Latvian -> Latvian */ {"lwg", HB_TAG('L','U','H',' ')}, /* Wanga -> Luyia */ - {"lzh", HB_TAG('Z','H','T',' ')}, /* Literary Chinese -> Chinese Traditional */ + {"lzh", HB_TAG('Z','H','T',' ')}, /* Literary Chinese -> Chinese, Traditional */ {"lzz", HB_TAG('L','A','Z',' ')}, /* Laz */ /*{"mad", HB_TAG('M','A','D',' ')},*/ /* Madurese -> Madura */ /*{"mag", HB_TAG('M','A','G',' ')},*/ /* Magahi */ {"mai", HB_TAG('M','T','H',' ')}, /* Maithili */ + {"maj", HB_TAG_NONE }, /* Jalapa De DÃaz Mazatec != Majang */ {"mak", HB_TAG('M','K','R',' ')}, /* Makasar */ -/*{"mam", HB_TAG('M','A','M',' ')},*/ /* Mam */ + {"mam", HB_TAG('M','A','M',' ')}, /* Mam */ + {"mam", HB_TAG('M','Y','N',' ')}, /* Mam -> Mayan */ {"man", HB_TAG('M','N','K',' ')}, /* Mandingo [macrolanguage] -> Maninka */ + {"map", HB_TAG_NONE }, /* Austronesian [family] != Mapudungun */ + {"maw", HB_TAG_NONE }, /* Mampruli != Marwari */ {"max", HB_TAG('M','L','Y',' ')}, /* North Moluccan Malay -> Malay */ + {"max", HB_TAG('C','P','P',' ')}, /* North Moluccan Malay -> Creoles */ + {"mbf", HB_TAG('C','P','P',' ')}, /* Baba Malay -> Creoles */ + {"mbn", HB_TAG_NONE }, /* Macaguán != Mbundu */ /*{"mbo", HB_TAG('M','B','O',' ')},*/ /* Mbo (Cameroon) */ + {"mch", HB_TAG_NONE }, /* Maquiritari != Manchu */ + {"mcm", HB_TAG('C','P','P',' ')}, /* Malaccan Creole Portuguese -> Creoles */ + {"mcr", HB_TAG_NONE }, /* Menya != Moose Cree */ {"mct", HB_TAG('B','T','I',' ')}, /* Mengisa -> Beti */ + {"mde", HB_TAG_NONE }, /* Maba (Chad) != Mende */ {"mdf", HB_TAG('M','O','K',' ')}, /* Moksha */ /*{"mdr", HB_TAG('M','D','R',' ')},*/ /* Mandar */ {"mdy", HB_TAG('M','L','E',' ')}, /* Male (Ethiopia) */ {"men", HB_TAG('M','D','E',' ')}, /* Mende (Sierra Leone) */ {"meo", HB_TAG('M','L','Y',' ')}, /* Kedah Malay -> Malay */ /*{"mer", HB_TAG('M','E','R',' ')},*/ /* Meru */ -/*{"mfa", HB_TAG('M','F','A',' ')},*/ /* Pattani Malay */ + {"mfa", HB_TAG('M','F','A',' ')}, /* Pattani Malay */ + {"mfa", HB_TAG('M','L','Y',' ')}, /* Pattani Malay -> Malay */ {"mfb", HB_TAG('M','L','Y',' ')}, /* Bangka -> Malay */ -/*{"mfe", HB_TAG('M','F','E',' ')},*/ /* Morisyen */ + {"mfe", HB_TAG('M','F','E',' ')}, /* Morisyen */ + {"mfe", HB_TAG('C','P','P',' ')}, /* Morisyen -> Creoles */ + {"mfp", HB_TAG('C','P','P',' ')}, /* Makassar Malay -> Creoles */ {"mg", HB_TAG('M','L','G',' ')}, /* Malagasy [macrolanguage] */ {"mh", HB_TAG('M','A','H',' ')}, /* Marshallese */ + {"mhc", HB_TAG('M','Y','N',' ')}, /* Mocho -> Mayan */ {"mhr", HB_TAG('L','M','A',' ')}, /* Eastern Mari -> Low Mari */ {"mhv", HB_TAG('A','R','K',' ')}, /* Arakanese (retired code) -> Rakhine */ {"mi", HB_TAG('M','R','I',' ')}, /* Maori */ -/*{"min", HB_TAG('M','I','N',' ')},*/ /* Minangkabau */ + {"min", HB_TAG('M','I','N',' ')}, /* Minangkabau */ + {"min", HB_TAG('M','L','Y',' ')}, /* Minangkabau -> Malay */ + {"miz", HB_TAG_NONE }, /* Coatzospan Mixtec != Mizo */ {"mk", HB_TAG('M','K','D',' ')}, /* Macedonian */ + {"mkn", HB_TAG('C','P','P',' ')}, /* Kupang Malay -> Creoles */ + {"mkr", HB_TAG_NONE }, /* Malas != Makasar */ {"mku", HB_TAG('M','N','K',' ')}, /* Konyanka Maninka -> Maninka */ /*{"mkw", HB_TAG('M','K','W',' ')},*/ /* Kituba (Congo) */ {"ml", HB_TAG('M','A','L',' ')}, /* Malayalam -> Malayalam Traditional */ {"ml", HB_TAG('M','L','R',' ')}, /* Malayalam -> Malayalam Reformed */ + {"mle", HB_TAG_NONE }, /* Manambu != Male */ + {"mln", HB_TAG_NONE }, /* Malango != Malinke */ {"mlq", HB_TAG('M','L','N',' ')}, /* Western Maninkakan -> Malinke */ {"mlq", HB_TAG('M','N','K',' ')}, /* Western Maninkakan -> Maninka */ + {"mlr", HB_TAG_NONE }, /* Vame != Malayalam Reformed */ {"mmr", HB_TAG('H','M','N',' ')}, /* Western Xiangxi Miao -> Hmong */ {"mn", HB_TAG('M','N','G',' ')}, /* Mongolian [macrolanguage] */ {"mnc", HB_TAG('M','C','H',' ')}, /* Manchu */ + {"mnd", HB_TAG_NONE }, /* Mondé != Mandinka */ + {"mng", HB_TAG_NONE }, /* Eastern Mnong != Mongolian */ + {"mnh", HB_TAG('B','A','D','0')}, /* Mono (Democratic Republic of Congo) -> Banda */ /*{"mni", HB_TAG('M','N','I',' ')},*/ /* Manipuri */ {"mnk", HB_TAG('M','N','D',' ')}, /* Mandinka */ {"mnk", HB_TAG('M','N','K',' ')}, /* Mandinka -> Maninka */ - {"mnp", HB_TAG('Z','H','S',' ')}, /* Min Bei Chinese -> Chinese Simplified */ + {"mnp", HB_TAG('Z','H','S',' ')}, /* Min Bei Chinese -> Chinese, Simplified */ {"mns", HB_TAG('M','A','N',' ')}, /* Mansi */ {"mnw", HB_TAG('M','O','N',' ')}, /* Mon */ + {"mnx", HB_TAG_NONE }, /* Manikion != Manx */ {"mo", HB_TAG('M','O','L',' ')}, /* Moldavian (retired code) */ + {"mod", HB_TAG('C','P','P',' ')}, /* Mobilian -> Creoles */ /*{"moh", HB_TAG('M','O','H',' ')},*/ /* Mohawk */ + {"mok", HB_TAG_NONE }, /* Morori != Moksha */ + {"mop", HB_TAG('M','Y','N',' ')}, /* Mopán Maya -> Mayan */ + {"mor", HB_TAG_NONE }, /* Moro != Moroccan */ /*{"mos", HB_TAG('M','O','S',' ')},*/ /* Mossi */ {"mpe", HB_TAG('M','A','J',' ')}, /* Majang */ {"mqg", HB_TAG('M','L','Y',' ')}, /* Kota Bangun Kutai Malay -> Malay */ @@ -643,9 +935,14 @@ static const LangTag ot_languages[] = { {"msc", HB_TAG('M','N','K',' ')}, /* Sankaran Maninka -> Maninka */ {"msh", HB_TAG('M','L','G',' ')}, /* Masikoro Malagasy -> Malagasy */ {"msi", HB_TAG('M','L','Y',' ')}, /* Sabah Malay -> Malay */ + {"msi", HB_TAG('C','P','P',' ')}, /* Sabah Malay -> Creoles */ {"mt", HB_TAG('M','T','S',' ')}, /* Maltese */ + {"mth", HB_TAG_NONE }, /* Munggui != Maithili */ {"mtr", HB_TAG('M','A','W',' ')}, /* Mewari -> Marwari */ + {"mts", HB_TAG_NONE }, /* Yora != Maltese */ + {"mud", HB_TAG('C','P','P',' ')}, /* Mednyj Aleut -> Creoles */ {"mui", HB_TAG('M','L','Y',' ')}, /* Musi -> Malay */ + {"mun", HB_TAG_NONE }, /* Munda [family] != Mundari */ {"mup", HB_TAG('R','A','J',' ')}, /* Malvi -> Rajasthani */ {"muq", HB_TAG('H','M','N',' ')}, /* Eastern Xiangxi Miao -> Hmong */ /*{"mus", HB_TAG('M','U','S',' ')},*/ /* Creek -> Muscogee */ @@ -654,49 +951,101 @@ static const LangTag ot_languages[] = { {"mvf", HB_TAG('M','N','G',' ')}, /* Peripheral Mongolian -> Mongolian */ {"mwk", HB_TAG('M','N','K',' ')}, /* Kita Maninkakan -> Maninka */ /*{"mwl", HB_TAG('M','W','L',' ')},*/ /* Mirandese */ + {"mwq", HB_TAG('Q','I','N',' ')}, /* Mün Chin -> Chin */ {"mwr", HB_TAG('M','A','W',' ')}, /* Marwari [macrolanguage] */ -/*{"mww", HB_TAG('M','W','W',' ')},*/ /* Hmong Daw */ + {"mww", HB_TAG('M','W','W',' ')}, /* Hmong Daw */ + {"mww", HB_TAG('H','M','N',' ')}, /* Hmong Daw -> Hmong */ {"my", HB_TAG('B','R','M',' ')}, /* Burmese */ {"mym", HB_TAG('M','E','N',' ')}, /* Me’en */ /*{"myn", HB_TAG('M','Y','N',' ')},*/ /* Mayan [family] */ {"myq", HB_TAG('M','N','K',' ')}, /* Forest Maninka (retired code) -> Maninka */ {"myv", HB_TAG('E','R','Z',' ')}, /* Erzya */ + {"mzb", HB_TAG('B','B','R',' ')}, /* Tumzabt -> Berber */ /*{"mzn", HB_TAG('M','Z','N',' ')},*/ /* Mazanderani */ + {"mzs", HB_TAG('C','P','P',' ')}, /* Macanese -> Creoles */ {"na", HB_TAG('N','A','U',' ')}, /* Nauru -> Nauruan */ -/*{"nag", HB_TAG('N','A','G',' ')},*/ /* Naga Pidgin -> Naga-Assamese */ + {"nag", HB_TAG('N','A','G',' ')}, /* Naga Pidgin -> Naga-Assamese */ + {"nag", HB_TAG('C','P','P',' ')}, /* Naga Pidgin -> Creoles */ /*{"nah", HB_TAG('N','A','H',' ')},*/ /* Nahuatl [family] */ - {"nan", HB_TAG('Z','H','S',' ')}, /* Min Nan Chinese -> Chinese Simplified */ + {"nan", HB_TAG('Z','H','S',' ')}, /* Min Nan Chinese -> Chinese, Simplified */ /*{"nap", HB_TAG('N','A','P',' ')},*/ /* Neapolitan */ + {"nas", HB_TAG_NONE }, /* Naasioi != Naskapi */ + {"naz", HB_TAG('N','A','H',' ')}, /* Coatepec Nahuatl -> Nahuatl */ {"nb", HB_TAG('N','O','R',' ')}, /* Norwegian BokmÃ¥l -> Norwegian */ + {"nch", HB_TAG('N','A','H',' ')}, /* Central Huasteca Nahuatl -> Nahuatl */ + {"nci", HB_TAG('N','A','H',' ')}, /* Classical Nahuatl -> Nahuatl */ + {"ncj", HB_TAG('N','A','H',' ')}, /* Northern Puebla Nahuatl -> Nahuatl */ + {"ncl", HB_TAG('N','A','H',' ')}, /* Michoacán Nahuatl -> Nahuatl */ + {"ncr", HB_TAG_NONE }, /* Ncane != N-Cree */ + {"ncx", HB_TAG('N','A','H',' ')}, /* Central Puebla Nahuatl -> Nahuatl */ {"nd", HB_TAG('N','D','B',' ')}, /* North Ndebele -> Ndebele */ + {"ndb", HB_TAG_NONE }, /* Kenswei Nsei != Ndebele */ /*{"ndc", HB_TAG('N','D','C',' ')},*/ /* Ndau */ + {"ndg", HB_TAG_NONE }, /* Ndengereko != Ndonga */ /*{"nds", HB_TAG('N','D','S',' ')},*/ /* Low Saxon */ {"ne", HB_TAG('N','E','P',' ')}, /* Nepali [macrolanguage] */ + {"nef", HB_TAG('C','P','P',' ')}, /* Nefamese -> Creoles */ /*{"new", HB_TAG('N','E','W',' ')},*/ /* Newari */ {"ng", HB_TAG('N','D','G',' ')}, /* Ndonga */ /*{"nga", HB_TAG('N','G','A',' ')},*/ /* Ngbaka */ {"ngl", HB_TAG('L','M','W',' ')}, /* Lomwe */ + {"ngm", HB_TAG('C','P','P',' ')}, /* Ngatik Men's Creole -> Creoles */ {"ngo", HB_TAG('S','X','T',' ')}, /* Ngoni -> Sutu */ + {"ngr", HB_TAG_NONE }, /* Engdewu != Nagari */ + {"ngu", HB_TAG('N','A','H',' ')}, /* Guerrero Nahuatl -> Nahuatl */ + {"nhc", HB_TAG('N','A','H',' ')}, /* Tabasco Nahuatl -> Nahuatl */ {"nhd", HB_TAG('G','U','A',' ')}, /* Chiripá -> Guarani */ + {"nhe", HB_TAG('N','A','H',' ')}, /* Eastern Huasteca Nahuatl -> Nahuatl */ + {"nhg", HB_TAG('N','A','H',' ')}, /* Tetelcingo Nahuatl -> Nahuatl */ + {"nhi", HB_TAG('N','A','H',' ')}, /* Zacatlán-Ahuacatlán-Tepetzintla Nahuatl -> Nahuatl */ + {"nhk", HB_TAG('N','A','H',' ')}, /* Isthmus-Cosoleacaque Nahuatl -> Nahuatl */ + {"nhm", HB_TAG('N','A','H',' ')}, /* Morelos Nahuatl -> Nahuatl */ + {"nhn", HB_TAG('N','A','H',' ')}, /* Central Nahuatl -> Nahuatl */ + {"nhp", HB_TAG('N','A','H',' ')}, /* Isthmus-Pajapan Nahuatl -> Nahuatl */ + {"nhq", HB_TAG('N','A','H',' ')}, /* Huaxcaleca Nahuatl -> Nahuatl */ + {"nht", HB_TAG('N','A','H',' ')}, /* Ometepec Nahuatl -> Nahuatl */ + {"nhv", HB_TAG('N','A','H',' ')}, /* Temascaltepec Nahuatl -> Nahuatl */ + {"nhw", HB_TAG('N','A','H',' ')}, /* Western Huasteca Nahuatl -> Nahuatl */ + {"nhx", HB_TAG('N','A','H',' ')}, /* Isthmus-Mecayapan Nahuatl -> Nahuatl */ + {"nhy", HB_TAG('N','A','H',' ')}, /* Northern Oaxaca Nahuatl -> Nahuatl */ + {"nhz", HB_TAG('N','A','H',' ')}, /* Santa MarÃa La Alta Nahuatl -> Nahuatl */ {"niq", HB_TAG('K','A','L',' ')}, /* Nandi -> Kalenjin */ + {"nis", HB_TAG_NONE }, /* Nimi != Nisi */ /*{"niu", HB_TAG('N','I','U',' ')},*/ /* Niuean */ {"niv", HB_TAG('G','I','L',' ')}, /* Gilyak */ + {"njt", HB_TAG('C','P','P',' ')}, /* Ndyuka-Trio Pidgin -> Creoles */ {"njz", HB_TAG('N','I','S',' ')}, /* Nyishi -> Nisi */ + {"nko", HB_TAG_NONE }, /* Nkonya != N’Ko */ + {"nkx", HB_TAG('I','J','O',' ')}, /* Nkoroo -> Ijo */ {"nl", HB_TAG('N','L','D',' ')}, /* Dutch */ + {"nla", HB_TAG('B','M','L',' ')}, /* Ngombale -> Bamileke */ {"nle", HB_TAG('L','U','H',' ')}, /* East Nyala -> Luyia */ + {"nln", HB_TAG('N','A','H',' ')}, /* Durango Nahuatl (retired code) -> Nahuatl */ + {"nlv", HB_TAG('N','A','H',' ')}, /* Orizaba Nahuatl -> Nahuatl */ {"nn", HB_TAG('N','Y','N',' ')}, /* Norwegian Nynorsk (Nynorsk, Norwegian) */ + {"nn", HB_TAG('N','O','R',' ')}, /* Norwegian Nynorsk -> Norwegian */ + {"nnh", HB_TAG('B','M','L',' ')}, /* Ngiemboon -> Bamileke */ + {"nnz", HB_TAG('B','M','L',' ')}, /* Nda'nda' -> Bamileke */ {"no", HB_TAG('N','O','R',' ')}, /* Norwegian [macrolanguage] */ {"nod", HB_TAG('N','T','A',' ')}, /* Northern Thai -> Northern Tai */ /*{"noe", HB_TAG('N','O','E',' ')},*/ /* Nimadi */ /*{"nog", HB_TAG('N','O','G',' ')},*/ /* Nogai */ /*{"nov", HB_TAG('N','O','V',' ')},*/ /* Novial */ {"npi", HB_TAG('N','E','P',' ')}, /* Nepali */ + {"npl", HB_TAG('N','A','H',' ')}, /* Southeastern Puebla Nahuatl -> Nahuatl */ {"nqo", HB_TAG('N','K','O',' ')}, /* N’Ko */ {"nr", HB_TAG('N','D','B',' ')}, /* South Ndebele -> Ndebele */ {"nsk", HB_TAG('N','A','S',' ')}, /* Naskapi */ -/*{"nso", HB_TAG('N','S','O',' ')},*/ /* Pedi -> Sotho, Northern */ + {"nsm", HB_TAG_NONE }, /* Sumi Naga != Northern Sami */ +/*{"nso", HB_TAG('N','S','O',' ')},*/ /* Northern Sotho */ + {"nsu", HB_TAG('N','A','H',' ')}, /* Sierra Negra Nahuatl -> Nahuatl */ + {"nto", HB_TAG_NONE }, /* Ntomba != Esperanto */ + {"nue", HB_TAG('B','A','D','0')}, /* Ngundu -> Banda */ + {"nuu", HB_TAG('B','A','D','0')}, /* Ngbundu -> Banda */ + {"nuz", HB_TAG('N','A','H',' ')}, /* Tlamacazapa Nahuatl -> Nahuatl */ {"nv", HB_TAG('N','A','V',' ')}, /* Navajo */ {"nv", HB_TAG('A','T','H',' ')}, /* Navajo -> Athapaskan */ + {"nwe", HB_TAG('B','M','L',' ')}, /* Ngwe -> Bamileke */ {"ny", HB_TAG('C','H','I',' ')}, /* Chichewa (Chewa, Nyanja) */ {"nyd", HB_TAG('L','U','H',' ')}, /* Nyore -> Luyia */ /*{"nym", HB_TAG('N','Y','M',' ')},*/ /* Nyamwezi */ @@ -708,21 +1057,33 @@ static const LangTag ot_languages[] = { {"ojc", HB_TAG('O','J','B',' ')}, /* Central Ojibwa -> Ojibway */ {"ojg", HB_TAG('O','J','B',' ')}, /* Eastern Ojibwa -> Ojibway */ {"ojs", HB_TAG('O','C','R',' ')}, /* Severn Ojibwa -> Oji-Cree */ + {"ojs", HB_TAG('O','J','B',' ')}, /* Severn Ojibwa -> Ojibway */ {"ojw", HB_TAG('O','J','B',' ')}, /* Western Ojibwa -> Ojibway */ + {"okd", HB_TAG('I','J','O',' ')}, /* Okodia -> Ijo */ {"oki", HB_TAG('K','A','L',' ')}, /* Okiek -> Kalenjin */ {"okm", HB_TAG('K','O','H',' ')}, /* Middle Korean (10th-16th cent.) -> Korean Old Hangul */ + {"okr", HB_TAG('I','J','O',' ')}, /* Kirike -> Ijo */ {"om", HB_TAG('O','R','O',' ')}, /* Oromo [macrolanguage] */ + {"onx", HB_TAG('C','P','P',' ')}, /* Onin Based Pidgin -> Creoles */ + {"oor", HB_TAG('C','P','P',' ')}, /* Oorlams -> Creoles */ {"or", HB_TAG('O','R','I',' ')}, /* Odia (formerly Oriya) [macrolanguage] */ {"orc", HB_TAG('O','R','O',' ')}, /* Orma -> Oromo */ {"orn", HB_TAG('M','L','Y',' ')}, /* Orang Kanaq -> Malay */ + {"oro", HB_TAG_NONE }, /* Orokolo != Oromo */ + {"orr", HB_TAG('I','J','O',' ')}, /* Oruma -> Ijo */ {"ors", HB_TAG('M','L','Y',' ')}, /* Orang Seletar -> Malay */ {"ory", HB_TAG('O','R','I',' ')}, /* Odia (formerly Oriya) */ {"os", HB_TAG('O','S','S',' ')}, /* Ossetian */ {"otw", HB_TAG('O','J','B',' ')}, /* Ottawa -> Ojibway */ + {"oua", HB_TAG('B','B','R',' ')}, /* Tagargrent -> Berber */ {"pa", HB_TAG('P','A','N',' ')}, /* Punjabi */ + {"paa", HB_TAG_NONE }, /* Papuan [family] != Palestinian Aramaic */ /*{"pag", HB_TAG('P','A','G',' ')},*/ /* Pangasinan */ + {"pal", HB_TAG_NONE }, /* Pahlavi != Pali */ /*{"pam", HB_TAG('P','A','M',' ')},*/ /* Pampanga -> Pampangan */ {"pap", HB_TAG('P','A','P','0')}, /* Papiamento -> Papiamentu */ + {"pap", HB_TAG('C','P','P',' ')}, /* Papiamento -> Creoles */ + {"pas", HB_TAG_NONE }, /* Papasena != Pashto */ /*{"pau", HB_TAG('P','A','U',' ')},*/ /* Palauan */ {"pbt", HB_TAG('P','A','S',' ')}, /* Southern Pashto -> Pashto */ {"pbu", HB_TAG('P','A','S',' ')}, /* Northern Pashto -> Pashto */ @@ -730,83 +1091,146 @@ static const LangTag ot_languages[] = { /*{"pcd", HB_TAG('P','C','D',' ')},*/ /* Picard */ {"pce", HB_TAG('P','L','G',' ')}, /* Ruching Palaung -> Palaung */ {"pck", HB_TAG('Q','I','N',' ')}, /* Paite Chin -> Chin */ + {"pcm", HB_TAG('C','P','P',' ')}, /* Nigerian Pidgin -> Creoles */ /*{"pdc", HB_TAG('P','D','C',' ')},*/ /* Pennsylvania German */ + {"pdu", HB_TAG('K','R','N',' ')}, /* Kayan -> Karen */ + {"pea", HB_TAG('C','P','P',' ')}, /* Peranakan Indonesian -> Creoles */ {"pel", HB_TAG('M','L','Y',' ')}, /* Pekal -> Malay */ {"pes", HB_TAG('F','A','R',' ')}, /* Iranian Persian -> Persian */ + {"pey", HB_TAG('C','P','P',' ')}, /* Petjo -> Creoles */ {"pga", HB_TAG('A','R','A',' ')}, /* Sudanese Creole Arabic -> Arabic */ + {"pga", HB_TAG('C','P','P',' ')}, /* Sudanese Creole Arabic -> Creoles */ /*{"phk", HB_TAG('P','H','K',' ')},*/ /* Phake */ {"pi", HB_TAG('P','A','L',' ')}, /* Pali */ -/*{"pih", HB_TAG('P','I','H',' ')},*/ /* Pitcairn-Norfolk -> Norfolk */ + {"pih", HB_TAG('P','I','H',' ')}, /* Pitcairn-Norfolk -> Norfolk */ + {"pih", HB_TAG('C','P','P',' ')}, /* Pitcairn-Norfolk -> Creoles */ + {"pil", HB_TAG_NONE }, /* Yom != Filipino */ + {"pis", HB_TAG('C','P','P',' ')}, /* Pijin -> Creoles */ + {"pkh", HB_TAG('Q','I','N',' ')}, /* Pankhu -> Chin */ {"pko", HB_TAG('K','A','L',' ')}, /* Pökoot -> Kalenjin */ {"pl", HB_TAG('P','L','K',' ')}, /* Polish */ + {"plg", HB_TAG_NONE }, /* Pilagá != Palaung */ + {"plk", HB_TAG_NONE }, /* Kohistani Shina != Polish */ {"pll", HB_TAG('P','L','G',' ')}, /* Shwe Palaung -> Palaung */ + {"pln", HB_TAG('C','P','P',' ')}, /* Palenquero -> Creoles */ {"plp", HB_TAG('P','A','P',' ')}, /* Palpa (retired code) */ {"plt", HB_TAG('M','L','G',' ')}, /* Plateau Malagasy -> Malagasy */ + {"pml", HB_TAG('C','P','P',' ')}, /* Lingua Franca -> Creoles */ /*{"pms", HB_TAG('P','M','S',' ')},*/ /* Piemontese */ + {"pmy", HB_TAG('C','P','P',' ')}, /* Papuan Malay -> Creoles */ /*{"pnb", HB_TAG('P','N','B',' ')},*/ /* Western Panjabi */ -/*{"poh", HB_TAG('P','O','H',' ')},*/ /* Poqomchi' -> Pocomchi */ + {"poc", HB_TAG('M','Y','N',' ')}, /* Poqomam -> Mayan */ + {"poh", HB_TAG('P','O','H',' ')}, /* Poqomchi' -> Pocomchi */ + {"poh", HB_TAG('M','Y','N',' ')}, /* Poqomchi' -> Mayan */ /*{"pon", HB_TAG('P','O','N',' ')},*/ /* Pohnpeian */ + {"pov", HB_TAG('C','P','P',' ')}, /* Upper Guinea Crioulo -> Creoles */ {"ppa", HB_TAG('B','A','G',' ')}, /* Pao (retired code) -> Baghelkhandi */ + {"pre", HB_TAG('C','P','P',' ')}, /* Principense -> Creoles */ /*{"pro", HB_TAG('P','R','O',' ')},*/ /* Old Provençal (to 1500) -> Provençal / Old Provençal */ {"prs", HB_TAG('D','R','I',' ')}, /* Dari */ + {"prs", HB_TAG('F','A','R',' ')}, /* Dari -> Persian */ {"ps", HB_TAG('P','A','S',' ')}, /* Pashto [macrolanguage] */ {"pse", HB_TAG('M','L','Y',' ')}, /* Central Malay -> Malay */ {"pst", HB_TAG('P','A','S',' ')}, /* Central Pashto -> Pashto */ {"pt", HB_TAG('P','T','G',' ')}, /* Portuguese */ -/*{"pwo", HB_TAG('P','W','O',' ')},*/ /* Pwo Western Karen -> Western Pwo Karen */ + {"pub", HB_TAG('Q','I','N',' ')}, /* Purum -> Chin */ + {"puz", HB_TAG('Q','I','N',' ')}, /* Purum Naga (retired code) -> Chin */ + {"pwo", HB_TAG('P','W','O',' ')}, /* Pwo Western Karen -> Western Pwo Karen */ + {"pwo", HB_TAG('K','R','N',' ')}, /* Pwo Western Karen -> Karen */ + {"pww", HB_TAG('K','R','N',' ')}, /* Pwo Northern Karen -> Karen */ {"qu", HB_TAG('Q','U','Z',' ')}, /* Quechua [macrolanguage] */ {"qub", HB_TAG('Q','W','H',' ')}, /* Huallaga Huánuco Quechua -> Quechua (Peru) */ -/*{"quc", HB_TAG('Q','U','C',' ')},*/ /* K’iche’ */ + {"qub", HB_TAG('Q','U','Z',' ')}, /* Huallaga Huánuco Quechua -> Quechua */ + {"quc", HB_TAG('Q','U','C',' ')}, /* K’iche’ */ + {"quc", HB_TAG('M','Y','N',' ')}, /* K'iche' -> Mayan */ {"qud", HB_TAG('Q','V','I',' ')}, /* Calderón Highland Quichua -> Quechua (Ecuador) */ + {"qud", HB_TAG('Q','U','Z',' ')}, /* Calderón Highland Quichua -> Quechua */ {"quf", HB_TAG('Q','U','Z',' ')}, /* Lambayeque Quechua -> Quechua */ {"qug", HB_TAG('Q','V','I',' ')}, /* Chimborazo Highland Quichua -> Quechua (Ecuador) */ -/*{"quh", HB_TAG('Q','U','H',' ')},*/ /* South Bolivian Quechua -> Quechua (Bolivia) */ + {"qug", HB_TAG('Q','U','Z',' ')}, /* Chimborazo Highland Quichua -> Quechua */ + {"quh", HB_TAG('Q','U','H',' ')}, /* South Bolivian Quechua -> Quechua (Bolivia) */ + {"quh", HB_TAG('Q','U','Z',' ')}, /* South Bolivian Quechua -> Quechua */ {"quk", HB_TAG('Q','U','Z',' ')}, /* Chachapoyas Quechua -> Quechua */ + {"qul", HB_TAG('Q','U','H',' ')}, /* North Bolivian Quechua -> Quechua (Bolivia) */ {"qul", HB_TAG('Q','U','Z',' ')}, /* North Bolivian Quechua -> Quechua */ + {"qum", HB_TAG('M','Y','N',' ')}, /* Sipacapense -> Mayan */ {"qup", HB_TAG('Q','V','I',' ')}, /* Southern Pastaza Quechua -> Quechua (Ecuador) */ + {"qup", HB_TAG('Q','U','Z',' ')}, /* Southern Pastaza Quechua -> Quechua */ {"qur", HB_TAG('Q','W','H',' ')}, /* Yanahuanca Pasco Quechua -> Quechua (Peru) */ + {"qur", HB_TAG('Q','U','Z',' ')}, /* Yanahuanca Pasco Quechua -> Quechua */ {"qus", HB_TAG('Q','U','H',' ')}, /* Santiago del Estero Quichua -> Quechua (Bolivia) */ + {"qus", HB_TAG('Q','U','Z',' ')}, /* Santiago del Estero Quichua -> Quechua */ + {"quv", HB_TAG('M','Y','N',' ')}, /* Sacapulteco -> Mayan */ {"quw", HB_TAG('Q','V','I',' ')}, /* Tena Lowland Quichua -> Quechua (Ecuador) */ + {"quw", HB_TAG('Q','U','Z',' ')}, /* Tena Lowland Quichua -> Quechua */ {"qux", HB_TAG('Q','W','H',' ')}, /* Yauyos Quechua -> Quechua (Peru) */ + {"qux", HB_TAG('Q','U','Z',' ')}, /* Yauyos Quechua -> Quechua */ {"quy", HB_TAG('Q','U','Z',' ')}, /* Ayacucho Quechua -> Quechua */ /*{"quz", HB_TAG('Q','U','Z',' ')},*/ /* Cusco Quechua -> Quechua */ {"qva", HB_TAG('Q','W','H',' ')}, /* Ambo-Pasco Quechua -> Quechua (Peru) */ + {"qva", HB_TAG('Q','U','Z',' ')}, /* Ambo-Pasco Quechua -> Quechua */ {"qvc", HB_TAG('Q','U','Z',' ')}, /* Cajamarca Quechua -> Quechua */ {"qve", HB_TAG('Q','U','Z',' ')}, /* Eastern ApurÃmac Quechua -> Quechua */ {"qvh", HB_TAG('Q','W','H',' ')}, /* HuamalÃes-Dos de Mayo Huánuco Quechua -> Quechua (Peru) */ -/*{"qvi", HB_TAG('Q','V','I',' ')},*/ /* Imbabura Highland Quichua -> Quechua (Ecuador) */ + {"qvh", HB_TAG('Q','U','Z',' ')}, /* HuamalÃes-Dos de Mayo Huánuco Quechua -> Quechua */ + {"qvi", HB_TAG('Q','V','I',' ')}, /* Imbabura Highland Quichua -> Quechua (Ecuador) */ + {"qvi", HB_TAG('Q','U','Z',' ')}, /* Imbabura Highland Quichua -> Quechua */ {"qvj", HB_TAG('Q','V','I',' ')}, /* Loja Highland Quichua -> Quechua (Ecuador) */ + {"qvj", HB_TAG('Q','U','Z',' ')}, /* Loja Highland Quichua -> Quechua */ {"qvl", HB_TAG('Q','W','H',' ')}, /* Cajatambo North Lima Quechua -> Quechua (Peru) */ + {"qvl", HB_TAG('Q','U','Z',' ')}, /* Cajatambo North Lima Quechua -> Quechua */ {"qvm", HB_TAG('Q','W','H',' ')}, /* Margos-Yarowilca-Lauricocha Quechua -> Quechua (Peru) */ + {"qvm", HB_TAG('Q','U','Z',' ')}, /* Margos-Yarowilca-Lauricocha Quechua -> Quechua */ {"qvn", HB_TAG('Q','W','H',' ')}, /* North JunÃn Quechua -> Quechua (Peru) */ + {"qvn", HB_TAG('Q','U','Z',' ')}, /* North JunÃn Quechua -> Quechua */ {"qvo", HB_TAG('Q','V','I',' ')}, /* Napo Lowland Quechua -> Quechua (Ecuador) */ + {"qvo", HB_TAG('Q','U','Z',' ')}, /* Napo Lowland Quechua -> Quechua */ {"qvp", HB_TAG('Q','W','H',' ')}, /* Pacaraos Quechua -> Quechua (Peru) */ + {"qvp", HB_TAG('Q','U','Z',' ')}, /* Pacaraos Quechua -> Quechua */ {"qvs", HB_TAG('Q','U','Z',' ')}, /* San MartÃn Quechua -> Quechua */ {"qvw", HB_TAG('Q','W','H',' ')}, /* Huaylla Wanca Quechua -> Quechua (Peru) */ + {"qvw", HB_TAG('Q','U','Z',' ')}, /* Huaylla Wanca Quechua -> Quechua */ {"qvz", HB_TAG('Q','V','I',' ')}, /* Northern Pastaza Quichua -> Quechua (Ecuador) */ + {"qvz", HB_TAG('Q','U','Z',' ')}, /* Northern Pastaza Quichua -> Quechua */ {"qwa", HB_TAG('Q','W','H',' ')}, /* Corongo Ancash Quechua -> Quechua (Peru) */ + {"qwa", HB_TAG('Q','U','Z',' ')}, /* Corongo Ancash Quechua -> Quechua */ {"qwc", HB_TAG('Q','U','Z',' ')}, /* Classical Quechua -> Quechua */ -/*{"qwh", HB_TAG('Q','W','H',' ')},*/ /* Huaylas Ancash Quechua -> Quechua (Peru) */ + {"qwh", HB_TAG('Q','W','H',' ')}, /* Huaylas Ancash Quechua -> Quechua (Peru) */ + {"qwh", HB_TAG('Q','U','Z',' ')}, /* Huaylas Ancash Quechua -> Quechua */ {"qws", HB_TAG('Q','W','H',' ')}, /* Sihuas Ancash Quechua -> Quechua (Peru) */ + {"qws", HB_TAG('Q','U','Z',' ')}, /* Sihuas Ancash Quechua -> Quechua */ + {"qwt", HB_TAG('A','T','H',' ')}, /* Kwalhioqua-Tlatskanai -> Athapaskan */ {"qxa", HB_TAG('Q','W','H',' ')}, /* Chiquián Ancash Quechua -> Quechua (Peru) */ + {"qxa", HB_TAG('Q','U','Z',' ')}, /* Chiquián Ancash Quechua -> Quechua */ {"qxc", HB_TAG('Q','W','H',' ')}, /* Chincha Quechua -> Quechua (Peru) */ + {"qxc", HB_TAG('Q','U','Z',' ')}, /* Chincha Quechua -> Quechua */ {"qxh", HB_TAG('Q','W','H',' ')}, /* Panao Huánuco Quechua -> Quechua (Peru) */ + {"qxh", HB_TAG('Q','U','Z',' ')}, /* Panao Huánuco Quechua -> Quechua */ {"qxl", HB_TAG('Q','V','I',' ')}, /* Salasaca Highland Quichua -> Quechua (Ecuador) */ + {"qxl", HB_TAG('Q','U','Z',' ')}, /* Salasaca Highland Quichua -> Quechua */ {"qxn", HB_TAG('Q','W','H',' ')}, /* Northern Conchucos Ancash Quechua -> Quechua (Peru) */ + {"qxn", HB_TAG('Q','U','Z',' ')}, /* Northern Conchucos Ancash Quechua -> Quechua */ {"qxo", HB_TAG('Q','W','H',' ')}, /* Southern Conchucos Ancash Quechua -> Quechua (Peru) */ + {"qxo", HB_TAG('Q','U','Z',' ')}, /* Southern Conchucos Ancash Quechua -> Quechua */ {"qxp", HB_TAG('Q','U','Z',' ')}, /* Puno Quechua -> Quechua */ {"qxr", HB_TAG('Q','V','I',' ')}, /* Cañar Highland Quichua -> Quechua (Ecuador) */ + {"qxr", HB_TAG('Q','U','Z',' ')}, /* Cañar Highland Quichua -> Quechua */ {"qxt", HB_TAG('Q','W','H',' ')}, /* Santa Ana de Tusi Pasco Quechua -> Quechua (Peru) */ + {"qxt", HB_TAG('Q','U','Z',' ')}, /* Santa Ana de Tusi Pasco Quechua -> Quechua */ {"qxu", HB_TAG('Q','U','Z',' ')}, /* Arequipa-La Unión Quechua -> Quechua */ {"qxw", HB_TAG('Q','W','H',' ')}, /* Jauja Wanca Quechua -> Quechua (Peru) */ + {"qxw", HB_TAG('Q','U','Z',' ')}, /* Jauja Wanca Quechua -> Quechua */ {"rag", HB_TAG('L','U','H',' ')}, /* Logooli -> Luyia */ /*{"raj", HB_TAG('R','A','J',' ')},*/ /* Rajasthani [macrolanguage] */ + {"ral", HB_TAG('Q','I','N',' ')}, /* Ralte -> Chin */ /*{"rar", HB_TAG('R','A','R',' ')},*/ /* Rarotongan */ {"rbb", HB_TAG('P','L','G',' ')}, /* Rumai Palaung -> Palaung */ {"rbl", HB_TAG('B','I','K',' ')}, /* Miraya Bikol -> Bikol */ + {"rcf", HB_TAG('C','P','P',' ')}, /* Réunion Creole French -> Creoles */ /*{"rej", HB_TAG('R','E','J',' ')},*/ /* Rejang */ /*{"ria", HB_TAG('R','I','A',' ')},*/ /* Riang (India) */ -/*{"rif", HB_TAG('R','I','F',' ')},*/ /* Tarifit */ + {"rif", HB_TAG('R','I','F',' ')}, /* Tarifit */ + {"rif", HB_TAG('B','B','R',' ')}, /* Tarifit -> Berber */ /*{"rit", HB_TAG('R','I','T',' ')},*/ /* Ritharrngu -> Ritarungo */ {"rki", HB_TAG('A','R','K',' ')}, /* Rakhine */ /*{"rkw", HB_TAG('R','K','W',' ')},*/ /* Arakwal */ @@ -816,13 +1240,16 @@ static const LangTag ot_languages[] = { {"rml", HB_TAG('R','O','Y',' ')}, /* Baltic Romani -> Romany */ {"rmn", HB_TAG('R','O','Y',' ')}, /* Balkan Romani -> Romany */ {"rmo", HB_TAG('R','O','Y',' ')}, /* Sinte Romani -> Romany */ + {"rms", HB_TAG_NONE }, /* Romanian Sign Language != Romansh */ {"rmw", HB_TAG('R','O','Y',' ')}, /* Welsh Romani -> Romany */ -/*{"rmy", HB_TAG('R','M','Y',' ')},*/ /* Vlax Romani */ + {"rmy", HB_TAG('R','M','Y',' ')}, /* Vlax Romani */ + {"rmy", HB_TAG('R','O','Y',' ')}, /* Vlax Romani -> Romany */ {"rmz", HB_TAG('A','R','K',' ')}, /* Marma -> Rakhine */ {"rn", HB_TAG('R','U','N',' ')}, /* Rundi */ - {"rnl", HB_TAG('H','A','L',' ')}, /* Ranglong -> Halam (Falam Chin) */ {"ro", HB_TAG('R','O','M',' ')}, /* Romanian */ {"rom", HB_TAG('R','O','Y',' ')}, /* Romany [macrolanguage] */ + {"rop", HB_TAG('C','P','P',' ')}, /* Kriol -> Creoles */ + {"rtc", HB_TAG('Q','I','N',' ')}, /* Rungtu Chin -> Chin */ /*{"rtm", HB_TAG('R','T','M',' ')},*/ /* Rotuman */ {"ru", HB_TAG('R','U','S',' ')}, /* Russian */ {"rue", HB_TAG('R','S','Y',' ')}, /* Rusyn */ @@ -830,11 +1257,16 @@ static const LangTag ot_languages[] = { {"rw", HB_TAG('R','U','A',' ')}, /* Kinyarwanda */ {"rwr", HB_TAG('M','A','W',' ')}, /* Marwari (India) */ {"sa", HB_TAG('S','A','N',' ')}, /* Sanskrit */ + {"sad", HB_TAG_NONE }, /* Sandawe != Sadri */ {"sah", HB_TAG('Y','A','K',' ')}, /* Yakut -> Sakha */ {"sam", HB_TAG('P','A','A',' ')}, /* Samaritan Aramaic -> Palestinian Aramaic */ /*{"sas", HB_TAG('S','A','S',' ')},*/ /* Sasak */ /*{"sat", HB_TAG('S','A','T',' ')},*/ /* Santali */ + {"say", HB_TAG_NONE }, /* Saya != Sayisi */ {"sc", HB_TAG('S','R','D',' ')}, /* Sardinian [macrolanguage] */ + {"scf", HB_TAG('C','P','P',' ')}, /* San Miguel Creole French -> Creoles */ + {"sch", HB_TAG('Q','I','N',' ')}, /* Sakachep -> Chin */ + {"sci", HB_TAG('C','P','P',' ')}, /* Sri Lankan Creole Malay -> Creoles */ {"sck", HB_TAG('S','A','D',' ')}, /* Sadri */ /*{"scn", HB_TAG('S','C','N',' ')},*/ /* Sicilian */ /*{"sco", HB_TAG('S','C','O',' ')},*/ /* Scots */ @@ -845,6 +1277,7 @@ static const LangTag ot_languages[] = { {"sdc", HB_TAG('S','R','D',' ')}, /* Sassarese Sardinian -> Sardinian */ {"sdh", HB_TAG('K','U','R',' ')}, /* Southern Kurdish -> Kurdish */ {"sdn", HB_TAG('S','R','D',' ')}, /* Gallurese Sardinian -> Sardinian */ + {"sds", HB_TAG('B','B','R',' ')}, /* Sened -> Berber */ {"se", HB_TAG('N','S','M',' ')}, /* Northern Sami */ {"seh", HB_TAG('S','N','A',' ')}, /* Sena */ {"sek", HB_TAG('A','T','H',' ')}, /* Sekani -> Athapaskan */ @@ -854,51 +1287,78 @@ static const LangTag ot_languages[] = { {"sg", HB_TAG('S','G','O',' ')}, /* Sango */ /*{"sga", HB_TAG('S','G','A',' ')},*/ /* Old Irish (to 900) */ {"sgc", HB_TAG('K','A','L',' ')}, /* Kipsigis -> Kalenjin */ + {"sgo", HB_TAG_NONE }, /* Songa (retired code) != Sango */ /*{"sgs", HB_TAG('S','G','S',' ')},*/ /* Samogitian */ {"sgw", HB_TAG('C','H','G',' ')}, /* Sebat Bet Gurage -> Chaha Gurage */ - {"sgw", HB_TAG('S','G','W',' ')}, /* Sebat Bet Gurage -> Chaha Gurage (SIL fonts) */ -/*{"shi", HB_TAG('S','H','I',' ')},*/ /* Tachelhit */ + {"shi", HB_TAG('S','H','I',' ')}, /* Tachelhit */ + {"shi", HB_TAG('B','B','R',' ')}, /* Tachelhit -> Berber */ + {"shl", HB_TAG('Q','I','N',' ')}, /* Shendu -> Chin */ /*{"shn", HB_TAG('S','H','N',' ')},*/ /* Shan */ {"shu", HB_TAG('A','R','A',' ')}, /* Chadian Arabic -> Arabic */ + {"shy", HB_TAG('B','B','R',' ')}, /* Tachawit -> Berber */ {"si", HB_TAG('S','N','H',' ')}, /* Sinhala (Sinhalese) */ + {"sib", HB_TAG_NONE }, /* Sebop != Sibe */ /*{"sid", HB_TAG('S','I','D',' ')},*/ /* Sidamo */ + {"sig", HB_TAG_NONE }, /* Paasaal != Silte Gurage */ + {"siz", HB_TAG('B','B','R',' ')}, /* Siwi -> Berber */ {"sjd", HB_TAG('K','S','M',' ')}, /* Kildin Sami */ {"sjo", HB_TAG('S','I','B',' ')}, /* Xibe -> Sibe */ + {"sjs", HB_TAG('B','B','R',' ')}, /* Senhaja De Srair -> Berber */ {"sk", HB_TAG('S','K','Y',' ')}, /* Slovak */ {"skg", HB_TAG('M','L','G',' ')}, /* Sakalava Malagasy -> Malagasy */ {"skr", HB_TAG('S','R','K',' ')}, /* Saraiki */ + {"sks", HB_TAG_NONE }, /* Maia != Skolt Sami */ + {"skw", HB_TAG('C','P','P',' ')}, /* Skepi Creole Dutch -> Creoles */ + {"sky", HB_TAG_NONE }, /* Sikaiana != Slovak */ {"sl", HB_TAG('S','L','V',' ')}, /* Slovenian */ + {"sla", HB_TAG_NONE }, /* Slavic [family] != Slavey */ {"sm", HB_TAG('S','M','O',' ')}, /* Samoan */ {"sma", HB_TAG('S','S','M',' ')}, /* Southern Sami */ {"smj", HB_TAG('L','S','M',' ')}, /* Lule Sami */ + {"sml", HB_TAG_NONE }, /* Central Sama != Somali */ {"smn", HB_TAG('I','S','M',' ')}, /* Inari Sami */ {"sms", HB_TAG('S','K','S',' ')}, /* Skolt Sami */ + {"smt", HB_TAG('Q','I','N',' ')}, /* Simte -> Chin */ {"sn", HB_TAG('S','N','A','0')}, /* Shona */ + {"snh", HB_TAG_NONE }, /* Shinabo (retired code) != Sinhala (Sinhalese) */ /*{"snk", HB_TAG('S','N','K',' ')},*/ /* Soninke */ {"so", HB_TAG('S','M','L',' ')}, /* Somali */ + {"sog", HB_TAG_NONE }, /* Sogdian != Sodo Gurage */ /*{"sop", HB_TAG('S','O','P',' ')},*/ /* Songe */ {"spv", HB_TAG('O','R','I',' ')}, /* Sambalpuri -> Odia (formerly Oriya) */ {"spy", HB_TAG('K','A','L',' ')}, /* Sabaot -> Kalenjin */ {"sq", HB_TAG('S','Q','I',' ')}, /* Albanian [macrolanguage] */ {"sr", HB_TAG('S','R','B',' ')}, /* Serbian */ + {"srb", HB_TAG_NONE }, /* Sora != Serbian */ {"src", HB_TAG('S','R','D',' ')}, /* Logudorese Sardinian -> Sardinian */ + {"srk", HB_TAG_NONE }, /* Serudung Murut != Saraiki */ + {"srm", HB_TAG('C','P','P',' ')}, /* Saramaccan -> Creoles */ + {"srn", HB_TAG('C','P','P',' ')}, /* Sranan Tongo -> Creoles */ {"sro", HB_TAG('S','R','D',' ')}, /* Campidanese Sardinian -> Sardinian */ /*{"srr", HB_TAG('S','R','R',' ')},*/ /* Serer */ {"srs", HB_TAG('A','T','H',' ')}, /* Sarsi -> Athapaskan */ {"ss", HB_TAG('S','W','Z',' ')}, /* Swati */ {"ssh", HB_TAG('A','R','A',' ')}, /* Shihhi Arabic -> Arabic */ - {"st", HB_TAG('S','O','T',' ')}, /* Southern Sotho -> Sotho, Southern */ + {"ssl", HB_TAG_NONE }, /* Western Sisaala != South Slavey */ + {"ssm", HB_TAG_NONE }, /* Semnam != Southern Sami */ + {"st", HB_TAG('S','O','T',' ')}, /* Southern Sotho */ + {"sta", HB_TAG('C','P','P',' ')}, /* Settla -> Creoles */ /*{"stq", HB_TAG('S','T','Q',' ')},*/ /* Saterfriesisch -> Saterland Frisian */ {"stv", HB_TAG('S','I','G',' ')}, /* Silt'e -> Silte Gurage */ {"su", HB_TAG('S','U','N',' ')}, /* Sundanese */ /*{"suk", HB_TAG('S','U','K',' ')},*/ /* Sukuma */ {"suq", HB_TAG('S','U','R',' ')}, /* Suri */ + {"sur", HB_TAG_NONE }, /* Mwaghavul != Suri */ {"sv", HB_TAG('S','V','E',' ')}, /* Swedish */ /*{"sva", HB_TAG('S','V','A',' ')},*/ /* Svan */ + {"svc", HB_TAG('C','P','P',' ')}, /* Vincentian Creole English -> Creoles */ + {"sve", HB_TAG_NONE }, /* Serili != Swedish */ {"sw", HB_TAG('S','W','K',' ')}, /* Swahili [macrolanguage] */ {"swb", HB_TAG('C','M','R',' ')}, /* Maore Comorian -> Comorian */ {"swc", HB_TAG('S','W','K',' ')}, /* Congo Swahili -> Swahili */ {"swh", HB_TAG('S','W','K',' ')}, /* Swahili */ + {"swk", HB_TAG_NONE }, /* Malawi Sena != Swahili */ + {"swn", HB_TAG('B','B','R',' ')}, /* Sawknah -> Berber */ {"swv", HB_TAG('M','A','W',' ')}, /* Shekhawati -> Marwari */ /*{"sxu", HB_TAG('S','X','U',' ')},*/ /* Upper Saxon */ {"syc", HB_TAG('S','Y','R',' ')}, /* Classical Syriac -> Syriac */ @@ -908,11 +1368,16 @@ static const LangTag ot_languages[] = { {"ta", HB_TAG('T','A','M',' ')}, /* Tamil */ {"taa", HB_TAG('A','T','H',' ')}, /* Lower Tanana -> Athapaskan */ /*{"tab", HB_TAG('T','A','B',' ')},*/ /* Tabassaran -> Tabasaran */ + {"taj", HB_TAG_NONE }, /* Eastern Tamang != Tajiki */ {"taq", HB_TAG('T','M','H',' ')}, /* Tamasheq -> Tamashek */ + {"taq", HB_TAG('B','B','R',' ')}, /* Tamasheq -> Berber */ + {"tas", HB_TAG('C','P','P',' ')}, /* Tay Boi -> Creoles */ {"tau", HB_TAG('A','T','H',' ')}, /* Upper Tanana -> Athapaskan */ {"tcb", HB_TAG('A','T','H',' ')}, /* Tanacross -> Athapaskan */ {"tce", HB_TAG('A','T','H',' ')}, /* Southern Tutchone -> Athapaskan */ + {"tch", HB_TAG('C','P','P',' ')}, /* Turks And Caicos Creole English -> Creoles */ {"tcp", HB_TAG('Q','I','N',' ')}, /* Tawr Chin -> Chin */ + {"tcs", HB_TAG('C','P','P',' ')}, /* Torres Strait Creole -> Creoles */ {"tcy", HB_TAG('T','U','L',' ')}, /* Tulu -> Tumbuka */ {"tcz", HB_TAG('Q','I','N',' ')}, /* Thado Chin -> Chin */ /*{"tdd", HB_TAG('T','D','D',' ')},*/ /* Tai Nüa -> Dehong Dai */ @@ -921,41 +1386,70 @@ static const LangTag ot_languages[] = { {"tec", HB_TAG('K','A','L',' ')}, /* Terik -> Kalenjin */ {"tem", HB_TAG('T','M','N',' ')}, /* Timne -> Temne */ /*{"tet", HB_TAG('T','E','T',' ')},*/ /* Tetum */ + {"tez", HB_TAG('B','B','R',' ')}, /* Tetserret -> Berber */ {"tfn", HB_TAG('A','T','H',' ')}, /* Tanaina -> Athapaskan */ {"tg", HB_TAG('T','A','J',' ')}, /* Tajik -> Tajiki */ + {"tgh", HB_TAG('C','P','P',' ')}, /* Tobagonian Creole English -> Creoles */ {"tgj", HB_TAG('N','I','S',' ')}, /* Tagin -> Nisi */ + {"tgn", HB_TAG_NONE }, /* Tandaganon != Tongan */ + {"tgr", HB_TAG_NONE }, /* Tareng != Tigre */ {"tgx", HB_TAG('A','T','H',' ')}, /* Tagish -> Athapaskan */ + {"tgy", HB_TAG_NONE }, /* Togoyo != Tigrinya */ {"th", HB_TAG('T','H','A',' ')}, /* Thai */ {"tht", HB_TAG('A','T','H',' ')}, /* Tahltan -> Athapaskan */ {"thv", HB_TAG('T','M','H',' ')}, /* Tahaggart Tamahaq -> Tamashek */ + {"thv", HB_TAG('B','B','R',' ')}, /* Tahaggart Tamahaq -> Berber */ {"thz", HB_TAG('T','M','H',' ')}, /* Tayart Tamajeq -> Tamashek */ + {"thz", HB_TAG('B','B','R',' ')}, /* Tayart Tamajeq -> Berber */ {"ti", HB_TAG('T','G','Y',' ')}, /* Tigrinya */ + {"tia", HB_TAG('B','B','R',' ')}, /* Tidikelt Tamazight -> Berber */ {"tig", HB_TAG('T','G','R',' ')}, /* Tigre */ /*{"tiv", HB_TAG('T','I','V',' ')},*/ /* Tiv */ + {"tjo", HB_TAG('B','B','R',' ')}, /* Temacine Tamazight -> Berber */ {"tk", HB_TAG('T','K','M',' ')}, /* Turkmen */ {"tkg", HB_TAG('M','L','G',' ')}, /* Tesaka Malagasy -> Malagasy */ + {"tkm", HB_TAG_NONE }, /* Takelma != Turkmen */ {"tl", HB_TAG('T','G','L',' ')}, /* Tagalog */ -/*{"tmh", HB_TAG('T','M','H',' ')},*/ /* Tamashek [macrolanguage] */ + {"tmg", HB_TAG('C','P','P',' ')}, /* Ternateño -> Creoles */ + {"tmh", HB_TAG('T','M','H',' ')}, /* Tamashek [macrolanguage] */ + {"tmh", HB_TAG('B','B','R',' ')}, /* Tamashek [macrolanguage] -> Berber */ + {"tmn", HB_TAG_NONE }, /* Taman (Indonesia) != Temne */ {"tmw", HB_TAG('M','L','Y',' ')}, /* Temuan -> Malay */ {"tn", HB_TAG('T','N','A',' ')}, /* Tswana */ + {"tna", HB_TAG_NONE }, /* Tacana != Tswana */ + {"tne", HB_TAG_NONE }, /* Tinoc Kallahan (retired code) != Tundra Enets */ {"tnf", HB_TAG('D','R','I',' ')}, /* Tangshewi (retired code) -> Dari */ + {"tnf", HB_TAG('F','A','R',' ')}, /* Tangshewi (retired code) -> Persian */ + {"tng", HB_TAG_NONE }, /* Tobanga != Tonga */ {"to", HB_TAG('T','G','N',' ')}, /* Tonga (Tonga Islands) -> Tongan */ {"tod", HB_TAG('T','O','D','0')}, /* Toma */ {"toi", HB_TAG('T','N','G',' ')}, /* Tonga (Zambia) */ + {"toj", HB_TAG('M','Y','N',' ')}, /* Tojolabal -> Mayan */ {"tol", HB_TAG('A','T','H',' ')}, /* Tolowa -> Athapaskan */ -/*{"tpi", HB_TAG('T','P','I',' ')},*/ /* Tok Pisin */ + {"tor", HB_TAG('B','A','D','0')}, /* Togbo-Vara Banda -> Banda */ + {"tpi", HB_TAG('T','P','I',' ')}, /* Tok Pisin */ + {"tpi", HB_TAG('C','P','P',' ')}, /* Tok Pisin -> Creoles */ {"tr", HB_TAG('T','R','K',' ')}, /* Turkish */ + {"trf", HB_TAG('C','P','P',' ')}, /* Trinidadian Creole English -> Creoles */ + {"trk", HB_TAG_NONE }, /* Turkic [family] != Turkish */ {"tru", HB_TAG('T','U','A',' ')}, /* Turoyo -> Turoyo Aramaic */ {"tru", HB_TAG('S','Y','R',' ')}, /* Turoyo -> Syriac */ {"ts", HB_TAG('T','S','G',' ')}, /* Tsonga */ + {"tsg", HB_TAG_NONE }, /* Tausug != Tsonga */ /*{"tsj", HB_TAG('T','S','J',' ')},*/ /* Tshangla */ {"tt", HB_TAG('T','A','T',' ')}, /* Tatar */ + {"ttc", HB_TAG('M','Y','N',' ')}, /* Tektiteko -> Mayan */ {"ttm", HB_TAG('A','T','H',' ')}, /* Northern Tutchone -> Athapaskan */ {"ttq", HB_TAG('T','M','H',' ')}, /* Tawallammat Tamajaq -> Tamashek */ + {"ttq", HB_TAG('B','B','R',' ')}, /* Tawallammat Tamajaq -> Berber */ + {"tua", HB_TAG_NONE }, /* Wiarumus != Turoyo Aramaic */ + {"tul", HB_TAG_NONE }, /* Tula != Tumbuka */ /*{"tum", HB_TAG('T','U','M',' ')},*/ /* Tumbuka -> Tulu */ {"tuu", HB_TAG('A','T','H',' ')}, /* Tututni -> Athapaskan */ + {"tuv", HB_TAG_NONE }, /* Turkana != Tuvin */ {"tuy", HB_TAG('K','A','L',' ')}, /* Tugen -> Kalenjin */ /*{"tvl", HB_TAG('T','V','L',' ')},*/ /* Tuvalu */ + {"tvy", HB_TAG('C','P','P',' ')}, /* Timor Pidgin -> Creoles */ {"tw", HB_TAG('T','W','I',' ')}, /* Twi */ {"tw", HB_TAG('A','K','A',' ')}, /* Twi -> Akan */ {"txc", HB_TAG('A','T','H',' ')}, /* Tsetsaut -> Athapaskan */ @@ -963,33 +1457,48 @@ static const LangTag ot_languages[] = { {"ty", HB_TAG('T','H','T',' ')}, /* Tahitian */ {"tyv", HB_TAG('T','U','V',' ')}, /* Tuvinian -> Tuvin */ /*{"tyz", HB_TAG('T','Y','Z',' ')},*/ /* Tà y */ -/*{"tzm", HB_TAG('T','Z','M',' ')},*/ /* Central Atlas Tamazight -> Tamazight */ -/*{"tzo", HB_TAG('T','Z','O',' ')},*/ /* Tzotzil */ + {"tzh", HB_TAG('M','Y','N',' ')}, /* Tzeltal -> Mayan */ + {"tzj", HB_TAG('M','Y','N',' ')}, /* Tz'utujil -> Mayan */ + {"tzm", HB_TAG('T','Z','M',' ')}, /* Central Atlas Tamazight -> Tamazight */ + {"tzm", HB_TAG('B','B','R',' ')}, /* Central Atlas Tamazight -> Berber */ + {"tzo", HB_TAG('T','Z','O',' ')}, /* Tzotzil */ + {"tzo", HB_TAG('M','Y','N',' ')}, /* Tzotzil -> Mayan */ {"ubl", HB_TAG('B','I','K',' ')}, /* Buhi'non Bikol -> Bikol */ /*{"udm", HB_TAG('U','D','M',' ')},*/ /* Udmurt */ {"ug", HB_TAG('U','Y','G',' ')}, /* Uyghur */ {"uk", HB_TAG('U','K','R',' ')}, /* Ukrainian */ {"uki", HB_TAG('K','U','I',' ')}, /* Kui (India) */ + {"uln", HB_TAG('C','P','P',' ')}, /* Unserdeutsch -> Creoles */ /*{"umb", HB_TAG('U','M','B',' ')},*/ /* Umbundu */ {"unr", HB_TAG('M','U','N',' ')}, /* Mundari */ {"ur", HB_TAG('U','R','D',' ')}, /* Urdu */ {"urk", HB_TAG('M','L','Y',' ')}, /* Urak Lawoi' -> Malay */ + {"usp", HB_TAG('M','Y','N',' ')}, /* Uspanteco -> Mayan */ {"uz", HB_TAG('U','Z','B',' ')}, /* Uzbek [macrolanguage] */ {"uzn", HB_TAG('U','Z','B',' ')}, /* Northern Uzbek -> Uzbek */ {"uzs", HB_TAG('U','Z','B',' ')}, /* Southern Uzbek -> Uzbek */ + {"vap", HB_TAG('Q','I','N',' ')}, /* Vaiphei -> Chin */ {"ve", HB_TAG('V','E','N',' ')}, /* Venda */ /*{"vec", HB_TAG('V','E','C',' ')},*/ /* Venetian */ {"vi", HB_TAG('V','I','T',' ')}, /* Vietnamese */ + {"vic", HB_TAG('C','P','P',' ')}, /* Virgin Islands Creole English -> Creoles */ + {"vit", HB_TAG_NONE }, /* Viti != Vietnamese */ {"vkk", HB_TAG('M','L','Y',' ')}, /* Kaur -> Malay */ + {"vkp", HB_TAG('C','P','P',' ')}, /* Korlai Creole Portuguese -> Creoles */ {"vkt", HB_TAG('M','L','Y',' ')}, /* Tenggarong Kutai Malay -> Malay */ {"vls", HB_TAG('F','L','E',' ')}, /* Vlaams -> Dutch (Flemish) */ {"vmw", HB_TAG('M','A','K',' ')}, /* Makhuwa */ {"vo", HB_TAG('V','O','L',' ')}, /* Volapük */ /*{"vro", HB_TAG('V','R','O',' ')},*/ /* Võro */ {"wa", HB_TAG('W','L','N',' ')}, /* Walloon */ + {"wag", HB_TAG_NONE }, /* Wa'ema != Wagdi */ /*{"war", HB_TAG('W','A','R',' ')},*/ /* Waray (Philippines) -> Waray-Waray */ {"wbm", HB_TAG('W','A',' ',' ')}, /* Wa */ {"wbr", HB_TAG('W','A','G',' ')}, /* Wagdi */ + {"wbr", HB_TAG('R','A','J',' ')}, /* Wagdi -> Rajasthani */ + {"wea", HB_TAG('K','R','N',' ')}, /* Wewaw -> Karen */ + {"wes", HB_TAG('C','P','P',' ')}, /* Cameroon Pidgin -> Creoles */ + {"weu", HB_TAG('Q','I','N',' ')}, /* Rawngtu Chin -> Chin */ {"wlc", HB_TAG('C','M','R',' ')}, /* Mwali Comorian -> Comorian */ {"wle", HB_TAG('S','I','G',' ')}, /* Wolane -> Silte Gurage */ {"wlk", HB_TAG('A','T','H',' ')}, /* Wailaki -> Athapaskan */ @@ -998,45 +1507,56 @@ static const LangTag ot_languages[] = { {"wry", HB_TAG('M','A','W',' ')}, /* Merwari -> Marwari */ {"wsg", HB_TAG('G','O','N',' ')}, /* Adilabad Gondi -> Gondi */ /*{"wtm", HB_TAG('W','T','M',' ')},*/ /* Mewati */ - {"wuu", HB_TAG('Z','H','S',' ')}, /* Wu Chinese -> Chinese Simplified */ + {"wuu", HB_TAG('Z','H','S',' ')}, /* Wu Chinese -> Chinese, Simplified */ {"xal", HB_TAG('K','L','M',' ')}, /* Kalmyk */ {"xal", HB_TAG('T','O','D',' ')}, /* Kalmyk -> Todo */ {"xan", HB_TAG('S','E','K',' ')}, /* Xamtanga -> Sekota */ + {"xbd", HB_TAG_NONE }, /* Bindal != Lü */ {"xh", HB_TAG('X','H','S',' ')}, /* Xhosa */ /*{"xjb", HB_TAG('X','J','B',' ')},*/ /* Minjungbal -> Minjangbal */ /*{"xkf", HB_TAG('X','K','F',' ')},*/ /* Khengkha */ + {"xmg", HB_TAG('B','M','L',' ')}, /* Mengaka -> Bamileke */ {"xmm", HB_TAG('M','L','Y',' ')}, /* Manado Malay -> Malay */ + {"xmm", HB_TAG('C','P','P',' ')}, /* Manado Malay -> Creoles */ {"xmv", HB_TAG('M','L','G',' ')}, /* Antankarana Malagasy -> Malagasy */ {"xmw", HB_TAG('M','L','G',' ')}, /* Tsimihety Malagasy -> Malagasy */ - {"xnr", HB_TAG('D','G','R',' ')}, /* Kangri -> Dogri */ + {"xnr", HB_TAG('D','G','R',' ')}, /* Kangri -> Dogri (macrolanguage) */ /*{"xog", HB_TAG('X','O','G',' ')},*/ /* Soga */ -/*{"xpe", HB_TAG('X','P','E',' ')},*/ /* Liberia Kpelle -> Kpelle (Liberia) */ + {"xpe", HB_TAG('X','P','E',' ')}, /* Liberia Kpelle -> Kpelle (Liberia) */ + {"xpe", HB_TAG('K','P','L',' ')}, /* Liberia Kpelle -> Kpelle */ {"xsl", HB_TAG('S','S','L',' ')}, /* South Slavey */ {"xsl", HB_TAG('S','L','A',' ')}, /* South Slavey -> Slavey */ {"xsl", HB_TAG('A','T','H',' ')}, /* South Slavey -> Athapaskan */ {"xst", HB_TAG('S','I','G',' ')}, /* Silt'e (retired code) -> Silte Gurage */ + {"xup", HB_TAG('A','T','H',' ')}, /* Upper Umpqua -> Athapaskan */ {"xwo", HB_TAG('T','O','D',' ')}, /* Written Oirat -> Todo */ + {"yaj", HB_TAG('B','A','D','0')}, /* Banda-Yangere -> Banda */ + {"yak", HB_TAG_NONE }, /* Yakama != Sakha */ /*{"yao", HB_TAG('Y','A','O',' ')},*/ /* Yao */ /*{"yap", HB_TAG('Y','A','P',' ')},*/ /* Yapese */ + {"yba", HB_TAG_NONE }, /* Yala != Yoruba */ + {"ybb", HB_TAG('B','M','L',' ')}, /* Yemba -> Bamileke */ {"ybd", HB_TAG('A','R','K',' ')}, /* Yangbye (retired code) -> Rakhine */ {"ydd", HB_TAG('J','I','I',' ')}, /* Eastern Yiddish -> Yiddish */ {"yi", HB_TAG('J','I','I',' ')}, /* Yiddish [macrolanguage] */ {"yih", HB_TAG('J','I','I',' ')}, /* Western Yiddish -> Yiddish */ + {"yim", HB_TAG_NONE }, /* Yimchungru Naga != Yi Modern */ {"yo", HB_TAG('Y','B','A',' ')}, /* Yoruba */ {"yos", HB_TAG('Q','I','N',' ')}, /* Yos (retired code) -> Chin */ - {"yrk", HB_TAG('T','N','E',' ')}, /* Nenets -> Tundra Nenets */ - {"yrk", HB_TAG('F','N','E',' ')}, /* Nenets -> Forest Nenets */ - {"yue", HB_TAG('Z','H','H',' ')}, /* Yue Chinese -> Chinese, Hong Kong SAR */ + {"yua", HB_TAG('M','Y','N',' ')}, /* Yucateco -> Mayan */ + {"yue", HB_TAG('Z','H','H',' ')}, /* Yue Chinese -> Chinese, Traditional, Hong Kong SAR */ {"za", HB_TAG('Z','H','A',' ')}, /* Zhuang [macrolanguage] */ {"zch", HB_TAG('Z','H','A',' ')}, /* Central Hongshuihe Zhuang -> Zhuang */ {"zdj", HB_TAG('C','M','R',' ')}, /* Ngazidja Comorian -> Comorian */ /*{"zea", HB_TAG('Z','E','A',' ')},*/ /* Zeeuws -> Zealandic */ {"zeh", HB_TAG('Z','H','A',' ')}, /* Eastern Hongshuihe Zhuang -> Zhuang */ + {"zen", HB_TAG('B','B','R',' ')}, /* Zenaga -> Berber */ {"zgb", HB_TAG('Z','H','A',' ')}, /* Guibei Zhuang -> Zhuang */ -/*{"zgh", HB_TAG('Z','G','H',' ')},*/ /* Standard Moroccan Tamazight */ + {"zgh", HB_TAG('Z','G','H',' ')}, /* Standard Moroccan Tamazight */ + {"zgh", HB_TAG('B','B','R',' ')}, /* Standard Moroccan Tamazight -> Berber */ {"zgm", HB_TAG('Z','H','A',' ')}, /* Minz Zhuang -> Zhuang */ {"zgn", HB_TAG('Z','H','A',' ')}, /* Guibian Zhuang -> Zhuang */ - {"zh", HB_TAG('Z','H','S',' ')}, /* Chinese [macrolanguage] -> Chinese Simplified */ + {"zh", HB_TAG('Z','H','S',' ')}, /* Chinese, Simplified [macrolanguage] */ {"zhd", HB_TAG('Z','H','A',' ')}, /* Dai Zhuang -> Zhuang */ {"zhn", HB_TAG('Z','H','A',' ')}, /* Nong Zhuang -> Zhuang */ {"zlj", HB_TAG('Z','H','A',' ')}, /* Liujiang Zhuang -> Zhuang */ @@ -1044,6 +1564,8 @@ static const LangTag ot_languages[] = { {"zln", HB_TAG('Z','H','A',' ')}, /* Lianshan Zhuang -> Zhuang */ {"zlq", HB_TAG('Z','H','A',' ')}, /* Liuqian Zhuang -> Zhuang */ {"zmi", HB_TAG('M','L','Y',' ')}, /* Negeri Sembilan Malay -> Malay */ + {"zmz", HB_TAG('B','A','D','0')}, /* Mbandja -> Banda */ + {"znd", HB_TAG_NONE }, /* Zande [family] != Zande */ {"zne", HB_TAG('Z','N','D',' ')}, /* Zande */ {"zom", HB_TAG('Q','I','N',' ')}, /* Zou -> Chin */ {"zqe", HB_TAG('Z','H','A',' ')}, /* Qiubei Zhuang -> Zhuang */ @@ -1054,6 +1576,7 @@ static const LangTag ot_languages[] = { {"zyg", HB_TAG('Z','H','A',' ')}, /* Yang Zhuang -> Zhuang */ {"zyj", HB_TAG('Z','H','A',' ')}, /* Youjiang Zhuang -> Zhuang */ {"zyn", HB_TAG('Z','H','A',' ')}, /* Yongnan Zhuang -> Zhuang */ + {"zyp", HB_TAG('Q','I','N',' ')}, /* Zyphe Chin -> Chin */ /*{"zza", HB_TAG('Z','Z','A',' ')},*/ /* Zazaki [macrolanguage] */ {"zzj", HB_TAG('Z','H','A',' ')}, /* Zuojiang Zhuang -> Zhuang */ }; @@ -1092,6 +1615,13 @@ hb_ot_tags_from_complex_language (const char *lang_str, *count = 1; return true; } + if (subtag_matches (lang_str, limit, "-arevmda")) + { + /* Armenian; Western Armenian (retired code) */ + tags[0] = HB_TAG('H','Y','E',' '); /* Armenian */ + *count = 1; + return true; + } if (subtag_matches (lang_str, limit, "-provenc")) { /* Occitan (post 1500); Provençal */ @@ -1139,7 +1669,7 @@ hb_ot_tags_from_complex_language (const char *lang_str, case 'a': if (0 == strcmp (&lang_str[1], "rt-lojban")) { - /* Lojban */ + /* Lojban (retired code) */ tags[0] = HB_TAG('J','B','O',' '); /* Lojban */ *count = 1; return true; @@ -1148,225 +1678,273 @@ hb_ot_tags_from_complex_language (const char *lang_str, case 'c': if (lang_matches (&lang_str[1], "do-hant-hk")) { - /* Min Dong Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + /* Min Dong Chinese; Han (Traditional variant); Hong Kong */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } if (lang_matches (&lang_str[1], "do-hant-mo")) { - /* Min Dong Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + /* Min Dong Chinese; Han (Traditional variant); Macao */ + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (lang_matches (&lang_str[1], "jy-hant-hk")) { - /* Jinyu Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + /* Jinyu Chinese; Han (Traditional variant); Hong Kong */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } if (lang_matches (&lang_str[1], "jy-hant-mo")) { - /* Jinyu Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + /* Jinyu Chinese; Han (Traditional variant); Macao */ + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (lang_matches (&lang_str[1], "mn-hant-hk")) { - /* Mandarin Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + /* Mandarin Chinese; Han (Traditional variant); Hong Kong */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } if (lang_matches (&lang_str[1], "mn-hant-mo")) { - /* Mandarin Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + /* Mandarin Chinese; Han (Traditional variant); Macao */ + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (lang_matches (&lang_str[1], "np-hant-hk")) { - /* Northern Ping Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + /* Northern Ping Chinese; Han (Traditional variant); Hong Kong */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } if (lang_matches (&lang_str[1], "np-hant-mo")) { - /* Northern Ping Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + /* Northern Ping Chinese; Han (Traditional variant); Macao */ + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (lang_matches (&lang_str[1], "px-hant-hk")) { - /* Pu-Xian Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + /* Pu-Xian Chinese; Han (Traditional variant); Hong Kong */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } if (lang_matches (&lang_str[1], "px-hant-mo")) { - /* Pu-Xian Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + /* Pu-Xian Chinese; Han (Traditional variant); Macao */ + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (lang_matches (&lang_str[1], "sp-hant-hk")) { - /* Southern Ping Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + /* Southern Ping Chinese; Han (Traditional variant); Hong Kong */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } if (lang_matches (&lang_str[1], "sp-hant-mo")) { - /* Southern Ping Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + /* Southern Ping Chinese; Han (Traditional variant); Macao */ + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (lang_matches (&lang_str[1], "zh-hant-hk")) { - /* Huizhou Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + /* Huizhou Chinese; Han (Traditional variant); Hong Kong */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } if (lang_matches (&lang_str[1], "zh-hant-mo")) { - /* Huizhou Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + /* Huizhou Chinese; Han (Traditional variant); Macao */ + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (lang_matches (&lang_str[1], "zo-hant-hk")) { - /* Min Zhong Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + /* Min Zhong Chinese; Han (Traditional variant); Hong Kong */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } if (lang_matches (&lang_str[1], "zo-hant-mo")) { - /* Min Zhong Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + /* Min Zhong Chinese; Han (Traditional variant); Macao */ + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (lang_matches (&lang_str[1], "do-hans")) { - /* Min Dong Chinese */ - tags[0] = HB_TAG('Z','H','S',' '); /* Chinese Simplified */ + /* Min Dong Chinese; Han (Simplified variant) */ + tags[0] = HB_TAG('Z','H','S',' '); /* Chinese, Simplified */ *count = 1; return true; } if (lang_matches (&lang_str[1], "do-hant")) { - /* Min Dong Chinese */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + /* Min Dong Chinese; Han (Traditional variant) */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } if (lang_matches (&lang_str[1], "jy-hans")) { - /* Jinyu Chinese */ - tags[0] = HB_TAG('Z','H','S',' '); /* Chinese Simplified */ + /* Jinyu Chinese; Han (Simplified variant) */ + tags[0] = HB_TAG('Z','H','S',' '); /* Chinese, Simplified */ *count = 1; return true; } if (lang_matches (&lang_str[1], "jy-hant")) { - /* Jinyu Chinese */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + /* Jinyu Chinese; Han (Traditional variant) */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } if (lang_matches (&lang_str[1], "mn-hans")) { - /* Mandarin Chinese */ - tags[0] = HB_TAG('Z','H','S',' '); /* Chinese Simplified */ + /* Mandarin Chinese; Han (Simplified variant) */ + tags[0] = HB_TAG('Z','H','S',' '); /* Chinese, Simplified */ *count = 1; return true; } if (lang_matches (&lang_str[1], "mn-hant")) { - /* Mandarin Chinese */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + /* Mandarin Chinese; Han (Traditional variant) */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } if (lang_matches (&lang_str[1], "np-hans")) { - /* Northern Ping Chinese */ - tags[0] = HB_TAG('Z','H','S',' '); /* Chinese Simplified */ + /* Northern Ping Chinese; Han (Simplified variant) */ + tags[0] = HB_TAG('Z','H','S',' '); /* Chinese, Simplified */ *count = 1; return true; } if (lang_matches (&lang_str[1], "np-hant")) { - /* Northern Ping Chinese */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + /* Northern Ping Chinese; Han (Traditional variant) */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } if (lang_matches (&lang_str[1], "px-hans")) { - /* Pu-Xian Chinese */ - tags[0] = HB_TAG('Z','H','S',' '); /* Chinese Simplified */ + /* Pu-Xian Chinese; Han (Simplified variant) */ + tags[0] = HB_TAG('Z','H','S',' '); /* Chinese, Simplified */ *count = 1; return true; } if (lang_matches (&lang_str[1], "px-hant")) { - /* Pu-Xian Chinese */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + /* Pu-Xian Chinese; Han (Traditional variant) */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } if (lang_matches (&lang_str[1], "sp-hans")) { - /* Southern Ping Chinese */ - tags[0] = HB_TAG('Z','H','S',' '); /* Chinese Simplified */ + /* Southern Ping Chinese; Han (Simplified variant) */ + tags[0] = HB_TAG('Z','H','S',' '); /* Chinese, Simplified */ *count = 1; return true; } if (lang_matches (&lang_str[1], "sp-hant")) { - /* Southern Ping Chinese */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + /* Southern Ping Chinese; Han (Traditional variant) */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } if (lang_matches (&lang_str[1], "zh-hans")) { - /* Huizhou Chinese */ - tags[0] = HB_TAG('Z','H','S',' '); /* Chinese Simplified */ + /* Huizhou Chinese; Han (Simplified variant) */ + tags[0] = HB_TAG('Z','H','S',' '); /* Chinese, Simplified */ *count = 1; return true; } if (lang_matches (&lang_str[1], "zh-hant")) { - /* Huizhou Chinese */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + /* Huizhou Chinese; Han (Traditional variant) */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } if (lang_matches (&lang_str[1], "zo-hans")) { - /* Min Zhong Chinese */ - tags[0] = HB_TAG('Z','H','S',' '); /* Chinese Simplified */ + /* Min Zhong Chinese; Han (Simplified variant) */ + tags[0] = HB_TAG('Z','H','S',' '); /* Chinese, Simplified */ *count = 1; return true; } if (lang_matches (&lang_str[1], "zo-hant")) { - /* Min Zhong Chinese */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + /* Min Zhong Chinese; Han (Traditional variant) */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } @@ -1374,7 +1952,7 @@ hb_ot_tags_from_complex_language (const char *lang_str, && subtag_matches (lang_str, limit, "-hk")) { /* Min Dong Chinese; Hong Kong */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } @@ -1382,15 +1960,21 @@ hb_ot_tags_from_complex_language (const char *lang_str, && subtag_matches (lang_str, limit, "-mo")) { /* Min Dong Chinese; Macao */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (0 == strncmp (&lang_str[1], "do-", 3) && subtag_matches (lang_str, limit, "-tw")) { /* Min Dong Chinese; Taiwan, Province of China */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } @@ -1398,7 +1982,7 @@ hb_ot_tags_from_complex_language (const char *lang_str, && subtag_matches (lang_str, limit, "-hk")) { /* Jinyu Chinese; Hong Kong */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } @@ -1406,15 +1990,21 @@ hb_ot_tags_from_complex_language (const char *lang_str, && subtag_matches (lang_str, limit, "-mo")) { /* Jinyu Chinese; Macao */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (0 == strncmp (&lang_str[1], "jy-", 3) && subtag_matches (lang_str, limit, "-tw")) { /* Jinyu Chinese; Taiwan, Province of China */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } @@ -1422,7 +2012,7 @@ hb_ot_tags_from_complex_language (const char *lang_str, && subtag_matches (lang_str, limit, "-hk")) { /* Mandarin Chinese; Hong Kong */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } @@ -1430,15 +2020,21 @@ hb_ot_tags_from_complex_language (const char *lang_str, && subtag_matches (lang_str, limit, "-mo")) { /* Mandarin Chinese; Macao */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (0 == strncmp (&lang_str[1], "mn-", 3) && subtag_matches (lang_str, limit, "-tw")) { /* Mandarin Chinese; Taiwan, Province of China */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } @@ -1446,7 +2042,7 @@ hb_ot_tags_from_complex_language (const char *lang_str, && subtag_matches (lang_str, limit, "-hk")) { /* Northern Ping Chinese; Hong Kong */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } @@ -1454,15 +2050,21 @@ hb_ot_tags_from_complex_language (const char *lang_str, && subtag_matches (lang_str, limit, "-mo")) { /* Northern Ping Chinese; Macao */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (0 == strncmp (&lang_str[1], "np-", 3) && subtag_matches (lang_str, limit, "-tw")) { /* Northern Ping Chinese; Taiwan, Province of China */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } @@ -1470,7 +2072,7 @@ hb_ot_tags_from_complex_language (const char *lang_str, && subtag_matches (lang_str, limit, "-hk")) { /* Pu-Xian Chinese; Hong Kong */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } @@ -1478,15 +2080,21 @@ hb_ot_tags_from_complex_language (const char *lang_str, && subtag_matches (lang_str, limit, "-mo")) { /* Pu-Xian Chinese; Macao */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (0 == strncmp (&lang_str[1], "px-", 3) && subtag_matches (lang_str, limit, "-tw")) { /* Pu-Xian Chinese; Taiwan, Province of China */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } @@ -1494,7 +2102,7 @@ hb_ot_tags_from_complex_language (const char *lang_str, && subtag_matches (lang_str, limit, "-hk")) { /* Southern Ping Chinese; Hong Kong */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } @@ -1502,15 +2110,21 @@ hb_ot_tags_from_complex_language (const char *lang_str, && subtag_matches (lang_str, limit, "-mo")) { /* Southern Ping Chinese; Macao */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (0 == strncmp (&lang_str[1], "sp-", 3) && subtag_matches (lang_str, limit, "-tw")) { /* Southern Ping Chinese; Taiwan, Province of China */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } @@ -1518,7 +2132,7 @@ hb_ot_tags_from_complex_language (const char *lang_str, && subtag_matches (lang_str, limit, "-hk")) { /* Huizhou Chinese; Hong Kong */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } @@ -1526,15 +2140,21 @@ hb_ot_tags_from_complex_language (const char *lang_str, && subtag_matches (lang_str, limit, "-mo")) { /* Huizhou Chinese; Macao */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (0 == strncmp (&lang_str[1], "zh-", 3) && subtag_matches (lang_str, limit, "-tw")) { /* Huizhou Chinese; Taiwan, Province of China */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } @@ -1542,7 +2162,7 @@ hb_ot_tags_from_complex_language (const char *lang_str, && subtag_matches (lang_str, limit, "-hk")) { /* Min Zhong Chinese; Hong Kong */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } @@ -1550,15 +2170,21 @@ hb_ot_tags_from_complex_language (const char *lang_str, && subtag_matches (lang_str, limit, "-mo")) { /* Min Zhong Chinese; Macao */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (0 == strncmp (&lang_str[1], "zo-", 3) && subtag_matches (lang_str, limit, "-tw")) { /* Min Zhong Chinese; Taiwan, Province of China */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } @@ -1566,35 +2192,41 @@ hb_ot_tags_from_complex_language (const char *lang_str, case 'g': if (lang_matches (&lang_str[1], "an-hant-hk")) { - /* Gan Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + /* Gan Chinese; Han (Traditional variant); Hong Kong */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } if (lang_matches (&lang_str[1], "an-hant-mo")) { - /* Gan Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + /* Gan Chinese; Han (Traditional variant); Macao */ + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (lang_matches (&lang_str[1], "an-hans")) { - /* Gan Chinese */ - tags[0] = HB_TAG('Z','H','S',' '); /* Chinese Simplified */ + /* Gan Chinese; Han (Simplified variant) */ + tags[0] = HB_TAG('Z','H','S',' '); /* Chinese, Simplified */ *count = 1; return true; } if (lang_matches (&lang_str[1], "an-hant")) { - /* Gan Chinese */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + /* Gan Chinese; Han (Traditional variant) */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } if (lang_matches (&lang_str[1], "a-latg")) { - /* Irish */ + /* Irish; Latin (Gaelic variant) */ tags[0] = HB_TAG('I','R','T',' '); /* Irish Traditional */ *count = 1; return true; @@ -1603,7 +2235,7 @@ hb_ot_tags_from_complex_language (const char *lang_str, && subtag_matches (lang_str, limit, "-hk")) { /* Gan Chinese; Hong Kong */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } @@ -1611,15 +2243,21 @@ hb_ot_tags_from_complex_language (const char *lang_str, && subtag_matches (lang_str, limit, "-mo")) { /* Gan Chinese; Macao */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (0 == strncmp (&lang_str[1], "an-", 3) && subtag_matches (lang_str, limit, "-tw")) { /* Gan Chinese; Taiwan, Province of China */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } @@ -1627,57 +2265,69 @@ hb_ot_tags_from_complex_language (const char *lang_str, case 'h': if (lang_matches (&lang_str[1], "ak-hant-hk")) { - /* Hakka Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + /* Hakka Chinese; Han (Traditional variant); Hong Kong */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } if (lang_matches (&lang_str[1], "ak-hant-mo")) { - /* Hakka Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + /* Hakka Chinese; Han (Traditional variant); Macao */ + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (lang_matches (&lang_str[1], "sn-hant-hk")) { - /* Xiang Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + /* Xiang Chinese; Han (Traditional variant); Hong Kong */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } if (lang_matches (&lang_str[1], "sn-hant-mo")) { - /* Xiang Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + /* Xiang Chinese; Han (Traditional variant); Macao */ + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (lang_matches (&lang_str[1], "ak-hans")) { - /* Hakka Chinese */ - tags[0] = HB_TAG('Z','H','S',' '); /* Chinese Simplified */ + /* Hakka Chinese; Han (Simplified variant) */ + tags[0] = HB_TAG('Z','H','S',' '); /* Chinese, Simplified */ *count = 1; return true; } if (lang_matches (&lang_str[1], "ak-hant")) { - /* Hakka Chinese */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + /* Hakka Chinese; Han (Traditional variant) */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } if (lang_matches (&lang_str[1], "sn-hans")) { - /* Xiang Chinese */ - tags[0] = HB_TAG('Z','H','S',' '); /* Chinese Simplified */ + /* Xiang Chinese; Han (Simplified variant) */ + tags[0] = HB_TAG('Z','H','S',' '); /* Chinese, Simplified */ *count = 1; return true; } if (lang_matches (&lang_str[1], "sn-hant")) { - /* Xiang Chinese */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + /* Xiang Chinese; Han (Traditional variant) */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } @@ -1685,7 +2335,7 @@ hb_ot_tags_from_complex_language (const char *lang_str, && subtag_matches (lang_str, limit, "-hk")) { /* Hakka Chinese; Hong Kong */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } @@ -1693,15 +2343,21 @@ hb_ot_tags_from_complex_language (const char *lang_str, && subtag_matches (lang_str, limit, "-mo")) { /* Hakka Chinese; Macao */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (0 == strncmp (&lang_str[1], "ak-", 3) && subtag_matches (lang_str, limit, "-tw")) { /* Hakka Chinese; Taiwan, Province of China */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } @@ -1709,7 +2365,7 @@ hb_ot_tags_from_complex_language (const char *lang_str, && subtag_matches (lang_str, limit, "-hk")) { /* Xiang Chinese; Hong Kong */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } @@ -1717,15 +2373,21 @@ hb_ot_tags_from_complex_language (const char *lang_str, && subtag_matches (lang_str, limit, "-mo")) { /* Xiang Chinese; Macao */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (0 == strncmp (&lang_str[1], "sn-", 3) && subtag_matches (lang_str, limit, "-tw")) { /* Xiang Chinese; Taiwan, Province of China */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } @@ -1733,7 +2395,7 @@ hb_ot_tags_from_complex_language (const char *lang_str, case 'i': if (0 == strcmp (&lang_str[1], "-navajo")) { - /* Navajo */ + /* Navajo (retired code) */ unsigned int i; hb_tag_t possible_tags[] = { HB_TAG('N','A','V',' '), /* Navajo */ @@ -1746,14 +2408,14 @@ hb_ot_tags_from_complex_language (const char *lang_str, } if (0 == strcmp (&lang_str[1], "-hak")) { - /* Hakka */ - tags[0] = HB_TAG('Z','H','S',' '); /* Chinese Simplified */ + /* Hakka (retired code) */ + tags[0] = HB_TAG('Z','H','S',' '); /* Chinese, Simplified */ *count = 1; return true; } if (0 == strcmp (&lang_str[1], "-lux")) { - /* Luxembourgish */ + /* Luxembourgish (retired code) */ tags[0] = HB_TAG('L','T','Z',' '); /* Luxembourgish */ *count = 1; return true; @@ -1762,8 +2424,8 @@ hb_ot_tags_from_complex_language (const char *lang_str, case 'l': if (lang_matches (&lang_str[1], "zh-hans")) { - /* Literary Chinese */ - tags[0] = HB_TAG('Z','H','S',' '); /* Chinese Simplified */ + /* Literary Chinese; Han (Simplified variant) */ + tags[0] = HB_TAG('Z','H','S',' '); /* Chinese, Simplified */ *count = 1; return true; } @@ -1771,29 +2433,35 @@ hb_ot_tags_from_complex_language (const char *lang_str, case 'm': if (lang_matches (&lang_str[1], "np-hant-hk")) { - /* Min Bei Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + /* Min Bei Chinese; Han (Traditional variant); Hong Kong */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } if (lang_matches (&lang_str[1], "np-hant-mo")) { - /* Min Bei Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + /* Min Bei Chinese; Han (Traditional variant); Macao */ + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (lang_matches (&lang_str[1], "np-hans")) { - /* Min Bei Chinese */ - tags[0] = HB_TAG('Z','H','S',' '); /* Chinese Simplified */ + /* Min Bei Chinese; Han (Simplified variant) */ + tags[0] = HB_TAG('Z','H','S',' '); /* Chinese, Simplified */ *count = 1; return true; } if (lang_matches (&lang_str[1], "np-hant")) { - /* Min Bei Chinese */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + /* Min Bei Chinese; Han (Traditional variant) */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } @@ -1801,7 +2469,7 @@ hb_ot_tags_from_complex_language (const char *lang_str, && subtag_matches (lang_str, limit, "-hk")) { /* Min Bei Chinese; Hong Kong */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } @@ -1809,15 +2477,21 @@ hb_ot_tags_from_complex_language (const char *lang_str, && subtag_matches (lang_str, limit, "-mo")) { /* Min Bei Chinese; Macao */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (0 == strncmp (&lang_str[1], "np-", 3) && subtag_matches (lang_str, limit, "-tw")) { /* Min Bei Chinese; Taiwan, Province of China */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } @@ -1825,29 +2499,35 @@ hb_ot_tags_from_complex_language (const char *lang_str, case 'n': if (lang_matches (&lang_str[1], "an-hant-hk")) { - /* Min Nan Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + /* Min Nan Chinese; Han (Traditional variant); Hong Kong */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } if (lang_matches (&lang_str[1], "an-hant-mo")) { - /* Min Nan Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + /* Min Nan Chinese; Han (Traditional variant); Macao */ + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (lang_matches (&lang_str[1], "an-hans")) { - /* Min Nan Chinese */ - tags[0] = HB_TAG('Z','H','S',' '); /* Chinese Simplified */ + /* Min Nan Chinese; Han (Simplified variant) */ + tags[0] = HB_TAG('Z','H','S',' '); /* Chinese, Simplified */ *count = 1; return true; } if (lang_matches (&lang_str[1], "an-hant")) { - /* Min Nan Chinese */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + /* Min Nan Chinese; Han (Traditional variant) */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } @@ -1855,7 +2535,7 @@ hb_ot_tags_from_complex_language (const char *lang_str, && subtag_matches (lang_str, limit, "-hk")) { /* Min Nan Chinese; Hong Kong */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } @@ -1863,30 +2543,42 @@ hb_ot_tags_from_complex_language (const char *lang_str, && subtag_matches (lang_str, limit, "-mo")) { /* Min Nan Chinese; Macao */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (0 == strncmp (&lang_str[1], "an-", 3) && subtag_matches (lang_str, limit, "-tw")) { /* Min Nan Chinese; Taiwan, Province of China */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } if (0 == strcmp (&lang_str[1], "o-bok")) { - /* Norwegian Bokmal */ + /* Norwegian Bokmal (retired code) */ tags[0] = HB_TAG('N','O','R',' '); /* Norwegian */ *count = 1; return true; } if (0 == strcmp (&lang_str[1], "o-nyn")) { - /* Norwegian Nynorsk */ - tags[0] = HB_TAG('N','Y','N',' '); /* Norwegian Nynorsk (Nynorsk, Norwegian) */ - *count = 1; + /* Norwegian Nynorsk (retired code) */ + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('N','Y','N',' '), /* Norwegian Nynorsk (Nynorsk, Norwegian) */ + HB_TAG('N','O','R',' '), /* Norwegian */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } break; @@ -1903,29 +2595,35 @@ hb_ot_tags_from_complex_language (const char *lang_str, case 'w': if (lang_matches (&lang_str[1], "uu-hant-hk")) { - /* Wu Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + /* Wu Chinese; Han (Traditional variant); Hong Kong */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } if (lang_matches (&lang_str[1], "uu-hant-mo")) { - /* Wu Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + /* Wu Chinese; Han (Traditional variant); Macao */ + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (lang_matches (&lang_str[1], "uu-hans")) { - /* Wu Chinese */ - tags[0] = HB_TAG('Z','H','S',' '); /* Chinese Simplified */ + /* Wu Chinese; Han (Simplified variant) */ + tags[0] = HB_TAG('Z','H','S',' '); /* Chinese, Simplified */ *count = 1; return true; } if (lang_matches (&lang_str[1], "uu-hant")) { - /* Wu Chinese */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + /* Wu Chinese; Han (Traditional variant) */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } @@ -1933,7 +2631,7 @@ hb_ot_tags_from_complex_language (const char *lang_str, && subtag_matches (lang_str, limit, "-hk")) { /* Wu Chinese; Hong Kong */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } @@ -1941,15 +2639,21 @@ hb_ot_tags_from_complex_language (const char *lang_str, && subtag_matches (lang_str, limit, "-mo")) { /* Wu Chinese; Macao */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (0 == strncmp (&lang_str[1], "uu-", 3) && subtag_matches (lang_str, limit, "-tw")) { /* Wu Chinese; Taiwan, Province of China */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } @@ -1957,8 +2661,8 @@ hb_ot_tags_from_complex_language (const char *lang_str, case 'y': if (lang_matches (&lang_str[1], "ue-hans")) { - /* Yue Chinese */ - tags[0] = HB_TAG('Z','H','S',' '); /* Chinese Simplified */ + /* Yue Chinese; Han (Simplified variant) */ + tags[0] = HB_TAG('Z','H','S',' '); /* Chinese, Simplified */ *count = 1; return true; } @@ -1966,67 +2670,79 @@ hb_ot_tags_from_complex_language (const char *lang_str, case 'z': if (lang_matches (&lang_str[1], "h-hant-hk")) { - /* Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + /* Chinese [macrolanguage]; Han (Traditional variant); Hong Kong */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } if (lang_matches (&lang_str[1], "h-hant-mo")) { - /* Chinese */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + /* Chinese [macrolanguage]; Han (Traditional variant); Macao */ + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (0 == strcmp (&lang_str[1], "h-min-nan")) { - /* Minnan, Hokkien, Amoy, Taiwanese, Southern Min, Southern Fujian, Hoklo, Southern Fukien, Ho-lo */ - tags[0] = HB_TAG('Z','H','S',' '); /* Chinese Simplified */ + /* Minnan, Hokkien, Amoy, Taiwanese, Southern Min, Southern Fujian, Hoklo, Southern Fukien, Ho-lo (retired code) */ + tags[0] = HB_TAG('Z','H','S',' '); /* Chinese, Simplified */ *count = 1; return true; } if (lang_matches (&lang_str[1], "h-hans")) { - /* Chinese */ - tags[0] = HB_TAG('Z','H','S',' '); /* Chinese Simplified */ + /* Chinese [macrolanguage]; Han (Simplified variant) */ + tags[0] = HB_TAG('Z','H','S',' '); /* Chinese, Simplified */ *count = 1; return true; } if (lang_matches (&lang_str[1], "h-hant")) { - /* Chinese */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + /* Chinese [macrolanguage]; Han (Traditional variant) */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } if (0 == strcmp (&lang_str[1], "h-min")) { - /* Min, Fuzhou, Hokkien, Amoy, or Taiwanese */ - tags[0] = HB_TAG('Z','H','S',' '); /* Chinese Simplified */ + /* Min, Fuzhou, Hokkien, Amoy, or Taiwanese (retired code) */ + tags[0] = HB_TAG('Z','H','S',' '); /* Chinese, Simplified */ *count = 1; return true; } if (0 == strncmp (&lang_str[1], "h-", 2) && subtag_matches (lang_str, limit, "-hk")) { - /* Chinese; Hong Kong */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ + /* Chinese [macrolanguage]; Hong Kong */ + tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Traditional, Hong Kong SAR */ *count = 1; return true; } if (0 == strncmp (&lang_str[1], "h-", 2) && subtag_matches (lang_str, limit, "-mo")) { - /* Chinese; Macao */ - tags[0] = HB_TAG('Z','H','H',' '); /* Chinese, Hong Kong SAR */ - *count = 1; + /* Chinese [macrolanguage]; Macao */ + unsigned int i; + hb_tag_t possible_tags[] = { + HB_TAG('Z','H','T','M'), /* Chinese, Traditional, Macao SAR */ + HB_TAG('Z','H','H',' '), /* Chinese, Traditional, Hong Kong SAR */ + }; + for (i = 0; i < 2 && i < *count; i++) + tags[i] = possible_tags[i]; + *count = i; return true; } if (0 == strncmp (&lang_str[1], "h-", 2) && subtag_matches (lang_str, limit, "-tw")) { - /* Chinese; Taiwan, Province of China */ - tags[0] = HB_TAG('Z','H','T',' '); /* Chinese Traditional */ + /* Chinese [macrolanguage]; Taiwan, Province of China */ + tags[0] = HB_TAG('Z','H','T',' '); /* Chinese, Traditional */ *count = 1; return true; } @@ -2057,99 +2773,127 @@ hb_ot_ambiguous_tag_to_language (hb_tag_t tag) case HB_TAG('A','P','P','H'): /* Phonetic transcription—Americanist conventions */ return hb_language_from_string ("und-fonnapa", -1); /* Undetermined; North American Phonetic Alphabet */ case HB_TAG('A','R','A',' '): /* Arabic */ - return hb_language_from_string ("ar", -1); /* Arabic */ + return hb_language_from_string ("ar", -1); /* Arabic [macrolanguage] */ case HB_TAG('A','R','K',' '): /* Rakhine */ return hb_language_from_string ("rki", -1); /* Rakhine */ case HB_TAG('A','T','H',' '): /* Athapaskan */ - return hb_language_from_string ("ath", -1); /* Athapascan */ + return hb_language_from_string ("ath", -1); /* Athapascan [family] */ + case HB_TAG('B','B','R',' '): /* Berber */ + return hb_language_from_string ("ber", -1); /* Berber [family] */ case HB_TAG('B','I','K',' '): /* Bikol */ - return hb_language_from_string ("bik", -1); /* Bikol */ + return hb_language_from_string ("bik", -1); /* Bikol [macrolanguage] */ + case HB_TAG('B','T','K',' '): /* Batak */ + return hb_language_from_string ("btk", -1); /* Batak [family] */ case HB_TAG('C','P','P',' '): /* Creoles */ - return hb_language_from_string ("crp", -1); /* Creoles and pidgins */ + return hb_language_from_string ("crp", -1); /* Creoles and pidgins [family] */ case HB_TAG('C','R','R',' '): /* Carrier */ return hb_language_from_string ("crx", -1); /* Carrier */ + case HB_TAG('D','G','R',' '): /* Dogri (macrolanguage) */ + return hb_language_from_string ("doi", -1); /* Dogri [macrolanguage] */ case HB_TAG('D','N','K',' '): /* Dinka */ - return hb_language_from_string ("din", -1); /* Dinka */ + return hb_language_from_string ("din", -1); /* Dinka [macrolanguage] */ case HB_TAG('D','R','I',' '): /* Dari */ return hb_language_from_string ("prs", -1); /* Dari */ case HB_TAG('D','Z','N',' '): /* Dzongkha */ return hb_language_from_string ("dz", -1); /* Dzongkha */ case HB_TAG('E','T','I',' '): /* Estonian */ - return hb_language_from_string ("et", -1); /* Estonian */ + return hb_language_from_string ("et", -1); /* Estonian [macrolanguage] */ + case HB_TAG('F','A','R',' '): /* Persian */ + return hb_language_from_string ("fa", -1); /* Persian [macrolanguage] */ case HB_TAG('G','O','N',' '): /* Gondi */ - return hb_language_from_string ("gon", -1); /* Gondi */ + return hb_language_from_string ("gon", -1); /* Gondi [macrolanguage] */ case HB_TAG('H','M','N',' '): /* Hmong */ - return hb_language_from_string ("hmn", -1); /* Hmong */ + return hb_language_from_string ("hmn", -1); /* Hmong [macrolanguage] */ case HB_TAG('H','N','D',' '): /* Hindko */ return hb_language_from_string ("hnd", -1); /* Southern Hindko */ + case HB_TAG('H','Y','E',' '): /* Armenian */ + return hb_language_from_string ("hyw", -1); /* Western Armenian */ case HB_TAG('I','J','O',' '): /* Ijo */ - return hb_language_from_string ("ijo", -1); /* Ijo */ + return hb_language_from_string ("ijo", -1); /* Ijo [family] */ case HB_TAG('I','N','U',' '): /* Inuktitut */ - return hb_language_from_string ("iu", -1); /* Inuktitut */ + return hb_language_from_string ("iu", -1); /* Inuktitut [macrolanguage] */ case HB_TAG('I','P','K',' '): /* Inupiat */ - return hb_language_from_string ("ik", -1); /* Inupiaq */ + return hb_language_from_string ("ik", -1); /* Inupiaq [macrolanguage] */ case HB_TAG('I','P','P','H'): /* Phonetic transcription—IPA conventions */ return hb_language_from_string ("und-fonipa", -1); /* Undetermined; International Phonetic Alphabet */ case HB_TAG('I','R','T',' '): /* Irish Traditional */ return hb_language_from_string ("ga-Latg", -1); /* Irish; Latin (Gaelic variant) */ case HB_TAG('J','I','I',' '): /* Yiddish */ - return hb_language_from_string ("yi", -1); /* Yiddish */ + return hb_language_from_string ("yi", -1); /* Yiddish [macrolanguage] */ case HB_TAG('K','A','L',' '): /* Kalenjin */ - return hb_language_from_string ("kln", -1); /* Kalenjin */ + return hb_language_from_string ("kln", -1); /* Kalenjin [macrolanguage] */ case HB_TAG('K','G','E',' '): /* Khutsuri Georgian */ return hb_language_from_string ("und-Geok", -1); /* Undetermined; Khutsuri (Asomtavruli and Nuskhuri) */ case HB_TAG('K','N','R',' '): /* Kanuri */ - return hb_language_from_string ("kr", -1); /* Kanuri */ + return hb_language_from_string ("kr", -1); /* Kanuri [macrolanguage] */ + case HB_TAG('K','O','H',' '): /* Korean Old Hangul */ + return hb_language_from_string ("okm", -1); /* Middle Korean (10th-16th cent.) */ case HB_TAG('K','O','K',' '): /* Konkani */ - return hb_language_from_string ("kok", -1); /* Konkani */ + return hb_language_from_string ("kok", -1); /* Konkani [macrolanguage] */ + case HB_TAG('K','O','M',' '): /* Komi */ + return hb_language_from_string ("kv", -1); /* Komi [macrolanguage] */ + case HB_TAG('K','P','L',' '): /* Kpelle */ + return hb_language_from_string ("kpe", -1); /* Kpelle [macrolanguage] */ + case HB_TAG('K','R','N',' '): /* Karen */ + return hb_language_from_string ("kar", -1); /* Karen [family] */ case HB_TAG('K','U','I',' '): /* Kui */ return hb_language_from_string ("uki", -1); /* Kui (India) */ case HB_TAG('K','U','R',' '): /* Kurdish */ - return hb_language_from_string ("ku", -1); /* Kurdish */ + return hb_language_from_string ("ku", -1); /* Kurdish [macrolanguage] */ case HB_TAG('L','U','H',' '): /* Luyia */ - return hb_language_from_string ("luy", -1); /* Luyia */ + return hb_language_from_string ("luy", -1); /* Luyia [macrolanguage] */ case HB_TAG('L','V','I',' '): /* Latvian */ - return hb_language_from_string ("lv", -1); /* Latvian */ + return hb_language_from_string ("lv", -1); /* Latvian [macrolanguage] */ case HB_TAG('M','A','W',' '): /* Marwari */ - return hb_language_from_string ("mwr", -1); /* Marwari */ + return hb_language_from_string ("mwr", -1); /* Marwari [macrolanguage] */ case HB_TAG('M','L','G',' '): /* Malagasy */ - return hb_language_from_string ("mg", -1); /* Malagasy */ + return hb_language_from_string ("mg", -1); /* Malagasy [macrolanguage] */ case HB_TAG('M','L','Y',' '): /* Malay */ - return hb_language_from_string ("ms", -1); /* Malay */ + return hb_language_from_string ("ms", -1); /* Malay [macrolanguage] */ case HB_TAG('M','N','G',' '): /* Mongolian */ - return hb_language_from_string ("mn", -1); /* Mongolian */ + return hb_language_from_string ("mn", -1); /* Mongolian [macrolanguage] */ + case HB_TAG('M','N','K',' '): /* Maninka */ + return hb_language_from_string ("man", -1); /* Mandingo [macrolanguage] */ case HB_TAG('M','O','L',' '): /* Moldavian */ return hb_language_from_string ("ro-MD", -1); /* Romanian; Moldova */ + case HB_TAG('M','Y','N',' '): /* Mayan */ + return hb_language_from_string ("myn", -1); /* Mayan [family] */ + case HB_TAG('N','A','H',' '): /* Nahuatl */ + return hb_language_from_string ("nah", -1); /* Nahuatl [family] */ case HB_TAG('N','E','P',' '): /* Nepali */ - return hb_language_from_string ("ne", -1); /* Nepali */ + return hb_language_from_string ("ne", -1); /* Nepali [macrolanguage] */ case HB_TAG('N','I','S',' '): /* Nisi */ return hb_language_from_string ("njz", -1); /* Nyishi */ case HB_TAG('N','O','R',' '): /* Norwegian */ - return hb_language_from_string ("no", -1); /* Norwegian */ + return hb_language_from_string ("no", -1); /* Norwegian [macrolanguage] */ case HB_TAG('O','J','B',' '): /* Ojibway */ - return hb_language_from_string ("oj", -1); /* Ojibwa */ + return hb_language_from_string ("oj", -1); /* Ojibwa [macrolanguage] */ case HB_TAG('O','R','O',' '): /* Oromo */ - return hb_language_from_string ("om", -1); /* Oromo */ + return hb_language_from_string ("om", -1); /* Oromo [macrolanguage] */ case HB_TAG('P','A','S',' '): /* Pashto */ - return hb_language_from_string ("ps", -1); /* Pashto */ + return hb_language_from_string ("ps", -1); /* Pashto [macrolanguage] */ case HB_TAG('P','G','R',' '): /* Polytonic Greek */ return hb_language_from_string ("el-polyton", -1); /* Modern Greek (1453-); Polytonic Greek */ case HB_TAG('P','R','O',' '): /* Provençal / Old Provençal */ return hb_language_from_string ("pro", -1); /* Old Provençal (to 1500) */ case HB_TAG('Q','U','H',' '): /* Quechua (Bolivia) */ return hb_language_from_string ("quh", -1); /* South Bolivian Quechua */ + case HB_TAG('Q','U','Z',' '): /* Quechua */ + return hb_language_from_string ("qu", -1); /* Quechua [macrolanguage] */ case HB_TAG('Q','V','I',' '): /* Quechua (Ecuador) */ return hb_language_from_string ("qvi", -1); /* Imbabura Highland Quichua */ case HB_TAG('Q','W','H',' '): /* Quechua (Peru) */ return hb_language_from_string ("qwh", -1); /* Huaylas Ancash Quechua */ case HB_TAG('R','A','J',' '): /* Rajasthani */ - return hb_language_from_string ("raj", -1); /* Rajasthani */ + return hb_language_from_string ("raj", -1); /* Rajasthani [macrolanguage] */ case HB_TAG('R','O','Y',' '): /* Romany */ - return hb_language_from_string ("rom", -1); /* Romany */ + return hb_language_from_string ("rom", -1); /* Romany [macrolanguage] */ case HB_TAG('S','Q','I',' '): /* Albanian */ - return hb_language_from_string ("sq", -1); /* Albanian */ + return hb_language_from_string ("sq", -1); /* Albanian [macrolanguage] */ + case HB_TAG('S','R','B',' '): /* Serbian */ + return hb_language_from_string ("sr", -1); /* Serbian */ case HB_TAG('S','Y','R',' '): /* Syriac */ - return hb_language_from_string ("syr", -1); /* Syriac */ + return hb_language_from_string ("syr", -1); /* Syriac [macrolanguage] */ case HB_TAG('S','Y','R','E'): /* Syriac, Estrangela script-variant (equivalent to ISO 15924 'Syre') */ return hb_language_from_string ("und-Syre", -1); /* Undetermined; Syriac (Estrangelo variant) */ case HB_TAG('S','Y','R','J'): /* Syriac, Western script-variant (equivalent to ISO 15924 'Syrj') */ @@ -2157,15 +2901,19 @@ hb_ot_ambiguous_tag_to_language (hb_tag_t tag) case HB_TAG('S','Y','R','N'): /* Syriac, Eastern script-variant (equivalent to ISO 15924 'Syrn') */ return hb_language_from_string ("und-Syrn", -1); /* Undetermined; Syriac (Eastern variant) */ case HB_TAG('T','M','H',' '): /* Tamashek */ - return hb_language_from_string ("tmh", -1); /* Tamashek */ - case HB_TAG('T','N','E',' '): /* Tundra Nenets */ - return hb_language_from_string ("yrk", -1); /* Nenets */ - case HB_TAG('Z','H','H',' '): /* Chinese, Hong Kong SAR */ - return hb_language_from_string ("zh-HK", -1); /* Chinese; Hong Kong */ - case HB_TAG('Z','H','S',' '): /* Chinese Simplified */ - return hb_language_from_string ("zh-Hans", -1); /* Chinese; Han (Simplified variant) */ - case HB_TAG('Z','H','T',' '): /* Chinese Traditional */ - return hb_language_from_string ("zh-Hant", -1); /* Chinese; Han (Traditional variant) */ + return hb_language_from_string ("tmh", -1); /* Tamashek [macrolanguage] */ + case HB_TAG('T','O','D',' '): /* Todo */ + return hb_language_from_string ("xwo", -1); /* Written Oirat */ + case HB_TAG('Z','H','H',' '): /* Chinese, Traditional, Hong Kong SAR */ + return hb_language_from_string ("zh-HK", -1); /* Chinese [macrolanguage]; Hong Kong */ + case HB_TAG('Z','H','S',' '): /* Chinese, Simplified */ + return hb_language_from_string ("zh-Hans", -1); /* Chinese [macrolanguage]; Han (Simplified variant) */ + case HB_TAG('Z','H','T',' '): /* Chinese, Traditional */ + return hb_language_from_string ("zh-Hant", -1); /* Chinese [macrolanguage]; Han (Traditional variant) */ + case HB_TAG('Z','H','T','M'): /* Chinese, Traditional, Macao SAR */ + return hb_language_from_string ("zh-MO", -1); /* Chinese [macrolanguage]; Macao */ + case HB_TAG('Z','Z','A',' '): /* Zazaki */ + return hb_language_from_string ("zza", -1); /* Zazaki [macrolanguage] */ default: return HB_LANGUAGE_INVALID; } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-tag.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-tag.cc index 7ec91c58151..19bd3639d37 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-tag.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-tag.cc @@ -280,6 +280,7 @@ hb_ot_tags_from_language (const char *lang_str, for (i = 0; i < *count && tag_idx + i < ARRAY_LENGTH (ot_languages) && + ot_languages[tag_idx + i].tag != HB_TAG_NONE && 0 == strcmp (ot_languages[tag_idx + i].language, ot_languages[tag_idx].language); i++) tags[i] = ot_languages[tag_idx + i].tag; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var.cc index 6b8b09b6ba8..1fe57383c07 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var.cc @@ -52,11 +52,11 @@ /** * hb_ot_var_has_data: - * @face: #hb_face_t to test + * @face: The #hb_face_t to work on * - * This function allows to verify the presence of OpenType variation data on the face. + * Tests whether a face includes any OpenType variation data in the `fvar` table. * - * Return value: true if face has a `fvar' table and false otherwise + * Return value: true if data found, false otherwise * * Since: 1.4.2 **/ @@ -68,6 +68,11 @@ hb_ot_var_has_data (hb_face_t *face) /** * hb_ot_var_get_axis_count: + * @face: The #hb_face_t to work on + * + * Fetches the number of OpenType variation axes included in the face. + * + * Return value: the number of variation axes defined * * Since: 1.4.2 **/ @@ -80,9 +85,17 @@ hb_ot_var_get_axis_count (hb_face_t *face) #ifndef HB_DISABLE_DEPRECATED /** * hb_ot_var_get_axes: + * @face: #hb_face_t to work upon + * @start_offset: offset of the first lookup to retrieve + * @axes_count: (inout) (allow-none): Input = the maximum number of variation axes to return; + * Output = the actual number of variation axes returned (may be zero) + * @axes_array: (out caller-allocates) (array length=axes_count): The array of variation axes found + * + * Fetches a list of all variation axes in the specified face. The list returned will begin + * at the offset provided. * * Since: 1.4.2 - * Deprecated: 2.2.0 + * Deprecated: 2.2.0: use hb_ot_var_get_axis_infos() instead **/ unsigned int hb_ot_var_get_axes (hb_face_t *face, @@ -95,9 +108,16 @@ hb_ot_var_get_axes (hb_face_t *face, /** * hb_ot_var_find_axis: + * @face: #hb_face_t to work upon + * @axis_tag: The #hb_tag_t of the variation axis to query + * @axis_index: The index of the variation axis + * @axis_info: (out): The #hb_ot_var_axis_info_t of the axis tag queried + * + * Fetches the variation-axis information corresponding to the specified axis tag + * in the specified face. * * Since: 1.4.2 - * Deprecated: 2.2.0 + * Deprecated: 2.2.0 - use hb_ot_var_find_axis_info() instead **/ hb_bool_t hb_ot_var_find_axis (hb_face_t *face, @@ -111,6 +131,16 @@ hb_ot_var_find_axis (hb_face_t *face, /** * hb_ot_var_get_axis_infos: + * @face: #hb_face_t to work upon + * @start_offset: offset of the first lookup to retrieve + * @axes_count: (inout) (allow-none): Input = the maximum number of variation axes to return; + * Output = the actual number of variation axes returned (may be zero) + * @axes_array: (out caller-allocates) (array length=axes_count): The array of variation axes found + * + * Fetches a list of all variation axes in the specified face. The list returned will begin + * at the offset provided. + * + * Return value: the number of variation axes in the face * * Since: 2.2.0 **/ @@ -125,6 +155,14 @@ hb_ot_var_get_axis_infos (hb_face_t *face, /** * hb_ot_var_find_axis_info: + * @face: #hb_face_t to work upon + * @axis_tag: The #hb_tag_t of the variation axis to query + * @axis_info: (out): The #hb_ot_var_axis_info_t of the axis tag queried + * + * Fetches the variation-axis information corresponding to the specified axis tag + * in the specified face. + * + * Return value: true if data found, false otherwise * * Since: 2.2.0 **/ @@ -141,12 +179,34 @@ hb_ot_var_find_axis_info (hb_face_t *face, * Named instances. */ +/** + * hb_ot_var_get_named_instance_count: + * @face: The #hb_face_t to work on + * + * Fetches the number of named instances included in the face. + * + * Return value: the number of named instances defined + * + * Since: 2.2.0 + **/ unsigned int hb_ot_var_get_named_instance_count (hb_face_t *face) { return face->table.fvar->get_instance_count (); } +/** + * hb_ot_var_named_instance_get_subfamily_name_id: + * @face: The #hb_face_t to work on + * @instance_index: The index of the named instance to query + * + * Fetches the `name` table Name ID that provides display names for + * the "Subfamily name" defined for the given named instance in the face. + * + * Return value: the Name ID found for the Subfamily name + * + * Since: 2.2.0 + **/ hb_ot_name_id_t hb_ot_var_named_instance_get_subfamily_name_id (hb_face_t *face, unsigned int instance_index) @@ -154,6 +214,18 @@ hb_ot_var_named_instance_get_subfamily_name_id (hb_face_t *face, return face->table.fvar->get_instance_subfamily_name_id (instance_index); } +/** + * hb_ot_var_named_instance_get_postscript_name_id: + * @face: The #hb_face_t to work on + * @instance_index: The index of the named instance to query + * + * Fetches the `name` table Name ID that provides display names for + * the "PostScript name" defined for the given named instance in the face. + * + * Return value: the Name ID found for the PostScript name + * + * Since: 2.2.0 + **/ hb_ot_name_id_t hb_ot_var_named_instance_get_postscript_name_id (hb_face_t *face, unsigned int instance_index) @@ -161,6 +233,21 @@ hb_ot_var_named_instance_get_postscript_name_id (hb_face_t *face, return face->table.fvar->get_instance_postscript_name_id (instance_index); } +/** + * hb_ot_var_named_instance_get_design_coords: + * @face: The #hb_face_t to work on + * @instance_index: The index of the named instance to query + * @coords_length: (inout) (allow-none): Input = the maximum number of coordinates to return; + * Output = the actual number of coordinates returned (may be zero) + * @coords: (out) (array length=coords_length): The array of coordinates found for the query + * + * Fetches the design-space coordinates corresponding to the given + * named instance in the face. + * + * Return value: the number of variation axes in the face + * + * Since: 2.2.0 + **/ unsigned int hb_ot_var_named_instance_get_design_coords (hb_face_t *face, unsigned int instance_index, @@ -173,6 +260,13 @@ hb_ot_var_named_instance_get_design_coords (hb_face_t *face, /** * hb_ot_var_normalize_variations: + * @face: The #hb_face_t to work on + * @variations: The array of variations to normalize + * @variations_length: The number of variations to normalize + * @coords: (out) (array length=coords_length): The array of normalized coordinates + * @coords_length: The length of the coordinate array + * + * Normalizes all of the coordinates in the given list of variation axes. * * Since: 1.4.2 **/ @@ -200,6 +294,17 @@ hb_ot_var_normalize_variations (hb_face_t *face, /** * hb_ot_var_normalize_coords: + * @face: The #hb_face_t to work on + * @coords_length: The length of the coordinate array + * @design_coords: The design-space coordinates to normalize + * @normalized_coords: (out): The normalized coordinates + * + * Normalizes the given design-space coordinates. The minimum and maximum + * values for the axis are mapped to the interval [-1,1], with the default + * axis value mapped to 0. + * + * Any additional scaling defined in the face's `avar` table is also + * applied, as described at https://docs.microsoft.com/en-us/typography/opentype/spec/avar * * Since: 1.4.2 **/ diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var.h index df89bc5a231..ef2ca0a7165 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var.h +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var.h @@ -35,11 +35,36 @@ HB_BEGIN_DECLS - +/** + * hb_tag_t: + * @HB_OT_TAG_VAR_AXIS_ITALIC: Registered tag for the roman/italic axis + */ #define HB_OT_TAG_VAR_AXIS_ITALIC HB_TAG('i','t','a','l') + +/** + * hb_tag_t: + * @HB_OT_TAG_VAR_AXIS_OPTICAL_SIZE: Registered tag for the optical-size axis + * + * <note>Note: The optical-size axis supersedes the OpenType `size` feature.</note> + */ #define HB_OT_TAG_VAR_AXIS_OPTICAL_SIZE HB_TAG('o','p','s','z') + +/** + * hb_tag_t: + * @HB_OT_TAG_VAR_AXIS_SLANT: Registered tag for the slant axis + */ #define HB_OT_TAG_VAR_AXIS_SLANT HB_TAG('s','l','n','t') + +/** + * hb_tag_t: + * @HB_OT_TAG_VAR_AXIS_WIDTH: Registered tag for the width axis + */ #define HB_OT_TAG_VAR_AXIS_WIDTH HB_TAG('w','d','t','h') + +/** + * hb_tag_t: + * @HB_OT_TAG_VAR_AXIS_WEIGHT: Registered tag for the weight axis + */ #define HB_OT_TAG_VAR_AXIS_WEIGHT HB_TAG('w','g','h','t') @@ -73,11 +98,24 @@ typedef enum { /*< flags >*/ /** * hb_ot_var_axis_info_t: + * @axis_index: Index of the axis in the variation-axis array + * @tag: The #hb_tag_t tag identifying the design variation of the axis + * @name_id: The `name` table Name ID that provides display names for the axis + * @flags: The #hb_ot_var_axis_flags_t flags for the axis + * @min_value: The mininum value on the variation axis that the font covers + * @default_value: The position on the variation axis corresponding to the font's defaults + * @max_value: The maximum value on the variation axis that the font covers + * + * Data type for holding variation-axis values. + * + * The minimum, default, and maximum values are in un-normalized, user scales. + * + * <note>Note: at present, the only flag defined for @flags is + * #HB_OT_VAR_AXIS_FLAG_HIDDEN.</note> * * Since: 2.2.0 */ -typedef struct hb_ot_var_axis_info_t -{ +typedef struct hb_ot_var_axis_info_t { unsigned int axis_index; hb_tag_t tag; hb_ot_name_id_t name_id; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc index 666470b4f16..f893c4a3f72 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc @@ -37,10 +37,17 @@ * @short_description: Object representing a shaping plan * @include: hb.h * - * Shape plans are not used for shaping directly, but can be access to query - * certain information about how shaping will perform given a set of input - * parameters (script, language, direction, features, etc.) - * Most client would not need to deal with shape plans directly. + * Shape plans are an internal mechanism. Each plan contains state + * describing how HarfBuzz will shape a particular text segment, based on + * the combination of segment properties and the capabilities in the + * font face in use. + * + * Shape plans are not used for shaping directly, but can be queried to + * access certain information about how shaping will perform, given a set + * of specific input parameters (script, language, direction, features, + * etc.). + * + * Most client programs will not need to deal with shape plans directly. **/ @@ -164,15 +171,16 @@ hb_shape_plan_key_t::equal (const hb_shape_plan_key_t *other) /** * hb_shape_plan_create: (Xconstructor) - * @face: - * @props: - * @user_features: (array length=num_user_features): - * @num_user_features: - * @shaper_list: (array zero-terminated=1): - * + * @face: #hb_face_t to use + * @props: The #hb_segment_properties_t of the segment + * @user_features: (array length=num_user_features): The list of user-selected features + * @num_user_features: The number of user-selected features + * @shaper_list: (array zero-terminated=1): List of shapers to try * + * Constructs a shaping plan for a combination of @face, @user_features, @props, + * and @shaper_list. * - * Return value: (transfer full): + * Return value: (transfer full): The shaping plan * * Since: 0.9.7 **/ @@ -189,6 +197,24 @@ hb_shape_plan_create (hb_face_t *face, shaper_list); } +/** + * hb_shape_plan_create2: (Xconstructor) + * @face: #hb_face_t to use + * @props: The #hb_segment_properties_t of the segment + * @user_features: (array length=num_user_features): The list of user-selected features + * @num_user_features: The number of user-selected features + * @coords: (array length=num_coords): The list of variation-space coordinates + * @num_coords: The number of variation-space coordinates + * @shaper_list: (array zero-terminated=1): List of shapers to try + * + * The variable-font version of #hb_shape_plan_create. + * Constructs a shaping plan for a combination of @face, @user_features, @props, + * and @shaper_list, plus the variation-space coordinates @coords. + * + * Return value: (transfer full): The shaping plan + * + * Since: 1.4.0 + **/ hb_shape_plan_t * hb_shape_plan_create2 (hb_face_t *face, const hb_segment_properties_t *props, @@ -248,9 +274,9 @@ bail: /** * hb_shape_plan_get_empty: * + * Fetches the singleton empty shaping plan. * - * - * Return value: (transfer full): + * Return value: (transfer full): The empty shaping plan * * Since: 0.9.7 **/ @@ -262,11 +288,11 @@ hb_shape_plan_get_empty () /** * hb_shape_plan_reference: (skip) - * @shape_plan: a shape plan. + * @shape_plan: A shaping plan * + * Increases the reference count on the given shaping plan. * - * - * Return value: (transfer full): + * Return value: (transfer full): @shape_plan * * Since: 0.9.7 **/ @@ -278,9 +304,11 @@ hb_shape_plan_reference (hb_shape_plan_t *shape_plan) /** * hb_shape_plan_destroy: (skip) - * @shape_plan: a shape plan. - * + * @shape_plan: A shaping plan * + * Decreases the reference count on the given shaping plan. When the + * reference count reaches zero, the shaping plan is destroyed, + * freeing all memory. * * Since: 0.9.7 **/ @@ -298,13 +326,13 @@ hb_shape_plan_destroy (hb_shape_plan_t *shape_plan) /** * hb_shape_plan_set_user_data: (skip) - * @shape_plan: a shape plan. - * @key: - * @data: - * @destroy: - * @replace: - * + * @shape_plan: A shaping plan + * @key: The user-data key to set + * @data: A pointer to the user data + * @destroy: A callback to call when @data is not needed anymore + * @replace: Whether to replace an existing data with the same key * + * Attaches a user-data key/data pair to the given shaping plan. * * Return value: * @@ -322,12 +350,13 @@ hb_shape_plan_set_user_data (hb_shape_plan_t *shape_plan, /** * hb_shape_plan_get_user_data: (skip) - * @shape_plan: a shape plan. - * @key: + * @shape_plan: A shaping plan + * @key: The user-data key to query * + * Fetches the user data associated with the specified key, + * attached to the specified shaping plan. * - * - * Return value: (transfer none): + * Return value: (transfer none): A pointer to the user data * * Since: 0.9.7 **/ @@ -340,11 +369,11 @@ hb_shape_plan_get_user_data (hb_shape_plan_t *shape_plan, /** * hb_shape_plan_get_shaper: - * @shape_plan: a shape plan. - * + * @shape_plan: A shaping plan * + * Fetches the shaper from a given shaping plan. * - * Return value: (transfer none): + * Return value: (transfer none): The shaper * * Since: 0.9.7 **/ @@ -355,26 +384,12 @@ hb_shape_plan_get_shaper (hb_shape_plan_t *shape_plan) } -/** - * hb_shape_plan_execute: - * @shape_plan: a shape plan. - * @font: a font. - * @buffer: a buffer. - * @features: (array length=num_features): - * @num_features: - * - * - * - * Return value: - * - * Since: 0.9.7 - **/ -hb_bool_t -hb_shape_plan_execute (hb_shape_plan_t *shape_plan, - hb_font_t *font, - hb_buffer_t *buffer, - const hb_feature_t *features, - unsigned int num_features) +static bool +_hb_shape_plan_execute_internal (hb_shape_plan_t *shape_plan, + hb_font_t *font, + hb_buffer_t *buffer, + const hb_feature_t *features, + unsigned int num_features) { DEBUG_MSG_FUNC (SHAPE_PLAN, shape_plan, "num_features=%d shaper_func=%p, shaper_name=%s", @@ -386,7 +401,8 @@ hb_shape_plan_execute (hb_shape_plan_t *shape_plan, return true; assert (!hb_object_is_immutable (buffer)); - assert (buffer->content_type == HB_BUFFER_CONTENT_TYPE_UNICODE); + + buffer->assert_unicode (); if (unlikely (hb_object_is_inert (shape_plan))) return false; @@ -412,6 +428,36 @@ hb_shape_plan_execute (hb_shape_plan_t *shape_plan, return false; } +/** + * hb_shape_plan_execute: + * @shape_plan: A shaping plan + * @font: The #hb_font_t to use + * @buffer: The #hb_buffer_t to work upon + * @features: (array length=num_features): Features to enable + * @num_features: The number of features to enable + * + * Executes the given shaping plan on the specified buffer, using + * the given @font and @features. + * + * Return value: + * + * Since: 0.9.7 + **/ +hb_bool_t +hb_shape_plan_execute (hb_shape_plan_t *shape_plan, + hb_font_t *font, + hb_buffer_t *buffer, + const hb_feature_t *features, + unsigned int num_features) +{ + bool ret = _hb_shape_plan_execute_internal (shape_plan, font, buffer, + features, num_features); + + if (ret && buffer->content_type == HB_BUFFER_CONTENT_TYPE_UNICODE) + buffer->content_type = HB_BUFFER_CONTENT_TYPE_GLYPHS; + + return ret; +} /* @@ -420,15 +466,16 @@ hb_shape_plan_execute (hb_shape_plan_t *shape_plan, /** * hb_shape_plan_create_cached: - * @face: - * @props: - * @user_features: (array length=num_user_features): - * @num_user_features: - * @shaper_list: (array zero-terminated=1): - * + * @face: #hb_face_t to use + * @props: The #hb_segment_properties_t of the segment + * @user_features: (array length=num_user_features): The list of user-selected features + * @num_user_features: The number of user-selected features + * @shaper_list: (array zero-terminated=1): List of shapers to try * + * Creates a cached shaping plan suitable for reuse, for a combination + * of @face, @user_features, @props, and @shaper_list. * - * Return value: (transfer full): + * Return value: (transfer full): The shaping plan * * Since: 0.9.7 **/ @@ -445,6 +492,25 @@ hb_shape_plan_create_cached (hb_face_t *face, shaper_list); } +/** + * hb_shape_plan_create_cached2: + * @face: #hb_face_t to use + * @props: The #hb_segment_properties_t of the segment + * @user_features: (array length=num_user_features): The list of user-selected features + * @num_user_features: The number of user-selected features + * @coords: (array length=num_coords): The list of variation-space coordinates + * @num_coords: The number of variation-space coordinates + * @shaper_list: (array zero-terminated=1): List of shapers to try + * + * The variable-font version of #hb_shape_plan_create_cached. + * Creates a cached shaping plan suitable for reuse, for a combination + * of @face, @user_features, @props, and @shaper_list, plus the + * variation-space coordinates @coords. + * + * Return value: (transfer full): The shaping plan + * + * Since: 1.4.0 + **/ hb_shape_plan_t * hb_shape_plan_create_cached2 (hb_face_t *face, const hb_segment_properties_t *props, diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.h index b62ae7ca350..336524ee2fc 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.h +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.h @@ -36,6 +36,20 @@ HB_BEGIN_DECLS +/** + * hb_shape_plan_t: + * + * Data type for holding a shaping plan. + * + * Shape plans contain information about how HarfBuzz will shape a + * particular text segment, based on the segment's properties and the + * capabilities in the font face in use. + * + * Shape plans can be queried about how shaping will perform, given a set + * of specific input parameters (script, language, direction, features, + * etc.). + * + **/ typedef struct hb_shape_plan_t hb_shape_plan_t; HB_EXTERN hb_shape_plan_t * diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape.cc index 017fb91b69f..a3debce3972 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape.cc @@ -132,8 +132,6 @@ hb_shape_full (hb_font_t *font, unsigned int num_features, const char * const *shaper_list) { - if (unlikely (hb_object_is_immutable (buffer))) return false; - hb_shape_plan_t *shape_plan = hb_shape_plan_create_cached2 (font->face, &buffer->props, features, num_features, font->coords, font->num_coords, @@ -141,8 +139,6 @@ hb_shape_full (hb_font_t *font, hb_bool_t res = hb_shape_plan_execute (shape_plan, font, buffer, features, num_features); hb_shape_plan_destroy (shape_plan); - if (res) - buffer->content_type = HB_BUFFER_CONTENT_TYPE_GLYPHS; return res; } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.cc index 36070a7f182..71de7154915 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.cc @@ -40,11 +40,16 @@ * @include: hb.h * * Unicode functions are used to access Unicode character properties. - * Client can pass its own Unicode functions to HarfBuzz, or access - * the built-in Unicode functions that come with HarfBuzz. + * With these functions, client programs can query various properties from + * the Unicode Character Database for any code point, such as General + * Category (gc), Script (sc), Canonical Combining Class (ccc), etc. * - * With the Unicode functions, one can query variour Unicode character - * properties, such as General Category, Script, Combining Class, etc. + * Client programs can optionally pass in their own Unicode functions + * that implement the same queries. The set of functions available is + * defined by the virtual methods in #hb_unicode_funcs_t. + * + * HarfBuzz provides built-in default functions for each method in + * #hb_unicode_funcs_t. **/ @@ -133,6 +138,16 @@ hb_unicode_decompose_compatibility_nil (hb_unicode_funcs_t *ufuncs HB_UNUSED #include "hb-icu.h" #endif +/** + * hb_unicode_funcs_get_default: + * + * Fetches a pointer to the default Unicode-functions structure that is used + * when no functions are explicitly set on #hb_buffer_t. + * + * Return value: (transfer none): a pointer to the #hb_unicode_funcs_t Unicode-functions structure + * + * Since: 0.9.2 + **/ hb_unicode_funcs_t * hb_unicode_funcs_get_default () { @@ -155,11 +170,11 @@ hb_unicode_funcs_get_default () /** * hb_unicode_funcs_create: (Xconstructor) - * @parent: (nullable): - * + * @parent: (nullable): Parent Unicode-functions structure * + * Creates a new #hb_unicode_funcs_t structure of Unicode functions. * - * Return value: (transfer full): + * Return value: (transfer full): The Unicode-functions structure * * Since: 0.9.2 **/ @@ -203,9 +218,9 @@ DEFINE_NULL_INSTANCE (hb_unicode_funcs_t) = /** * hb_unicode_funcs_get_empty: * + * Fetches the singleton empty Unicode-functions structure. * - * - * Return value: (transfer full): + * Return value: (transfer full): The empty Unicode-functions structure * * Since: 0.9.2 **/ @@ -217,11 +232,11 @@ hb_unicode_funcs_get_empty () /** * hb_unicode_funcs_reference: (skip) - * @ufuncs: Unicode functions. + * @ufuncs: The Unicode-functions structure * + * Increases the reference count on a Unicode-functions structure. * - * - * Return value: (transfer full): + * Return value: (transfer full): The Unicode-functions structure * * Since: 0.9.2 **/ @@ -233,9 +248,11 @@ hb_unicode_funcs_reference (hb_unicode_funcs_t *ufuncs) /** * hb_unicode_funcs_destroy: (skip) - * @ufuncs: Unicode functions. - * + * @ufuncs: The Unicode-functions structure * + * Decreases the reference count on a Unicode-functions structure. When + * the reference count reaches zero, the Unicode-functions structure is + * destroyed, freeing all memory. * * Since: 0.9.2 **/ @@ -256,15 +273,15 @@ hb_unicode_funcs_destroy (hb_unicode_funcs_t *ufuncs) /** * hb_unicode_funcs_set_user_data: (skip) - * @ufuncs: Unicode functions. - * @key: - * @data: - * @destroy: - * @replace: + * @ufuncs: The Unicode-functions structure + * @key: The user-data key + * @data: A pointer to the user data + * @destroy: A callback to call when @data is not needed anymore + * @replace: Whether to replace an existing data with the same key * + * Attaches a user-data key/data pair to the specified Unicode-functions structure. * - * - * Return value: + * Return value: %true if success, false otherwise * * Since: 0.9.2 **/ @@ -280,12 +297,13 @@ hb_unicode_funcs_set_user_data (hb_unicode_funcs_t *ufuncs, /** * hb_unicode_funcs_get_user_data: (skip) - * @ufuncs: Unicode functions. - * @key: - * + * @ufuncs: The Unicode-functions structure + * @key: The user-data key to query * + * Fetches the user-data associated with the specified key, + * attached to the specified Unicode-functions structure. * - * Return value: (transfer none): + * Return value: (transfer none): A pointer to the user data * * Since: 0.9.2 **/ @@ -299,9 +317,10 @@ hb_unicode_funcs_get_user_data (hb_unicode_funcs_t *ufuncs, /** * hb_unicode_funcs_make_immutable: - * @ufuncs: Unicode functions. - * + * @ufuncs: The Unicode-functions structure * + * Makes the specified Unicode-functions structure + * immutable. * * Since: 0.9.2 **/ @@ -316,11 +335,12 @@ hb_unicode_funcs_make_immutable (hb_unicode_funcs_t *ufuncs) /** * hb_unicode_funcs_is_immutable: - * @ufuncs: Unicode functions. - * + * @ufuncs: The Unicode-functions structure * + * Tests whether the specified Unicode-functions structure + * is immutable. * - * Return value: + * Return value: %true if @ufuncs is immutable, false otherwise * * Since: 0.9.2 **/ @@ -332,11 +352,12 @@ hb_unicode_funcs_is_immutable (hb_unicode_funcs_t *ufuncs) /** * hb_unicode_funcs_get_parent: - * @ufuncs: Unicode functions. + * @ufuncs: The Unicode-functions structure * + * Fetches the parent of the Unicode-functions structure + * @ufuncs. * - * - * Return value: + * Return value: The parent Unicode-functions structure * * Since: 0.9.2 **/ @@ -389,14 +410,18 @@ HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE /** * hb_unicode_compose: - * @ufuncs: Unicode functions. - * @a: - * @b: - * @ab: (out): + * @ufuncs: The Unicode-functions structure + * @a: The first Unicode code point to compose + * @b: The second Unicode code point to compose + * @ab: (out): The composition of @a, @b * + * Fetches the composition of a sequence of two Unicode + * code points. * + * Calls the composition function of the specified + * Unicode-functions structure @ufuncs. * - * Return value: + * Return value: %true if @a and @b composed, false otherwise * * Since: 0.9.2 **/ @@ -411,14 +436,17 @@ hb_unicode_compose (hb_unicode_funcs_t *ufuncs, /** * hb_unicode_decompose: - * @ufuncs: Unicode functions. - * @ab: - * @a: (out): - * @b: (out): + * @ufuncs: The Unicode-functions structure + * @ab: Unicode code point to decompose + * @a: (out): The first code point of the decomposition of @ab + * @b: (out): The second code point of the decomposition of @ab * + * Fetches the decomposition of a Unicode code point. * + * Calls the decomposition function of the specified + * Unicode-functions structure @ufuncs. * - * Return value: + * Return value: %true if @ab was decomposed, false otherwise * * Since: 0.9.2 **/ @@ -434,11 +462,12 @@ hb_unicode_decompose (hb_unicode_funcs_t *ufuncs, #ifndef HB_DISABLE_DEPRECATED /** * hb_unicode_decompose_compatibility: - * @ufuncs: Unicode functions. - * @u: - * @decomposed: (out): - * + * @ufuncs: The Unicode-functions structure + * @u: Code point to decompose + * @decomposed: (out): Compatibility decomposition of @u * + * Fetches the compatibility decomposition of a Unicode + * code point. Deprecated. * * Return value: * diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.h b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.h index 61b1b0ba1f7..2353f0fbf2e 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.h +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.h @@ -48,7 +48,42 @@ HB_BEGIN_DECLS #define HB_UNICODE_MAX 0x10FFFFu -/* hb_unicode_general_category_t */ +/** + * hb_unicode_general_category_t: + * @HB_UNICODE_GENERAL_CATEGORY_CONTROL: (Cc) + * @HB_UNICODE_GENERAL_CATEGORY_FORMAT: (Cf) + * @HB_UNICODE_GENERAL_CATEGORY_UNASSIGNED: (Cn) + * @HB_UNICODE_GENERAL_CATEGORY_PRIVATE_USE: (Co) + * @HB_UNICODE_GENERAL_CATEGORY_SURROGATE: (Cs) + * @HB_UNICODE_GENERAL_CATEGORY_LOWERCASE_LETTER: (Ll) + * @HB_UNICODE_GENERAL_CATEGORY_MODIFIER_LETTER: (Lm) + * @HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER: (Lo) + * @HB_UNICODE_GENERAL_CATEGORY_TITLECASE_LETTER: (Lt) + * @HB_UNICODE_GENERAL_CATEGORY_UPPERCASE_LETTER: (Lu) + * @HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK: (Mc) + * @HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK: (Me) + * @HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK: (Mn) + * @HB_UNICODE_GENERAL_CATEGORY_DECIMAL_NUMBER: (Nd) + * @HB_UNICODE_GENERAL_CATEGORY_LETTER_NUMBER: (Nl) + * @HB_UNICODE_GENERAL_CATEGORY_OTHER_NUMBER: (No) + * @HB_UNICODE_GENERAL_CATEGORY_CONNECT_PUNCTUATION: (Pc) + * @HB_UNICODE_GENERAL_CATEGORY_DASH_PUNCTUATION: (Pd) + * @HB_UNICODE_GENERAL_CATEGORY_CLOSE_PUNCTUATION: (Pe) + * @HB_UNICODE_GENERAL_CATEGORY_FINAL_PUNCTUATION: (Pf) + * @HB_UNICODE_GENERAL_CATEGORY_INITIAL_PUNCTUATION: (Pi) + * @HB_UNICODE_GENERAL_CATEGORY_OTHER_PUNCTUATION: (Po) + * @HB_UNICODE_GENERAL_CATEGORY_OPEN_PUNCTUATION: (Ps) + * @HB_UNICODE_GENERAL_CATEGORY_CURRENCY_SYMBOL: (Sc) + * @HB_UNICODE_GENERAL_CATEGORY_MODIFIER_SYMBOL: (Sk) + * @HB_UNICODE_GENERAL_CATEGORY_MATH_SYMBOL: (Sm) + * @HB_UNICODE_GENERAL_CATEGORY_OTHER_SYMBOL: (So) + * @HB_UNICODE_GENERAL_CATEGORY_LINE_SEPARATOR: (Zl) + * @HB_UNICODE_GENERAL_CATEGORY_PARAGRAPH_SEPARATOR: (Zp) + * @HB_UNICODE_GENERAL_CATEGORY_SPACE_SEPARATOR: (Zs) + * + * Data type for the "General_Category" (gc) property from + * the Unicode Character Database. + **/ /* Unicode Character Database property: General_Category (gc) */ typedef enum @@ -85,13 +120,72 @@ typedef enum HB_UNICODE_GENERAL_CATEGORY_SPACE_SEPARATOR /* Zs */ } hb_unicode_general_category_t; -/* hb_unicode_combining_class_t */ - -/* Note: newer versions of Unicode may add new values. Clients should be ready to handle - * any value in the 0..254 range being returned from hb_unicode_combining_class(). - */ - -/* Unicode Character Database property: Canonical_Combining_Class (ccc) */ +/** + * hb_unicode_combining_class_t: + * @HB_UNICODE_COMBINING_CLASS_NOT_REORDERED + * @HB_UNICODE_COMBINING_CLASS_OVERLAY + * @HB_UNICODE_COMBINING_CLASS_NUKTA + * @HB_UNICODE_COMBINING_CLASS_KANA_VOICING + * @HB_UNICODE_COMBINING_CLASS_VIRAMA + * @HB_UNICODE_COMBINING_CLASS_CCC11: (Hebrew) + * @HB_UNICODE_COMBINING_CLASS_CCC12: (Hebrew) + * @HB_UNICODE_COMBINING_CLASS_CCC13: (Hebrew) + * @HB_UNICODE_COMBINING_CLASS_CCC14: (Hebrew) + * @HB_UNICODE_COMBINING_CLASS_CCC15: (Hebrew) + * @HB_UNICODE_COMBINING_CLASS_CCC16: (Hebrew) + * @HB_UNICODE_COMBINING_CLASS_CCC17: (Hebrew) + * @HB_UNICODE_COMBINING_CLASS_CCC18: (Hebrew) + * @HB_UNICODE_COMBINING_CLASS_CCC19: (Hebrew) + * @HB_UNICODE_COMBINING_CLASS_CCC20: (Hebrew) + * @HB_UNICODE_COMBINING_CLASS_CCC21: (Hebrew) + * @HB_UNICODE_COMBINING_CLASS_CCC22: (Hebrew) + * @HB_UNICODE_COMBINING_CLASS_CCC23: (Hebrew) + * @HB_UNICODE_COMBINING_CLASS_CCC24: (Hebrew) + * @HB_UNICODE_COMBINING_CLASS_CCC25: (Hebrew) + * @HB_UNICODE_COMBINING_CLASS_CCC26: (Hebrew) + * @HB_UNICODE_COMBINING_CLASS_CCC28: (Arabic) + * @HB_UNICODE_COMBINING_CLASS_CCC29: (Arabic) + * @HB_UNICODE_COMBINING_CLASS_CCC30: (Arabic) + * @HB_UNICODE_COMBINING_CLASS_CCC31: (Arabic) + * @HB_UNICODE_COMBINING_CLASS_CCC32: (Arabic) + * @HB_UNICODE_COMBINING_CLASS_CCC33: (Arabic) + * @HB_UNICODE_COMBINING_CLASS_CCC34: (Arabic) + * @HB_UNICODE_COMBINING_CLASS_CCC35: (Arabic) + * @HB_UNICODE_COMBINING_CLASS_CCC36: (Syriac) + * @HB_UNICODE_COMBINING_CLASS_CCC84: (Telugu) + * @HB_UNICODE_COMBINING_CLASS_CCC91: (Telugu) + * @HB_UNICODE_COMBINING_CLASS_CCC103: (Thai) + * @HB_UNICODE_COMBINING_CLASS_CCC107: (Thai) + * @HB_UNICODE_COMBINING_CLASS_CCC118: (Lao) + * @HB_UNICODE_COMBINING_CLASS_CCC122: (Lao) + * @HB_UNICODE_COMBINING_CLASS_CCC129: (Tibetan) + * @HB_UNICODE_COMBINING_CLASS_CCC130: (Tibetan) + * @HB_UNICODE_COMBINING_CLASS_CCC133: (Tibetan) + * @HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW_LEFT + * @HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW + * @HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE + * @HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE_RIGHT + * @HB_UNICODE_COMBINING_CLASS_BELOW_LEFT + * @HB_UNICODE_COMBINING_CLASS_BELOW + * @HB_UNICODE_COMBINING_CLASS_BELOW_RIGHT + * @HB_UNICODE_COMBINING_CLASS_LEFT + * @HB_UNICODE_COMBINING_CLASS_RIGHT + * @HB_UNICODE_COMBINING_CLASS_ABOVE_LEFT + * @HB_UNICODE_COMBINING_CLASS_ABOVE + * @HB_UNICODE_COMBINING_CLASS_ABOVE_RIGHT + * @HB_UNICODE_COMBINING_CLASS_DOUBLE_BELOW + * @HB_UNICODE_COMBINING_CLASS_DOUBLE_ABOVE + * @HB_UNICODE_COMBINING_CLASS_IOTA_SUBSCRIPT + * @HB_UNICODE_COMBINING_CLASS_INVALID: 255 + * + * Data type for the Canonical_Combining_Class (ccc) property + * from the Unicode Character Database. + * + * <note>Note: newer versions of Unicode may add new values. + * Client programs should be ready to handle any value in the 0..254 range + * being returned from hb_unicode_combining_class().</note> + * + **/ typedef enum { HB_UNICODE_COMBINING_CLASS_NOT_REORDERED = 0, @@ -176,6 +270,18 @@ typedef enum * hb_unicode_funcs_t */ +/** + * hb_unicode_funcs_t: + * + * Data type containing a set of virtual methods used for + * accessing various Unicode character properties. + * + * HarfBuzz provides a default function for each of the + * methods in #hb_unicode_funcs_t. Client programs can implement + * their own replacements for the individual Unicode functions, as + * needed, and replace the default by calling the setter for a + * method. + **/ typedef struct hb_unicode_funcs_t hb_unicode_funcs_t; @@ -227,40 +333,107 @@ hb_unicode_funcs_get_parent (hb_unicode_funcs_t *ufuncs); /* typedefs */ +/** + * hb_unicode_combining_class_func_t: + * + * A virtual method for the #hb_unicode_funcs_t structure. + * + * This method should retrieve the Canonical Combining Class (ccc) + * property for a specified Unicode code point. + * + **/ typedef hb_unicode_combining_class_t (*hb_unicode_combining_class_func_t) (hb_unicode_funcs_t *ufuncs, hb_codepoint_t unicode, void *user_data); + +/** + * hb_unicode_general_category_func_t: + * + * A virtual method for the #hb_unicode_funcs_t structure. + * + * This method should retrieve the General Category property for + * a specified Unicode code point. + * + **/ typedef hb_unicode_general_category_t (*hb_unicode_general_category_func_t) (hb_unicode_funcs_t *ufuncs, hb_codepoint_t unicode, void *user_data); + +/** + * hb_unicode_mirroring_func_t: + * + * A virtual method for the #hb_unicode_funcs_t structure. + * + * This method should retrieve the Bi-Directional Mirroring Glyph + * code point for a specified Unicode code point. + * + * <note>Note: If a code point does not have a specified + * Bi-Directional Mirroring Glyph defined, the method should + * return the original code point.</note> + * + **/ typedef hb_codepoint_t (*hb_unicode_mirroring_func_t) (hb_unicode_funcs_t *ufuncs, hb_codepoint_t unicode, void *user_data); + +/** + * hb_unicode_script_func_t: + * + * A virtual method for the #hb_unicode_funcs_t structure. + * + * This method should retrieve the Script property for a + * specified Unicode code point. + * + **/ typedef hb_script_t (*hb_unicode_script_func_t) (hb_unicode_funcs_t *ufuncs, hb_codepoint_t unicode, void *user_data); +/** + * hb_unicode_compose_func_t: + * + * A virtual method for the #hb_unicode_funcs_t structure. + * + * This method should compose a sequence of two input Unicode code + * points by canonical equivalence, returning the composed code + * point in a #hb_codepoint_t output parameter (if successful). + * The method must return an #hb_bool_t indicating the success + * of the composition. + * + **/ typedef hb_bool_t (*hb_unicode_compose_func_t) (hb_unicode_funcs_t *ufuncs, hb_codepoint_t a, hb_codepoint_t b, hb_codepoint_t *ab, void *user_data); + +/** + * hb_unicode_decompose_func_t: + * + * A virtual method for the #hb_unicode_funcs_t structure. + * + * This method should decompose an input Unicode code point, + * returning the two decomposed code points in #hb_codepoint_t + * output parameters (if successful). The method must return an + * #hb_bool_t indicating the success of the composition. + * + **/ typedef hb_bool_t (*hb_unicode_decompose_func_t) (hb_unicode_funcs_t *ufuncs, hb_codepoint_t ab, hb_codepoint_t *a, hb_codepoint_t *b, void *user_data); -/* setters */ +/* func setters */ /** * hb_unicode_funcs_set_combining_class_func: - * @ufuncs: a Unicode function structure - * @func: (closure user_data) (destroy destroy) (scope notified): - * @user_data: - * @destroy: - * + * @ufuncs: A Unicode-functions structure + * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign + * @user_data: Data to pass to @func + * @destroy: The function to call when @user_data is not needed anymore * + * Sets the implementation function for #hb_unicode_combining_class_func_t. * * Since: 0.9.2 **/ @@ -271,12 +444,12 @@ hb_unicode_funcs_set_combining_class_func (hb_unicode_funcs_t *ufuncs, /** * hb_unicode_funcs_set_general_category_func: - * @ufuncs: a Unicode function structure - * @func: (closure user_data) (destroy destroy) (scope notified): - * @user_data: - * @destroy: - * + * @ufuncs: A Unicode-functions structure + * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign + * @user_data: Data to pass to @func + * @destroy: The function to call when @user_data is not needed anymore * + * Sets the implementation function for #hb_unicode_general_category_func_t. * * Since: 0.9.2 **/ @@ -287,12 +460,12 @@ hb_unicode_funcs_set_general_category_func (hb_unicode_funcs_t *ufuncs, /** * hb_unicode_funcs_set_mirroring_func: - * @ufuncs: a Unicode function structure - * @func: (closure user_data) (destroy destroy) (scope notified): - * @user_data: - * @destroy: - * + * @ufuncs: A Unicode-functions structure + * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign + * @user_data: Data to pass to @func + * @destroy: The function to call when @user_data is not needed anymore * + * Sets the implementation function for #hb_unicode_mirroring_func_t. * * Since: 0.9.2 **/ @@ -303,12 +476,12 @@ hb_unicode_funcs_set_mirroring_func (hb_unicode_funcs_t *ufuncs, /** * hb_unicode_funcs_set_script_func: - * @ufuncs: a Unicode function structure - * @func: (closure user_data) (destroy destroy) (scope notified): - * @user_data: - * @destroy: - * + * @ufuncs: A Unicode-functions structure + * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign + * @user_data: Data to pass to @func + * @destroy: The function to call when @user_data is not needed anymore * + * Sets the implementation function for #hb_unicode_script_func_t. * * Since: 0.9.2 **/ @@ -319,12 +492,12 @@ hb_unicode_funcs_set_script_func (hb_unicode_funcs_t *ufuncs, /** * hb_unicode_funcs_set_compose_func: - * @ufuncs: a Unicode function structure - * @func: (closure user_data) (destroy destroy) (scope notified): - * @user_data: - * @destroy: - * + * @ufuncs: A Unicode-functions structure + * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign + * @user_data: Data to pass to @func + * @destroy: The function to call when @user_data is not needed anymore * + * Sets the implementation function for #hb_unicode_compose_func_t. * * Since: 0.9.2 **/ @@ -335,12 +508,12 @@ hb_unicode_funcs_set_compose_func (hb_unicode_funcs_t *ufuncs, /** * hb_unicode_funcs_set_decompose_func: - * @ufuncs: a Unicode function structure - * @func: (closure user_data) (destroy destroy) (scope notified): - * @user_data: - * @destroy: - * + * @ufuncs: A Unicode-functions structure + * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign + * @user_data: Data to pass to @func + * @destroy: The function to call when @user_data is not needed anymore * + * Sets the implementation function for #hb_unicode_decompose_func_t. * * Since: 0.9.2 **/ @@ -353,6 +526,13 @@ hb_unicode_funcs_set_decompose_func (hb_unicode_funcs_t *ufuncs, /** * hb_unicode_combining_class: + * @ufuncs: The Unicode-functions structure + * @unicode: The code point to query + * + * Retrieves the Canonical Combining Class (ccc) property + * of code point @unicode. + * + * Return value: The #hb_unicode_combining_class_t of @unicode * * Since: 0.9.2 **/ @@ -362,6 +542,13 @@ hb_unicode_combining_class (hb_unicode_funcs_t *ufuncs, /** * hb_unicode_general_category: + * @ufuncs: The Unicode-functions structure + * @unicode: The code point to query + * + * Retrieves the General Category (gc) property + * of code point @unicode. + * + * Return value: The #hb_unicode_general_category_t of @unicode * * Since: 0.9.2 **/ @@ -371,6 +558,13 @@ hb_unicode_general_category (hb_unicode_funcs_t *ufuncs, /** * hb_unicode_mirroring: + * @ufuncs: The Unicode-functions structure + * @unicode: The code point to query + * + * Retrieves the Bi-directional Mirroring Glyph code + * point defined for code point @unicode. + * + * Return value: The #hb_codepoint_t of the Mirroring Glyph for @unicode * * Since: 0.9.2 **/ @@ -380,6 +574,13 @@ hb_unicode_mirroring (hb_unicode_funcs_t *ufuncs, /** * hb_unicode_script: + * @ufuncs: The Unicode-functions structure + * @unicode: The code point to query + * + * Retrieves the #hb_script_t script to which code + * point @unicode belongs. + * + * Return value: The #hb_script_t of @unicode * * Since: 0.9.2 **/ @@ -387,12 +588,40 @@ HB_EXTERN hb_script_t hb_unicode_script (hb_unicode_funcs_t *ufuncs, hb_codepoint_t unicode); +/** + * hb_unicode_compose: + * @ufuncs: The Unicode-functions structure + * @a: The first code point to compose + * @b: The second code point to compose + * @ab: (out): The composed code point + * + * Composes the code point sequence @a,@b by canonical equivalence into + * code point @ab. + * + * Return value: True is @a,@b composed, false otherwise + * + * Since: 0.9.2 + **/ HB_EXTERN hb_bool_t hb_unicode_compose (hb_unicode_funcs_t *ufuncs, hb_codepoint_t a, hb_codepoint_t b, hb_codepoint_t *ab); +/** + * hb_unicode_decompose: + * @ufuncs: The Unicode-functions structure + * @ab: The code point to decompose + * @a: (out): The first decomposed code point + * @b: (out): The second decomposed code point + * + * Decomposes code point @ab by canonical equivalence, into code points + * @a and @b. + * + * Return value: True if @ab decomposed, false otherwise + * + * Since: 0.9.2 + **/ HB_EXTERN hb_bool_t hb_unicode_decompose (hb_unicode_funcs_t *ufuncs, hb_codepoint_t ab, diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/meson.build b/Build/source/libs/harfbuzz/harfbuzz-src/src/meson.build index 186563365e1..8bfbd97b8e9 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/meson.build +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/meson.build @@ -1,3 +1,10 @@ +hb_version_h = configure_file( + command: [find_program('gen-hb-version.py'), meson.project_version(), '@OUTPUT@', '@INPUT@'], + input: 'hb-version.h.in', + output: 'hb-version.h', + install: true, + install_dir: join_paths(get_option('includedir'), meson.project_name())) + # Base and default-included sources and headers hb_base_sources = files( 'hb-aat-layout-ankr-table.hh', @@ -214,9 +221,9 @@ hb_base_headers = files( 'hb-shape.h', 'hb-style.h', 'hb-unicode.h', - 'hb-version.h', 'hb.h', ) +hb_base_headers += hb_version_h # Optional Sources and Headers with external deps @@ -281,14 +288,6 @@ hb_gobject_headers = files( 'hb-gobject-structs.h', ) -custom_target('hb-version.h', - build_by_default: true, - input: 'hb-version.h.in', - output: 'hb-version.h', - command: [find_program('gen-hb-version.py'), meson.project_version(), - '@OUTPUT@', '@CURRENT_SOURCE_DIR@', '@INPUT@'], -) - ragel = find_program('ragel', required: false) if not ragel.found() warning('You have to install ragel if you are going to develop HarfBuzz itself') @@ -300,7 +299,7 @@ else build_by_default: true, input: rl, output: hh, - command: [ragel_helper, '@OUTPUT@', '@CURRENT_SOURCE_DIR@', '@INPUT@'], + command: [ragel_helper, '@OUTPUT@', meson.current_source_dir(), '@INPUT@'], ) endforeach endif @@ -312,7 +311,7 @@ custom_target('harfbuzz.cc', hb_graphite2_sources + hb_uniscribe_sources + hb_gdi_sources + hb_directwrite_sources + hb_coretext_sources, command: [find_program('gen-harfbuzzcc.py'), - '@OUTPUT@', '@CURRENT_SOURCE_DIR@', '@INPUT@'], + '@OUTPUT@', meson.current_source_dir(), '@INPUT@'], ) incsrc = include_directories('.') @@ -322,6 +321,8 @@ hb_headers = hb_base_headers harfbuzz_deps = [thread_dep, m_dep] + harfbuzz_extra_deps +libharfbuzz_link_language = 'c' + if conf.get('HAVE_FREETYPE', 0) == 1 hb_sources += hb_ft_sources hb_headers += hb_ft_headers @@ -355,6 +356,8 @@ if conf.get('HAVE_DIRECTWRITE', 0) == 1 hb_sources += hb_directwrite_sources hb_headers += hb_directwrite_headers harfbuzz_deps += directwrite_dep + # hb-directwrite needs a C++ linker + libharfbuzz_link_language = 'cpp' endif if conf.get('HAVE_CORETEXT', 0) == 1 @@ -416,7 +419,7 @@ libharfbuzz = library('harfbuzz', hb_sources, version: version, install: true, darwin_versions: darwin_versions, - link_language: 'c', + link_language: libharfbuzz_link_language, ) libharfbuzz_dep = declare_dependency( @@ -632,12 +635,7 @@ if have_gobject ) gir = find_program('g-ir-scanner', required: get_option('introspection')) - build_gir = gir.found() - - build_gir = build_gir and not meson.is_cross_build() - if not build_gir and get_option('introspection').enabled() - error('Introspection support is requested but it isn\'t available in cross builds') - endif + build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled()) build_gir = build_gir and get_option('default_library') != 'static' if not build_gir and get_option('introspection').enabled() diff --git a/Build/source/libs/harfbuzz/version.ac b/Build/source/libs/harfbuzz/version.ac index 2531b5699b3..a0106e1999d 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], [2.7.2]) +m4_define([harfbuzz_version], [2.7.3]) |