diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2017-07-18 21:30:24 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2017-07-18 21:30:24 +0000 |
commit | 1259233aec698e07b7aedb390f151aec2f552a22 (patch) | |
tree | a2786914cdcbc0c3406ac8904add1cec02ae4e2e /Build/source/libs | |
parent | 82ea6625f41c38023b6d4fe3e712492b5ac53073 (diff) |
harfbuzz-1.4.7
git-svn-id: svn://tug.org/texlive/trunk@44840 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs')
38 files changed, 845 insertions, 327 deletions
diff --git a/Build/source/libs/README b/Build/source/libs/README index 02c86e16515..9fc0c14eeec 100644 --- a/Build/source/libs/README +++ b/Build/source/libs/README @@ -24,7 +24,7 @@ gmp 6.1.2 - checked 16dec16 graphite2 1.3.10 - checked 20jun17 http://sourceforge.net/projects/silgraphite/files/graphite2/ -harfbuzz 1.4.6 - checked 24apr17 +harfbuzz 1.4.7 - checked 18jul17 http://www.freedesktop.org/software/harfbuzz/release/ icu 58.2 - checked 13mar17 diff --git a/Build/source/libs/harfbuzz/ChangeLog b/Build/source/libs/harfbuzz/ChangeLog index d9bbbaee961..c5cb19cc544 100644 --- a/Build/source/libs/harfbuzz/ChangeLog +++ b/Build/source/libs/harfbuzz/ChangeLog @@ -1,3 +1,8 @@ +2017-07-18 Akira Kakuto <kakuto@fuk.kindai.ac.jp> + + Import harfbuzz-1.4.7. + * version.ac: Adjusted. + 2017-04-27 Karl Berry <karl@tug.org> * Makefile.am (LDADD): add $(ICU_LIBS_EXTRA). diff --git a/Build/source/libs/harfbuzz/TLpatches/ChangeLog b/Build/source/libs/harfbuzz/TLpatches/ChangeLog index 00a66146a60..0112f1bba98 100644 --- a/Build/source/libs/harfbuzz/TLpatches/ChangeLog +++ b/Build/source/libs/harfbuzz/TLpatches/ChangeLog @@ -1,3 +1,8 @@ +2017-07-18 Akira Kakuto <kakuto@fuk.kindai.ac.jp> + + Imported harfbuzz-1.4.7 source tree from: + http://www.freedesktop.org/software/harfbuzz/release/ + 2017-04-24 Akira Kakuto <kakuto@fuk.kindai.ac.jp> Imported harfbuzz-1.4.6 source tree from: diff --git a/Build/source/libs/harfbuzz/TLpatches/TL-Changes b/Build/source/libs/harfbuzz/TLpatches/TL-Changes index e69ff2e1fb4..258404a9af8 100644 --- a/Build/source/libs/harfbuzz/TLpatches/TL-Changes +++ b/Build/source/libs/harfbuzz/TLpatches/TL-Changes @@ -1,4 +1,4 @@ -Changes applied to the harfbuzz-1.4.6/ tree as obtained from: +Changes applied to the harfbuzz-1.4.7/ tree as obtained from: http://www.freedesktop.org/software/harfbuzz/release/ Removed: diff --git a/Build/source/libs/harfbuzz/configure b/Build/source/libs/harfbuzz/configure index 1083903fd17..203e0aa5e6f 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) 1.4.6. +# Generated by GNU Autoconf 2.69 for harfbuzz (TeX Live) 1.4.7. # # 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='1.4.6' -PACKAGE_STRING='harfbuzz (TeX Live) 1.4.6' +PACKAGE_VERSION='1.4.7' +PACKAGE_STRING='harfbuzz (TeX Live) 1.4.7' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' @@ -1312,7 +1312,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) 1.4.6 to adapt to many kinds of systems. +\`configure' configures harfbuzz (TeX Live) 1.4.7 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1383,7 +1383,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of harfbuzz (TeX Live) 1.4.6:";; + short | recursive ) echo "Configuration of harfbuzz (TeX Live) 1.4.7:";; esac cat <<\_ACEOF @@ -1490,7 +1490,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -harfbuzz (TeX Live) configure 1.4.6 +harfbuzz (TeX Live) configure 1.4.7 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2080,7 +2080,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 1.4.6, which was +It was created by harfbuzz (TeX Live) $as_me 1.4.7, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -4003,7 +4003,7 @@ fi # Define the identity of the package. PACKAGE='harfbuzz--tex-live-' - VERSION='1.4.6' + VERSION='1.4.7' cat >>confdefs.h <<_ACEOF @@ -4206,8 +4206,8 @@ WARNING_CFLAGS=$kpse_cv_warning_cflags HB_VERSION_MAJOR=1 HB_VERSION_MINOR=4 -HB_VERSION_MICRO=6 -HB_VERSION=1.4.6 +HB_VERSION_MICRO=7 +HB_VERSION=1.4.7 ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -6866,7 +6866,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 1.4.6, which was +This file was extended by harfbuzz (TeX Live) $as_me 1.4.7, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6932,7 +6932,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 1.4.6 +harfbuzz (TeX Live) config.status 1.4.7 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 91e7eca0e0d..ee313566786 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/CMakeLists.txt +++ b/Build/source/libs/harfbuzz/harfbuzz-src/CMakeLists.txt @@ -1,8 +1,22 @@ cmake_minimum_required(VERSION 2.8.0) project(harfbuzz) -## Disallow in-source builds -if ("${PROJECT_BINARY_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}") + +## Limit framework build to Xcode generator +if (BUILD_FRAMEWORK) + # for a framework on macOS, use `cmake .. -DBUILD_FRAMEWORK:BOOL=true -G Xcode` + if (NOT "${CMAKE_GENERATOR}" STREQUAL "Xcode") + message(FATAL_ERROR + "You should use Xcode generator with BUILD_FRAMEWORK enabled") + endif () + set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD_32_64_BIT)") + set(CMAKE_MACOSX_RPATH ON) + set(BUILD_SHARED_LIBS ON) +endif () + + +## Disallow in-source builds, as CMake generated make files can collide with autotools ones +if (NOT MSVC AND "${PROJECT_BINARY_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}") message(FATAL_ERROR " In-source builds are not permitted! Make a separate folder for" @@ -14,7 +28,7 @@ Before that, remove the files created by this failed run with" " rm -rf CMakeCache.txt CMakeFiles") endif () -## + ## HarfBuzz build configurations option(HB_HAVE_FREETYPE "Enable freetype interop helpers" OFF) @@ -53,15 +67,17 @@ endif () if (WIN32 AND NOT MINGW AND BUILD_SHARED_LIBS) add_definitions("-DHB_EXTERN=__declspec(dllexport) extern") endif () -## + +## Detect if we are running inside a distribution or regular repository folder set(IN_HB_DIST FALSE) -if (EXISTS "${PROJECT_SOURCE_DIR}/src/hb-version.h") +if (EXISTS "${PROJECT_SOURCE_DIR}/ChangeLog") # perhaps we are on dist directory set(IN_HB_DIST TRUE) set(HB_VERSION_H "${PROJECT_SOURCE_DIR}/src/hb-version.h") endif () + ## Extract variables from Makefile files # http://stackoverflow.com/a/27630120/1414809 function (prepend var prefix) @@ -108,11 +124,11 @@ set(HB_VERSION ${CMAKE_MATCH_1}) set(HB_VERSION_MAJOR ${CMAKE_MATCH_2}) set(HB_VERSION_MINOR ${CMAKE_MATCH_3}) set(HB_VERSION_MICRO ${CMAKE_MATCH_4}) -## + +## Define ragel tasks if (NOT IN_HB_DIST) - ## Define ragel tasks - find_program(RAGEL "ragel") + find_program(RAGEL "ragel" CMAKE_FIND_ROOT_PATH_BOTH) if (RAGEL) message(STATUS "ragel found at: ${RAGEL}") @@ -131,20 +147,23 @@ if (NOT IN_HB_DIST) endforeach () mark_as_advanced(RAGEL) - ## +endif () + - ## Generate hb-version.h +## Generate hb-version.h +if (NOT IN_HB_DIST) set(HB_VERSION_H_IN "${PROJECT_SOURCE_DIR}/src/hb-version.h.in") set(HB_VERSION_H "${PROJECT_BINARY_DIR}/src/hb-version.h") set_source_files_properties("${HB_VERSION_H}" PROPERTIES GENERATED true) configure_file("${HB_VERSION_H_IN}" "${HB_VERSION_H}.tmp" @ONLY) execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${HB_VERSION_H}.tmp" - "${HB_VERSION_H}") + "${HB_VERSION_H}" + ) file(REMOVE "${HB_VERSION_H}.tmp") - ## endif () + ## Define sources and headers of the project set(project_sources ${HB_BASE_sources} @@ -161,6 +180,8 @@ set(project_headers ${HB_OT_headers} ) + +## Find and include needed header folders and libraries if (HB_HAVE_FREETYPE) add_definitions(-DHAVE_FREETYPE=1 -DHAVE_FT_FACE_GETCHARVARIANTINDEX=1) @@ -209,7 +230,8 @@ if (HB_BUILTIN_UCDN) list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-ucdn.cc - ${LIBHB_UCDN_sources}) + ${LIBHB_UCDN_sources} + ) endif () if (HB_HAVE_GLIB) @@ -285,7 +307,7 @@ if (WIN32 AND HB_HAVE_DIRECTWRITE) list(APPEND THIRD_PARTY_LIBS dwrite rpcrt4) endif () -## + ## Atomic ops availability detection file(WRITE "${PROJECT_BINARY_DIR}/try_compile_intel_atomic_primitives.c" @@ -317,11 +339,28 @@ try_compile(HB_HAVE_SOLARIS_ATOMIC_OPS if (HB_HAVE_SOLARIS_ATOMIC_OPS) add_definitions(-DHAVE_SOLARIS_ATOMIC_OPS) endif () -## + +## Define harfbuzz library add_library(harfbuzz ${project_sources} ${project_headers}) target_link_libraries(harfbuzz ${THIRD_PARTY_LIBS}) + +## Additional framework build configs +if (BUILD_FRAMEWORK) + set(CMAKE_MACOSX_RPATH ON) + set_target_properties(harfbuzz PROPERTIES + FRAMEWORK TRUE + PUBLIC_HEADER "${project_headers}" + XCODE_ATTRIBUTE_INSTALL_PATH "@rpath" + ) + set(MACOSX_FRAMEWORK_IDENTIFIER "harfbuzz") + set(MACOSX_FRAMEWORK_SHORT_VERSION_STRING "${HB_VERSION}") + set(MACOSX_FRAMEWORK_BUNDLE_VERSION "${HB_VERSION}") +endif () + + +## Additional harfbuzz build artifacts if (HB_BUILD_UTILS) # https://github.com/WebKit/webkit/blob/master/Source/cmake/FindCairo.cmake find_package(PkgConfig) @@ -343,9 +382,10 @@ if (HB_BUILD_UTILS) add_executable(hb-ot-shape-closure ${HB_OT_SHAPE_CLOSURE_sources}) target_link_libraries(hb-ot-shape-closure harfbuzz) - mark_as_advanced(CAIRO_LIBRARIESNAMES) + mark_as_advanced(CAIRO_INCLUDE_DIRS CAIRO_LIBRARIESNAMES) endif () + ## Install if (NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL) install(FILES ${project_headers} DESTINATION include/harfbuzz) @@ -356,6 +396,6 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin + FRAMEWORK DESTINATION Library/Frameworks ) endif () -## diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog b/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog index 86ffc1f908d..90dde27e882 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog +++ b/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog @@ -1,3 +1,360 @@ +commit fc15e60eadfc89aca5b8815262b8ee888f285169 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jul 18 11:24:42 2017 -0700 + + 1.4.7 + + NEWS | 10 ++++++++++ + configure.ac | 2 +- + 2 files changed, 11 insertions(+), 1 deletion(-) + +commit c1432bce3cfc1156d19b21892d4083afa8838d94 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jul 14 17:34:47 2017 +0100 + + [arabic] Adjust feature order again + + Fixes https://github.com/behdad/harfbuzz/issues/505 + + src/hb-ot-shape-complex-arabic.cc | 7 ++++++- + .../sha1sum/bf39b0e91ef9807f15a9e283a21a14a209fd2cfc.ttf | Bin 0 -> + 7312 bytes + test/shaping/tests/arabic-feature-order.tests | 1 + + 3 files changed, 7 insertions(+), 1 deletion(-) + +commit 9813be3d1212eef5a525d64978e0bb2032cd44d9 +Author: Cosimo Lupo <cosimo@anthrotype.com> +Date: Fri Jul 14 17:11:46 2017 +0100 + + [coretext] Allow to disable kern (#508) + + * Minor + + * [coretext] Fix leak + + * [coretext] Do not reset num_features + + * [coretext] allow to disable kern; re-enabling doesn't seem to + be working + + src/hb-coretext.cc | 41 ++++++++++++++++++++++++++++++++--------- + 1 file changed, 32 insertions(+), 9 deletions(-) + +commit 9dd29c681e8e856c139f20f405d7c0e04928aa70 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jul 14 17:01:27 2017 +0100 + + [use] Allow up to two medial-below letters + + Fixes https://github.com/behdad/harfbuzz/issues/376 + + src/hb-ot-shape-complex-use-machine.rl | 3 ++- + .../sha1sum/e68a88939e0f06e34d2bc911f09b70890289c8fd.ttf | Bin 0 -> + 2192 bytes + test/shaping/tests/use-syllable.tests | 3 +++ + 3 files changed, 5 insertions(+), 1 deletion(-) + +commit 216b003c914d2209a6846b1ce61fe7a3421c789c +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jul 14 16:38:51 2017 +0100 + + [use] Fix shaping of U+AA29 CHAM VOWEL SIGN AA + + Part of https://github.com/behdad/harfbuzz/issues/376 + Also see https://github.com/roozbehp/unicode-data/issues/6 + + Test added, using NotoSansCham built from Noto Phase III sources. + + src/gen-arabic-table.py | 2 +- + src/gen-indic-table.py | 2 +- + src/gen-use-table.py | 8 +++++--- + src/hb-ot-shape-complex-use-table.cc | 4 ++-- + test/shaping/Makefile.am | 1 + + .../sha1sum/96490dd2ff81233b335a650e7eb660e0e7b2eeea.ttf | Bin 0 -> + 1368 bytes + test/shaping/tests/use-syllable.tests | 1 + + 7 files changed, 11 insertions(+), 7 deletions(-) + +commit f1cd7ca89306ff252816e9747177d8dab00524f6 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jul 14 15:59:40 2017 +0100 + + [indic] Add github URL + + src/hb-ot-shape-complex-indic.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 3cc84f45b995b243fca82ce18481f11d69846eb5 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jul 14 15:50:22 2017 +0100 + + [indic] Fix https://github.com/behdad/harfbuzz/issues/478 + + src/hb-ot-shape-complex-indic-private.hh | 2 +- + src/hb-ot-shape-complex-indic.cc | 8 ++++++++ + test/shaping/Makefile.am | 1 + + .../sha1sum/54674a3111d209fb6be0ed31745314b7a8d2c244.ttf | Bin 0 -> + 1352 bytes + test/shaping/tests/indic-syllable.tests | 1 + + 5 files changed, 11 insertions(+), 1 deletion(-) + +commit e359a4b8f57bbc778843f233c4f5d6fb07ff11d9 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jul 14 14:14:35 2017 +0100 + + [indic] Disable automatic ZWNJ handling for Indic features + + Fixes https://github.com/behdad/harfbuzz/issues/294 + + Also fixes a bunch of other Indic issues. Test results after: + + BENGALI: 353725 out of 354188 tests passed. 463 failed (0.130722%) + DEVANAGARI: 707307 out of 707394 tests passed. 87 failed (0.0122987%) + GUJARATI: 366355 out of 366457 tests passed. 102 failed (0.0278341%) + GURMUKHI: 60732 out of 60747 tests passed. 15 failed (0.0246926%) + KANNADA: 951201 out of 951913 tests passed. 712 failed (0.0747968%) + KHMER: 299071 out of 299124 tests passed. 53 failed (0.0177184%) + MALAYALAM: 1048136 out of 1048334 tests passed. 198 failed + (0.0188871%) + ORIYA: 42320 out of 42329 tests passed. 9 failed (0.021262%) + SINHALA: 271662 out of 271847 tests passed. 185 failed (0.068053%) + TAMIL: 1091754 out of 1091754 tests passed. 0 failed (0%) + TELUGU: 970555 out of 970573 tests passed. 18 failed (0.00185457%) + + Before: + + BENGALI: 353725 out of 354188 tests passed. 463 failed (0.130722%) + DEVANAGARI: 707307 out of 707394 tests passed. 87 failed (0.0122987%) + GUJARATI: 366349 out of 366457 tests passed. 108 failed (0.0294714%) + GURMUKHI: 60732 out of 60747 tests passed. 15 failed (0.0246926%) + KANNADA: 951190 out of 951913 tests passed. 723 failed (0.0759523%) + KHMER: 299070 out of 299124 tests passed. 54 failed (0.0180527%) + MALAYALAM: 1048136 out of 1048334 tests passed. 198 failed + (0.0188871%) + ORIYA: 42320 out of 42329 tests passed. 9 failed (0.021262%) + SINHALA: 271662 out of 271847 tests passed. 185 failed (0.068053%) + TAMIL: 1091753 out of 1091754 tests passed. 1 failed (9.15957e-05%) + TELUGU: 970555 out of 970573 tests passed. 18 failed (0.00185457%) + + src/hb-ot-shape-complex-indic.cc | 4 ++-- + test/shaping/Makefile.am | 1 + + .../sha1sum/f443753e8ffe8e8aae606cfba158e00334b6efb1.ttf | Bin 0 -> + 3972 bytes + test/shaping/tests/indic-joiners.tests | 2 ++ + 4 files changed, 5 insertions(+), 2 deletions(-) + +commit cdf1fd0627c5517c948ca05d2e9427c3e441adf9 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jul 14 12:43:34 2017 +0100 + + [indic] Add infrastructure to disable ZWNJ-skipping in + context-matching + + Not used yet. + + src/hb-ot-layout-gsubgpos-private.hh | 45 + ++++++++++++++++++++---------------- + src/hb-ot-layout.cc | 1 + + src/hb-ot-map-private.hh | 10 +++++--- + src/hb-ot-map.cc | 8 +++++-- + 4 files changed, 39 insertions(+), 25 deletions(-) + +commit 3a73e0d5e17b87ac7e307d855c2cb43d040bd195 +Author: Dominik Schlösser <dominik.schloesser@gmail.com> +Date: Fri Jul 14 13:14:55 2017 +0200 + + Shaping tests for Tibetan vowels (#446) + + * Shaping tests for Tibetan vowels + + * Test-cases for the Dzongkha contractions with multiple vowel-signs + added. + + * going to be removed + + * Extended contraction-test-cases to all test cases in + contractions.txt that actually use multiple-vowels (113 cases) + + test/shaping/Makefile.am | 3 ++ + .../2de1ab4907ab688c0cfc236b0bf51151db38bf2e.ttf | Bin 0 -> 125256 + bytes + .../82f4f3b57bb55344e72e70231380202a52af5805.ttf | Bin 0 -> 11116 bytes + .../a02a7f0ad42c2922cb37ad1358c9df4eb81f1bca.ttf | Bin 0 -> 106096 + bytes + test/shaping/tests/tibetan-contractions-1.tests | 60 + +++++++++++++++++++++ + test/shaping/tests/tibetan-contractions-2.tests | 53 + ++++++++++++++++++ + test/shaping/tests/tibetan-vowels.tests | 11 ++++ + 7 files changed, 127 insertions(+) + +commit 4e21ec546932c2a982aa52fce718c1a0d90a71d6 +Author: Dominik Schlösser <dominik.schloesser@gmail.com> +Date: Fri Jul 14 13:14:23 2017 +0200 + + Fix for reordering of Tibetan vowel u (#443) + + * Undone change for Tibetan vowel u + + * removed comment on reordering that became invalid with roll-back + + * Support for Dzongkha contractions with multiple vowel-signs + + * Removed non-functional and unnecessary defines for + HB_MODIFIED_COMBINING_CLASS_CCC138,140 + + src/hb-unicode-private.hh | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +commit ad52e044bcf733bcc6c0373bafcd78a8c0beb400 +Author: fanc999 <fanc999@yahoo.com.tw> +Date: Wed Jun 21 22:19:57 2017 +0800 + + Win32/NMake builds: Support builds from GIT (#498) + + Add Python scripts to generate the full win32/config.h.win32 and + src/hb-version.h which can be used to build directly from a GIT + checkout. Since the scripts are currently intended for building + from a + GIT checkout, these are not distributed in the release tarballs. + + Also, support the re-build of Ragel-generated .hh headers using + the NMake + build system, and allow one to specify the path of the Ragel + executable + if a suitable one cannot be found in the PATH. + + Update the Win32/NMake build documentation to let people know + about how + these mechanisms can be utilized. + + win32/README.txt | 20 ++++++- + win32/build-rules-msvc.mak | 5 +- + win32/config-msvc.mak | 7 +++ + win32/create-lists-msvc.mak | 9 ++++ + win32/generate-msvc.mak | 6 +++ + win32/info-msvc.mak | 8 ++- + win32/pc_base.py | 124 + ++++++++++++++++++++++++++++++++++++++++++++ + win32/replace.py | 115 + ++++++++++++++++++++++++++++++++++++++++ + win32/setup.py | 62 ++++++++++++++++++++++ + 9 files changed, 353 insertions(+), 3 deletions(-) + +commit 3b0e47ca006b8fe6a24ace72dd931e3649bb8e6f +Author: Ebrahim Byagowi <ebrahim@gnu.org> +Date: Mon Jun 19 14:47:09 2017 +0430 + + Fix arm-none-eabi build (fixes #451) (#496) + + CMakeLists.txt | 4 ++-- + src/hb-buffer.cc | 4 ++-- + src/hb-common.cc | 28 ++++++++++++++++++++-- + src/hb-ot-font.cc | 2 +- + src/hb-ot-layout.cc | 2 +- + src/hb-ot-shape-complex-arabic-table.hh | 14 +++++------ + src/hb-ot-shape-complex-arabic.cc | 2 +- + src/hb-ot-shape-complex-hangul.cc | 16 ++++++------- + src/hb-ot-shape-complex-indic-table.cc | 22 ++++++++--------- + src/hb-ot-shape-complex-indic.cc | 12 +++++----- + src/hb-ot-shape-complex-myanmar.cc | 2 +- + src/hb-ot-shape-complex-thai.cc | 12 +++++----- + src/hb-ot-shape-complex-use-table.cc | 42 + ++++++++++++++++----------------- + src/hb-unicode-private.hh | 16 ++++++------- + src/hb-utf-private.hh | 18 +++++++------- + 15 files changed, 110 insertions(+), 86 deletions(-) + +commit 76c4873e8cad2871d2d547318d371b9a89d8c806 +Author: Ebrahim Byagowi <ebrahim@gnu.org> +Date: Fri Jun 2 21:53:10 2017 +0430 + + Support branch prediction helpers on clang compiles (#491) + + src/hb-private.hh | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +commit 7dba30639a6f62803dfc21706bc7c654799f373e +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jun 1 11:44:42 2017 -0400 + + Handle allocation failure in hb-language code + + src/hb-common.cc | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) + +commit 92e2c4baafa0401cb8d7dd2bbd70acfaeaf2aabf +Author: Sebastian Rasmussen <sebras@gmail.com> +Date: Mon May 29 12:53:30 2017 -0500 + + Avoid using strdup inside library. (#488) + + If an application provides a malloc replacement through + hb_malloc_impl() it is important that it is used to allocate + everything, but the use of strdup() circumvents this and + causes system malloc() to be called instead. This pairs + badly with the custom hb_free_impl() being called later. + + src/hb-common.cc | 8 +++++++- + src/hb-private.hh | 4 ---- + 2 files changed, 7 insertions(+), 5 deletions(-) + +commit 06cfe3f7369684fc05fa16da7f6778350f8bcba5 +Author: Khaled Hosny <khaledhosny@eglug.org> +Date: Wed May 17 21:32:47 2017 +0300 + + Do not skip TAG characters in glyph substitution (#487) + + Hide them like Mongolian Free Variation Selectors instead. + + Fixes https://github.com/behdad/harfbuzz/issues/463 + + src/hb-ot-layout-gsubgpos-private.hh | 2 +- + src/hb-ot-layout-private.hh | 13 + +++++++++---- + test/shaping/Makefile.am | 1 + + .../sha1sum/53374c7ca3657be37efde7ed02ae34229a56ae1f.ttf | Bin 0 -> + 5044 bytes + test/shaping/tests/emoji-flag-tags.tests | 2 ++ + 5 files changed, 13 insertions(+), 5 deletions(-) + +commit 1817221620dce713aae67352568ebcc231ab9512 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue May 16 14:26:28 2017 -0700 + + Minor + + src/hb-atomic-private.hh | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +commit 152736981d5bb9e098c1a8b86fcf8fe577a4a9ec +Author: Ebrahim Byagowi <ebrahim@gnu.org> +Date: Sat May 13 21:32:56 2017 +0430 + + [cmake] Add framework build support (#484) + + CMakeLists.txt | 46 +++++++++++++++++++++++++++++++++++++++------- + 1 file changed, 39 insertions(+), 7 deletions(-) + +commit bf50ddaf2b416bd80ae8849593bc745b578193d9 +Author: Ebrahim Byagowi <ebrahim@gnu.org> +Date: Thu May 4 20:31:42 2017 +0430 + + [cmake] minor (#482) + + CMakeLists.txt | 30 +++++++++++++++++++----------- + 1 file changed, 19 insertions(+), 11 deletions(-) + +commit 141b33de9a141248e2f034d55f48460159536cb9 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Apr 23 16:19:13 2017 -0700 + + 1.4.6 + + NEWS | 9 +++++++++ + configure.ac | 2 +- + 2 files changed, 10 insertions(+), 1 deletion(-) + commit 74b99ef2249107e7cd01bd1ee522a5d9ce61e05f Author: mhosken <mhosken@users.noreply.github.com> Date: Thu Apr 20 19:13:22 2017 +0100 diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/NEWS b/Build/source/libs/harfbuzz/harfbuzz-src/NEWS index 9c7e7d3b471..5cbfacf23f9 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/NEWS +++ b/Build/source/libs/harfbuzz/harfbuzz-src/NEWS @@ -1,3 +1,13 @@ +Overview of changes leading to 1.4.7 +Tuesday, July 18, 2017 +==================================== + +- Multiple Indic, Tibetan, and Cham fixes. +- CoreText: Allow disabling kerning. +- Adjust Arabic feature order again. +- Misc build fixes. + + Overview of changes leading to 1.4.6 Sunday, April 23, 2017 ==================================== diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac b/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac index 6d14455509c..ec9e2986968 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], - [1.4.6], + [1.4.7], [https://github.com/behdad/harfbuzz/issues/new], [harfbuzz], [http://harfbuzz.org/]) diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am b/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am index 958972a1445..0c077d99013 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am @@ -151,7 +151,7 @@ CLEANFILES += libharfbuzz-fuzzing.la if HAVE_ICU if HAVE_ICU_BUILTIN HBCFLAGS += $(ICU_CFLAGS) -HBLIBS += $(ICU_LIBS) $(ICU_LIBS_EXTRA) +HBLIBS += $(ICU_LIBS) HBSOURCES += $(HB_ICU_sources) HBHEADERS += $(HB_ICU_headers) else @@ -159,7 +159,7 @@ lib_LTLIBRARIES += libharfbuzz-icu.la libharfbuzz_icu_la_SOURCES = $(HB_ICU_sources) libharfbuzz_icu_la_CPPFLAGS = $(ICU_CFLAGS) libharfbuzz_icu_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(HB_LIBTOOL_VERSION_INFO) -no-undefined -libharfbuzz_icu_la_LIBADD = $(ICU_LIBS) $(ICU_LIBS_EXTRA) libharfbuzz.la +libharfbuzz_icu_la_LIBADD = $(ICU_LIBS) libharfbuzz.la pkginclude_HEADERS += $(HB_ICU_headers) pkgconfig_DATA += harfbuzz-icu.pc endif diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-arabic-table.py b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-arabic-table.py index 308435f991e..59bd7601296 100755 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-arabic-table.py +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-arabic-table.py @@ -134,7 +134,7 @@ def print_joining_table(f): for (start,end) in ranges: if p not in [start>>page_bits, end>>page_bits]: continue offset = "joining_offset_0x%04xu" % start - print " if (hb_in_range (u, 0x%04Xu, 0x%04Xu)) return joining_table[u - 0x%04Xu + %s];" % (start, end, start, offset) + print " if (hb_in_range<hb_codepoint_t> (u, 0x%04Xu, 0x%04Xu)) return joining_table[u - 0x%04Xu + %s];" % (start, end, start, offset) print " break;" print "" print " default:" diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-indic-table.py b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-indic-table.py index 3016cd07b68..a849db18e26 100755 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-indic-table.py +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-indic-table.py @@ -232,7 +232,7 @@ for p in sorted(pages): for (start,end) in zip (starts, ends): if p not in [start>>page_bits, end>>page_bits]: continue offset = "indic_offset_0x%04xu" % start - print " if (hb_in_range (u, 0x%04Xu, 0x%04Xu)) return indic_table[u - 0x%04Xu + %s];" % (start, end-1, start, offset) + print " if (hb_in_range<hb_codepoint_t> (u, 0x%04Xu, 0x%04Xu)) return indic_table[u - 0x%04Xu + %s];" % (start, end-1, start, offset) for u,d in singles.items (): if p != u>>page_bits: continue print " if (unlikely (u == 0x%04Xu)) return _(%s,%s);" % (u, short[0][d[0]], short[1][d[1]]) 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 a922c92faeb..fcb66a58022 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 @@ -210,11 +210,13 @@ def is_SYM_MOD(U, UISC, UGC): def is_VARIATION_SELECTOR(U, UISC, UGC): return 0xFE00 <= U <= 0xFE0F def is_VOWEL(U, UISC, UGC): + # https://github.com/roozbehp/unicode-data/issues/6 return (UISC == Pure_Killer or - (UGC != Lo and UISC in [Vowel, Vowel_Dependent])) + (UGC != Lo and UISC in [Vowel, Vowel_Dependent] and U not in [0xAA29])) def is_VOWEL_MOD(U, UISC, UGC): + # https://github.com/roozbehp/unicode-data/issues/6 return (UISC in [Tone_Mark, Cantillation_Mark, Register_Shifter, Visarga] or - (UGC != Lo and UISC == Bindu)) + (UGC != Lo and (UISC == Bindu or U in [0xAA29]))) use_mapping = { 'B': is_BASE, @@ -449,7 +451,7 @@ for p in sorted(pages): for (start,end) in zip (starts, ends): if p not in [start>>page_bits, end>>page_bits]: continue offset = "use_offset_0x%04xu" % start - print " if (hb_in_range (u, 0x%04Xu, 0x%04Xu)) return use_table[u - 0x%04Xu + %s];" % (start, end-1, start, offset) + print " if (hb_in_range<hb_codepoint_t> (u, 0x%04Xu, 0x%04Xu)) return use_table[u - 0x%04Xu + %s];" % (start, end-1, start, offset) for u,d in singles.items (): if p != u>>page_bits: continue print " if (unlikely (u == 0x%04Xu)) return %s;" % (u, d[0]) diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-atomic-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-atomic-private.hh index 100ba539e3a..2d5675792de 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-atomic-private.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-atomic-private.hh @@ -124,13 +124,13 @@ typedef unsigned int hb_atomic_int_impl_t; #include <builtins.h> -static inline int hb_fetch_and_add(volatile int* AI, unsigned int V) { +static inline int _hb_fetch_and_add(volatile int* AI, unsigned int V) { __lwsync(); int result = __fetch_and_add(AI, V); __isync(); return result; } -static inline int hb_compare_and_swaplp(volatile long* P, long O, long N) { +static inline int _hb_compare_and_swaplp(volatile long* P, long O, long N) { __sync(); int result = __compare_and_swaplp (P, &O, N); __sync(); @@ -139,10 +139,10 @@ static inline int hb_compare_and_swaplp(volatile long* P, long O, long N) { typedef int hb_atomic_int_impl_t; #define HB_ATOMIC_INT_IMPL_INIT(V) (V) -#define hb_atomic_int_impl_add(AI, V) hb_fetch_and_add (&(AI), (V)) +#define hb_atomic_int_impl_add(AI, V) _hb_fetch_and_add (&(AI), (V)) #define hb_atomic_ptr_impl_get(P) (__sync(), (void *) *(P)) -#define hb_atomic_ptr_impl_cmpexch(P,O,N) hb_compare_and_swaplp ((long*)(P), (long)(O), (long)(N)) +#define hb_atomic_ptr_impl_cmpexch(P,O,N) _hb_compare_and_swaplp ((long*)(P), (long)(O), (long)(N)) #elif !defined(HB_NO_MT) 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 3940a3dbf8e..3777f7f8f3e 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.cc @@ -552,7 +552,7 @@ hb_buffer_t::merge_clusters_impl (unsigned int start, if (cluster_level == HB_BUFFER_CLUSTER_LEVEL_CHARACTERS) return; - unsigned int cluster = info[start].cluster; + uint32_t cluster = info[start].cluster; for (unsigned int i = start + 1; i < end; i++) cluster = MIN (cluster, info[i].cluster); @@ -583,7 +583,7 @@ hb_buffer_t::merge_out_clusters (unsigned int start, if (unlikely (end - start < 2)) return; - unsigned int cluster = out_info[start].cluster; + uint32_t cluster = out_info[start].cluster; for (unsigned int i = start + 1; i < end; i++) cluster = MIN (cluster, out_info[i].cluster); 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 39006237a0c..0483816d37b 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc @@ -221,9 +221,18 @@ struct hb_language_item_t { } inline hb_language_item_t & operator = (const char *s) { - lang = (hb_language_t) strdup (s); - for (unsigned char *p = (unsigned char *) lang; *p; p++) - *p = canon_map[*p]; + /* If a custom allocated is used calling strdup() pairs + badly with a call to the custom free() in finish() below. + Therefore don't call strdup(), implement its behavior. + */ + size_t len = strlen(s) + 1; + lang = (hb_language_t) malloc(len); + if (likely (lang)) + { + memcpy((unsigned char *) lang, s, len); + for (unsigned char *p = (unsigned char *) lang; *p; p++) + *p = canon_map[*p]; + } return *this; } @@ -265,6 +274,11 @@ retry: return NULL; lang->next = first_lang; *lang = key; + if (unlikely (!lang->lang)) + { + free (lang); + return NULL; + } if (!hb_atomic_ptr_cmpexch (&langs, first_lang, lang)) { lang->finish (); @@ -657,6 +671,30 @@ parse_uint (const char **pp, const char *end, unsigned int *pv) } static bool +parse_uint32 (const char **pp, const char *end, uint32_t *pv) +{ + char buf[32]; + unsigned int len = MIN (ARRAY_LENGTH (buf) - 1, (unsigned int) (end - *pp)); + strncpy (buf, *pp, len); + buf[len] = '\0'; + + char *p = buf; + char *pend = p; + unsigned int v; + + /* Intentionally use strtol instead of strtoul, such that + * -1 turns into "big number"... */ + errno = 0; + v = strtol (p, &pend, 0); + if (errno || p == pend) + return false; + + *pv = v; + *pp += pend - p; + return true; +} + +static bool parse_float (const char **pp, const char *end, float *pv) { char buf[32]; @@ -679,7 +717,7 @@ parse_float (const char **pp, const char *end, float *pv) } static bool -parse_bool (const char **pp, const char *end, unsigned int *pv) +parse_bool (const char **pp, const char *end, uint32_t *pv) { parse_space (pp, end); @@ -778,7 +816,7 @@ static bool parse_feature_value_postfix (const char **pp, const char *end, hb_feature_t *feature) { bool had_equal = parse_char (pp, end, '='); - bool had_value = parse_uint (pp, end, &feature->value) || + bool had_value = parse_uint32 (pp, end, &feature->value) || parse_bool (pp, end, &feature->value); /* CSS doesn't use equal-sign between tag and value. * If there was an equal-sign, then there *must* be a value. diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc index 8f2483b0806..e237335e7d3 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc @@ -641,22 +641,23 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan, /* active_features.qsort (); */ for (unsigned int j = 0; j < active_features.len; j++) { - CFStringRef keys[2] = { + CFStringRef keys[] = { kCTFontFeatureTypeIdentifierKey, kCTFontFeatureSelectorIdentifierKey }; - CFNumberRef values[2] = { + CFNumberRef values[] = { CFNumberCreate (kCFAllocatorDefault, kCFNumberIntType, &active_features[j].rec.feature), CFNumberCreate (kCFAllocatorDefault, kCFNumberIntType, &active_features[j].rec.setting) }; + ASSERT_STATIC (ARRAY_LENGTH (keys) == ARRAY_LENGTH (values)); CFDictionaryRef dict = CFDictionaryCreate (kCFAllocatorDefault, (const void **) keys, (const void **) values, - 2, + ARRAY_LENGTH (keys), &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); - CFRelease (values[0]); - CFRelease (values[1]); + for (unsigned int i = 0; i < ARRAY_LENGTH (values); i++) + CFRelease (values[i]); CFArrayAppendValue (features_array, dict); CFRelease (dict); @@ -699,9 +700,6 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan, active_features.remove (feature - active_features.array); } } - - if (!range_records.len) /* No active feature found. */ - goto fail_features; } else { @@ -833,7 +831,7 @@ resize_and_retry: CFAttributedStringSetAttribute (attr_string, CFRangeMake (0, chars_len), kCTFontAttributeName, face_data->ct_font); - if (num_features) + if (num_features && range_records.len) { unsigned int start = 0; range_record_t *last_range = &range_records[0]; @@ -859,6 +857,30 @@ resize_and_retry: CFAttributedStringSetAttribute (attr_string, CFRangeMake (start, chars_len - start), kCTFontAttributeName, last_range->font); } + /* Enable/disable kern if requested. + * + * Note: once kern is disabled, reenabling it doesn't currently seem to work in CoreText. + */ + if (num_features) + { + unsigned int zeroint = 0; + CFNumberRef zero = CFNumberCreate (kCFAllocatorDefault, kCFNumberIntType, &zeroint); + for (unsigned int i = 0; i < num_features; i++) + { + const hb_feature_t &feature = features[i]; + if (feature.tag == HB_TAG('k','e','r','n') && + feature.start < chars_len && feature.start < feature.end) + { + CFRange feature_range = CFRangeMake (feature.start, + MIN (feature.end, chars_len) - feature.start); + if (feature.value) + CFAttributedStringRemoveAttribute (attr_string, feature_range, kCTKernAttributeName); + else + CFAttributedStringSetAttribute (attr_string, feature_range, kCTKernAttributeName, zero); + } + } + CFRelease (zero); + } int level = HB_DIRECTION_IS_FORWARD (buffer->props.direction) ? 0 : 1; CFNumberRef level_number = CFNumberCreate (kCFAllocatorDefault, kCFNumberIntType, &level); @@ -868,6 +890,7 @@ resize_and_retry: 1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); + CFRelease (level_number); if (unlikely (!options)) FAIL ("CFDictionaryCreate failed"); 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 009db20ae59..2ce29cdffbf 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 @@ -138,7 +138,7 @@ struct hb_ot_face_metrics_accelerator_t return this->default_advance; } - return this->table->longMetric[MIN (glyph, this->num_advances - 1)].advance + return this->table->longMetric[MIN (glyph, (uint32_t) this->num_advances - 1)].advance + this->var->get_advance_var (glyph, font->coords, font->num_coords); // TODO Optimize?! } }; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh index 921859a6603..2235d3a0ad7 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh @@ -319,7 +319,7 @@ struct hb_apply_context_t : if (!c->check_glyph_property (&info, lookup_props)) return SKIP_YES; - if (unlikely (_hb_glyph_info_is_default_ignorable_and_not_fvs (&info) && + if (unlikely (_hb_glyph_info_is_default_ignorable_and_not_hidden (&info) && (ignore_zwnj || !_hb_glyph_info_is_zwnj (&info)) && (ignore_zwj || !_hb_glyph_info_is_zwj (&info)))) return SKIP_MAYBE; @@ -346,9 +346,9 @@ struct hb_apply_context_t : matcher.set_match_func (NULL, NULL); matcher.set_lookup_props (c->lookup_props); /* Ignore ZWNJ if we are matching GSUB context, or matching GPOS. */ - matcher.set_ignore_zwnj (context_match || c->table_index == 1); + matcher.set_ignore_zwnj (c->table_index == 1 || (context_match && c->auto_zwnj)); /* Ignore ZWJ if we are matching GSUB context, or matching GPOS, or if asked to. */ - matcher.set_ignore_zwj (context_match || c->table_index == 1 || c->auto_zwj); + matcher.set_ignore_zwj (c->table_index == 1 || (context_match || c->auto_zwj)); matcher.set_mask (context_match ? -1 : c->lookup_mask); } inline void set_lookup_props (unsigned int lookup_props) @@ -457,45 +457,50 @@ struct hb_apply_context_t : return ret; } - unsigned int table_index; /* GSUB/GPOS */ + skipping_iterator_t iter_input, iter_context; + hb_font_t *font; hb_face_t *face; hb_buffer_t *buffer; - hb_direction_t direction; - hb_mask_t lookup_mask; - bool auto_zwj; recurse_func_t recurse_func; - unsigned int nesting_level_left; - unsigned int lookup_props; const GDEF &gdef; - bool has_glyph_classes; const VariationStore &var_store; - skipping_iterator_t iter_input, iter_context; + + hb_direction_t direction; + hb_mask_t lookup_mask; + unsigned int table_index; /* GSUB/GPOS */ unsigned int lookup_index; + unsigned int lookup_props; + unsigned int nesting_level_left; unsigned int debug_depth; + bool auto_zwnj; + bool auto_zwj; + bool has_glyph_classes; + hb_apply_context_t (unsigned int table_index_, hb_font_t *font_, hb_buffer_t *buffer_) : - table_index (table_index_), + iter_input (), iter_context (), font (font_), face (font->face), buffer (buffer_), - direction (buffer_->props.direction), - lookup_mask (1), - auto_zwj (true), recurse_func (NULL), - nesting_level_left (HB_MAX_NESTING_LEVEL), - lookup_props (0), gdef (*hb_ot_layout_from_face (face)->gdef), - has_glyph_classes (gdef.has_glyph_classes ()), var_store (gdef.get_var_store ()), - iter_input (), - iter_context (), + direction (buffer_->props.direction), + lookup_mask (1), + table_index (table_index_), lookup_index ((unsigned int) -1), - debug_depth (0) {} + lookup_props (0), + nesting_level_left (HB_MAX_NESTING_LEVEL), + debug_depth (0), + auto_zwnj (true), + auto_zwj (true), + has_glyph_classes (gdef.has_glyph_classes ()) {} inline void set_lookup_mask (hb_mask_t mask) { lookup_mask = mask; } inline void set_auto_zwj (bool auto_zwj_) { auto_zwj = auto_zwj_; } + inline void set_auto_zwnj (bool auto_zwnj_) { auto_zwnj = auto_zwnj_; } inline void set_recurse_func (recurse_func_t func) { recurse_func = func; } inline void set_lookup_index (unsigned int lookup_index_) { lookup_index = lookup_index_; } inline void set_lookup_props (unsigned int lookup_props_) diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-private.hh index 071a439d60c..b476339e1c0 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-private.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-private.hh @@ -240,7 +240,8 @@ _next_syllable (hb_buffer_t *buffer, unsigned int start) enum hb_unicode_props_flags_t { UPROPS_MASK_GEN_CAT = 0x001Fu, UPROPS_MASK_IGNORABLE = 0x0020u, - UPROPS_MASK_FVS = 0x0040u, /* MONGOLIAN FREE VARIATION SELECTOR 1..3 */ + UPROPS_MASK_HIDDEN = 0x0040u, /* MONGOLIAN FREE VARIATION SELECTOR 1..3, + * or TAG characters */ /* If GEN_CAT=FORMAT, top byte masks: */ UPROPS_MASK_Cf_ZWJ = 0x0100u, @@ -273,7 +274,11 @@ _hb_glyph_info_set_unicode_props (hb_glyph_info_t *info, hb_buffer_t *buffer) * Fixes: * https://github.com/behdad/harfbuzz/issues/234 */ - if (unlikely (hb_in_range (u, 0x180Bu, 0x180Du))) props |= UPROPS_MASK_FVS; + if (unlikely (hb_in_range (u, 0x180Bu, 0x180Du))) props |= UPROPS_MASK_HIDDEN; + /* TAG characters need similar treatment. Fixes: + * https://github.com/behdad/harfbuzz/issues/463 + */ + if (unlikely (hb_in_range (u, 0xE0020u, 0xE007Fu))) props |= UPROPS_MASK_HIDDEN; } else if (unlikely (HB_UNICODE_GENERAL_CATEGORY_IS_NON_ENCLOSING_MARK_OR_MODIFIER_SYMBOL (gen_cat))) { @@ -373,9 +378,9 @@ _hb_glyph_info_is_default_ignorable (const hb_glyph_info_t *info) !_hb_glyph_info_ligated (info); } static inline hb_bool_t -_hb_glyph_info_is_default_ignorable_and_not_fvs (const hb_glyph_info_t *info) +_hb_glyph_info_is_default_ignorable_and_not_hidden (const hb_glyph_info_t *info) { - return ((info->unicode_props() & (UPROPS_MASK_IGNORABLE|UPROPS_MASK_FVS)) + return ((info->unicode_props() & (UPROPS_MASK_IGNORABLE|UPROPS_MASK_HIDDEN)) == UPROPS_MASK_IGNORABLE) && !_hb_glyph_info_ligated (info); } 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 7f4e0184427..977e5830150 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 @@ -279,7 +279,7 @@ hb_ot_layout_get_ligature_carets (hb_font_t *font, hb_codepoint_t glyph, unsigned int start_offset, unsigned int *caret_count /* IN/OUT */, - int *caret_array /* OUT */) + hb_position_t *caret_array /* OUT */) { return _get_gdef (font->face).get_lig_carets (font, direction, glyph, start_offset, caret_count, caret_array); } @@ -1219,6 +1219,7 @@ inline void hb_ot_map_t::apply (const Proxy &proxy, c.set_lookup_index (lookup_index); c.set_lookup_mask (lookups[table_index][i].mask); c.set_auto_zwj (lookups[table_index][i].auto_zwj); + c.set_auto_zwnj (lookups[table_index][i].auto_zwnj); apply_string<Proxy> (&c, proxy.table.get_lookup (lookup_index), proxy.accels[lookup_index]); diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map-private.hh index b69e5344c14..6f774dde02f 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map-private.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map-private.hh @@ -50,6 +50,7 @@ struct hb_ot_map_t hb_mask_t mask; hb_mask_t _1_mask; /* mask for value=1, for quick access */ unsigned int needs_fallback : 1; + unsigned int auto_zwnj : 1; unsigned int auto_zwj : 1; static int cmp (const feature_map_t *a, const feature_map_t *b) @@ -58,6 +59,7 @@ struct hb_ot_map_t struct lookup_map_t { unsigned short index; + unsigned short auto_zwnj : 1; unsigned short auto_zwj : 1; hb_mask_t mask; @@ -150,8 +152,9 @@ enum hb_ot_map_feature_flags_t { F_NONE = 0x0000u, F_GLOBAL = 0x0001u, /* Feature applies to all characters; results in no mask allocated for it. */ F_HAS_FALLBACK = 0x0002u, /* Has fallback implementation, so include mask bit even if feature not found. */ - F_MANUAL_ZWJ = 0x0004u, /* Don't skip over ZWJ when matching. */ - F_GLOBAL_SEARCH = 0x0008u /* If feature not found in LangSys, look for it in global feature list and pick one. */ + F_MANUAL_ZWNJ = 0x0004u, /* Don't skip over ZWNJ when matching **context**. */ + F_MANUAL_ZWJ = 0x0008u, /* Don't skip over ZWJ when matching **input**. */ + F_GLOBAL_SEARCH = 0x0010u /* If feature not found in LangSys, look for it in global feature list and pick one. */ }; HB_MARK_AS_FLAG_T (hb_ot_map_feature_flags_t); /* Macro version for where const is desired. */ @@ -196,7 +199,8 @@ struct hb_ot_map_builder_t unsigned int feature_index, unsigned int variations_index, hb_mask_t mask, - bool auto_zwj); + bool auto_zwnj = true, + bool auto_zwj = true); struct feature_info_t { hb_tag_t tag; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map.cc index 9b331d5210f..014e4430a6c 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-map.cc @@ -85,6 +85,7 @@ hb_ot_map_builder_t::add_lookups (hb_ot_map_t &m, unsigned int feature_index, unsigned int variations_index, hb_mask_t mask, + bool auto_zwnj, bool auto_zwj) { unsigned int lookup_indices[32]; @@ -112,6 +113,7 @@ hb_ot_map_builder_t::add_lookups (hb_ot_map_t &m, return; lookup->mask = mask; lookup->index = lookup_indices[i]; + lookup->auto_zwnj = auto_zwnj; lookup->auto_zwj = auto_zwj; } @@ -243,6 +245,7 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m, map->index[1] = feature_index[1]; map->stage[0] = info->stage[0]; map->stage[1] = info->stage[1]; + map->auto_zwnj = !(info->flags & F_MANUAL_ZWNJ); map->auto_zwj = !(info->flags & F_MANUAL_ZWJ); if ((info->flags & F_GLOBAL) && info->max_value == 1) { /* Uses the global bit */ @@ -284,8 +287,7 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m, add_lookups (m, face, table_index, required_feature_index[table_index], variations_index, - 1 /* mask */, - true /* auto_zwj */); + 1 /* mask */); for (unsigned i = 0; i < m.features.len; i++) if (m.features[i].stage[table_index] == stage) @@ -293,6 +295,7 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m, m.features[i].index[table_index], variations_index, m.features[i].mask, + m.features[i].auto_zwnj, m.features[i].auto_zwj); /* Sort lookups and merge duplicates */ @@ -307,6 +310,7 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m, else { m.lookups[table_index][j].mask |= m.lookups[table_index][i].mask; + m.lookups[table_index][j].auto_zwnj &= m.lookups[table_index][i].auto_zwnj; m.lookups[table_index][j].auto_zwj &= m.lookups[table_index][i].auto_zwj; } m.lookups[table_index].shrink (j + 1); diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-table.hh index 736c7f76b36..228f3665901 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic-table.hh @@ -139,28 +139,28 @@ joining_type (hb_codepoint_t u) switch (u >> 12) { case 0x0u: - if (hb_in_range (u, 0x0600u, 0x08E2u)) return joining_table[u - 0x0600u + joining_offset_0x0600u]; + if (hb_in_range<hb_codepoint_t> (u, 0x0600u, 0x08E2u)) return joining_table[u - 0x0600u + joining_offset_0x0600u]; break; case 0x1u: - if (hb_in_range (u, 0x1806u, 0x18AAu)) return joining_table[u - 0x1806u + joining_offset_0x1806u]; + if (hb_in_range<hb_codepoint_t> (u, 0x1806u, 0x18AAu)) return joining_table[u - 0x1806u + joining_offset_0x1806u]; break; case 0x2u: - if (hb_in_range (u, 0x200Cu, 0x2069u)) return joining_table[u - 0x200Cu + joining_offset_0x200cu]; + if (hb_in_range<hb_codepoint_t> (u, 0x200Cu, 0x2069u)) return joining_table[u - 0x200Cu + joining_offset_0x200cu]; break; case 0xAu: - if (hb_in_range (u, 0xA840u, 0xA873u)) return joining_table[u - 0xA840u + joining_offset_0xa840u]; + if (hb_in_range<hb_codepoint_t> (u, 0xA840u, 0xA873u)) return joining_table[u - 0xA840u + joining_offset_0xa840u]; break; case 0x10u: - if (hb_in_range (u, 0x10AC0u, 0x10AEFu)) return joining_table[u - 0x10AC0u + joining_offset_0x10ac0u]; - if (hb_in_range (u, 0x10B80u, 0x10BAFu)) return joining_table[u - 0x10B80u + joining_offset_0x10b80u]; + if (hb_in_range<hb_codepoint_t> (u, 0x10AC0u, 0x10AEFu)) return joining_table[u - 0x10AC0u + joining_offset_0x10ac0u]; + if (hb_in_range<hb_codepoint_t> (u, 0x10B80u, 0x10BAFu)) return joining_table[u - 0x10B80u + joining_offset_0x10b80u]; break; case 0x1Eu: - if (hb_in_range (u, 0x1E900u, 0x1E943u)) return joining_table[u - 0x1E900u + joining_offset_0x1e900u]; + if (hb_in_range<hb_codepoint_t> (u, 0x1E900u, 0x1E943u)) return joining_table[u - 0x1E900u + joining_offset_0x1e900u]; break; default: diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic.cc index 57ffc1dc5fe..5dbbcd9af99 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-arabic.cc @@ -199,6 +199,9 @@ collect_features_arabic (hb_ot_shape_planner_t *plan) * work. However, testing shows that rlig and calt are applied * together for Mongolian in Uniscribe. As such, we only add a * pause for Arabic, not other scripts. + * + * A pause after calt is required to make KFGQPC Uthmanic Script HAFS + * work correctly. See https://github.com/behdad/harfbuzz/issues/505 */ map->add_gsub_pause (nuke_joiners); @@ -222,7 +225,10 @@ collect_features_arabic (hb_ot_shape_planner_t *plan) if (plan->props.script == HB_SCRIPT_ARABIC) map->add_gsub_pause (arabic_fallback_shape); + /* No pause after rclt. See 98460779bae19e4d64d29461ff154b3527bf8420. */ + map->add_global_bool_feature (HB_TAG('r','c','l','t')); map->add_global_bool_feature (HB_TAG('c','a','l','t')); + map->add_gsub_pause (NULL); /* The spec includes 'cswh'. Earlier versions of Windows * used to enable this by default, but testing suggests @@ -232,7 +238,6 @@ collect_features_arabic (hb_ot_shape_planner_t *plan) * Note that IranNastaliq uses this feature extensively * to fixup broken glyph sequences. Oh well... * Test case: U+0643,U+0640,U+0631. */ - //map->add_gsub_pause (NULL); //map->add_global_bool_feature (HB_TAG('c','s','w','h')); map->add_global_bool_feature (HB_TAG('m','s','e','t')); } @@ -345,7 +350,7 @@ mongolian_variation_selectors (hb_buffer_t *buffer) unsigned int count = buffer->len; hb_glyph_info_t *info = buffer->info; for (unsigned int i = 1; i < count; i++) - if (unlikely (hb_in_range (info[i].codepoint, 0x180Bu, 0x180Du))) + if (unlikely (hb_in_range<hb_codepoint_t> (info[i].codepoint, 0x180Bu, 0x180Du))) info[i].arabic_shaping_action() = info[i - 1].arabic_shaping_action(); } diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hangul.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hangul.cc index af50565225b..23e07e59f39 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hangul.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-hangul.cc @@ -105,16 +105,16 @@ data_destroy_hangul (void *data) #define NCount (VCount * TCount) #define SCount (LCount * NCount) -#define isCombiningL(u) (hb_in_range ((u), LBase, LBase+LCount-1)) -#define isCombiningV(u) (hb_in_range ((u), VBase, VBase+VCount-1)) -#define isCombiningT(u) (hb_in_range ((u), TBase+1, TBase+TCount-1)) -#define isCombinedS(u) (hb_in_range ((u), SBase, SBase+SCount-1)) +#define isCombiningL(u) (hb_in_range<hb_codepoint_t> ((u), LBase, LBase+LCount-1)) +#define isCombiningV(u) (hb_in_range<hb_codepoint_t> ((u), VBase, VBase+VCount-1)) +#define isCombiningT(u) (hb_in_range<hb_codepoint_t> ((u), TBase+1, TBase+TCount-1)) +#define isCombinedS(u) (hb_in_range<hb_codepoint_t> ((u), SBase, SBase+SCount-1)) -#define isL(u) (hb_in_ranges ((u), 0x1100u, 0x115Fu, 0xA960u, 0xA97Cu)) -#define isV(u) (hb_in_ranges ((u), 0x1160u, 0x11A7u, 0xD7B0u, 0xD7C6u)) -#define isT(u) (hb_in_ranges ((u), 0x11A8u, 0x11FFu, 0xD7CBu, 0xD7FBu)) +#define isL(u) (hb_in_ranges<hb_codepoint_t> ((u), 0x1100u, 0x115Fu, 0xA960u, 0xA97Cu)) +#define isV(u) (hb_in_ranges<hb_codepoint_t> ((u), 0x1160u, 0x11A7u, 0xD7B0u, 0xD7C6u)) +#define isT(u) (hb_in_ranges<hb_codepoint_t> ((u), 0x11A8u, 0x11FFu, 0xD7CBu, 0xD7FBu)) -#define isHangulTone(u) (hb_in_range ((u), 0x302Eu, 0x302Fu)) +#define isHangulTone(u) (hb_in_range<hb_codepoint_t> ((u), 0x302Eu, 0x302Fu)) /* buffer var allocations */ #define hangul_shaping_feature() complex_var_u8_0() /* hangul jamo shaping feature */ diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-private.hh index 5879c3e4914..58be4222465 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-private.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-private.hh @@ -132,7 +132,7 @@ enum indic_syllabic_category_t { INDIC_SYLLABIC_CATEGORY_NUMBER_JOINER = OT_PLACEHOLDER, /* Don't care. */ INDIC_SYLLABIC_CATEGORY_PURE_KILLER = OT_M, /* Is like a vowel matra. */ INDIC_SYLLABIC_CATEGORY_REGISTER_SHIFTER = OT_RS, - INDIC_SYLLABIC_CATEGORY_SYLLABLE_MODIFIER = OT_M, /* Misc Khmer signs. */ + INDIC_SYLLABIC_CATEGORY_SYLLABLE_MODIFIER = OT_SM, INDIC_SYLLABIC_CATEGORY_TONE_LETTER = OT_X, INDIC_SYLLABIC_CATEGORY_TONE_MARK = OT_N, INDIC_SYLLABIC_CATEGORY_VIRAMA = OT_H, diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-table.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-table.cc index e10a4d25f5f..3bf5285e6bb 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-table.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-indic-table.cc @@ -398,28 +398,28 @@ hb_indic_get_categories (hb_codepoint_t u) switch (u >> 12) { case 0x0u: - if (hb_in_range (u, 0x0028u, 0x003Fu)) return indic_table[u - 0x0028u + indic_offset_0x0028u]; - if (hb_in_range (u, 0x00B0u, 0x00D7u)) return indic_table[u - 0x00B0u + indic_offset_0x00b0u]; - if (hb_in_range (u, 0x0900u, 0x0DF7u)) return indic_table[u - 0x0900u + indic_offset_0x0900u]; + if (hb_in_range<hb_codepoint_t> (u, 0x0028u, 0x003Fu)) return indic_table[u - 0x0028u + indic_offset_0x0028u]; + if (hb_in_range<hb_codepoint_t> (u, 0x00B0u, 0x00D7u)) return indic_table[u - 0x00B0u + indic_offset_0x00b0u]; + if (hb_in_range<hb_codepoint_t> (u, 0x0900u, 0x0DF7u)) return indic_table[u - 0x0900u + indic_offset_0x0900u]; if (unlikely (u == 0x00A0u)) return _(CP,x); break; case 0x1u: - if (hb_in_range (u, 0x1000u, 0x109Fu)) return indic_table[u - 0x1000u + indic_offset_0x1000u]; - if (hb_in_range (u, 0x1780u, 0x17EFu)) return indic_table[u - 0x1780u + indic_offset_0x1780u]; - if (hb_in_range (u, 0x1CD0u, 0x1CFFu)) return indic_table[u - 0x1CD0u + indic_offset_0x1cd0u]; + if (hb_in_range<hb_codepoint_t> (u, 0x1000u, 0x109Fu)) return indic_table[u - 0x1000u + indic_offset_0x1000u]; + if (hb_in_range<hb_codepoint_t> (u, 0x1780u, 0x17EFu)) return indic_table[u - 0x1780u + indic_offset_0x1780u]; + if (hb_in_range<hb_codepoint_t> (u, 0x1CD0u, 0x1CFFu)) return indic_table[u - 0x1CD0u + indic_offset_0x1cd0u]; break; case 0x2u: - if (hb_in_range (u, 0x2008u, 0x2017u)) return indic_table[u - 0x2008u + indic_offset_0x2008u]; - if (hb_in_range (u, 0x2070u, 0x2087u)) return indic_table[u - 0x2070u + indic_offset_0x2070u]; + if (hb_in_range<hb_codepoint_t> (u, 0x2008u, 0x2017u)) return indic_table[u - 0x2008u + indic_offset_0x2008u]; + if (hb_in_range<hb_codepoint_t> (u, 0x2070u, 0x2087u)) return indic_table[u - 0x2070u + indic_offset_0x2070u]; if (unlikely (u == 0x25CCu)) return _(CP,x); break; case 0xAu: - if (hb_in_range (u, 0xA8E0u, 0xA8F7u)) return indic_table[u - 0xA8E0u + indic_offset_0xa8e0u]; - if (hb_in_range (u, 0xA9E0u, 0xA9FFu)) return indic_table[u - 0xA9E0u + indic_offset_0xa9e0u]; - if (hb_in_range (u, 0xAA60u, 0xAA7Fu)) return indic_table[u - 0xAA60u + indic_offset_0xaa60u]; + if (hb_in_range<hb_codepoint_t> (u, 0xA8E0u, 0xA8F7u)) return indic_table[u - 0xA8E0u + indic_offset_0xa8e0u]; + if (hb_in_range<hb_codepoint_t> (u, 0xA9E0u, 0xA9FFu)) return indic_table[u - 0xA9E0u + indic_offset_0xa9e0u]; + if (hb_in_range<hb_codepoint_t> (u, 0xAA60u, 0xAA7Fu)) return indic_table[u - 0xAA60u + indic_offset_0xaa60u]; break; case 0x11u: 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 ec12ce69e0b..0232b3057a2 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 @@ -177,15 +177,15 @@ set_indic_properties (hb_glyph_info_t &info) */ /* The following act more like the Bindus. */ - if (unlikely (hb_in_range (u, 0x0953u, 0x0954u))) + if (unlikely (hb_in_range<hb_codepoint_t> (u, 0x0953u, 0x0954u))) cat = OT_SM; /* The following act like consonants. */ - else if (unlikely (hb_in_ranges (u, 0x0A72u, 0x0A73u, + else if (unlikely (hb_in_ranges<hb_codepoint_t> (u, 0x0A72u, 0x0A73u, 0x1CF5u, 0x1CF6u))) cat = OT_C; /* TODO: The following should only be allowed after a Visarga. * For now, just treat them like regular tone marks. */ - else if (unlikely (hb_in_range (u, 0x1CE2u, 0x1CE8u))) + else if (unlikely (hb_in_range<hb_codepoint_t> (u, 0x1CE2u, 0x1CE8u))) cat = OT_A; /* TODO: The following should only be allowed after some of * the nasalization marks, maybe only for U+1CE9..U+1CF1. @@ -193,15 +193,24 @@ set_indic_properties (hb_glyph_info_t &info) else if (unlikely (u == 0x1CEDu)) cat = OT_A; /* The following take marks in standalone clusters, similar to Avagraha. */ - else if (unlikely (hb_in_ranges (u, 0xA8F2u, 0xA8F7u, + else if (unlikely (hb_in_ranges<hb_codepoint_t> (u, 0xA8F2u, 0xA8F7u, 0x1CE9u, 0x1CECu, 0x1CEEu, 0x1CF1u))) { cat = OT_Symbol; ASSERT_STATIC ((int) INDIC_SYLLABIC_CATEGORY_AVAGRAHA == OT_Symbol); } + else if (unlikely (hb_in_range (u, 0x17CDu, 0x17D1u) || + u == 0x17CBu || u == 0x17D3u || u == 0x17DDu)) /* Khmer Various signs */ + { + /* These can occur mid-syllable (eg. before matras), even though Unicode marks them as Syllable_Modifier. + * https://github.com/roozbehp/unicode-data/issues/5 */ + cat = OT_M; + pos = POS_ABOVE_C; + } + else if (unlikely (u == 0x17C6u)) cat = OT_N; /* Khmer Bindu doesn't like to be repositioned. */ - else if (unlikely (hb_in_range (u, 0x2010u, 0x2011u))) + else if (unlikely (hb_in_range<hb_codepoint_t> (u, 0x2010u, 0x2011u))) cat = OT_PLACEHOLDER; else if (unlikely (u == 0x25CCu)) cat = OT_DOTTEDCIRCLE; @@ -411,12 +420,12 @@ collect_features_indic (hb_ot_shape_planner_t *plan) unsigned int i = 0; map->add_gsub_pause (initial_reordering); for (; i < INDIC_BASIC_FEATURES; i++) { - map->add_feature (indic_features[i].tag, 1, indic_features[i].flags | F_MANUAL_ZWJ); + map->add_feature (indic_features[i].tag, 1, indic_features[i].flags | F_MANUAL_ZWJ | F_MANUAL_ZWNJ); map->add_gsub_pause (NULL); } map->add_gsub_pause (final_reordering); for (; i < INDIC_NUM_FEATURES; i++) { - map->add_feature (indic_features[i].tag, 1, indic_features[i].flags | F_MANUAL_ZWJ); + map->add_feature (indic_features[i].tag, 1, indic_features[i].flags | F_MANUAL_ZWJ | F_MANUAL_ZWNJ); } map->add_global_bool_feature (HB_TAG('c','a','l','t')); @@ -1738,7 +1747,7 @@ decompose_indic (const hb_ot_shape_normalize_context_t *c, #endif } - if ((ab == 0x0DDAu || hb_in_range (ab, 0x0DDCu, 0x0DDEu))) + if ((ab == 0x0DDAu || hb_in_range<hb_codepoint_t> (ab, 0x0DDCu, 0x0DDEu))) { /* * Sinhala split matras... Let the fun begin. 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 bb68622e2a7..4e912c361fc 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 @@ -175,7 +175,7 @@ set_myanmar_properties (hb_glyph_info_t &info) /* Myanmar * http://www.microsoft.com/typography/OpenTypeDev/myanmar/intro.htm#analyze */ - if (unlikely (hb_in_range (u, 0xFE00u, 0xFE0Fu))) + if (unlikely (hb_in_range<hb_codepoint_t> (u, 0xFE00u, 0xFE0Fu))) cat = (indic_category_t) OT_VS; switch (u) diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-thai.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-thai.cc index e6f80f59e7f..e75b3537927 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-thai.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape-complex-thai.cc @@ -52,7 +52,7 @@ get_consonant_type (hb_codepoint_t u) return RC; if (u == 0x0E0Eu || u == 0x0E0Fu) return DC; - if (hb_in_range (u, 0x0E01u, 0x0E2Eu)) + if (hb_in_range<hb_codepoint_t> (u, 0x0E01u, 0x0E2Eu)) return NC; return NOT_CONSONANT; } @@ -70,12 +70,12 @@ enum thai_mark_type_t static thai_mark_type_t get_mark_type (hb_codepoint_t u) { - if (u == 0x0E31u || hb_in_range (u, 0x0E34u, 0x0E37u) || - u == 0x0E47u || hb_in_range (u, 0x0E4Du, 0x0E4Eu)) + if (u == 0x0E31u || hb_in_range<hb_codepoint_t> (u, 0x0E34u, 0x0E37u) || + u == 0x0E47u || hb_in_range<hb_codepoint_t> (u, 0x0E4Du, 0x0E4Eu)) return AV; - if (hb_in_range (u, 0x0E38u, 0x0E3Au)) + if (hb_in_range<hb_codepoint_t> (u, 0x0E38u, 0x0E3Au)) return BV; - if (hb_in_range (u, 0x0E48u, 0x0E4Cu)) + if (hb_in_range<hb_codepoint_t> (u, 0x0E48u, 0x0E4Cu)) return T; return NOT_MARK; } @@ -310,7 +310,7 @@ preprocess_text_thai (const hb_ot_shape_plan_t *plan, #define IS_SARA_AM(x) (((x) & ~0x0080u) == 0x0E33u) #define NIKHAHIT_FROM_SARA_AM(x) ((x) - 0x0E33u + 0x0E4Du) #define SARA_AA_FROM_SARA_AM(x) ((x) - 1) -#define IS_TONE_MARK(x) (hb_in_ranges ((x) & ~0x0080u, 0x0E34u, 0x0E37u, 0x0E47u, 0x0E4Eu, 0x0E31u, 0x0E31u)) +#define IS_TONE_MARK(x) (hb_in_ranges<hb_codepoint_t> ((x) & ~0x0080u, 0x0E34u, 0x0E37u, 0x0E47u, 0x0E4Eu, 0x0E31u, 0x0E31u)) buffer->clear_output (); unsigned int count = buffer->len; 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 44e5d0d56b2..1847c48afd9 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 @@ -38,31 +38,31 @@ static const unsigned char _use_syllable_machine_trans_keys[] = { 1u, 1u, 0u, 39u, 21u, 21u, 8u, 39u, 8u, 39u, 1u, 1u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 26u, 8u, 26u, 8u, 26u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, - 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 13u, 21u, - 4u, 4u, 13u, 13u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 26u, 8u, 26u, - 8u, 26u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, - 8u, 39u, 8u, 39u, 8u, 39u, 1u, 1u, 1u, 39u, 8u, 39u, 21u, 42u, 41u, 42u, - 42u, 42u, 0 + 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, + 13u, 21u, 4u, 4u, 13u, 13u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 26u, + 8u, 26u, 8u, 26u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, + 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 8u, 39u, 1u, 1u, 1u, 39u, 8u, 39u, + 21u, 42u, 41u, 42u, 42u, 42u, 0 }; static const char _use_syllable_machine_key_spans[] = { 1, 40, 1, 32, 32, 1, 32, 32, 32, 19, 19, 19, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 9, - 1, 1, 32, 32, 32, 32, 19, 19, - 19, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 1, 39, 32, 22, 2, - 1 + 32, 32, 32, 32, 32, 32, 32, 32, + 9, 1, 1, 32, 32, 32, 32, 19, + 19, 19, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 1, 39, 32, + 22, 2, 1 }; static const short _use_syllable_machine_index_offsets[] = { 0, 2, 43, 45, 78, 111, 113, 146, 179, 212, 232, 252, 272, 305, 338, 371, 404, 437, 470, 503, 536, 569, 602, 635, - 645, 647, 649, 682, 715, 748, 781, 801, - 821, 841, 874, 907, 940, 973, 1006, 1039, - 1072, 1105, 1138, 1171, 1173, 1213, 1246, 1269, - 1272 + 668, 678, 680, 682, 715, 748, 781, 814, + 834, 854, 874, 907, 940, 973, 1006, 1039, + 1072, 1105, 1138, 1171, 1204, 1237, 1239, 1279, + 1312, 1335, 1338 }; static const char _use_syllable_machine_indicies[] = { @@ -131,112 +131,120 @@ static const char _use_syllable_machine_indicies[] = { 43, 44, 28, 45, 46, 47, 28, 29, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 33, 34, 35, - 36, 37, 28, 28, 33, 28, 28, 28, + 36, 37, 28, 50, 33, 28, 28, 28, 42, 43, 44, 28, 45, 46, 47, 28, 29, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 33, 34, - 35, 36, 37, 38, 39, 33, 28, 28, + 35, 36, 37, 28, 28, 33, 28, 28, 28, 42, 43, 44, 28, 45, 46, 47, - 28, 29, 28, 28, 30, 31, 28, 28, + 28, 29, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 33, - 34, 35, 36, 37, 38, 39, 33, 40, - 28, 41, 42, 43, 44, 28, 45, 46, + 34, 35, 36, 37, 38, 39, 33, 28, + 28, 28, 42, 43, 44, 28, 45, 46, 47, 28, 29, 28, 28, 30, 31, 28, 28, 28, 28, 28, 28, 28, 28, 28, 33, 34, 35, 36, 37, 38, 39, 33, - 40, 32, 41, 42, 43, 44, 28, 45, - 46, 47, 28, 51, 50, 50, 50, 50, - 50, 50, 50, 52, 50, 5, 53, 51, - 50, 6, 54, 54, 1, 55, 54, 54, - 54, 54, 54, 54, 54, 54, 56, 10, - 11, 12, 13, 14, 15, 16, 10, 17, - 19, 19, 20, 21, 22, 54, 23, 24, - 25, 54, 6, 54, 54, 1, 55, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 10, 11, 12, 13, 14, 15, 16, 10, - 17, 19, 19, 20, 21, 22, 54, 23, - 24, 25, 54, 6, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 10, 11, 12, 13, 14, 54, 54, - 54, 54, 54, 54, 20, 21, 22, 54, - 23, 24, 25, 54, 6, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 11, 12, 13, 14, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 23, 24, 25, 54, 6, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 12, 13, 14, - 54, 6, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 13, 14, 54, 6, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 14, - 54, 6, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 12, 13, 14, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 23, 24, - 25, 54, 6, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 12, 13, 14, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 24, 25, 54, 6, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 12, 13, 14, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 25, 54, 6, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 11, 12, 13, 14, 54, - 54, 54, 54, 54, 54, 20, 21, 22, - 54, 23, 24, 25, 54, 6, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 11, 12, 13, 14, - 54, 54, 54, 54, 54, 54, 54, 21, - 22, 54, 23, 24, 25, 54, 6, 54, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 11, 12, 13, - 14, 54, 54, 54, 54, 54, 54, 54, - 54, 22, 54, 23, 24, 25, 54, 6, - 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 10, 11, 12, - 13, 14, 54, 16, 10, 54, 54, 54, - 20, 21, 22, 54, 23, 24, 25, 54, - 6, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 10, 11, - 12, 13, 14, 54, 54, 10, 54, 54, - 54, 20, 21, 22, 54, 23, 24, 25, - 54, 6, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 10, - 11, 12, 13, 14, 15, 16, 10, 54, - 54, 54, 20, 21, 22, 54, 23, 24, - 25, 54, 6, 54, 54, 1, 55, 54, - 54, 54, 54, 54, 54, 54, 54, 54, + 40, 28, 41, 42, 43, 44, 28, 45, + 46, 47, 28, 29, 28, 28, 30, 31, + 28, 28, 28, 28, 28, 28, 28, 28, + 28, 33, 34, 35, 36, 37, 38, 39, + 33, 40, 32, 41, 42, 43, 44, 28, + 45, 46, 47, 28, 52, 51, 51, 51, + 51, 51, 51, 51, 53, 51, 5, 54, + 52, 51, 6, 55, 55, 1, 56, 55, + 55, 55, 55, 55, 55, 55, 55, 57, 10, 11, 12, 13, 14, 15, 16, 10, - 17, 54, 19, 20, 21, 22, 54, 23, - 24, 25, 54, 1, 57, 3, 54, 54, - 54, 3, 54, 54, 6, 54, 54, 1, - 55, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 10, 11, 12, 13, 14, 15, - 16, 10, 17, 18, 19, 20, 21, 22, - 54, 23, 24, 25, 54, 6, 54, 54, - 1, 55, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 10, 11, 12, 13, 14, - 15, 16, 10, 17, 18, 19, 20, 21, - 22, 54, 23, 24, 25, 54, 59, 58, - 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 59, 60, 58, 59, 60, 58, - 60, 58, 0 + 17, 19, 19, 20, 21, 22, 55, 23, + 24, 25, 55, 6, 55, 55, 1, 56, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 10, 11, 12, 13, 14, 15, 16, + 10, 17, 19, 19, 20, 21, 22, 55, + 23, 24, 25, 55, 6, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 10, 11, 12, 13, 14, 55, + 55, 55, 55, 55, 55, 20, 21, 22, + 55, 23, 24, 25, 55, 6, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 11, 12, 13, 14, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 23, 24, 25, 55, 6, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 12, 13, + 14, 55, 6, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 13, 14, 55, 6, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 14, 55, 6, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 12, 13, 14, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 23, + 24, 25, 55, 6, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 12, 13, 14, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 24, 25, 55, 6, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 12, 13, 14, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 25, 55, 6, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 11, 12, 13, 14, + 55, 55, 55, 55, 55, 55, 20, 21, + 22, 55, 23, 24, 25, 55, 6, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 11, 12, 13, + 14, 55, 55, 55, 55, 55, 55, 55, + 21, 22, 55, 23, 24, 25, 55, 6, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 11, 12, + 13, 14, 55, 55, 55, 55, 55, 55, + 55, 55, 22, 55, 23, 24, 25, 55, + 6, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 10, 11, + 12, 13, 14, 55, 16, 10, 55, 55, + 55, 20, 21, 22, 55, 23, 24, 25, + 55, 6, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 10, + 11, 12, 13, 14, 55, 58, 10, 55, + 55, 55, 20, 21, 22, 55, 23, 24, + 25, 55, 6, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 10, 11, 12, 13, 14, 55, 55, 10, + 55, 55, 55, 20, 21, 22, 55, 23, + 24, 25, 55, 6, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 10, 11, 12, 13, 14, 15, 16, + 10, 55, 55, 55, 20, 21, 22, 55, + 23, 24, 25, 55, 6, 55, 55, 1, + 56, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 10, 11, 12, 13, 14, 15, + 16, 10, 17, 55, 19, 20, 21, 22, + 55, 23, 24, 25, 55, 1, 59, 3, + 55, 55, 55, 3, 55, 55, 6, 55, + 55, 1, 56, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 10, 11, 12, 13, + 14, 15, 16, 10, 17, 18, 19, 20, + 21, 22, 55, 23, 24, 25, 55, 6, + 55, 55, 1, 56, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 10, 11, 12, + 13, 14, 15, 16, 10, 17, 18, 19, + 20, 21, 22, 55, 23, 24, 25, 55, + 61, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 61, 62, 60, 61, + 62, 60, 62, 60, 0 }; static const char _use_syllable_machine_trans_targs[] = { - 1, 26, 2, 3, 1, 23, 1, 43, - 44, 46, 28, 29, 30, 31, 32, 39, - 40, 41, 45, 42, 36, 37, 38, 33, - 34, 35, 1, 1, 1, 1, 4, 5, - 22, 7, 8, 9, 10, 11, 18, 19, - 20, 21, 15, 16, 17, 12, 13, 14, - 6, 1, 1, 24, 25, 1, 1, 0, - 27, 1, 1, 47, 48 + 1, 27, 2, 3, 1, 24, 1, 45, + 46, 48, 29, 30, 31, 32, 33, 40, + 41, 43, 47, 44, 37, 38, 39, 34, + 35, 36, 1, 1, 1, 1, 4, 5, + 23, 7, 8, 9, 10, 11, 18, 19, + 21, 22, 15, 16, 17, 12, 13, 14, + 6, 1, 20, 1, 25, 26, 1, 1, + 0, 28, 42, 1, 1, 49, 50 }; static const char _use_syllable_machine_trans_actions[] = { @@ -246,8 +254,8 @@ static const char _use_syllable_machine_trans_actions[] = { 0, 0, 7, 8, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 11, 12, 0, 0, 13, 14, 0, - 2, 15, 16, 0, 0 + 0, 11, 0, 12, 0, 0, 13, 14, + 0, 2, 0, 15, 16, 0, 0 }; static const char _use_syllable_machine_to_state_actions[] = { @@ -257,7 +265,7 @@ static const char _use_syllable_machine_to_state_actions[] = { 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[] = { @@ -267,17 +275,17 @@ static const char _use_syllable_machine_from_state_actions[] = { 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, 0, 27, 29, 29, 50, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 51, - 54, 51, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 58, 55, 55, 59, 59, - 59 + 29, 29, 29, 29, 29, 29, 29, 29, + 52, 55, 52, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 60, 56, 56, + 61, 61, 61 }; static const int use_syllable_machine_start = 1; @@ -291,7 +299,7 @@ static const int use_syllable_machine_en_main = 1; -#line 138 "hb-ot-shape-complex-use-machine.rl" +#line 139 "hb-ot-shape-complex-use-machine.rl" #define found_syllable(syllable_type) \ @@ -311,7 +319,7 @@ find_syllables (hb_buffer_t *buffer) int cs; hb_glyph_info_t *info = buffer->info; -#line 315 "hb-ot-shape-complex-use-machine.hh" +#line 323 "hb-ot-shape-complex-use-machine.hh" { cs = use_syllable_machine_start; ts = 0; @@ -319,7 +327,7 @@ find_syllables (hb_buffer_t *buffer) act = 0; } -#line 159 "hb-ot-shape-complex-use-machine.rl" +#line 160 "hb-ot-shape-complex-use-machine.rl" p = 0; @@ -328,7 +336,7 @@ find_syllables (hb_buffer_t *buffer) unsigned int last = 0; unsigned int syllable_serial = 1; -#line 332 "hb-ot-shape-complex-use-machine.hh" +#line 340 "hb-ot-shape-complex-use-machine.hh" { int _slen; int _trans; @@ -342,7 +350,7 @@ _resume: #line 1 "NONE" {ts = p;} break; -#line 346 "hb-ot-shape-complex-use-machine.hh" +#line 354 "hb-ot-shape-complex-use-machine.hh" } _keys = _use_syllable_machine_trans_keys + (cs<<1); @@ -365,58 +373,58 @@ _eof_trans: {te = p+1;} break; case 8: -#line 127 "hb-ot-shape-complex-use-machine.rl" +#line 128 "hb-ot-shape-complex-use-machine.rl" {te = p+1;{ found_syllable (independent_cluster); }} break; case 10: -#line 129 "hb-ot-shape-complex-use-machine.rl" +#line 130 "hb-ot-shape-complex-use-machine.rl" {te = p+1;{ found_syllable (standard_cluster); }} break; case 6: -#line 133 "hb-ot-shape-complex-use-machine.rl" +#line 134 "hb-ot-shape-complex-use-machine.rl" {te = p+1;{ found_syllable (broken_cluster); }} break; case 5: -#line 134 "hb-ot-shape-complex-use-machine.rl" +#line 135 "hb-ot-shape-complex-use-machine.rl" {te = p+1;{ found_syllable (non_cluster); }} break; case 7: -#line 127 "hb-ot-shape-complex-use-machine.rl" +#line 128 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (independent_cluster); }} break; case 11: -#line 128 "hb-ot-shape-complex-use-machine.rl" +#line 129 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (virama_terminated_cluster); }} break; case 9: -#line 129 "hb-ot-shape-complex-use-machine.rl" +#line 130 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (standard_cluster); }} break; case 13: -#line 130 "hb-ot-shape-complex-use-machine.rl" +#line 131 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (number_joiner_terminated_cluster); }} break; case 12: -#line 131 "hb-ot-shape-complex-use-machine.rl" +#line 132 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (numeral_cluster); }} break; case 16: -#line 132 "hb-ot-shape-complex-use-machine.rl" +#line 133 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (symbol_cluster); }} break; case 14: -#line 133 "hb-ot-shape-complex-use-machine.rl" +#line 134 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (broken_cluster); }} break; case 15: -#line 134 "hb-ot-shape-complex-use-machine.rl" +#line 135 "hb-ot-shape-complex-use-machine.rl" {te = p;p--;{ found_syllable (non_cluster); }} break; case 1: -#line 133 "hb-ot-shape-complex-use-machine.rl" +#line 134 "hb-ot-shape-complex-use-machine.rl" {{p = ((te))-1;}{ found_syllable (broken_cluster); }} break; -#line 420 "hb-ot-shape-complex-use-machine.hh" +#line 428 "hb-ot-shape-complex-use-machine.hh" } _again: @@ -425,7 +433,7 @@ _again: #line 1 "NONE" {ts = 0;} break; -#line 429 "hb-ot-shape-complex-use-machine.hh" +#line 437 "hb-ot-shape-complex-use-machine.hh" } if ( ++p != pe ) @@ -441,7 +449,7 @@ _again: } -#line 168 "hb-ot-shape-complex-use-machine.rl" +#line 169 "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 f6b814b1df0..2a7f75115e1 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 @@ -89,7 +89,8 @@ SMBlw = 42; # SYM_MOD_BELOW consonant_modifiers = CMAbv* CMBlw* ((H B | SUB) VS? CMAbv? CMBlw*)*; -medial_consonants = MPre? MAbv? MBlw? MPst?; +# Override: Allow two MBlw. https://github.com/behdad/harfbuzz/issues/376 +medial_consonants = MPre? MAbv? MBlw?.MBlw? MPst?; dependent_vowels = VPre* VAbv* VBlw* VPst*; vowel_modifiers = VMPre* VMAbv* VMBlw* VMPst*; final_consonants = FAbv* FBlw* FPst* FM?; 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 38c46d002d1..941a003aaf5 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 @@ -9,7 +9,7 @@ * # IndicSyllabicCategory-9.0.0.txt * # Date: 2016-05-21, 02:46:00 GMT [RP] * # IndicPositionalCategory-9.0.0.txt - * # Date: 2016-02-25, 00:48:00 GMT [RP] + * # Date: 2016-06-09, 19:33:00 GMT [RP] * # Blocks-9.0.0.txt * # Date: 2016-02-05, 23:48:00 GMT [KW] * UnicodeData.txt does not have a header. @@ -410,7 +410,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, VAbv, VAbv, VAbv, VAbv, VBlw, VAbv, VPre, + /* 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, /* 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, @@ -644,47 +644,47 @@ hb_use_get_categories (hb_codepoint_t u) switch (u >> 12) { case 0x0u: - if (hb_in_range (u, 0x0028u, 0x003Fu)) return use_table[u - 0x0028u + use_offset_0x0028u]; - if (hb_in_range (u, 0x00A0u, 0x00D7u)) return use_table[u - 0x00A0u + use_offset_0x00a0u]; - if (hb_in_range (u, 0x0900u, 0x0DF7u)) return use_table[u - 0x0900u + use_offset_0x0900u]; + 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, 0x0900u, 0x0DF7u)) return use_table[u - 0x0900u + use_offset_0x0900u]; if (unlikely (u == 0x034Fu)) return CGJ; break; case 0x1u: - if (hb_in_range (u, 0x1000u, 0x109Fu)) return use_table[u - 0x1000u + use_offset_0x1000u]; - if (hb_in_range (u, 0x1700u, 0x17EFu)) return use_table[u - 0x1700u + use_offset_0x1700u]; - if (hb_in_range (u, 0x1900u, 0x1A9Fu)) return use_table[u - 0x1900u + use_offset_0x1900u]; - if (hb_in_range (u, 0x1B00u, 0x1C4Fu)) return use_table[u - 0x1B00u + use_offset_0x1b00u]; - if (hb_in_range (u, 0x1CD0u, 0x1CFFu)) return use_table[u - 0x1CD0u + use_offset_0x1cd0u]; - if (hb_in_range (u, 0x1DF8u, 0x1DFFu)) return use_table[u - 0x1DF8u + use_offset_0x1df8u]; + 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, 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]; + if (hb_in_range<hb_codepoint_t> (u, 0x1DF8u, 0x1DFFu)) return use_table[u - 0x1DF8u + use_offset_0x1df8u]; break; case 0x2u: - if (hb_in_range (u, 0x2008u, 0x2017u)) return use_table[u - 0x2008u + use_offset_0x2008u]; - if (hb_in_range (u, 0x2060u, 0x2087u)) return use_table[u - 0x2060u + use_offset_0x2060u]; + 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 (unlikely (u == 0x25CCu)) return GB; break; case 0xAu: - if (hb_in_range (u, 0xA800u, 0xAAF7u)) return use_table[u - 0xA800u + use_offset_0xa800u]; - if (hb_in_range (u, 0xABC0u, 0xABFFu)) return use_table[u - 0xABC0u + use_offset_0xabc0u]; + if (hb_in_range<hb_codepoint_t> (u, 0xA800u, 0xAAF7u)) return use_table[u - 0xA800u + use_offset_0xa800u]; + 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 (u, 0xFE00u, 0xFE0Fu)) return use_table[u - 0xFE00u + use_offset_0xfe00u]; + 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 (u, 0x10A00u, 0x10A47u)) return use_table[u - 0x10A00u + use_offset_0x10a00u]; + if (hb_in_range<hb_codepoint_t> (u, 0x10A00u, 0x10A47u)) return use_table[u - 0x10A00u + use_offset_0x10a00u]; break; case 0x11u: - if (hb_in_range (u, 0x11000u, 0x110BFu)) return use_table[u - 0x11000u + use_offset_0x11000u]; - if (hb_in_range (u, 0x11100u, 0x1123Fu)) return use_table[u - 0x11100u + use_offset_0x11100u]; - if (hb_in_range (u, 0x11280u, 0x11377u)) return use_table[u - 0x11280u + use_offset_0x11280u]; - if (hb_in_range (u, 0x11400u, 0x114DFu)) return use_table[u - 0x11400u + use_offset_0x11400u]; - if (hb_in_range (u, 0x11580u, 0x1173Fu)) return use_table[u - 0x11580u + use_offset_0x11580u]; - if (hb_in_range (u, 0x11C00u, 0x11CB7u)) return use_table[u - 0x11C00u + use_offset_0x11c00u]; + 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, 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]; + if (hb_in_range<hb_codepoint_t> (u, 0x11580u, 0x1173Fu)) return use_table[u - 0x11580u + use_offset_0x11580u]; + if (hb_in_range<hb_codepoint_t> (u, 0x11C00u, 0x11CB7u)) return use_table[u - 0x11C00u + use_offset_0x11c00u]; if (unlikely (u == 0x1107Fu)) return HN; break; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh index 666af6260b4..b5dccc556b4 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh @@ -74,10 +74,9 @@ extern "C" void hb_free_impl(void *ptr); /* Compiler attributes */ -#if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__) -#define _HB_BOOLEAN_EXPR(expr) ((expr) ? 1 : 0) -#define likely(expr) (__builtin_expect (_HB_BOOLEAN_EXPR(expr), 1)) -#define unlikely(expr) (__builtin_expect (_HB_BOOLEAN_EXPR(expr), 0)) +#if (defined(__GNUC__) || defined(__clang__)) && defined(__OPTIMIZE__) +#define likely(expr) (__builtin_expect (!!(expr), 1)) +#define unlikely(expr) (__builtin_expect (!!(expr), 0)) #else #define likely(expr) (expr) #define unlikely(expr) (expr) @@ -168,7 +167,6 @@ extern "C" void hb_free_impl(void *ptr); # if defined(_WIN32_WCE) /* Some things not defined on Windows CE. */ -# define strdup _strdup # define vsnprintf _vsnprintf # define getenv(Name) NULL # if _WIN32_WCE < 0x800 @@ -180,9 +178,6 @@ static int errno = 0; /* Use something better? */ # endif # if defined(_MSC_VER) && _MSC_VER < 1900 # define snprintf _snprintf -# elif defined(_MSC_VER) && _MSC_VER >= 1900 -# /* Covers VC++ Error for strdup being a deprecated POSIX name and to instead use _strdup instead */ -# define strdup _strdup # endif #endif diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode-private.hh index a4d118b6dc9..aa86a72c437 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode-private.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode-private.hh @@ -126,7 +126,7 @@ HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE { /* U+180B..180D MONGOLIAN FREE VARIATION SELECTORs are handled in the * Arabic shaper. No need to match them here. */ - return unlikely (hb_in_ranges (unicode, + return unlikely (hb_in_ranges<hb_codepoint_t> (unicode, 0xFE00u, 0xFE0Fu, /* VARIATION SELECTOR-1..16 */ 0xE0100u, 0xE01EFu)); /* VARIATION SELECTOR-17..256 */ } @@ -179,13 +179,13 @@ HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE case 0x00: return unlikely (ch == 0x00ADu); case 0x03: return unlikely (ch == 0x034Fu); case 0x06: return unlikely (ch == 0x061Cu); - case 0x17: return hb_in_range (ch, 0x17B4u, 0x17B5u); - case 0x18: return hb_in_range (ch, 0x180Bu, 0x180Eu); - case 0x20: return hb_in_ranges (ch, 0x200Bu, 0x200Fu, + case 0x17: return hb_in_range<hb_codepoint_t> (ch, 0x17B4u, 0x17B5u); + case 0x18: return hb_in_range<hb_codepoint_t> (ch, 0x180Bu, 0x180Eu); + case 0x20: return hb_in_ranges<hb_codepoint_t> (ch, 0x200Bu, 0x200Fu, 0x202Au, 0x202Eu, 0x2060u, 0x206Fu); - case 0xFE: return hb_in_range (ch, 0xFE00u, 0xFE0Fu) || ch == 0xFEFFu; - case 0xFF: return hb_in_range (ch, 0xFFF0u, 0xFFF8u); + case 0xFE: return hb_in_range<hb_codepoint_t> (ch, 0xFE00u, 0xFE0Fu) || ch == 0xFEFFu; + case 0xFF: return hb_in_range<hb_codepoint_t> (ch, 0xFFF0u, 0xFFF8u); default: return false; } } @@ -193,9 +193,9 @@ HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE { /* Other planes */ switch (plane) { - case 0x01: return hb_in_ranges (ch, 0x1BCA0u, 0x1BCA3u, + case 0x01: return hb_in_ranges<hb_codepoint_t> (ch, 0x1BCA0u, 0x1BCA3u, 0x1D173u, 0x1D17Au); - case 0x0E: return hb_in_range (ch, 0xE0000u, 0xE0FFFu); + case 0x0E: return hb_in_range<hb_codepoint_t> (ch, 0xE0000u, 0xE0FFFu); default: return false; } } @@ -346,12 +346,13 @@ extern HB_INTERNAL const hb_unicode_funcs_t _hb_unicode_funcs_nil; #define HB_MODIFIED_COMBINING_CLASS_CCC122 122 /* mai * */ /* Tibetan - * Modify U+0F74 (ccc=132) to reorder before ccc=130 marks. + * + * In case of multiple vowel-signs, use u first (but after achung) + * this allows Dzongkha multi-vowel shortcuts to render correctly */ #define HB_MODIFIED_COMBINING_CLASS_CCC129 129 /* sign aa */ -#define HB_MODIFIED_COMBINING_CLASS_CCC130 130 /* sign i */ -#define HB_MODIFIED_COMBINING_CLASS_CCC132 128 /* sign u */ - +#define HB_MODIFIED_COMBINING_CLASS_CCC130 132 /* sign i */ +#define HB_MODIFIED_COMBINING_CLASS_CCC132 131 /* sign u */ /* Misc */ diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-utf-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-utf-private.hh index 74cf5d66a29..211eb4dc023 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-utf-private.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-utf-private.hh @@ -48,7 +48,7 @@ struct hb_utf8_t if (c > 0x7Fu) { - if (hb_in_range (c, 0xC2u, 0xDFu)) /* Two-byte */ + if (hb_in_range<hb_codepoint_t> (c, 0xC2u, 0xDFu)) /* Two-byte */ { unsigned int t1; if (likely (text < end && @@ -60,7 +60,7 @@ struct hb_utf8_t else goto error; } - else if (hb_in_range (c, 0xE0u, 0xEFu)) /* Three-byte */ + else if (hb_in_range<hb_codepoint_t> (c, 0xE0u, 0xEFu)) /* Three-byte */ { unsigned int t1, t2; if (likely (1 < end - text && @@ -68,14 +68,14 @@ struct hb_utf8_t (t2 = text[1] - 0x80u) <= 0x3Fu)) { c = ((c&0xFu)<<12) | (t1<<6) | t2; - if (unlikely (c < 0x0800u || hb_in_range (c, 0xD800u, 0xDFFFu))) + if (unlikely (c < 0x0800u || hb_in_range<hb_codepoint_t> (c, 0xD800u, 0xDFFFu))) goto error; text += 2; } else goto error; } - else if (hb_in_range (c, 0xF0u, 0xF4u)) /* Four-byte */ + else if (hb_in_range<hb_codepoint_t> (c, 0xF0u, 0xF4u)) /* Four-byte */ { unsigned int t1, t2, t3; if (likely (2 < end - text && @@ -84,7 +84,7 @@ struct hb_utf8_t (t3 = text[2] - 0x80u) <= 0x3Fu)) { c = ((c&0x7u)<<18) | (t1<<12) | (t2<<6) | t3; - if (unlikely (!hb_in_range (c, 0x10000u, 0x10FFFFu))) + if (unlikely (!hb_in_range<hb_codepoint_t> (c, 0x10000u, 0x10FFFFu))) goto error; text += 3; } @@ -140,7 +140,7 @@ struct hb_utf16_t { hb_codepoint_t c = *text++; - if (likely (!hb_in_range (c, 0xD800u, 0xDFFFu))) + if (likely (!hb_in_range<hb_codepoint_t> (c, 0xD800u, 0xDFFFu))) { *unicode = c; return text; @@ -150,7 +150,7 @@ struct hb_utf16_t { /* High-surrogate in c */ hb_codepoint_t l = *text; - if (likely (hb_in_range (l, 0xDC00u, 0xDFFFu))) + if (likely (hb_in_range<hb_codepoint_t> (l, 0xDC00u, 0xDFFFu))) { /* Low-surrogate in l */ *unicode = (c << 10) + l - ((0xD800u << 10) - 0x10000u + 0xDC00u); @@ -172,7 +172,7 @@ struct hb_utf16_t { hb_codepoint_t c = *--text; - if (likely (!hb_in_range (c, 0xD800u, 0xDFFFu))) + if (likely (!hb_in_range<hb_codepoint_t> (c, 0xD800u, 0xDFFFu))) { *unicode = c; return text; @@ -182,7 +182,7 @@ struct hb_utf16_t { /* Low-surrogate in c */ hb_codepoint_t h = text[-1]; - if (likely (hb_in_range (h, 0xD800u, 0xDBFFu))) + if (likely (hb_in_range<hb_codepoint_t> (h, 0xD800u, 0xDBFFu))) { /* High-surrogate in h */ *unicode = (h << 10) + c - ((0xD800u << 10) - 0x10000u + 0xDC00u); diff --git a/Build/source/libs/harfbuzz/version.ac b/Build/source/libs/harfbuzz/version.ac index 40779f084cb..92216186c97 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], [1.4.6]) +m4_define([harfbuzz_version], [1.4.7]) |