diff options
19 files changed, 810 insertions, 57 deletions
diff --git a/Build/source/libs/README b/Build/source/libs/README index 9b81ab82b8b..e2221472f77 100644 --- a/Build/source/libs/README +++ b/Build/source/libs/README @@ -24,7 +24,7 @@ gmp 6.1.2 - checked 16dec16 graphite2 1.3.9 - checked 13nov16 http://sourceforge.net/projects/silgraphite/files/graphite2/ -harfbuzz 1.4.5 - checked 11mar17 +harfbuzz 1.4.6 - checked 24apr17 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 f4a6bedea82..2d09a6331e2 100644 --- a/Build/source/libs/harfbuzz/ChangeLog +++ b/Build/source/libs/harfbuzz/ChangeLog @@ -1,3 +1,8 @@ +2017-04-24 Akira Kakuto <kakuto@fuk.kindai.ac.jp> + + Import harfbuzz-1.4.6. + * version.ac: Adjusted. + 2017-03-11 Akira Kakuto <kakuto@fuk.kindai.ac.jp> Import harfbuzz-1.4.5. diff --git a/Build/source/libs/harfbuzz/TLpatches/ChangeLog b/Build/source/libs/harfbuzz/TLpatches/ChangeLog index 16c425bf8ec..00a66146a60 100644 --- a/Build/source/libs/harfbuzz/TLpatches/ChangeLog +++ b/Build/source/libs/harfbuzz/TLpatches/ChangeLog @@ -1,3 +1,8 @@ +2017-04-24 Akira Kakuto <kakuto@fuk.kindai.ac.jp> + + Imported harfbuzz-1.4.6 source tree from: + http://www.freedesktop.org/software/harfbuzz/release/ + 2017-03-11 Akira Kakuto <kakuto@fuk.kindai.ac.jp> Imported harfbuzz-1.4.5 source tree from: diff --git a/Build/source/libs/harfbuzz/TLpatches/TL-Changes b/Build/source/libs/harfbuzz/TLpatches/TL-Changes index 6f193dccd20..e69ff2e1fb4 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.5/ tree as obtained from: +Changes applied to the harfbuzz-1.4.6/ 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 93840eb3261..1083903fd17 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.5. +# Generated by GNU Autoconf 2.69 for harfbuzz (TeX Live) 1.4.6. # # 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.5' -PACKAGE_STRING='harfbuzz (TeX Live) 1.4.5' +PACKAGE_VERSION='1.4.6' +PACKAGE_STRING='harfbuzz (TeX Live) 1.4.6' 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.5 to adapt to many kinds of systems. +\`configure' configures harfbuzz (TeX Live) 1.4.6 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.5:";; + short | recursive ) echo "Configuration of harfbuzz (TeX Live) 1.4.6:";; 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.5 +harfbuzz (TeX Live) configure 1.4.6 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.5, which was +It was created by harfbuzz (TeX Live) $as_me 1.4.6, 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.5' + VERSION='1.4.6' 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=5 -HB_VERSION=1.4.5 +HB_VERSION_MICRO=6 +HB_VERSION=1.4.6 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.5, which was +This file was extended by harfbuzz (TeX Live) $as_me 1.4.6, 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.5 +harfbuzz (TeX Live) config.status 1.4.6 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 new file mode 100644 index 00000000000..91e7eca0e0d --- /dev/null +++ b/Build/source/libs/harfbuzz/harfbuzz-src/CMakeLists.txt @@ -0,0 +1,361 @@ +cmake_minimum_required(VERSION 2.8.0) +project(harfbuzz) + +## Disallow in-source builds +if ("${PROJECT_BINARY_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}") + message(FATAL_ERROR + " +In-source builds are not permitted! Make a separate folder for" + " building, e.g.," + " + mkdir build; cd build; cmake .." + " +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) +option(HB_HAVE_GRAPHITE2 "Enable Graphite2 complementary shaper" OFF) +option(HB_BUILTIN_UCDN "Use HarfBuzz provided UCDN" ON) +option(HB_HAVE_GLIB "Enable glib unicode functions" OFF) +option(HB_HAVE_ICU "Enable icu unicode functions" OFF) +if (APPLE) + option(HB_HAVE_CORETEXT "Enable CoreText shaper backend on macOS" ON) +endif () +if (WIN32) + option(HB_HAVE_UNISCRIBE "Enable Uniscribe shaper backend on Windows" OFF) + option(HB_HAVE_DIRECWRITE "Enable DirectWrite shaper backend on Windows" OFF) +endif () +option(HB_BUILD_UTILS "Build harfbuzz utils, needs cairo, freetype, and glib properly be installed" OFF) +if (HB_BUILD_UTILS) + set(HB_HAVE_GLIB ON) + set(HB_HAVE_FREETYPE ON) +endif () + +include_directories(AFTER + ${PROJECT_SOURCE_DIR}/src + ${PROJECT_BINARY_DIR}/src + ) + +add_definitions(-DHAVE_OT) + +if (BUILD_SHARED_LIBS) + add_definitions(-DHAVE_ATEXIT) +endif () + +if (MSVC) + add_definitions(-wd4244 -wd4267 -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS) +endif () + +if (WIN32 AND NOT MINGW AND BUILD_SHARED_LIBS) + add_definitions("-DHB_EXTERN=__declspec(dllexport) extern") +endif () +## + +set(IN_HB_DIST FALSE) +if (EXISTS "${PROJECT_SOURCE_DIR}/src/hb-version.h") + # 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) + set(listVar "") + foreach (f ${ARGN}) + list(APPEND listVar "${prefix}${f}") + endforeach () + set(${var} "${listVar}" PARENT_SCOPE) +endfunction () + +function (extract_make_variable variable file prefix) + string(REGEX MATCH "${variable} = ([^$]+)\\$" temp ${file}) + string(REGEX MATCHALL "[^ \n\t\\]+" list ${CMAKE_MATCH_1}) + prepend(list ${prefix} ${list}) + set(${variable} ${list} PARENT_SCOPE) +endfunction () + +file(READ ${PROJECT_SOURCE_DIR}/src/Makefile.sources SRCSOURCES) +file(READ ${PROJECT_SOURCE_DIR}/util/Makefile.sources UTILSOURCES) +file(READ ${PROJECT_SOURCE_DIR}/src/hb-ucdn/Makefile.sources UCDNSOURCES) + +extract_make_variable(HB_BASE_sources ${SRCSOURCES} "${PROJECT_SOURCE_DIR}/src/") +extract_make_variable(HB_BASE_headers ${SRCSOURCES} "${PROJECT_SOURCE_DIR}/src/") +extract_make_variable(HB_OT_sources ${SRCSOURCES} "${PROJECT_SOURCE_DIR}/src/") +extract_make_variable(HB_OT_headers ${SRCSOURCES} "${PROJECT_SOURCE_DIR}/src/") + +if (IN_HB_DIST) + set(RAGEL_GENERATED_DIR "${PROJECT_SOURCE_DIR}/src/") +else () + set(RAGEL_GENERATED_DIR "${PROJECT_BINARY_DIR}/src/") +endif () +extract_make_variable(HB_BASE_RAGEL_GENERATED_sources ${SRCSOURCES} ${RAGEL_GENERATED_DIR}) +extract_make_variable(HB_OT_RAGEL_GENERATED_sources ${SRCSOURCES} ${RAGEL_GENERATED_DIR}) + +extract_make_variable(HB_VIEW_sources ${UTILSOURCES} "${PROJECT_SOURCE_DIR}/util/") +extract_make_variable(HB_SHAPE_sources ${UTILSOURCES} "${PROJECT_SOURCE_DIR}/util/") +extract_make_variable(HB_OT_SHAPE_CLOSURE_sources ${UTILSOURCES} "${PROJECT_SOURCE_DIR}/util/") + +extract_make_variable(LIBHB_UCDN_sources ${UCDNSOURCES} "${PROJECT_SOURCE_DIR}/src/hb-ucdn/") + +file(READ configure.ac CONFIGUREAC) +string(REGEX MATCH "\\[(([0-9]+)\\.([0-9]+)\\.([0-9]+))\\]" HB_VERSION_MATCH ${CONFIGUREAC}) +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}) +## + +if (NOT IN_HB_DIST) + ## Define ragel tasks + find_program(RAGEL "ragel") + + if (RAGEL) + message(STATUS "ragel found at: ${RAGEL}") + else () + message(FATAL_ERROR "ragel not found, get it here -- http://www.complang.org/ragel/ or, use harfbuzz releases https://github.com/behdad/harfbuzz/releases") + endif () + + foreach (ragel_output IN ITEMS ${HB_BASE_RAGEL_GENERATED_sources} ${HB_OT_RAGEL_GENERATED_sources}) + string(REGEX MATCH "([^/]+)\\.hh" temp ${ragel_output}) + set(target_name ${CMAKE_MATCH_1}) + add_custom_command(OUTPUT ${ragel_output} + COMMAND ${RAGEL} -G2 -o ${ragel_output} ${PROJECT_SOURCE_DIR}/src/${target_name}.rl -I ${PROJECT_SOURCE_DIR} ${ARGN} + DEPENDS ${PROJECT_SOURCE_DIR}/src/${target_name}.rl + ) + add_custom_target(harfbuzz_${target_name} DEPENDS ${PROJECT_BINARY_DIR}/src/${target_name}) + endforeach () + + mark_as_advanced(RAGEL) + ## + + ## Generate hb-version.h + 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}") + file(REMOVE "${HB_VERSION_H}.tmp") + ## +endif () + +## Define sources and headers of the project +set(project_sources + ${HB_BASE_sources} + ${HB_BASE_RAGEL_GENERATED_sources} + + ${HB_OT_sources} + ${HB_OT_RAGEL_GENERATED_sources} + ) + +set(project_headers + ${HB_VERSION_H} + + ${HB_BASE_headers} + ${HB_OT_headers} + ) + +if (HB_HAVE_FREETYPE) + add_definitions(-DHAVE_FREETYPE=1 -DHAVE_FT_FACE_GETCHARVARIANTINDEX=1) + + # https://github.com/WebKit/webkit/blob/master/Source/cmake/FindFreetype2.cmake + find_package(PkgConfig) + pkg_check_modules(PC_FREETYPE2 QUIET freetype2) + + find_path(FREETYPE2_HEADER_DIR NAMES freetype.h HINTS ${PC_FREETYPE2_INCLUDE_DIRS} ${PC_FREETYPE2_INCLUDEDIR} $ENV{FREETYPE_DIR}/include PATH_SUFFIXES freetype) + find_path(FREETYPE2_ROOT_INCLUDE_DIR NAMES freetype/freetype.h HINTS ${PC_FREETYPE2_INCLUDE_DIRS} ${PC_FREETYPE2_INCLUDEDIR} $ENV{FREETYPE_DIR}/include) + if (CMAKE_BUILD_TYPE MATCHES Debug) + set(FREETYPE2_LIBRARY_NAME freetyped) + else () + set(FREETYPE2_LIBRARY_NAME freetype) + endif () + find_library(FREETYPE2_LIBRARIES ${FREETYPE2_LIBRARY_NAME} HINTS ${PC_FREETYPE2_LIBDIR} ${PC_FREETYPE2_LIBRARY_DIRS} $ENV{FREETYPE_DIR}/lib) + + include_directories(AFTER ${FREETYPE2_HEADER_DIR} ${FREETYPE2_ROOT_INCLUDE_DIR}) + + list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-ft.cc) + list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-ft.h) + + list(APPEND THIRD_PARTY_LIBS ${FREETYPE2_LIBRARIES}) + + mark_as_advanced(FREETYPE2_HEADER_DIR FREETYPE2_ROOT_INCLUDE_DIR FREETYPE2_LIBRARIES) +endif () + +if (HB_HAVE_GRAPHITE2) + add_definitions(-DHAVE_GRAPHITE2) + + find_path(GRAPHITE2_INCLUDE_DIR graphite2/Font.h) + find_library(GRAPHITE2_LIBRARY graphite2) + + include_directories(${GRAPHITE2_INCLUDE_DIR}) + + list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-graphite2.cc) + list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-graphite2.h) + + list(APPEND THIRD_PARTY_LIBS ${GRAPHITE2_LIBRARY}) + + mark_as_advanced(GRAPHITE2_INCLUDE_DIR GRAPHITE2_LIBRARY) +endif () + +if (HB_BUILTIN_UCDN) + include_directories(src/hb-ucdn) + add_definitions(-DHAVE_UCDN) + + list(APPEND project_sources + ${PROJECT_SOURCE_DIR}/src/hb-ucdn.cc + ${LIBHB_UCDN_sources}) +endif () + +if (HB_HAVE_GLIB) + add_definitions(-DHAVE_GLIB) + + # https://github.com/WebKit/webkit/blob/master/Source/cmake/FindGLIB.cmake + find_package(PkgConfig) + pkg_check_modules(PC_GLIB QUIET glib-2.0) + + find_library(GLIB_LIBRARIES NAMES glib-2.0 HINTS ${PC_GLIB_LIBDIR} ${PC_GLIB_LIBRARY_DIRS}) + find_path(GLIBCONFIG_INCLUDE_DIR NAMES glibconfig.h HINTS ${PC_LIBDIR} ${PC_LIBRARY_DIRS} ${PC_GLIB_INCLUDEDIR} ${PC_GLIB_INCLUDE_DIRS} PATH_SUFFIXES glib-2.0/include) + find_path(GLIB_INCLUDE_DIR NAMES glib.h HINTS ${PC_GLIB_INCLUDEDIR} ${PC_GLIB_INCLUDE_DIRS} PATH_SUFFIXES glib-2.0) + + include_directories(${GLIBCONFIG_INCLUDE_DIR} ${GLIB_INCLUDE_DIR}) + + list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-glib.cc) + list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-glib.h) + + list(APPEND THIRD_PARTY_LIBS ${GLIB_LIBRARIES}) + + mark_as_advanced(GLIB_LIBRARIES GLIBCONFIG_INCLUDE_DIR GLIB_INCLUDE_DIR) +endif () + +if (HB_HAVE_ICU) + add_definitions(-DHAVE_ICU) + + # https://github.com/WebKit/webkit/blob/master/Source/cmake/FindICU.cmake + find_package(PkgConfig) + pkg_check_modules(PC_ICU QUIET icu-uc) + + find_path(ICU_INCLUDE_DIR NAMES unicode/utypes.h HINTS ${PC_ICU_INCLUDE_DIRS} ${PC_ICU_INCLUDEDIR}) + find_library(ICU_LIBRARY NAMES libicuuc cygicuuc cygicuuc32 icuuc HINTS ${PC_ICU_LIBRARY_DIRS} ${PC_ICU_LIBDIR}) + + include_directories(${ICU_INCLUDE_DIR}) + + list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-icu.cc) + list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-icu.h) + + list(APPEND THIRD_PARTY_LIBS ${ICU_LIBRARY}) + + mark_as_advanced(ICU_INCLUDE_DIR ICU_LIBRARY) +endif () + +if (APPLE AND HB_HAVE_CORETEXT) + # Apple Advanced Typography + add_definitions(-DHAVE_CORETEXT) + + list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-coretext.cc) + list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-coretext.h) + + find_library(APPLICATION_SERVICES_FRAMEWORK ApplicationServices) + if (APPLICATION_SERVICES_FRAMEWORK) + list(APPEND THIRD_PARTY_LIBS ${APPLICATION_SERVICES_FRAMEWORK}) + endif (APPLICATION_SERVICES_FRAMEWORK) + + mark_as_advanced(APPLICATION_SERVICES_FRAMEWORK) +endif () + +if (WIN32 AND HB_HAVE_UNISCRIBE) + add_definitions(-DHAVE_UNISCRIBE) + + list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-uniscribe.cc) + list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-uniscribe.h) + + list(APPEND THIRD_PARTY_LIBS usp10 gdi32 rpcrt4) +endif () + +if (WIN32 AND HB_HAVE_DIRECTWRITE) + add_definitions(-DHAVE_DIRECTWRITE) + + list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-directwrite.cc) + list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-directwrite.h) + + list(APPEND THIRD_PARTY_LIBS dwrite rpcrt4) +endif () +## + +## Atomic ops availability detection +file(WRITE "${PROJECT_BINARY_DIR}/try_compile_intel_atomic_primitives.c" +" void memory_barrier (void) { __sync_synchronize (); } + int atomic_add (int *i) { return __sync_fetch_and_add (i, 1); } + int mutex_trylock (int *m) { return __sync_lock_test_and_set (m, 1); } + void mutex_unlock (int *m) { __sync_lock_release (m); } + int main () { return 0; } +") +try_compile(HB_HAVE_INTEL_ATOMIC_PRIMITIVES + ${PROJECT_BINARY_DIR}/try_compile_intel_atomic_primitives + SOURCES ${PROJECT_BINARY_DIR}/try_compile_intel_atomic_primitives.c) +if (HB_HAVE_INTEL_ATOMIC_PRIMITIVES) + add_definitions(-DHAVE_INTEL_ATOMIC_PRIMITIVES) +endif () + +file(WRITE "${PROJECT_BINARY_DIR}/try_compile_solaris_atomic_ops.c" +" #include <atomic.h> + /* This requires Solaris Studio 12.2 or newer: */ + #include <mbarrier.h> + void memory_barrier (void) { __machine_rw_barrier (); } + int atomic_add (volatile unsigned *i) { return atomic_add_int_nv (i, 1); } + void *atomic_ptr_cmpxchg (volatile void **target, void *cmp, void *newval) { return atomic_cas_ptr (target, cmp, newval); } + int main () { return 0; } +") +try_compile(HB_HAVE_SOLARIS_ATOMIC_OPS + ${PROJECT_BINARY_DIR}/try_compile_solaris_atomic_ops + SOURCES ${PROJECT_BINARY_DIR}/try_compile_solaris_atomic_ops.c) +if (HB_HAVE_SOLARIS_ATOMIC_OPS) + add_definitions(-DHAVE_SOLARIS_ATOMIC_OPS) +endif () +## + +add_library(harfbuzz ${project_sources} ${project_headers}) +target_link_libraries(harfbuzz ${THIRD_PARTY_LIBS}) + +if (HB_BUILD_UTILS) + # https://github.com/WebKit/webkit/blob/master/Source/cmake/FindCairo.cmake + find_package(PkgConfig) + pkg_check_modules(PC_CAIRO QUIET cairo) + + find_path(CAIRO_INCLUDE_DIRS NAMES cairo.h HINTS ${PC_CAIRO_INCLUDEDIR} ${PC_CAIRO_INCLUDE_DIRS} PATH_SUFFIXES cairo) + find_library(CAIRO_LIBRARIESNAMES cairo HINTS ${PC_CAIRO_LIBDIR} ${PC_CAIRO_LIBRARY_DIRS}) + + add_definitions("-DPACKAGE_NAME=\"HarfBuzz\"") + add_definitions("-DPACKAGE_VERSION=\"${HB_VERSION}\"") + include_directories(${CAIRO_INCLUDE_DIRS}) + + add_executable(hb-view ${HB_VIEW_sources}) + target_link_libraries(hb-view harfbuzz ${CAIRO_LIBRARIESNAMES}) + + add_executable(hb-shape ${HB_SHAPE_sources}) + target_link_libraries(hb-shape harfbuzz) + + add_executable(hb-ot-shape-closure ${HB_OT_SHAPE_CLOSURE_sources}) + target_link_libraries(hb-ot-shape-closure harfbuzz) + + mark_as_advanced(CAIRO_LIBRARIESNAMES) +endif () + +## Install +if (NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL) + install(FILES ${project_headers} DESTINATION include/harfbuzz) +endif () + +if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) + install(TARGETS harfbuzz + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin + ) +endif () +## diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog b/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog index fd8b8c03c20..86ffc1f908d 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog +++ b/Build/source/libs/harfbuzz/harfbuzz-src/ChangeLog @@ -1,3 +1,349 @@ +commit 74b99ef2249107e7cd01bd1ee522a5d9ce61e05f +Author: mhosken <mhosken@users.noreply.github.com> +Date: Thu Apr 20 19:13:22 2017 +0100 + + Fix graphite2 rtl conversion (#475) + + src/hb-graphite2.cc | 32 ++++++++++++++------------------ + 1 file changed, 14 insertions(+), 18 deletions(-) + +commit 696641314e7eb60a5a2e08c1c4fd1e5e41022148 +Author: ebraminio <ebrahim@gnu.org> +Date: Wed Apr 19 22:59:46 2017 +0430 + + [cmake] Final touches (#473) + + CMakeLists.txt | 113 + +++++++++++++++++++++++++++------------------------------ + 1 file changed, 54 insertions(+), 59 deletions(-) + +commit aacca37590656e235218557ea509eb5624dfbff9 +Author: Chris Peterson <cpeterson@mozilla.com> +Date: Mon Apr 17 23:25:24 2017 -0700 + + Fix clang -Wcomma warnings (#471) (#472) + + clang's new -Wcomma compiler option warns about possible misuse of the + comma operator such as between two statements. + + hb-common.cc:190:9 [-Wcomma] possible misuse of comma operator here + hb-ot-layout-gsubgpos-private.hh:345:30 [-Wcomma] possible misuse of + comma operator here + hb-shape-plan.cc:438:26 [-Wcomma] possible misuse of comma operator + here + + src/hb-common.cc | 6 ++++-- + src/hb-ot-layout-gsubgpos-private.hh | 2 +- + src/hb-shape-plan.cc | 7 ++++--- + 3 files changed, 9 insertions(+), 6 deletions(-) + +commit 4d7c52066b5b205b20ba2679cb57a4e593942102 +Author: ebraminio <ebrahim@gnu.org> +Date: Mon Apr 17 15:53:46 2017 +0430 + + [cmake] Remove HB_DISABLE_DEPRECATED as it seems needed for pango + build (#470) + + CMakeLists.txt | 2 -- + 1 file changed, 2 deletions(-) + +commit 5ecf96e3a22e896184710a9f146a8bf149af6ca4 +Author: William Hua <william@attente.ca> +Date: Mon Apr 17 01:33:42 2017 -0400 + + Use absolute paths of ragel generated headers (#467) + + https://github.com/behdad/harfbuzz/issues/455 + + src/Makefile.am | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit c42869eb713f53504e1b77a679cff2f88ebd0c20 +Author: Dominik Schlösser <dominik.schloesser@gmail.com> +Date: Sat Apr 15 21:17:05 2017 +0200 + + Small doc fix: `make check` runs the tests (#469) + + test/shaping/README.md | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 75931427aa4344cd75321c618b8373ffcf1ffc33 +Author: ebraminio <ebrahim@gnu.org> +Date: Fri Apr 14 05:08:11 2017 +0430 + + [cmake] Fix try compile link issues (#466) + + CMakeLists.txt | 2 ++ + 1 file changed, 2 insertions(+) + +commit cb021e14ab345def326fb58ce486515af179b2cf +Author: ebraminio <ebrahim@gnu.org> +Date: Fri Apr 14 04:31:17 2017 +0430 + + [cmake] typo (#465) + + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit a41d5ea4453995dfd7c523427c6017623164c6ff +Author: ebraminio <ebrahim@gnu.org> +Date: Fri Apr 14 04:25:50 2017 +0430 + + [cmake] Add atomic ops availability detection (#464) + + CMakeLists.txt | 30 ++++++++++++++++++++++++++++++ + 1 file changed, 30 insertions(+) + +commit 8568588202dd718b089e43cd6d46f689c706f665 +Author: ebraminio <ebrahim@gnu.org> +Date: Thu Apr 13 02:17:16 2017 +0430 + + [cmake] Remove NO_MT flag (#462) + + CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +commit c04c1fe86ee4b9b58ad88dad5593239ade4c75b8 +Author: jfkthame <jfkthame@gmail.com> +Date: Tue Apr 11 22:29:13 2017 +0100 + + Blacklist GDEF table in additional Tahoma versions. (#459) + + There are more broken versions of Tahoma out there on various + Windows releases, + so we need to add them to our blacklist to avoid broken rendering. + See https://bugzilla.mozilla.org/show_bug.cgi?id=1279925 for details. + + src/hb-ot-layout.cc | 8 ++++++++ + 1 file changed, 8 insertions(+) + +commit adfd4ae1cf6c4abe66aecf1eb0a05c7183a0f4e2 +Author: ebraminio <ebrahim@gnu.org> +Date: Tue Apr 11 23:18:18 2017 +0430 + + [cmake] Improve third party libraries support (#461) + + CMakeLists.txt | 57 + ++++++++++++++++++++++++++++++++++++-------- + src/hb-ucdn/Makefile.sources | 5 +++- + 2 files changed, 51 insertions(+), 11 deletions(-) + +commit 3a8bc572115a28741d5a80f3f1e28e6756b9abfa +Author: ebraminio <ebrahim@gnu.org> +Date: Tue Apr 11 21:32:14 2017 +0430 + + [cmake] Add utils build support (#460) + + CMakeLists.txt | 150 + +++++++++++++++++++++++++++++++++++++++++---------------- + 1 file changed, 108 insertions(+), 42 deletions(-) + +commit bc1244e2395f844b2b41315cb1eef29570e46b29 +Author: Chun-wei Fan <fanchunwei@src.gnome.org> +Date: Thu Apr 6 18:44:28 2017 +0800 + + NMake Makefiles: Fix ICU builds + + Fix the check conditions in config-msvc.mak and info-msvc.mak so that + the ICU items does indeed get built into the HarfBuzz main DLL, + and that + the correct configuration info is displayed. + + Also update the checks in detectenv-msvc.mak so that we can detect + that + we are using Visual Studio 2017 (although the 2015-built binaries use + the same CRT DLL as the 2017 ones). + + win32/config-msvc.mak | 22 ++++++++++++---------- + win32/detectenv-msvc.mak | 4 +++- + win32/info-msvc.mak | 12 ++++++++---- + 3 files changed, 23 insertions(+), 15 deletions(-) + +commit a4471d0c2cc4baa81e2cea695f9bd15e03d0f15e +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Apr 5 15:42:11 2017 +0200 + + Move list of ragel sources to Makefile.sources as well + + src/Makefile.am | 14 ++++---------- + src/Makefile.sources | 9 +++++++++ + 2 files changed, 13 insertions(+), 10 deletions(-) + +commit d2acaf6d729727f47c5aacf7ee40097580b6f18d +Author: ebraminio <ebrahim@gnu.org> +Date: Wed Apr 5 02:21:23 2017 -0700 + + Split ragel generated files lists and remove hardcoded rl files lists + (#453) + + CMakeLists.txt | 126 + +++++++++++++++++++++----------------------------- + src/Makefile.am | 2 + + src/Makefile.sources | 16 +++++-- + win32/config-msvc.mak | 8 ++-- + 4 files changed, 71 insertions(+), 81 deletions(-) + +commit 7d64c0ef37dd930e9807bd80d398491aa9c4428c +Author: ebraminio <ebrahim@gnu.org> +Date: Tue Apr 4 15:03:51 2017 +0430 + + Add CMake build support (#444) + + CMakeLists.txt | 254 + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Makefile.am | 1 + + appveyor.yml | 61 +++++++++----- + 3 files changed, 295 insertions(+), 21 deletions(-) + +commit 740fdbcd0e6d25c1d6f12537ca2aa559650b9d52 +Author: jfkthame <jfkthame@gmail.com> +Date: Mon Apr 3 12:22:39 2017 +0100 + + avoid UBSan warning in get_stage_lookups (#450) + + See https://bugzilla.mozilla.org/show_bug.cgi?id=1336600 + + src/hb-ot-map-private.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 8d256841ca7462fd596329abf6f71bafb56fd621 +Author: Dominik Schloesser <dsc@dosc.net> +Date: Sun Mar 26 09:22:34 2017 +0200 + + Current fonttools (3.9.1) generate subset-file called font.subset.ttf + instead of older font.ttf.subset + + test/shaping/record-test.sh | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +commit c2a9de15f5d9477c6f1c143ed8265f71fdb04584 +Author: Dominik Schloesser <dsc@dosc.net> +Date: Sun Mar 26 09:21:13 2017 +0200 + + Updated samples: record-it.sh is now record-test.sh + + test/shaping/README.md | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit f2e6c7ce51283809033d08692a2dee7cf04aefc5 +Author: Khaled Hosny <khaledhosny@eglug.org> +Date: Sun Mar 26 10:48:53 2017 +0200 + + [tools] Make hb-unicode-code work with Python 3 + + Related to https://github.com/behdad/harfbuzz/pull/445 + + test/shaping/hb_test_tools.py | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +commit edcf6344bc62af9ea726a633468c9243e127fa13 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Mar 24 10:24:52 2017 -0700 + + Blacklist more versions of Padauk + + Patch from Phil Race. + + src/hb-ot-layout.cc | 8 ++++++++ + 1 file changed, 8 insertions(+) + +commit e693ba77980d5ded65bf773d48b6b58274933fb7 +Author: Khaled Hosny <khaledhosny@eglug.org> +Date: Thu Mar 23 00:35:36 2017 +0200 + + [ci] Fix msys2 build on AppVeyor + + For whatever reason the env variables need to be the Windows way + or they + end up being empty. + + appveyor.yml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 91570a1eeb1eca425372e203656369f39ede5c61 +Author: Khaled Hosny <khaledhosny@eglug.org> +Date: Wed Mar 22 23:07:15 2017 +0200 + + Just always use strtod here + + src/hb-common.cc | 4 ---- + 1 file changed, 4 deletions(-) + +commit 539571c1a9cb5d443d029247874af37fed75432f +Author: Chun-wei Fan <fanchunwei@src.gnome.org> +Date: Fri Feb 24 17:58:25 2017 +0800 + + src/hb-common.cc: Fix build on older Visual Studio + + Visual Studio only supported strtof() from Visual Studio 2013 + onwards, so + use strtod() instead to do the operation, which should do the + same thing, + sans going to a double, not a float. + + src/hb-common.cc | 4 ++++ + 1 file changed, 4 insertions(+) + +commit b90fb83ea6067802e62af9e1ea0c61c7ac79e9a9 +Author: Chun-wei Fan <fanchunwei@src.gnome.org> +Date: Fri Feb 24 17:47:44 2017 +0800 + + Visual Studio builds: Fix Introspection when UCDN enabled + + The sources in src/hb-ucdn and not included correctly into the NMake + Makefiles, as we need their explicit relative location as we pass + all the + sources we used into the introspection scanner. This was not an issue + before as we excluded the UCDN sources in the build when we enabled + introspection (meaning GLib is enabled), but since we default on using + UCDN on all builds unless explicitly disabled, we need to deal + with this. + + This did not affect builds using UCDN without introspection due to + the use + of NMake batch rules. + + Fix this by creating a NMake Makefile module on-the-fly with the + correct + subdir info, and using that list in there instead. + + win32/Makefile.vc | 15 +++++++++++++++ + win32/config-msvc.mak | 2 +- + 2 files changed, 16 insertions(+), 1 deletion(-) + +commit f0aa167e447e8aa818a63a4a325be57844bf0353 +Author: Chun-wei Fan <fanchunwei@src.gnome.org> +Date: Thu Feb 23 13:02:49 2017 +0800 + + Update Visual Studio builds for UCDN usage + + We now use UCDN by default, so make it so in the build files; however + don't hardcode HAVE_UCDN as one may still opt not to use it (but pass + it in as a CFLAG unless one explicitly disables UCDN by using + NO_UCDN=1 + on the NMake command line). + + Note that we are not blocking builds where UCDN is disabled along with + GLib and ICU, as that will trigger a build error anyways which + will tell + the user what needs to be done to remedy this. + + win32/README.txt | 6 +++--- + win32/config-msvc.mak | 28 +++++++++++++++------------- + win32/config.h.win32.in | 2 +- + win32/info-msvc.mak | 43 +++++++++++++++++++++++++------------------ + 4 files changed, 44 insertions(+), 35 deletions(-) + +commit 60e2586f7652aaa0ee908eb8f54b1498e2ad299e +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Mar 10 23:02:28 2017 -0800 + + 1.4.5 + + NEWS | 8 ++++++++ + configure.ac | 2 +- + 2 files changed, 9 insertions(+), 1 deletion(-) + commit 47e7a1800fba9b8bf042a1f4976a15ab012ebfc7 Author: Behdad Esfahbod <behdad@behdad.org> Date: Fri Mar 10 13:23:02 2017 -0800 diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/Makefile.am b/Build/source/libs/harfbuzz/harfbuzz-src/Makefile.am index 8dc8a4b93ea..1d8f2e7c7d4 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/Makefile.am +++ b/Build/source/libs/harfbuzz/harfbuzz-src/Makefile.am @@ -11,6 +11,7 @@ EXTRA_DIST = \ harfbuzz.doap \ README.python \ BUILD.md \ + CMakeLists.txt \ $(NULL) MAINTAINERCLEANFILES = \ diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/NEWS b/Build/source/libs/harfbuzz/harfbuzz-src/NEWS index b878793af66..9c7e7d3b471 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/NEWS +++ b/Build/source/libs/harfbuzz/harfbuzz-src/NEWS @@ -1,3 +1,12 @@ +Overview of changes leading to 1.4.6 +Sunday, April 23, 2017 +==================================== + +- Graphite2: Fix RTL positioning issue. +- Backlist GDEF of more versions of Padauk and Tahoma. +- New, experimental, cmake alternative build system. + + Overview of changes leading to 1.4.5 Friday, March 10, 2017 ==================================== diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac b/Build/source/libs/harfbuzz/harfbuzz-src/configure.ac index 91fbfd70b8a..6d14455509c 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.5], + [1.4.6], [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 e322d568647..0c077d99013 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am @@ -25,11 +25,13 @@ HBLIBS = HBNONPCLIBS = HBDEPS = HBSOURCES = $(HB_BASE_sources) +HBSOURCES += $(HB_BASE_RAGEL_GENERATED_sources) HBHEADERS = $(HB_BASE_headers) HBNODISTHEADERS = $(HB_NODIST_headers) if HAVE_OT HBSOURCES += $(HB_OT_sources) +HBSOURCES += $(HB_OT_RAGEL_GENERATED_sources) HBHEADERS += $(HB_OT_headers) endif @@ -251,19 +253,13 @@ built-sources: $(BUILT_SOURCES) .PHONY: unicode-tables arabic-table indic-table use-table built-sources RAGEL_GENERATED = \ - $(srcdir)/hb-buffer-deserialize-json.hh \ - $(srcdir)/hb-buffer-deserialize-text.hh \ - $(srcdir)/hb-ot-shape-complex-indic-machine.hh \ - $(srcdir)/hb-ot-shape-complex-myanmar-machine.hh \ - $(srcdir)/hb-ot-shape-complex-use-machine.hh \ + $(patsubst %,$(srcdir)/%,$(HB_BASE_RAGEL_GENERATED_sources)) \ + $(patsubst %,$(srcdir)/%,$(HB_OT_RAGEL_GENERATED_sources)) \ $(NULL) BUILT_SOURCES += $(RAGEL_GENERATED) EXTRA_DIST += \ - hb-buffer-deserialize-json.rl \ - hb-buffer-deserialize-text.rl \ - hb-ot-shape-complex-indic-machine.rl \ - hb-ot-shape-complex-myanmar-machine.rl \ - hb-ot-shape-complex-use-machine.rl \ + $(HB_BASE_RAGEL_sources) \ + $(HB_OT_RAGEL_sources) \ $(NULL) MAINTAINERCLEANFILES += $(RAGEL_GENERATED) $(srcdir)/%.hh: $(srcdir)/%.rl diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources b/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources index 6363cf9300a..51e687b4a14 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources @@ -5,8 +5,6 @@ NULL = HB_BASE_sources = \ hb-atomic-private.hh \ hb-blob.cc \ - hb-buffer-deserialize-json.hh \ - hb-buffer-deserialize-text.hh \ hb-buffer-private.hh \ hb-buffer-serialize.cc \ hb-buffer.cc \ @@ -47,6 +45,15 @@ HB_BASE_sources = \ hb-warning.cc \ $(NULL) +HB_BASE_RAGEL_GENERATED_sources = \ + hb-buffer-deserialize-json.hh \ + hb-buffer-deserialize-text.hh \ + $(NULL) +HB_BASE_RAGEL_sources = \ + hb-buffer-deserialize-json.rl \ + hb-buffer-deserialize-text.rl \ + $(NULL) + HB_BASE_headers = \ hb.h \ hb-blob.h \ @@ -91,15 +98,12 @@ HB_OT_sources = \ hb-ot-shape-complex-hangul.cc \ hb-ot-shape-complex-hebrew.cc \ hb-ot-shape-complex-indic.cc \ - hb-ot-shape-complex-indic-machine.hh \ hb-ot-shape-complex-indic-private.hh \ hb-ot-shape-complex-indic-table.cc \ hb-ot-shape-complex-myanmar.cc \ - hb-ot-shape-complex-myanmar-machine.hh \ hb-ot-shape-complex-thai.cc \ hb-ot-shape-complex-tibetan.cc \ hb-ot-shape-complex-use.cc \ - hb-ot-shape-complex-use-machine.hh \ hb-ot-shape-complex-use-private.hh \ hb-ot-shape-complex-use-table.cc \ hb-ot-shape-complex-private.hh \ @@ -115,6 +119,17 @@ HB_OT_sources = \ hb-ot-var-mvar-table.hh \ $(NULL) +HB_OT_RAGEL_GENERATED_sources = \ + hb-ot-shape-complex-indic-machine.hh \ + hb-ot-shape-complex-myanmar-machine.hh \ + hb-ot-shape-complex-use-machine.hh \ + $(NULL) +HB_OT_RAGEL_sources = \ + hb-ot-shape-complex-indic-machine.rl \ + hb-ot-shape-complex-myanmar-machine.rl \ + hb-ot-shape-complex-use-machine.rl \ + $(NULL) + HB_OT_headers = \ hb-ot.h \ hb-ot-font.h \ 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 64e77d43472..39006237a0c 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc @@ -186,8 +186,10 @@ lang_equal (hb_language_t v1, const unsigned char *p1 = (const unsigned char *) v1; const unsigned char *p2 = (const unsigned char *) v2; - while (*p1 && *p1 == canon_map[*p2]) - p1++, p2++; + while (*p1 && *p1 == canon_map[*p2]) { + p1++; + p2++; + } return *p1 == canon_map[*p2]; } @@ -667,7 +669,7 @@ parse_float (const char **pp, const char *end, float *pv) float v; errno = 0; - v = strtof (p, &pend); + v = strtod (p, &pend); if (errno || p == pend) return false; diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-graphite2.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-graphite2.cc index 5b804b8294e..c9799e9da00 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-graphite2.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-graphite2.cc @@ -301,7 +301,7 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan, hb_codepoint_t *pg = gids; clusters[0].cluster = buffer->info[0].cluster; - float curradv = HB_DIRECTION_IS_BACKWARD(buffer->props.direction) ? gr_slot_origin_X(gr_seg_first_slot(seg)) : 0.; + float curradv = 0.; if (HB_DIRECTION_IS_BACKWARD(buffer->props.direction)) { curradv = gr_slot_origin_X(gr_seg_first_slot(seg)); @@ -330,13 +330,10 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan, c->base_glyph = ic; c->num_glyphs = 0; if (HB_DIRECTION_IS_BACKWARD(buffer->props.direction)) - { - ci++; - clusters[ci].advance = curradv - gr_slot_origin_X(is); - } else { + c->advance = curradv - gr_slot_origin_X(is); + else clusters[ci].advance = gr_slot_origin_X(is) - curradv; - ci++; - } + ci++; curradv = gr_slot_origin_X(is); } clusters[ci].num_glyphs++; @@ -345,7 +342,9 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan, clusters[ci].num_chars = after + 1 - clusters[ci].base_char; } - if (!HB_DIRECTION_IS_BACKWARD(buffer->props.direction)) + if (HB_DIRECTION_IS_BACKWARD(buffer->props.direction)) + clusters[ci].advance += curradv; + else clusters[ci].advance = gr_seg_advance_X(seg) - curradv; ci++; @@ -366,11 +365,11 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan, float yscale = (float) font->y_scale / upem; yscale *= yscale / xscale; /* Positioning. */ + int currclus = -1; + const hb_glyph_info_t *info = buffer->info; + hb_glyph_position_t *pPos = hb_buffer_get_glyph_positions (buffer, NULL); if (!HB_DIRECTION_IS_BACKWARD(buffer->props.direction)) { - int currclus = -1; - const hb_glyph_info_t *info = buffer->info; - hb_glyph_position_t *pPos = hb_buffer_get_glyph_positions (buffer, NULL); curradvx = 0; for (is = gr_seg_first_slot (seg); is; pPos++, ++info, is = gr_slot_next_in_segment (is)) { @@ -389,23 +388,20 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan, } else { - int currclus = -1; - const hb_glyph_info_t *info = buffer->info; - hb_glyph_position_t *pPos = hb_buffer_get_glyph_positions (buffer, NULL); - curradvx = gr_seg_advance_X(seg) * xscale; + curradvx = gr_seg_advance_X(seg); for (is = gr_seg_first_slot (seg); is; pPos++, info++, is = gr_slot_next_in_segment (is)) { if (info->cluster != currclus) { pPos->x_advance = info->var1.i32 * xscale; - if (currclus != -1) curradvx -= info[-1].var1.i32 * xscale; + curradvx -= pPos->x_advance; currclus = info->cluster; } else - pPos->x_advance = 0.; + pPos->x_advance = 0.; pPos->y_advance = gr_slot_advance_Y (is, grface, NULL) * yscale; curradvy -= pPos->y_advance; - pPos->x_offset = gr_slot_origin_X (is) * xscale - curradvx + pPos->x_advance; + pPos->x_offset = (gr_slot_origin_X (is) - info->var1.i32) * xscale - curradvx + pPos->x_advance; pPos->y_offset = gr_slot_origin_Y (is) * yscale - curradvy; } hb_buffer_reverse_clusters (buffer); 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 f9fcec52b77..921859a6603 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 @@ -342,7 +342,7 @@ struct hb_apply_context_t : inline void init (hb_apply_context_t *c_, bool context_match = false) { c = c_; - match_glyph_data = NULL, + match_glyph_data = NULL; matcher.set_match_func (NULL, NULL); matcher.set_lookup_props (c->lookup_props); /* Ignore ZWNJ if we are matching GSUB context, or matching GPOS. */ 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 e78e1524e65..7f4e0184427 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 @@ -101,10 +101,18 @@ _hb_ot_layout_create (hb_face_t *face) || (928 == gdef_len && 59332 == gpos_len && 23298 == gsub_len) /* sha1sum:6d400781948517c3c0441ba42acb309584b73033 tahomabd.ttf from Windows 8.1 */ || (940 == gdef_len && 60732 == gpos_len && 23310 == gsub_len) + /* tahoma.ttf v6.04 from Windows 8.1 x64, see https://bugzilla.mozilla.org/show_bug.cgi?id=1279925 */ + || (964 == gdef_len && 60072 == gpos_len && 23836 == gsub_len) + /* tahomabd.ttf v6.04 from Windows 8.1 x64, see https://bugzilla.mozilla.org/show_bug.cgi?id=1279925 */ + || (976 == gdef_len && 61456 == gpos_len && 23832 == gsub_len) /* sha1sum:e55fa2dfe957a9f7ec26be516a0e30b0c925f846 tahoma.ttf from Windows 10 */ || (994 == gdef_len && 60336 == gpos_len && 24474 == gsub_len) /* sha1sum:7199385abb4c2cc81c83a151a7599b6368e92343 tahomabd.ttf from Windows 10 */ || (1006 == gdef_len && 61740 == gpos_len && 24470 == gsub_len) + /* tahoma.ttf v6.91 from Windows 10 x64, see https://bugzilla.mozilla.org/show_bug.cgi?id=1279925 */ + || (1006 == gdef_len && 61346 == gpos_len && 24576 == gsub_len) + /* tahomabd.ttf v6.91 from Windows 10 x64, see https://bugzilla.mozilla.org/show_bug.cgi?id=1279925 */ + || (1018 == gdef_len && 62828 == gpos_len && 24572 == gsub_len) /* sha1sum:b9c84d820c49850d3d27ec498be93955b82772b5 tahoma.ttf from Windows 10 AU */ || (1006 == gdef_len && 61352 == gpos_len && 24576 == gsub_len) /* sha1sum:2bdfaab28174bdadd2f3d4200a30a7ae31db79d2 tahomabd.ttf from Windows 10 AU */ @@ -125,6 +133,14 @@ _hb_ot_layout_create (hb_face_t *face) /* 2c0c90c6f6087ffbfea76589c93113a9cbb0e75f cantarell-fonts-0.0.21/otf/Cantarell-Bold.otf */ /* 55461f5b853c6da88069ffcdf7f4dd3f8d7e3e6b cantarell-fonts-0.0.21/otf/Cantarell-Bold-Oblique.otf */ || (188 == gdef_len && 3426 == gpos_len && 264 == gsub_len) + /* d125afa82a77a6475ac0e74e7c207914af84b37a padauk-2.80/Padauk.ttf RHEL 7.2 */ + || (1058 == gdef_len && 11818 == gpos_len && 47032 == gsub_len) + /* 0f7b80437227b90a577cc078c0216160ae61b031 padauk-2.80/Padauk-Bold.ttf RHEL 7.2*/ + || (1046 == gdef_len && 12600 == gpos_len && 47030 == gsub_len) + /* d3dde9aa0a6b7f8f6a89ef1002e9aaa11b882290 padauk-2.80/Padauk.ttf Ubuntu 16.04 */ + || (1058 == gdef_len && 16770 == gpos_len && 71796 == gsub_len) + /* 5f3c98ccccae8a953be2d122c1b3a77fd805093f padauk-2.80/Padauk-Bold.ttf Ubuntu 16.04 */ + || (1046 == gdef_len && 17862 == gpos_len && 71790 == gsub_len) /* 6c93b63b64e8b2c93f5e824e78caca555dc887c7 padauk-2.80/Padauk-book.ttf */ || (1046 == gdef_len && 17112 == gpos_len && 71788 == gsub_len) /* d89b1664058359b8ec82e35d3531931125991fb9 padauk-2.80/Padauk-bookbold.ttf */ 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 0395c9c22ff..b69e5344c14 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 @@ -113,7 +113,7 @@ struct hb_ot_map_t assert (stage <= stages[table_index].len); unsigned int start = stage ? stages[table_index][stage - 1].last_lookup : 0; unsigned int end = stage < stages[table_index].len ? stages[table_index][stage].last_lookup : lookups[table_index].len; - *plookups = &lookups[table_index][start]; + *plookups = end == start ? NULL : &lookups[table_index][start]; *lookup_count = end - start; } 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 1ac77bef750..61737669c08 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 @@ -431,11 +431,12 @@ static inline hb_bool_t hb_non_global_user_features_present (const hb_feature_t *user_features, unsigned int num_user_features) { - while (num_user_features) + while (num_user_features) { if (user_features->start != 0 || user_features->end != (unsigned int) -1) return true; - else - num_user_features--, user_features++; + num_user_features--; + user_features++; + } return false; } diff --git a/Build/source/libs/harfbuzz/version.ac b/Build/source/libs/harfbuzz/version.ac index cd6d31b2db3..40779f084cb 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.5]) +m4_define([harfbuzz_version], [1.4.6]) |