diff options
15 files changed, 65 insertions, 40 deletions
diff --git a/Build/source/libs/README b/Build/source/libs/README index 1da72d6f7a1..938d6ce163a 100644 --- a/Build/source/libs/README +++ b/Build/source/libs/README @@ -21,7 +21,7 @@ gd 2.2.5 - checked 30aug17 gmp 6.1.2 - checked 16dec16 http://ftp.gnu.org/gnu/gmp/ -graphite2 1.3.12 - checked 16aug18 +graphite2 1.3.13 - checked 21dec18 http://sourceforge.net/projects/silgraphite/files/graphite2/ (requires C++11) diff --git a/Build/source/libs/graphite2/ChangeLog b/Build/source/libs/graphite2/ChangeLog index 1090c89f8a1..b1f9119ae12 100644 --- a/Build/source/libs/graphite2/ChangeLog +++ b/Build/source/libs/graphite2/ChangeLog @@ -1,3 +1,8 @@ +2018-12-21 Akira Kakuto <kakuto@fuk.kindai.ac.jp> + + Import graphite2-1.3.13. + * version.ac: Adjusted. + 2018-08-16 Akira Kakuto <kakuto@fuk.kindai.ac.jp> Import graphite2-1.3.12. diff --git a/Build/source/libs/graphite2/TLpatches/ChangeLog b/Build/source/libs/graphite2/TLpatches/ChangeLog index 0f6ff6dab41..30c3417f6f7 100644 --- a/Build/source/libs/graphite2/TLpatches/ChangeLog +++ b/Build/source/libs/graphite2/TLpatches/ChangeLog @@ -1,3 +1,8 @@ +2018-12-21 Akira Kakuto <kakuto@fuk.kindai.ac.jp> + + Imported graphite2-1.3.13 source tree from: + http://sourceforge.net/projects/silgraphite/files/graphite2/ + 2018-08-16 Akira Kakuto <kakuto@fuk.kindai.ac.jp> Imported graphite2-1.3.12 source tree from: diff --git a/Build/source/libs/graphite2/TLpatches/TL-Changes b/Build/source/libs/graphite2/TLpatches/TL-Changes index 06c9e580524..2f56db0f1cc 100644 --- a/Build/source/libs/graphite2/TLpatches/TL-Changes +++ b/Build/source/libs/graphite2/TLpatches/TL-Changes @@ -1,9 +1,11 @@ -Changes applied to the graphite2-1.3.12/ tree as obtained from: +Changes applied to the graphite2-1.3.13/ tree as obtained from: http://sourceforge.net/projects/silgraphite/files/graphite2/ +Removed setup.py Removed unused dirs: contrib debian-src doc gr2fonttest + python tests diff --git a/Build/source/libs/graphite2/configure b/Build/source/libs/graphite2/configure index a2bcbb6e707..4d4b75974e8 100755 --- a/Build/source/libs/graphite2/configure +++ b/Build/source/libs/graphite2/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for graphite2 (TeX Live) 1.3.12. +# Generated by GNU Autoconf 2.69 for graphite2 (TeX Live) 1.3.13. # # Report bugs to <tex-k@tug.org>. # @@ -579,8 +579,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='graphite2 (TeX Live)' PACKAGE_TARNAME='graphite2--tex-live-' -PACKAGE_VERSION='1.3.12' -PACKAGE_STRING='graphite2 (TeX Live) 1.3.12' +PACKAGE_VERSION='1.3.13' +PACKAGE_STRING='graphite2 (TeX Live) 1.3.13' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' @@ -1253,7 +1253,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 graphite2 (TeX Live) 1.3.12 to adapt to many kinds of systems. +\`configure' configures graphite2 (TeX Live) 1.3.13 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1320,7 +1320,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of graphite2 (TeX Live) 1.3.12:";; + short | recursive ) echo "Configuration of graphite2 (TeX Live) 1.3.13:";; esac cat <<\_ACEOF @@ -1418,7 +1418,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -graphite2 (TeX Live) configure 1.3.12 +graphite2 (TeX Live) configure 1.3.13 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1557,7 +1557,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 graphite2 (TeX Live) $as_me 1.3.12, which was +It was created by graphite2 (TeX Live) $as_me 1.3.13, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3480,7 +3480,7 @@ fi # Define the identity of the package. PACKAGE='graphite2--tex-live-' - VERSION='1.3.12' + VERSION='1.3.13' cat >>confdefs.h <<_ACEOF @@ -6543,7 +6543,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 graphite2 (TeX Live) $as_me 1.3.12, which was +This file was extended by graphite2 (TeX Live) $as_me 1.3.13, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6609,7 +6609,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="\\ -graphite2 (TeX Live) config.status 1.3.12 +graphite2 (TeX Live) config.status 1.3.13 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/Build/source/libs/graphite2/graphite2-src/CMakeLists.txt b/Build/source/libs/graphite2/graphite2-src/CMakeLists.txt index a4c648e3085..496712d54f8 100644 --- a/Build/source/libs/graphite2/graphite2-src/CMakeLists.txt +++ b/Build/source/libs/graphite2/graphite2-src/CMakeLists.txt @@ -1,13 +1,12 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR) cmake_policy(SET CMP0012 NEW) include(TestBigEndian) -include(FindPythonInterp) - +find_package(PythonInterp 3.6) project(graphite2) set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}) if (NOT CMAKE_BUILD_TYPE) set_property(CACHE CMAKE_BUILD_TYPE PROPERTY VALUE Release) -endif (NOT CMAKE_BUILD_TYPE) +endif() option(BUILD_SHARED_LIBS "Make library a shared library instead of static" ON) @@ -24,6 +23,7 @@ option(GRAPHITE2_NFILEFACE "Compile out the gr_make_file_face* APIs") option(GRAPHITE2_NTRACING "Compile out log segment tracing capability" ON) option(GRAPHITE2_TELEMETRY "Add memory usage telemetry") set(GRAPHITE2_SANITIZERS "" CACHE STRING "Set compiler sanitizers passed to -fsanitize") +set(GRAPHITE2_FUZZING_ENGINE libFuzzer.a CACHE STRING "Fuzzing engine to link against for the fuzzers") message(STATUS "Build: " ${CMAKE_BUILD_TYPE}) string(REPLACE "ON" "shared" _LIB_OBJECT_TYPE ${BUILD_SHARED_LIBS}) @@ -50,18 +50,18 @@ endif () string(TOLOWER ${GRAPHITE2_VM_TYPE} GRAPHITE2_VM_TYPE) if (NOT GRAPHITE2_VM_TYPE MATCHES "auto|direct|call") message(SEND_ERROR "unrecognised vm machine type: ${GRAPHITE2_VM_TYPE}. Only Auto, Direct or Call are available") -endif (NOT GRAPHITE2_VM_TYPE MATCHES "auto|direct|call") +endif() if (GRAPHITE2_VM_TYPE STREQUAL "auto") if (CMAKE_BUILD_TYPE MATCHES "[Rr]el(ease|[Ww]ith[Dd]eb[Ii]nfo)") set(GRAPHITE2_VM_TYPE "direct") else(CMAKE_BUILD_TYPE MATCHES "[Rr]el(ease|[Ww]ith[Dd]eb[Ii]nfo)") set(GRAPHITE2_VM_TYPE "call") - endif(CMAKE_BUILD_TYPE MATCHES "[Rr]el(ease|[Ww]ith[Dd]eb[Ii]nfo)") -endif (GRAPHITE2_VM_TYPE STREQUAL "auto") + endif() +endif() if (GRAPHITE2_VM_TYPE STREQUAL "direct" AND NOT (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")) message(WARNING "vm machine type direct can only be built using GCC") set(GRAPHITE2_VM_TYPE "call") -endif (GRAPHITE2_VM_TYPE STREQUAL "direct" AND NOT (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")) +endif() message(STATUS "Using vm machine type: ${GRAPHITE2_VM_TYPE}") if (BUILD_SHARED_LIBS) @@ -69,22 +69,24 @@ if (BUILD_SHARED_LIBS) EXEC_PROGRAM(${PYTHON_EXECUTABLE} ARGS -c \"import ctypes\; print(ctypes.sizeof(ctypes.c_void_p)) \" OUTPUT_VARIABLE PYTHON_SIZEOF_VOID_P) - if ((PYTHON_SIZEOF_VOID_P STREQUAL CMAKE_SIZEOF_VOID_P) AND (NOT GRAPHITE2_NFILEFACE) AND ((NOT GRAPHITE2_SANITIZERS MATCHES "address") OR CMAKE_COMPILER_IS_GNUCXX)) + if (NOT (PYTHON_VERSION_MAJOR GREATER 2 AND PYTHON_VERSION_MINOR GREATER 5)) + message(WARNING "Python version 3.6 or greater required. Disabling some tests.") + elseif ((PYTHON_SIZEOF_VOID_P STREQUAL CMAKE_SIZEOF_VOID_P) AND (NOT GRAPHITE2_NFILEFACE) AND ((NOT GRAPHITE2_SANITIZERS MATCHES "address") OR CMAKE_COMPILER_IS_GNUCXX)) set(PYTHON_CTYPES_COMPATBILE TRUE) else () if ((NOT GRAPHITE2_SANITIZERS MATCHES "address") OR CMAKE_COMPILER_IS_GNUCXX) message(WARNING "Python ctypes is incompatible with built DLL. Disabling some tests.") endif () endif () - endif (PYTHONINTERP_FOUND) -endif (BUILD_SHARED_LIBS) + endif() +endif() add_subdirectory(src) add_subdirectory(tests) add_subdirectory(doc) if (NOT GRAPHITE2_NFILEFACE) add_subdirectory(gr2fonttest) -endif (NOT GRAPHITE2_NFILEFACE) +endif() set(version 3.0.1) set(libdir ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}) diff --git a/Build/source/libs/graphite2/graphite2-src/ChangeLog b/Build/source/libs/graphite2/graphite2-src/ChangeLog index 672dddf8482..ac8b23aa1ad 100644 --- a/Build/source/libs/graphite2/graphite2-src/ChangeLog +++ b/Build/source/libs/graphite2/graphite2-src/ChangeLog @@ -1,3 +1,9 @@ +1.3.13 + . Resolve minor spacing issue in rtl non-overlap kerning + . python3 for graphite.py + . Better fuzzing + . Better building on windows + 1.3.12 . Graphite no longer does dumb rendering for fonts with no smarts . Segment caching code removed. Anything attempting to use the segment cache gets given a regular face instead diff --git a/Build/source/libs/graphite2/graphite2-src/Graphite.cmake b/Build/source/libs/graphite2/graphite2-src/Graphite.cmake index efc4006c842..1782c98d6d1 100644 --- a/Build/source/libs/graphite2/graphite2-src/Graphite.cmake +++ b/Build/source/libs/graphite2/graphite2-src/Graphite.cmake @@ -109,6 +109,7 @@ function(cmptest TESTNAME FONTFILE TEXTFILE) endif (EXISTS ${PROJECT_SOURCE_DIR}/standards/${TESTNAME}${CMAKE_SYSTEM_NAME}.json) if (PYTHON_CTYPES_COMPATBILE) add_test(NAME ${TESTNAME} COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/fnttxtrender --graphite_library=$<TARGET_FILE:graphite2> -t ${PROJECT_SOURCE_DIR}/texts/${TEXTFILE} -o ${PROJECT_BINARY_DIR}/${TESTNAME}.json -c ${PROJECT_SOURCE_DIR}/standards/${TESTNAME}${PLATFORM_TEST_SUFFIX}.json ${ARGN} ${PROJECT_SOURCE_DIR}/fonts/${FONTFILE}) + set_tests_properties(${TESTNAME} PROPERTIES ENVIRONMENT PYTHONPATH=${CMAKE_SOURCE_DIR}/python) endif (PYTHON_CTYPES_COMPATBILE) endif () endfunction(cmptest) diff --git a/Build/source/libs/graphite2/graphite2-src/README.md b/Build/source/libs/graphite2/graphite2-src/README.md index 8eb71935b29..277c32777be 100644 --- a/Build/source/libs/graphite2/graphite2-src/README.md +++ b/Build/source/libs/graphite2/graphite2-src/README.md @@ -4,7 +4,7 @@ | OS | Intel 64 bit | Intel 32 bit | Arm 32 bit | |---------|:------------:|:------------:|:----------:| | Linux | [![Build Status](http://build.palaso.org/app/rest/builds/buildType:bt124/statusIcon)](http://build.palaso.org/viewType.html?buildTypeId=bt124&guest=1) | [![Build Status](http://build.palaso.org/app/rest/builds/buildType:bt123/statusIcon)](http://build.palaso.org/viewType.html?buildTypeId=bt123&guest=1) | [![Build Status](http://build.palaso.org/app/rest/builds/buildType:Graphite_Linux32bitArm/statusIcon)](http://build.palaso.org/viewType.html?buildTypeId=Graphite_Linux32bitArm&guest=1) | -| Windows | [![Build Status](http://build.palaso.org/app/rest/builds/buildType:Graphite_Windows64bitProduction/statusIcon)](http://build.palaso.org/viewType.html?buildTypeId=Graphite_Windows64bitProduction&guest=1) | [![Build Status](http://build.palaso.org/app/rest/builds/buildType:bt91/statusIcon)](http://build.palaso.org/viewType.html?buildTypeId=bt91&guest=1)| | +| Windows | [![Build Status](http://build.palaso.org/app/rest/builds/buildType:Graphite_Windows64bit/statusIcon)](http://build.palaso.org/viewType.html?buildTypeId=Graphite_Windows64bit&guest=1) | [![Build Status](http://build.palaso.org/app/rest/builds/buildType:bt91/statusIcon)](http://build.palaso.org/viewType.html?buildTypeId=bt91&guest=1)| | ## What is Graphite? diff --git a/Build/source/libs/graphite2/graphite2-src/include/graphite2/Font.h b/Build/source/libs/graphite2/graphite2-src/include/graphite2/Font.h index ae5f28c457e..3e8214d46b5 100644 --- a/Build/source/libs/graphite2/graphite2-src/include/graphite2/Font.h +++ b/Build/source/libs/graphite2/graphite2-src/include/graphite2/Font.h @@ -30,7 +30,7 @@ #define GR2_VERSION_MAJOR 1 #define GR2_VERSION_MINOR 3 -#define GR2_VERSION_BUGFIX 12 +#define GR2_VERSION_BUGFIX 13 #ifdef __cplusplus extern "C" diff --git a/Build/source/libs/graphite2/graphite2-src/src/CMakeLists.txt b/Build/source/libs/graphite2/graphite2-src/src/CMakeLists.txt index 89a59afa1b7..389cf5a2389 100644 --- a/Build/source/libs/graphite2/graphite2-src/src/CMakeLists.txt +++ b/Build/source/libs/graphite2/graphite2-src/src/CMakeLists.txt @@ -38,21 +38,21 @@ set(FILEFACE FileFace.cpp) if (GRAPHITE2_NFILEFACE) add_definitions(-DGRAPHITE2_NFILEFACE) set(FILEFACE) -endif (GRAPHITE2_NFILEFACE) +endif() set(TRACING json.cpp) if (GRAPHITE2_NTRACING) add_definitions(-DGRAPHITE2_NTRACING) set(TRACING) -endif (GRAPHITE2_NTRACING) +endif() if (GRAPHITE2_TELEMETRY) add_definitions(-DGRAPHITE2_TELEMETRY) -endif (GRAPHITE2_TELEMETRY) +endif() if (NOT BUILD_SHARED_LIBS) add_definitions(-DGRAPHITE2_STATIC) -endif (NOT BUILD_SHARED_LIBS) +endif() set(GRAPHITE_HEADERS ../include/graphite2/Font.h @@ -109,14 +109,14 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") LINKER_LANGUAGE C) if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86|i.86") add_definitions(-mfpmath=sse -msse2) - endif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86|i.86") + endif() if (CMAKE_COMPILER_IS_GNUCXX) add_definitions(-Wdouble-promotion) - endif (CMAKE_COMPILER_IS_GNUCXX) + endif() message(STATUS "Compiler ID is: ${CMAKE_CXX_COMPILER_ID}") if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") add_definitions(-Wimplicit-fallthrough -Wshorten-64-to-32) - endif (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") + endif() if (${CMAKE_CXX_COMPILER} MATCHES ".*mingw.*") target_link_libraries(graphite2 kernel32 msvcr90 mingw32 gcc user32) else (${CMAKE_CXX_COMPILER} MATCHES ".*mingw.*") @@ -125,14 +125,14 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") else () target_link_libraries(graphite2 c gcc) endif () - endif (${CMAKE_CXX_COMPILER} MATCHES ".*mingw.*") + endif() include(Graphite) if (BUILD_SHARED_LIBS) nolib_test(stdc++ $<TARGET_SONAME_FILE:graphite2>) endif () set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}") -endif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") +endif() if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") set_target_properties(graphite2 PROPERTIES @@ -144,12 +144,12 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") nolib_test(stdc++ $<TARGET_SONAME_FILE:graphite2>) set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}") -endif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") +endif() if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") set_target_properties(graphite2 PROPERTIES COMPILE_DEFINITIONS "_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;UNICODE;GRAPHITE2_EXPORTING") -endif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") +endif() install(TARGETS graphite2 EXPORT graphite2 LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX} PUBLIC_HEADER DESTINATION include/graphite2 RUNTIME DESTINATION bin) diff --git a/Build/source/libs/graphite2/graphite2-src/src/Collider.cpp b/Build/source/libs/graphite2/graphite2-src/src/Collider.cpp index 53d498ce8e1..6b20a91c9bc 100644 --- a/Build/source/libs/graphite2/graphite2-src/src/Collider.cpp +++ b/Build/source/libs/graphite2/graphite2-src/src/Collider.cpp @@ -993,7 +993,7 @@ bool KernCollider::mergeSlot(Segment *seg, Slot *slot, const Position &currShift nooverlap = false; } if (nooverlap) - _mingap = max(_mingap, _xbound + currSpace + _margin - x); + _mingap = max(_mingap, _xbound - rtl * (currSpace + _margin + x)); if (collides && !nooverlap) _hit = true; return collides | nooverlap; // note that true is not a necessarily reliable value diff --git a/Build/source/libs/graphite2/graphite2-src/src/GlyphCache.cpp b/Build/source/libs/graphite2/graphite2-src/src/GlyphCache.cpp index 6d050ce756e..282bdc18fd6 100644 --- a/Build/source/libs/graphite2/graphite2-src/src/GlyphCache.cpp +++ b/Build/source/libs/graphite2/graphite2-src/src/GlyphCache.cpp @@ -164,6 +164,10 @@ GlyphCache::GlyphCache(const Face & face, const uint32 face_options) } delete _glyph_loader; _glyph_loader = 0; + // coverity[leaked_storage : FALSE] - calling read_glyph on index 0 saved + // glyphs as _glyphs[0]. Setting _glyph_loader to nullptr here flags that + // the dtor needs to call delete[] on _glyphs[0] to release what was allocated + // as glyphs } if (_glyphs && glyph(0) == 0) diff --git a/Build/source/libs/graphite2/graphite2-src/src/inc/TtfTypes.h b/Build/source/libs/graphite2/graphite2-src/src/inc/TtfTypes.h index b91c9f3b147..ae67915304e 100644 --- a/Build/source/libs/graphite2/graphite2-src/src/inc/TtfTypes.h +++ b/Build/source/libs/graphite2/graphite2-src/src/inc/TtfTypes.h @@ -79,7 +79,7 @@ enum //********************************************************************************************** namespace Sfnt { -#pragma pack(1) // We need this or the structure members aren't aligned +#pragma pack(push,1) // We need this or the structure members aren't aligned // correctly. Fortunately this form of pragma is supposed // to be recognised by VS C++ too (at least according to // MSDN). @@ -412,7 +412,7 @@ namespace Sfnt }; }; -#pragma pack() +#pragma pack(pop) } // end of namespace Sfnt } // end of namespace TtfUtil diff --git a/Build/source/libs/graphite2/version.ac b/Build/source/libs/graphite2/version.ac index 152b9a9bc1c..3cab71ac1dd 100644 --- a/Build/source/libs/graphite2/version.ac +++ b/Build/source/libs/graphite2/version.ac @@ -8,4 +8,4 @@ dnl dnl -------------------------------------------------------- dnl dnl m4-include this file to define the current graphite2 version -m4_define([graphite2_version], [1.3.12]) +m4_define([graphite2_version], [1.3.13]) |