diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index e78b66f71..000000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,2 +0,0 @@ -patreon: libgdx -custom: https://libgdx.badlogicgames.com/donate.html diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/CMakeLists.txt b/extensions/gdx-freetype/jni/freetype-2.9.1/CMakeLists.txt deleted file mode 100644 index ad8ded0bb..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/CMakeLists.txt +++ /dev/null @@ -1,497 +0,0 @@ -# CMakeLists.txt -# -# Copyright 2013-2018 by -# David Turner, Robert Wilhelm, and Werner Lemberg. -# -# Written originally by John Cary -# -# This file is part of the FreeType project, and may only be used, modified, -# and distributed under the terms of the FreeType project license, -# LICENSE.TXT. By continuing to use, modify, or distribute this file you -# indicate that you have read the license and understand and accept it -# fully. -# -# -# The following will 1. create a build directory and 2. change into it and -# call cmake to configure the build with default parameters as a static -# library. -# -# cmake -E make_directory build -# cmake -E chdir build cmake .. -# -# For a dynamic library, use -# -# cmake -E chdir build cmake -D BUILD_SHARED_LIBS:BOOL=true .. -# -# For a framework on OS X, use -# -# cmake -E chdir build cmake -G Xcode -D BUILD_FRAMEWORK:BOOL=true .. -# -# For an iOS static library, use -# -# cmake -E chdir build cmake -G Xcode -D IOS_PLATFORM=OS .. -# -# or -# -# cmake -E chdir build cmake -G Xcode -D IOS_PLATFORM=SIMULATOR .. -# -# Finally, build the project with: -# -# cmake --build build -# -# Install it with -# -# (sudo) cmake --build build --target install -# -# A binary distribution can be made with -# -# cmake --build build --config Release --target package -# -# Please refer to the cmake manual for further options, in particular, how -# to modify compilation and linking parameters. -# -# Some notes. -# -# . `cmake' creates configuration files in -# -# /include/freetype/config -# -# which should be further modified if necessary. -# -# . You can use `cmake' directly on a freshly cloned FreeType git -# repository. -# -# . `CMakeLists.txt' is provided as-is since it is normally not used by the -# developer team. -# -# . Set the `FT_WITH_ZLIB', `FT_WITH_BZIP2', `FT_WITH_PNG', and -# `FT_WITH_HARFBUZZ' CMake variables to `ON' to force using a dependency. -# Leave a variable undefined (which is the default) to use the dependency -# only if it is available. Set `CMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE' to -# disable a dependency completely (CMake package name, so `BZip2' instead of -# `BZIP2'). Example: -# -# cmake -DFT_WITH_ZLIB=ON -DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE [...] -# -# . Installation of FreeType can be controlled with the CMake variables -# `SKIP_INSTALL_HEADERS', `SKIP_INSTALL_LIBRARIES', and `SKIP_INSTALL_ALL' -# (this is compatible with the same CMake variables in zlib's CMake -# support). - -# FreeType explicitly marks the API to be exported and relies on the compiler -# to hide all other symbols. CMake supports a C_VISBILITY_PRESET property -# starting with 2.8.12. -cmake_minimum_required(VERSION 2.8.12) - -if (NOT CMAKE_VERSION VERSION_LESS 3.3) - # Allow symbol visibility settings also on static libraries. CMake < 3.3 - # only sets the propery on a shared library build. - cmake_policy(SET CMP0063 NEW) -endif () - -include(CheckIncludeFile) - -# CMAKE_TOOLCHAIN_FILE must be set before `project' is called, which -# configures the base build environment and references the toolchain file -if (APPLE) - if (DEFINED IOS_PLATFORM) - if (NOT "${IOS_PLATFORM}" STREQUAL "OS" - AND NOT "${IOS_PLATFORM}" STREQUAL "SIMULATOR") - message(FATAL_ERROR - "IOS_PLATFORM must be set to either OS or SIMULATOR") - endif () - if (NOT "${CMAKE_GENERATOR}" STREQUAL "Xcode") - message(AUTHOR_WARNING - "You should use Xcode generator with IOS_PLATFORM enabled to get Universal builds.") - endif () - if (BUILD_SHARED_LIBS) - message(FATAL_ERROR - "BUILD_SHARED_LIBS can not be on with IOS_PLATFORM enabled") - endif () - if (BUILD_FRAMEWORK) - message(FATAL_ERROR - "BUILD_FRAMEWORK can not be on with IOS_PLATFORM enabled") - endif () - - # iOS only uses static libraries - set(BUILD_SHARED_LIBS OFF) - - set(CMAKE_TOOLCHAIN_FILE - ${CMAKE_SOURCE_DIR}/builds/cmake/iOS.cmake) - endif () -else () - if (DEFINED IOS_PLATFORM) - message(FATAL_ERROR "IOS_PLATFORM is not supported on this platform") - endif () -endif () - - -project(freetype C) - -set(VERSION_MAJOR "2") -set(VERSION_MINOR "9") -set(VERSION_PATCH "1") - -# SOVERSION scheme: CURRENT.AGE.REVISION -# If there was an incompatible interface change: -# Increment CURRENT. Set AGE and REVISION to 0 -# If there was a compatible interface change: -# Increment AGE. Set REVISION to 0 -# If the source code was changed, but there were no interface changes: -# Increment REVISION. -set(LIBRARY_VERSION "6.16.0") -set(LIBRARY_SOVERSION "6") - -# These options mean "require x and complain if not found". They'll get -# optionally found anyway. Use `-DCMAKE_DISABLE_FIND_PACKAGE_x=TRUE` to disable -# searching for a packge entirely (x is the CMake package name, so "BZip2" -# instead of "BZIP2"). -option(FT_WITH_ZLIB "Use system zlib instead of internal library." OFF) -option(FT_WITH_BZIP2 "Support bzip2 compressed fonts." OFF) -option(FT_WITH_PNG "Support PNG compressed OpenType embedded bitmaps." OFF) -option(FT_WITH_HARFBUZZ "Improve auto-hinting of OpenType fonts." OFF) - - -# 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.,\n" - " cmake -E make_directory build\n" - " cmake -E chdir build cmake ..\n" - "Before that, remove the files created by this failed run with\n" - " cmake -E remove CMakeCache.txt\n" - " cmake -E remove_directory CMakeFiles") -endif () - - -# Add local cmake modules -list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/builds/cmake) - - -if (BUILD_FRAMEWORK) - 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(BUILD_SHARED_LIBS ON) -endif () - - -# Find dependencies -if (FT_WITH_HARFBUZZ) - find_package(HarfBuzz 1.3.0 REQUIRED) -else () - find_package(HarfBuzz 1.3.0) -endif () - -if (FT_WITH_PNG) - find_package(PNG REQUIRED) -else () - find_package(PNG) -endif () - -if (FT_WITH_ZLIB) - find_package(ZLIB REQUIRED) -else () - find_package(ZLIB) -endif () - -if (FT_WITH_BZIP2) - find_package(BZip2 REQUIRED) -else () - find_package(BZip2) -endif () - -# Create the configuration file -if (UNIX) - check_include_file("unistd.h" HAVE_UNISTD_H) - check_include_file("fcntl.h" HAVE_FCNTL_H) - check_include_file("stdint.h" HAVE_STDINT_H) - - file(READ "${PROJECT_SOURCE_DIR}/builds/unix/ftconfig.in" - FTCONFIG_H) - if (HAVE_UNISTD_H) - string(REGEX REPLACE - "#undef +(HAVE_UNISTD_H)" "#define \\1 1" - FTCONFIG_H "${FTCONFIG_H}") - endif () - if (HAVE_FCNTL_H) - string(REGEX REPLACE - "#undef +(HAVE_FCNTL_H)" "#define \\1 1" - FTCONFIG_H "${FTCONFIG_H}") - endif () - if (HAVE_STDINT_H) - string(REGEX REPLACE - "#undef +(HAVE_STDINT_H)" "#define \\1 1" - FTCONFIG_H "${FTCONFIG_H}") - endif () - string(REPLACE "/undef " "#undef " - FTCONFIG_H "${FTCONFIG_H}") - file(WRITE "${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h" - "${FTCONFIG_H}") -endif () - - -# Create the options file -file(READ "${PROJECT_SOURCE_DIR}/include/freetype/config/ftoption.h" - FTOPTION_H) -if (ZLIB_FOUND) - string(REGEX REPLACE - "/\\* +(#define +FT_CONFIG_OPTION_SYSTEM_ZLIB) +\\*/" "\\1" - FTOPTION_H "${FTOPTION_H}") -endif () -if (BZIP2_FOUND) - string(REGEX REPLACE - "/\\* +(#define +FT_CONFIG_OPTION_USE_BZIP2) +\\*/" "\\1" - FTOPTION_H "${FTOPTION_H}") -endif () -if (PNG_FOUND) - string(REGEX REPLACE - "/\\* +(#define +FT_CONFIG_OPTION_USE_PNG) +\\*/" "\\1" - FTOPTION_H "${FTOPTION_H}") -endif () -if (HARFBUZZ_FOUND) - string(REGEX REPLACE - "/\\* +(#define +FT_CONFIG_OPTION_USE_HARFBUZZ) +\\*/" "\\1" - FTOPTION_H "${FTOPTION_H}") -endif () -file(WRITE "${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h" - "${FTOPTION_H}") - - -file(GLOB PUBLIC_HEADERS "include/ft2build.h" "include/freetype/*.h") -file(GLOB PUBLIC_CONFIG_HEADERS "include/freetype/config/*.h") -file(GLOB PRIVATE_HEADERS "include/freetype/internal/*.h") - - -set(BASE_SRCS - src/autofit/autofit.c - src/base/ftbase.c - src/base/ftbbox.c - src/base/ftbdf.c - src/base/ftbitmap.c - src/base/ftcid.c - src/base/ftfstype.c - src/base/ftgasp.c - src/base/ftglyph.c - src/base/ftgxval.c - src/base/ftinit.c - src/base/ftmm.c - src/base/ftotval.c - src/base/ftpatent.c - src/base/ftpfr.c - src/base/ftstroke.c - src/base/ftsynth.c - src/base/ftsystem.c - src/base/fttype1.c - src/base/ftwinfnt.c - src/bdf/bdf.c - src/bzip2/ftbzip2.c - src/cache/ftcache.c - src/cff/cff.c - src/cid/type1cid.c - src/gzip/ftgzip.c - src/lzw/ftlzw.c - src/pcf/pcf.c - src/pfr/pfr.c - src/psaux/psaux.c - src/pshinter/pshinter.c - src/psnames/psnames.c - src/raster/raster.c - src/sfnt/sfnt.c - src/smooth/smooth.c - src/truetype/truetype.c - src/type1/type1.c - src/type42/type42.c - src/winfonts/winfnt.c -) - -if (WIN32) - enable_language(RC) - list(APPEND BASE_SRCS builds/windows/ftdebug.c - src/base/ftver.rc) -elseif (WINCE) - list(APPEND BASE_SRCS builds/wince/ftdebug.c) -else () - list(APPEND BASE_SRCS src/base/ftdebug.c) -endif () - -if (BUILD_FRAMEWORK) - list(APPEND BASE_SRCS builds/mac/freetype-Info.plist) -endif () - - -if (NOT DISABLE_FORCE_DEBUG_POSTFIX) - set(CMAKE_DEBUG_POSTFIX d) -endif() - - -add_library(freetype - ${PUBLIC_HEADERS} - ${PUBLIC_CONFIG_HEADERS} - ${PRIVATE_HEADERS} - ${BASE_SRCS} -) - -set_target_properties( - freetype PROPERTIES - C_VISIBILITY_PRESET hidden) - -target_compile_definitions( - freetype PRIVATE FT2_BUILD_LIBRARY) - -if (WIN32) - target_compile_definitions( - freetype PRIVATE _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS) -endif () - -if (BUILD_SHARED_LIBS) - set_target_properties(freetype PROPERTIES - VERSION ${LIBRARY_VERSION} - SOVERSION ${LIBRARY_SOVERSION}) -endif () - -target_include_directories( - freetype BEFORE # Pick up ftconfig.h and ftoption.h generated above. - PRIVATE "${PROJECT_BINARY_DIR}/include") - -target_include_directories( - freetype - PRIVATE "${PROJECT_SOURCE_DIR}/include") - -target_include_directories( - freetype - PUBLIC $) - -if (BUILD_FRAMEWORK) - set_property(SOURCE ${PUBLIC_CONFIG_HEADERS} - PROPERTY MACOSX_PACKAGE_LOCATION Headers/config - ) - set_target_properties(freetype PROPERTIES - FRAMEWORK TRUE - MACOSX_FRAMEWORK_INFO_PLIST builds/mac/freetype-Info.plist - PUBLIC_HEADER "${PUBLIC_HEADERS}" - XCODE_ATTRIBUTE_INSTALL_PATH "@rpath" - ) -endif () - - -set(PKG_CONFIG_REQUIRED_PRIVATE "") - -if (ZLIB_FOUND) - target_link_libraries(freetype PRIVATE ${ZLIB_LIBRARIES}) - target_include_directories(freetype PRIVATE ${ZLIB_INCLUDE_DIRS}) - list(APPEND PKG_CONFIG_REQUIRED_PRIVATE zlib) -endif () -if (BZIP2_FOUND) - target_link_libraries(freetype PRIVATE ${BZIP2_LIBRARIES}) - target_include_directories(freetype PRIVATE ${BZIP2_INCLUDE_DIR}) # not BZIP2_INCLUDE_DIRS - list(APPEND PKG_CONFIG_REQUIRED_PRIVATE bzip2) -endif () -if (PNG_FOUND) - target_link_libraries(freetype PRIVATE ${PNG_LIBRARIES}) - target_compile_definitions(freetype PRIVATE ${PNG_DEFINITIONS}) - target_include_directories(freetype PRIVATE ${PNG_INCLUDE_DIRS}) - list(APPEND PKG_CONFIG_REQUIRED_PRIVATE libpng) -endif () -if (HARFBUZZ_FOUND) - target_link_libraries(freetype PRIVATE ${HARFBUZZ_LIBRARIES}) - target_include_directories(freetype PRIVATE ${HARFBUZZ_INCLUDE_DIRS}) - list(APPEND PKG_CONFIG_REQUIRED_PRIVATE harfbuzz) -endif () - - -# Installation -include(GNUInstallDirs) - -if (NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL) - install( - # Note the trailing slash in the argument to `DIRECTORY'! - DIRECTORY ${PROJECT_SOURCE_DIR}/include/ - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/freetype2 - COMPONENT headers - PATTERN "internal" EXCLUDE - PATTERN "ftconfig.h" EXCLUDE - PATTERN "ftoption.h" EXCLUDE) - install( - FILES ${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h - ${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/freetype2/freetype/config - COMPONENT headers) -endif () - -if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) - # Generate the pkg-config file - if (UNIX) - file(READ ${PROJECT_SOURCE_DIR}/builds/unix/freetype2.in FREETYPE2_PC_IN) - - string(REPLACE ";" ", " PKG_CONFIG_REQUIRED_PRIVATE "${PKG_CONFIG_REQUIRED_PRIVATE}") - - string(REPLACE "%prefix%" ${CMAKE_INSTALL_PREFIX} - FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) - string(REPLACE "%exec_prefix%" "\${prefix}" - FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) - string(REPLACE "%libdir%" "\${prefix}/${CMAKE_INSTALL_LIBDIR}" - FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) - string(REPLACE "%includedir%" "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}" - FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) - string(REPLACE "%ft_version%" "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" - FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) - string(REPLACE "%REQUIRES_PRIVATE%" "${PKG_CONFIG_REQUIRED_PRIVATE}" - FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) - string(REPLACE "%LIBS_PRIVATE%" "" # All libs support pkg-config - FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) - - file(WRITE ${PROJECT_BINARY_DIR}/freetype2.pc ${FREETYPE2_PC_IN}) - - install( - FILES ${PROJECT_BINARY_DIR}/freetype2.pc - DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig - COMPONENT pkgconfig) - endif () - - install( - TARGETS freetype - EXPORT freetype-targets - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - FRAMEWORK DESTINATION Library/Frameworks - COMPONENT libraries) - install( - EXPORT freetype-targets - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/freetype - FILE freetype-config.cmake - COMPONENT headers) -endif () - - -# Packaging -set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME}) -set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The FreeType font rendering library.") -set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README") -set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/docs/LICENSE.TXT") - -set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR}) -set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR}) -set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH}) -set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") - -if (WIN32) - set(CPACK_GENERATOR ZIP) -else() - set(CPACK_GENERATOR TGZ) -endif() - -set(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Libraries") -set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C/C++ Headers") -set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION - "Library used to build programs which use FreeType") -set(CPACK_COMPONENT_HEADERS_DESCRIPTION - "C/C++ header files for use with FreeType") -set(CPACK_COMPONENT_HEADERS_DEPENDS libraries) -set(CPACK_COMPONENT_LIBRARIES_GROUP "Development") -set(CPACK_COMPONENT_HEADERS_GROUP "Development") - -include(CPack) diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/ChangeLog b/extensions/gdx-freetype/jni/freetype-2.9.1/ChangeLog deleted file mode 100644 index 806b8354a..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/ChangeLog +++ /dev/null @@ -1,2352 +0,0 @@ -2018-05-01 Werner Lemberg - - * Version 2.9.1 released. - ========================= - - - Tag sources with `VER-2-9-1'. - - * docs/VERSION.TXT: Add entry for version 2.9.1. - * docs/CHANGES: Updated. - - * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, - src/base/ftver.rc, builds/windows/vc2005/index.html, - builds/windows/vc2008/freetype.vcproj, - builds/windows/vc2008/index.html, - builds/windows/vc2010/freetype.vcxproj, - builds/windows/vc2010/index.html, - builds/windows/visualc/freetype.dsp, - builds/windows/visualc/freetype.vcproj, - builds/windows/visualc/index.html, - builds/windows/visualce/freetype.dsp, - builds/windows/visualce/freetype.vcproj, - builds/windows/visualce/index.html, - builds/wince/vc2005-ce/freetype.vcproj, - builds/wince/vc2005-ce/index.html, - builds/wince/vc2008-ce/freetype.vcproj, - builds/wince/vc2008-ce/index.html: s/2.9/2.9.1/, s/29/291/. - - * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. - - * builds/unix/configure.raw (version_info): Set to 22:1:16. - * CMakeLists.txt (VERSION_PATCH): Set to 1. - - * include/freetype/ftgasp.h: Use FT_BEGIN_HEADER and FT_END_HEADER. - -2018-04-26 Werner Lemberg - - Another fix for handling invalid format 2 cmaps. - - Sigh. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8003 - - * src/sfnt/ttcmap.c (tt_cmap2_char_next): Adjust condition to avoid - an endless loop. - -2018-04-24 Ben Wagner - - [base] Avoid undefined behaviour in lcd filtering code (#53727). - - * src/base/ftlcdfil.c (ft_lcd_filter_fir, _ft_lcd_filter_legacy): - Ensure `height > 0'. - -2018-04-22 Werner Lemberg - - * src/base/ftoutln.c (FT_Outline_Decompose): Improve error tracing. - -2018-04-22 Alexei Podtelezhnikov - - [base] Fix bitmap emboldening. - - Bug introduced after release 2.8. - - * src/base/ftbitmap.c (ft_bitmap_assure_buffer): We use - `FT_QALLOC_MULT', which doesn't zero out the buffer. Adjust the - bitmap copying code to take care of this fact. - -2018-04-22 Werner Lemberg - - Another fix for handling invalid format 2 cmaps. - - The previous commit was incomplete. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7928 - - * src/sfnt/ttcmap.c (tt_cmap2_char_next): Adjust condition to avoid - an endless loop. - -2018-04-19 Werner Lemberg - - Fix handling of invalid format 2 cmaps. - - The problem was introduced after the last release. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7828 - - * src/sfnt/ttcmap.c (tt_cmap2_char_next): Avoid endless loop. - -2018-04-17 Werner Lemberg - - [truetype] Integer overflow issues. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7739 - - * src/truetype/ttinterp.c (Ins_CEILING): Use FT_PIX_CEIL_LONG. - -2018-04-16 Werner Lemberg - - [truetype] Integer overflow issues. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7718 - - * src/truetype/ttinterp.c (Ins_MIRP): Use ADD_LONG. - -2018-04-15 Alexei Podtelezhnikov - - [build] Use `info' function of make 3.81. - - * configure, docs/INSTALL, docs/INSTALL.CROSS, docs/INSTALL.GNU, - docs/INSTALL.UNIX, docs/MAKEPP: Bump make version requirements. - - * builds/detect.mk (std_setup): Replace `echo' with `info'. - (dos_setup): Removed. - * builds/unix/install.mk, builds/modules.mk, builds/dos/detect.mk, - builds/windows/detect.mk, builds/os2/detect.mk: Updated. - * builds/newline: No longer needed. - -2018-04-15 Werner Lemberg - - [truetype]: Limit `SLOOP' bytecode argument to 16 bits. - - This fixes - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7707 - - * src/truetype/ttinterp.c (Ins_SLOOP): Do it. - -2018-04-14 Werner Lemberg - - [truetype] Integer overflow issues. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7652 - - * src/truetype/ttinterp.c (Ins_MDAP): Use SUB_LONG. - -2018-04-14 Werner Lemberg - - [autofit] Update to Unicode 11.0.0. - - But no support new scripts (volunteers welcomed). - - * src/autofit/afranges.c (af_arab_nonbase_uniranges, - af_beng_nonbase_uniranges, af_cakm_nonbase_uniranges, - af_deva_nonbase_uniranges, af_geor_uniranges, - af_gujr_nonbase_uniranges, af_mlym_nonbase_uniranges, - af_nkoo_nonbase_uniranges, af_telu_nonbase_uniranges, - af_hani_uniranges): Add new data. - -2018-04-10 Nikolaus Waxweiler - - * CMakeLists.txt, builds/cmake/FindHarfBuzz.cmake: Extensive - modernization measures. - - This brings up the minimum required CMake version to 2.8.12. - - The installation paths follow the GNU defaults now, e.g. installing on a - 64 bit host will place binaries into the lib64/ folder on e.g. Fedora. - - Symbols are hidden by default (e.g. `-fvisibility=hidden' on GCC). - - CMake will no longer look for a C++ compiler. - - Library and .so version now match the Autotools build. - - Comments in the build file and informational messages now use platform - agnostic example commands. - - ftoption.h and ftconfig.h are written directly without a redundant `-new' - copy. - - External dependencies are expressed as option()s and will turn up as such - in cmake-gui. - - Internal: Properties such as dependencies and include directories are now - privately set on the freetype library instead of globally. - - The CPack definitions have been cleaned up, the `make dist' has been - removed. Source packages generated with CPack don't contain Autotools - files and aren't used by the maintainters anyway. - - On Windows, src/base/ftver.rc is compiled to decorate the library with - version and copyright information. - - A pkg-config file is now generated and installed. - -2018-04-09 Werner Lemberg - - [truetype] Integer overflow issues. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7453 - - * src/truetype/ttinterp.c (Round_Super, Round_Super_45): Use - ADD_LONG and SUB_LONG. - -2018-04-06 Alexei Podtelezhnikov - - [windows, wince] Clean up legacy project files. - - * builds/wince/vc2005-ce/freetype.vcproj, - builds/wince/vc2008-ce/freetype.vcproj, - builds/windows/vc2005/freetype.vcproj, - builds/windows/vc2008/freetype.vcproj, - builds/windows/visualce/freetype.vcproj, - builds/windows/visualce/freetype.dsp, - builds/windows/visualc/freetype.vcproj, - builds/windows/visualc/freetype.dsp: Remove per-file compile flags. - -2018-04-04 Werner Lemberg - - [cff, type1] Sanitize `BlueFuzz' and `BlueShift'. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7371 - - * src/cff/cffload.c (cff_load_private_dict): Sanitize - `priv->blue_shift' and `priv->blue_fuzz' to avoid overflows later - on. - - * src/type1/t1load.c (T1_Open_Face): Ditto. - -2018-04-04 Ben Wagner - - * src/truetype/ttobjs.c (trick_names): Add 3 tricky fonts (#53554), - `DFHei-Md-HK-BF', `DFKaiShu-Md-HK-BF' and `DFMing-Bd-HK-BF'. - (tt_check_trickyness_sfnt_ids): Add checksums for 3 tricky fonts - in above. - -2018-04-01 Werner Lemberg - - * builds/toplevel.mk (work): Use $(SEP). - - This fixes the `make refdoc' using Cygwin: $(CAT) is `type' on this - platform, and this program only understands backslashes in paths. - - Reported by Nikhil Ramakrishnan . - -2018-03-30 Werner Lemberg - - [truetype] Fix memory leak (only if tracing is on). - - * src/truetype/ttgxvar.c (TT_Get_MM_Var) [FT_DEBUG_LEVEL_TRACE}: Fix - it. - -2018-03-23 Ben Wagner - - [sfnt] Correctly handle missing bitmaps in sbix format (#53404). - - * src/sfnt/ttfsbit.c (tt_face_load_sbix_image): Fix return value. - -2018-03-23 Ben Wagner - - [truetype] Fix advance of empty glyphs in bitmap fonts (#53393). - - * src/truetype/ttgload.c (TT_Load_Glyph): Apply scaling to metrics - for empty bitmaps. - -2018-03-22 Werner Lemberg - - Remove `ftlcdfil.c' and `ftfntfmt.c' from build files (#53415). - - builds/amiga/makefile, builds/amiga/makefile.os4, - builds/amiga/smakefile, builds/mac/FreeType.m68k_cfm.make.txt, - builds/mac/FreeType.m68k_far.make.txt, - builds/mac/FreeType.ppc_carbon.make.txt, - builds/mac/FreeType.ppc_classic.make.txt, - builds/symbian/freetype.mmp, builds/wince/vc2005-ce/freetype.vcproj, - builds/wince/vc2008-ce/freetype.vcproj, - builds/windows/vc2005/freetype.vcproj, - builds/windows/vc2008/freetype.vcproj, - builds/windows/vc2010/freetype.vcxproj, - builds/windows/vc2010/freetype.vcxproj.filters, - builds/windows/visualc/freetype.dsp, - builds/windows/visualc/freetype.vcproj, - builds/windows/visualce/freetype.dsp, - builds/windows/visualce/freetype.vcproj, vms_make.com: Do it. - -2018-03-13 Werner Lemberg - - * src/sfnt/ttcmap.c (tt_cmap2_validate): Fix potential numeric - overflow. - -2018-03-13 Werner Lemberg - - Fix cmap format 2 handling (#53320). - - The patch introduced for #52646 was not correct. - - * src/sfnt/ttcmap.c (tt_cmap2_char_next): Adjust condition. - -2018-03-10 Nikolaus Waxweiler - - * CMakeLists.txt (BASE_SRCS): Update to changes from 2018-03-05. - -2018-03-09 Chun-wei Fan - - * CMakeLists.txt [win32]: Allow MSVC DLL builds (#53287). - - Do not limit DLL builds to MinGW, since we already have - `__declspec(dllexport)' directives in `ftconfig.h'. - Also suppress more warnings for POSIX functions. - -2018-03-08 Hugh McMaster - - Make installation of `freetype-config' optional (#53093). - - * builds/unix/configure.raw: Add option `--enable-freetype-config' - and set `INSTALL_FT2_CONFIG'. - * builds/unix/unix-def.in (INSTALL_FT2_CONFIG): Define. - * builds/unix/install.mk (install): Handle it. - -2018-03-05 Werner Lemberg - - Make `ftlcdfil.c' part of the `base' module. - - `ftobjs.c' needs `ft_lcd_padding'. - - Problem reported by duhuanpeng <548708880@qq.com>. - - * modules.cfg (BASE_EXTENSIONS): Don't include `ftlcdfil.c'. - - * src/base/ftbase.c: Include `ftlcdfil.c'. - * src/base/rules.mk (BASE_SRC): Add `ftlcdfil.c'. - * src/base/Jamfile (_sources): Adjusted. - - * docs/INSTALL.ANY: Updated. - -2018-03-05 Werner Lemberg - - Make `ftfntfmt.c' part of the `base' module. - - `ftobjs.c' needs `FT_Get_Font_Format'. - - Problem reported by duhuanpeng <548708880@qq.com>. - - * modules.cfg (BASE_EXTENSIONS): Don't include `ftfntfmt.c'. - - * src/base/ftbase.c: Include `ftfntfmt.c'. - * src/base/rules.mk (BASE_SRC): Add `ftfntfmt.c'. - * src/base/Jamfile (_sources): Adjusted. - - * docs/INSTALL.ANY: Updated. - -2018-03-01 Werner Lemberg - - * src/truetype/ttinterp.c (TT_RunIns): Fix tracing arguments. - -2018-02-23 Werner Lemberg - - * builds/unix/configure.raw: Need HarfBuzz 1.3.0 or newer. - - Problem reported by Alan Coopersmith . - -2018-02-17 Werner Lemberg - - [sfnt] Prefer `CBDT'/`CBLC' over `glyf' table (#53154). - -2018-02-06 Werner Lemberg - - [truetype] Integer overflow issues. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6027 - - * src/truetype/ttinterp.c (Ins_MSIRP, Ins_MIAP, Ins_MIRP): Use - SUB_LONG; avoid FT_ABS. - -2018-02-04 Alexei Podtelezhnikov - - [unix] Use -fvisibility=hidden. - - It is now widely recommended that ELF shared libraries hide symbols - except those with explicit __attribute__((visibility("default"))). - This is supported by all major compilers and should rather be an - option in libtool. - - * builds/unix/configure.raw: Add -fvisibility=hidden to CFLAGS. - * builds/unix/ftconfig.in, builds/vms/ftconfig.h, - include/freetype/config/ftconfig.h (FT_EXPORT): Use visibility - attribute. - -2018-01-27 Werner Lemberg - - [truetype] Better protection against invalid VF data. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5739 - - Bug introduced in commit 08cd62deedefe217f2ea50e392923ce8b5bc7ac7. - - * src/truetype/ttgxvar.c (TT_Set_Var_Design): Always initialize - `normalizedcoords'. - -2018-01-27 Werner Lemberg - - * src/truetype/ttinterp.c (Ins_GETVARIATION): Avoid NULL reference. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5736 - -2018-01-27 Werner Lemberg - - * src/truetype/ttgxvar.c (tt_set_mm_blend): Minor. - -2018-01-27 Werner Lemberg - - [truetype] Better trace VF instances. - - * src/truetype/ttgxvar.c (ft_var_to_normalized): Don't emit number - of coordinates. - (TT_Get_MM_Var): Trace instance indices names. - (TT_Set_Var_Design): Updated. - -2018-01-27 Werner Lemberg - - [truetype] Beautify tracing of VF axis records. - - * src/truetype/ttgxvar.c (TT_Get_MM_Var): Show axis records in a - table-like manner. - -2018-01-26 Ben Wagner - - [truetype] Fix multiple calls of `FT_Get_MM_Var' (#52955). - - * src/truetype/ttgxvar.c (TT_Get_MM_Var): Set - `face->blend->num_axis' in case we have to initialize the - `face->blend'. - -2018-01-23 Alexei Podtelezhnikov - - [apinames] Anonymous version map for GNU linker. - - * src/tools/apinames.c (PROGRAM_VERSION): Set to 0.3. - (OutputFormat): Add `OUTPUT_GNU_VERMAP'. - (names_dump): Handle it. - (usage): Updated. - (main): Handle new command line flag `-wL'. - -2018-01-21 Alexei Podtelezhnikov - - [unix] Call libtool to clean up. - - * builds/unix/install.mk (clean_project_unix, distclean_project_unix): - Use libtool. - * builds/freetype.mk: Minor. - -2018-01-18 Alexei Podtelezhnikov - - * src/base/ftver.rc: Fix mingw-w64 compilation. - -2018-01-18 Alexei Podtelezhnikov - - [build] Enable VERSIONINFO resource for Cygwin/MinGW. - - * builds/unix/configure.raw: Check for resource compiler. - * builds/unix/unix-cc.in: Conditionally set up resource compiler. - * builds/freetype.mk: Add conditional rule for `ftver.rc'. - * src/base/ftver.rc: Copyright notice and year update. - -2018-01-18 Alexei Podtelezhnikov - - [build] Move VERSIONINFO resource. - - * builds/windows/vc2010/freetype.vcxproj: Updated. - * builds/windows/ftver.rc: Move file from here... - * src/base/ftver.rc: ... to here. - -2018-01-12 Alexei Podtelezhnikov - - [build] Expand dllexport/dllimport to Cygwin/MinGW. - - * include/freetype/config/ftconfig.h: Respect DLL_EXPORT, - s/_MSC_VER/_WIN32/. - * builds/unix/ftconfig.in: Replicate here. - * builds/vms/ftconfig.h: Replicate here. - -2018-01-12 Alexei Podtelezhnikov - - [build] Improve and document MSVC build. - - * include/freetype/config/ftconfig.h: Guard dllexport/dllimport - attributes with _DLL and FT2_DLLIMPORT. - * builds/windows/vc2010/index.html: Update documentation. - -2018-01-10 Steve Robinson - - * CMakeLists.txt [win32]: Suppress warnings for POSIX functions. - -2018-01-10 Ewald Hew - - [psaux] Correctly handle Flex features (#52846). - - * src/psaux/psintrp.c (cf2_interpT2CharString) : Do not move if doing Flex. - -2018-01-09 Alexei Podtelezhnikov - - * builds/windows/vc2010/freetype.sln: Synchronize with the project. - -2018-01-08 Werner Lemberg - - * Version 2.9 released. - ======================= - - - Tag sources with `VER-2-9'. - - * docs/VERSION.TXT: Add entry for version 2.9. - - * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, - builds/windows/vc2005/index.html, - builds/windows/vc2008/freetype.vcproj, - builds/windows/vc2008/index.html, - builds/windows/vc2010/freetype.vcxproj, - builds/windows/vc2010/index.html, - builds/windows/visualc/freetype.dsp, - builds/windows/visualc/freetype.vcproj, - builds/windows/visualc/index.html, - builds/windows/visualce/freetype.dsp, - builds/windows/visualce/freetype.vcproj, - builds/windows/visualce/index.html, - builds/windows/ftver.rc, - builds/wince/vc2005-ce/freetype.vcproj, - builds/wince/vc2005-ce/index.html, - builds/wince/vc2008-ce/freetype.vcproj, - builds/wince/vc2008-ce/index.html: s/2.8.1/2.9/, s/281/29/. - - * include/freetype/freetype.h (FREETYPE_MINOR): Set to 9. - (FREETYPE_PATCH): Set to 0. - - * builds/unix/configure.raw (version_info): Set to 22:0:16. - * CMakeLists.txt (VERSION_PATCH): Set to 0. - -2018-01-07 Werner Lemberg - - Add check for librt, needed for `ftbench' (#52824). - - * builds/unix/configure.raw (LIB_CLOCK_GETTIME): Define; this will - hold `-lrt' if necessary. - - * builds/unix/unix-cc.in (LIB_CLOCK_GETTIME): New variable. - -2018-01-07 Ewald Hew - - [psaux] Fix Type 1 glyphs with too many stem hints. - - According to the CFF specification, charstrings can have up to 96 stem - hints. Due to hint replacement routines in Type 1 charstrings, some - glyphs are rejected by the Adobe engine, which implements the above - limit. This fix turns off hinting for such glyphs. - - * src/psaux/pshints.c (cf2_hintmap_build): Reset the error from calling - `cf2_hintmask_setAll' on a problematic Type 1 charstring and turn off - hinting. - -2018-01-06 Werner Lemberg - - Add `FT_Done_MM_Var'. - - This is necessary in case the application's memory routines differ - from FreeType. A typical example is a Python application on Windows - that calls FreeType compiled as a DLL via the `ctypes' interface. - - * include/freetype/ftmm.h, src/base/ftmm.c (FT_Done_MM_Var): Declare - and define. - - * docs/CHANGES: Updated. - -2018-01-03 Werner Lemberg - - [truetype] Round offsets of glyph components only if hinting is on. - - * src/truetype/ttgload.c (TT_Process_Composite_Component): Implement - it. - -2018-01-03 Werner Lemberg - - * src/truetype/ttgxvar.c (ft_var_to_design): Remove dead code. - - This is a better fix than the previous commit, which is now - reverted. - -2018-01-03 Alexei Podtelezhnikov - - Move internal LCD-related declarations. - - * include/freetype/ftlcdfil.h (ft_lcd_padding, ft_lcd_filter_fir): - Move from here... - * include/freetype/internal/ftobjs.h: ... to here. - -2018-01-03 Alexei Podtelezhnikov - - * include/freetype/config/ftconfig.h (FT_EXPORT, FT_EXPORT_DEF) - [_MSC_VER]: Limit Visual C++ attributes. - -2018-01-03 Werner Lemberg - - [truetype] Make blend/design coordinate round-tripping work. - - Behdad reported that setting blend coordinates, then getting design - coordinates did incorrectly return the default instance's - coordinates. - - * src/truetype/ttgxvar.c (tt_set_mm_blend): Fix it. - -2017-12-31 Werner Lemberg - - * src/sfnt/ttcmap.c (tt_cmap2_char_next): Fix endless loop. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4838 - -2017-12-31 Werner Lemberg - - Synchronize other Windows project files. - - * builds/windows/*: Add missing files. - -2017-12-31 Werner Lemberg - - Update Visual C 2010 project files. - - Problem reported by Hin-Tak. - - * builds/windows/vc2010/freetype.vcxproj: Add files `ftbdf.c' and - `ftcid.c'. - Sort entries. - * builds/windows/vc2010/freetype.vcxproj.filter: Ditto. - Fix members of `FT_MODULE' group. - -2017-12-30 Werner Lemberg - - * builds/vms/ftconfig.h: Synchronize with unix `ftconfig.in' file. - -2017-12-28 Werner Lemberg - - * builds/unix/ftconfig.in: Synchronize with main `ftconfig.h' file. - - Reported by Nikolaus. - -2017-12-27 Werner Lemberg - - Fix compiler warnings. - - * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Make `pitch' and - `new_pitch' unsigned. - - * src/base/ftpsprop.c: Include FT_INTERNAL_POSTSCRIPT_PROPS_H. - -2017-12-27 Werner Lemberg - - Fixes for `make multi'. - - * include/freetype/internal/ftpsprop.h: Use `FT_BASE_CALLBACK'. - (ps_property_get): Harmonize declaration with corresponding - function typedef. - - * include/freety[e/internal/fttrace.h: Add `trace_psprops'. - - * src/base/ftpsprop.c: Include necessary header files. - (FT_COMPONENT): Define. - (ps_property_set): Tag with `FT_BASE_CALLBACK_DEF'. - (ps_property_get): Tag with `FT_BASE_CALLBACK_DEF'. - Harmonize declaration with corresponding function typedef. - -2017-12-27 Werner Lemberg - - Provide support for intra-module callback functions. - - This is needed especially for `make multi' with C++. - - * include/freetype/config/ftconfig.h (FT_BASE_CALLBACK, - FT_BASE_CALLBACK_DEF): New macros. - -2017-12-25 Ewald Hew - - Move PostScript drivers' property handlers to `base'. - - This reduces the amount of duplicated code across PostScript - drivers. - - * src/cff/cffdrivr.c, src/cid/cidriver.c, src/type1/t1driver.c - ({cff,cid,t1}_property_{get,set}): Moved to... - * include/freetype/internal/ftpsprop.h: ...this new file. - (ps_property_{get,set}): New functions to replace moved ones. - - * src/base/ftpsprop.c: New file that implements above functions. - - * include/freetype/internal/internal.h - (FT_INTERNAL_POSTSCRIPT_PROPS_H): New macro. - - * src/cff/cffdrivr.c, src/cid/cidriver.c, src/type1/t1driver.c: - Updated. - - * src/base/Jamfile, src/base/rules.mk (BASE_SRC), src/base/ftbase.c: - Updated. - -2017-12-20 Werner Lemberg - - Speed up FT_Set_Var_{Design,Blend}_Coordinates if curr == new. - - We exit early if the current design or blend coordinates are - identical to the new ones. - - * src/truetype/ttgxvar.c (tt_set_mm_blend, TT_Set_Var_Design): - Implement it, returning internal error code -1 if there will be no - variation change. - - * src/type1/t1load.c (t1_set_mm_blend): Ditto. - - * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, - FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Updated. - -2017-12-18 Werner Lemberg - - [sfnt] Fix charmap type 2 iterator (#52646). - - The subsetted demo font of the report that exhibits the bug has a - very unusual type 2 cmap for Unicode(!): It contains only two - sub-headers, one for one-byte characters (covering the range 0x20 to - 0xFA), and a second one for higher byte 0x01 (just for character - code U+0131). - - Before this commit, the iterator wasn't able to correctly handle a - sub-header for higher byte 0x01. - - * src/sfnt/ttcmap.c (tt_cmap2_char_next): Fix character increment - for outer loop. - -2017-12-18 Matthias Clasen - - [truetype] Fix clamping, minor tracing code beautification. - - * src/truetype/ttgxvar.c (ft_var_to_normalized): Trace number of - design coordinates. - Use clamped value. - -2017-12-18 Werner Lemberg - - * src/*/*: Only use `ft_' and `FT_' variants of stdc library stuff. - -2017-12-18 Werner Lemberg - - * src/truetype/ttgxvar.c (tt_face_vary_cvt): Add size guard (#52688). - -2017-12-18 Werner Lemberg - - [truetype] Fix previous commit. - - * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Correctly handle - unhinted phantom points, which must be properly scaled. - -2017-12-18 Werner Lemberg - - [truetype] Don't apply HVAR and VVAR deltas twice (#52683). - - * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Always adjust - `pp1' to `pp4', except if we have an HVAR and/or VVAR table. - - * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Handle - alternative code branch identically w.r.t. presence of an HVAR - and/or VVAR table. - -2017-12-17 Jonathan Kew - - [truetype] Correctly handle variation font phantom points (#52683). - - * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix phantom - point indices. - -2017-12-17 Jonathan Kew - - Fix incorrect advance width scaling (#52683). - - * src/base/ftadvance.c (FT_Get_Advances): Always respect the - FT_LOAD_NO_SCALE flag if present. - -2017-12-16 Alexei Podtelezhnikov - - * builds/windows/vc2010/freetype.vcxproj: AfterBuild copy. - * objs/.gitignore: Ignore almost everything. - -2017-12-11 Werner Lemberg - - Fix compiler warning (#52640). - - * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Remove unused - variable. - -2017-12-08 Azzuro - - * builds/windows/vc2010/freetype.vcxproj: Adjust output directory. - - This allows builds with different configurations in parallel. - -2017-12-08 Werner Lemberg - - Fix `make setup dos', second try (#52622). - - * builds/detect.mk (dos_setup): Don't use literal `>' character at - all. Mixing the different escaping rules from make, dos, and - windows is too fragile. - -2017-12-08 Werner Lemberg - - [docmaker] Fix code section parsing. - - Stuff like - - { - - } - - confused the parser, which incorrectly treated `' as a markup - tag. - - * src/tools/docmaker/content.py (ContentProcessor::process_content): - Apply `re_markup_tags' only outside of code sections. - -2017-12-08 Werner Lemberg - - New `ftdriver.h' file, covering all driver modules. - - This reduces redundancy and increases synergy; it also reduces the - number of header files. - - * include/freetype/config/ftheader.h (FT_DRIVER_H): New macro. - (FT_AUTOHINTER_H, FT_CFF_DRIVER_H, FT_TRUETYPE_DRIVER_H, - FT_PCF_DRIVER_H, FT_TYPE1_DRIVER_H): Make them aliases to - FT_DRIVER_H. - - * include/freetype/ftautoh.h, include/freetype/ftcffdrv.h, - include/freetype/ftpcfdrv.h, include/freetype/ftt1drv.h, - include/freetype/ftttdrv.h: Replaced with... - * include/freetype/ftdriver.h: ...this new file. - (FT_CFF_HINTING_ADOBE, FT_T1_HINTING_ADOBE): Renamed to... - (FT_HINTING_ADOBE): ... this new macro. - (FT_CFF_HINTING_FREETYPE, FT_T1_HINTING_FREETYPE): Renamed to... - (FT_HINTING_FREETYPE): ... this new macro. - - * src/*/*: Updated accordingly. - -2017-12-08 Werner Lemberg - - Move `ftdriver.h' to `ftdrv.h'. - - * include/freetype/internal/ftdriver.h: Renamed to... - * include/freetype/internal/ftdrv.h: ... this name. - - * include/freetype/internal/internal.h (FT_INTERNAL_DRIVER_H): - Updated. - -2017-12-08 Werner Lemberg - - Fix access to uninitalized memory (#52613). - - Also reported as - - https://bugs.chromium.org/p/chromium/issues/detail?id=791317 - - * src/base/ftbitmap.c (ft_bitmap_assure_buffer): If increasing the - bitmap size needs a larger bitmap buffer, assure that the new memory - areas are initialized also. - -2017-12-08 Werner Lemberg - - Fix `make setup dos' (#52622). - - * builds/detect.mk (dos_setup): Properly escape literal `>' - character. - -2017-12-07 Werner Lemberg - - Fix C++ compilation. - - * src/psaux/psauxmod.h: Use FT_CALLBACK_TABLE macro where necessary. - - * src/smooth/ftsmooth.c (ft_smooth_render_generic): Fix warning. - -2017-12-07 Werner Lemberg - - Fix `make multi'. - - * include/freetype/internal/fttrace.h: Remove unused tracing macros. - s/pshalgo2/pshalgo/. - Add `trace_cffdecode'. - * src/pshinter/pshalgo.c (FT_COMPONENT): Updated. - - * src/cff/cffload.c: Include FT_INTERNAL_POSTSCRIPT_AUX_H. - * src/cff/cffobjs.c: Include FT_SERVICE_METRICS_VARIATIONS_H and - FT_SERVICE_CFF_TABLE_LOAD_H. - - * src/cid/cidriver.c: Include FT_INTERNAL_POSTSCRIPT_AUX_H. - - * src/psaux/cffdecode.c: Include FT_FREETYPE_H and - FT_INTERNAL_DEBUG_H. - (FT_COMPONENT): Define. - * src/psaux/cffdecode.h: Include FT_INTERNAL_POSTSCRIPT_AUX_H. - * src/psaux/psauxmod.h: Include FT_INTERNAL_POSTSCRIPT_AUX_H. - Declare `cff_builder_funcs' and `ps_builder_funcs'. - * src/psaux/psft.c: Include `psobjs.h' and `cffdecode.h'. - * src/psaux/psobjs.c : Include `psauxmod.h'. - -2017-12-07 Werner Lemberg - - * include/freetype/config/ftheader.h: Some clean-up. - - This commit removes documentation of deprecated macros and does some - minor streamlining. - -2017-12-06 Werner Lemberg - - * builds/symbian/bld.inf: Updated. - -2017-12-06 Werner Lemberg - - New header file `ftparams.h' that collects all parameter tags. - - * include/freetype/config/ftheader.h (FT_PARAMETER_TAGS_H): New - macro. - (FT_TRUETYPE_UNPATENTED_H, FT_UNPATENTED_HINTING_H): Define it to - `ftparams.h'. - - * include/freetype/ftautoh.h, include/freetype/ftcffdrv.h, - include/freetype/ftincrem.h, include/freetype/ftlcdfil.h, - include/freetype/ftsnames.h, include/freetype/ftt1drv.h: Include - FT_PARAMETER_TAGS_H. - Move FT_PARAM_TAG_XXX definitions to... - * include/freetype/ftparams.h: ...this new file. - - * include/freetype/ttunpat.h: Remove. No longer needed. - -2017-12-05 Werner Lemberg - - Improve tracing messages by using singular and plural forms. - - * src/*/*.c: Implement it. - -2017-12-04 Werner Lemberg - - [truetype] Allow shared points in `cvar' table (#52532). - - * src/truetype/ttgxvar.c (tt_face_vary_cvt): Implement it by copying - and adjusting the corresponding code from - `TT_Vary_Apply_Glyph_Deltas'. - -2017-11-28 Werner Lemberg - - [truetype] Improving tracing of composite glyphs. - - * src/truetype/ttgload.c (TT_Load_Composite_Glyph) - [FT_DEBUG_LEVEL_TRACE]: Show composite glyph information. - -2017-11-27 Werner Lemberg - - [type1] Allow (again) `/Encoding' with >256 elements (#52464). - - In version 2.6.1, this has been disallowed to better reject - malformed fonts; however, this restriction was too strong. This - time, we only take the first 256 elements into account, since - encoding arrays are always accessed with a 8bit integer, according - to the PostScript Language Reference. - - * src/type1/t1load.c (parse_encoding): Implement it. - -2017-11-27 Jan Alexander Steffens (heftig) - - Fix last commit (#52522). - - * builds/freetype.mk: Set `FT_OPTION_H' and `FTOPTION_FLAG' - properly if we have `ftoption.h' in `BUILD_DIR'. - -2017-11-24 Werner Lemberg - - [unix] Install a massaged `ftoption.h' file (#51780). - - * builds/unix/configure.raw (ftoption_set, ftoption_unset): New - auxiliary functions to construct... - (FTOPTION_H_SED): ... this new variable. - Apply it as a sed argument while copying `ftoption.h' to the - `builds/unix' directory (using `AC_CONFIG_FILES'). - Simplify code of test that checks cpp's computation of bit length - (the test previously created an empty `ftoption.h' file and deleted - it immediately afterwards); without this change, it can happen on my - GNU/Linux box that `configure's execution of `config.status' doesn't - create `ftoption.h' (no idea why this happens). - - * builds/unix/install.mk (install): Install - `builds/unix/ftoption.h'. - - * builds/unix/unix-def.in (DISTCLEAN): Updated. - - * builds/unix/.gitignore: Updated. - -2017-11-23 Tor Andersson - - Silence unused function warnings (#52465). - - Some static function declarations cause unused function warnings if - certain config options are turned off via `ftoption.h'. - - * src/base/ftbase.h, src/base/ftrfork.c, src/sfnt/ttbdf.h, - src/truetype/ttgxvar.h: Add #ifdef guards around these sections. - -2017-11-22 Ewald Hew - - * src/psaux/psft.c (cf2_setGlyphWidth): Check format before setting. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4377 - -2017-11-22 Ewald Hew - - [psaux] Fix CFF advance widths. (#52466) - - Glyph advance widths were being written to the new `PS_Decoder' but not - saved to the underlying format specific decoder. This caused pure CFF - fonts to have bad advance width. - - * include/freetype/internal/psaux.h (PS_Decoder): Change `glyph_width' - field to pointer. - Remove unused fields. - * src/psaux/psobjs.c (ps_decoder_init): Change `glyph_width' from copy - to reference. - Remove unused. - * src/psaux/psft.c (cf2_setGlyphWidth): Update code. - -2017-11-15 Vlad Tsyrklevich - - * include/freetype/ftrender.h: Fix `FT_Renderer_RenderFunc' type. - -2017-11-14 Nikolaus Waxweiler - - Use Adobe hinting engine for `light' hinting of both CFF and Type 1. - - Since Ewald Hew factored the Adobe hinting engine out of the CFF - driver code, we can now use it on Type 1 (and CID) font formats, as - both have the same hinting philosophy. - - This change activates the Adobe hinter when in LIGHT mode, and - therefore always unless explicitly asking for the auto-hinter. This - makes LIGHT behavior consistent with CFF fonts. As of this commit, - the hinting engine table looks as follows. - - LIGHT NORMAL - ------------------------- - TrueType Auto v40 - CFF Adobe Adobe - Type 1 Adobe Adobe - -2017-11-10 Yuri Levchenko - - * CMakeLists.txt: Add `DISABLE_FORCE_DEBUG_PREFIX' option. - -2017-11-06 Alexei Podtelezhnikov - - * src/base/ftobjs.c (FT_Load_Glyph): Relocate condition. - -2017-11-06 Alexei Podtelezhnikov - - * src/smooth/ftgrays.c (gray_set_cell): Fix uninitialized variables. - -2017-11-03 Ewald Hew - - [psaux] Fix PostScript interpreter rewinding in Type 1 mode. (#52251) - - The interpreter in Type 1 mode rewinds the charstring after collecting - all hints for building the initial hintmap (commit d52dd7f). However, - some charstrings use `endchar' in a final subroutine call, rewinding to - the start of that subroutine, and only a small section of the actual - glyph is drawn. - - * src/psaux/psintrp.c (cf2_interpT2CharString) : - Ensure we are on the top level charstring before rewinding. - -2017-11-03 suzuki toshiya - - [truetype] Add more tricky fonts. - - See the report by Yang Yinsen. - https://lists.gnu.org/archive/html/freetype-devel/2017-11/msg00000.html - - * src/truetype/ttobjs.c (trick_names): Add `DFGothic-EB', - `DFGyoSho-Lt', `DFHSGothic-W5', `DFHSMincho-W3' and `DFHSMincho-W7'. - (tt_check_trickyness_sfnt_ids): Add checksums for DFGothic-EB, - DFGyoSho-Lt, DFHSGothic-W5, DFHSMincho-W3 and DFHSMincho-W7. Also - add checksums for DLCLiShu and DLCHayBold which their family names - were already listed but their checksums were previously unknown. - -2017-11-01 Alexei Podtelezhnikov - - [smooth] Fix complex rendering at high ppem. - - We used to split large glyphs into horizontal bands and continue - bisecting them still horizontally if that was not enough. This is - guaranteed to fail when a single scanline cannot fit into the - rendering memory pool. Now we bisect the bands vertically so that - the smallest unit is a column of the band height, which is guranteed - to fit into memory. - - * src/smooth/ftgrays.c (gray_convert_glyph): Implement it. - -2017-10-20 Alexei Podtelezhnikov - - [smooth] Improve complex rendering at high ppem. - - At large sizes almost but not exactly horizontal segments can quickly - drain the rendering pool. This patch at least avoids filling the pool - with trivial cells. Beyond this, we can only increase the pool size. - - Reported, analyzed, and tested by Colin Fahey. - - * src/smooth/ftgrays.c (gray_set_cell): Do not record trivial cells. - -2017-10-20 Alexei Podtelezhnikov - - [base] Improve tracing in FT_Load_Glyph, FT_*_Size. - - * src/base/ftobjs.c (FT_Load_Glyph): Tag tracing messages with - function name, glyph index, and load flags. - (FT_Select_Metrics, FT_Request_Metrics): Remove all tracing. - (FT_Select_Size, FT_Request_Size): Improve tracing. - -2017-10-18 Alexei Podtelezhnikov - - [base] Improve tracing in FT_Render_Glyph. - - * src/base/ftobjs.c (FT_Render_Glyph_Internal): Add total coverage - calculations and downgrade Netpbm dump to bitmap:7. - -2017-10-15 Ewald Hew - - [cff] Fix segfault on missing `psaux' (#52218) - - * src/cff/cffload.c (cff_done_blend): Add a check for possible nullptr. - - * modules.cfg: Update dependency list. - -2017-10-15 Alexei Podtelezhnikov - - [base, cff] Fix MSVC warnings. - - * src/base/ftobjs.c (FT_New_Library): C4702: unreachable code. - (ft_glyphslot_preset_bitmap): C4244: possible loss of data. - * src/cff/cffload.c (cff_blend_doBlend): C4244: possible loss of data. - Turn `sum' into unsigned. - -2017-10-14 Alexei Podtelezhnikov - - [base] Netpbm image tracing. - - * src/base/ftobjs.c (FT_Load_Glyph): Trace bitmap size. - (FT_Render_Glyph_Internal): Trace bitmap in Netpbm format. - - * src/smooth/ftgrays.c (gray_sweep): Sweep remnants of span tracing. - -2017-10-14 Alexei Podtelezhnikov - - * builds/windows/ftdebug.c (FT_Message): Print to stderr. - * builds/wince/ftdebug.c (FT_Message): Ditto. - -2017-10-14 Behdad Esfahbod - - [afshaper] Delay creating `hb_set' objects until needed. - - In runs on Noto Naskh Arabic, this results in 89 sets created - instead of 340 before. Makes auto-hinter setup with HarfBuzz - enabled 20% to 30% faster. - - * src/autofit/afshaper.c (af_shaper_get_coverage): Implement it. - -2017-10-12 Ewald Hew - - [type1, cid] Add hinting engine switch. - - Implement property service in `type1' and `cid' drivers to allow - switching between FreeType or Adobe hinting engine when both are - available. - - * src/cid/cidriver.c (cid_property_{set,get}, cid_services), - src/type1/t1driver.c (t1_property_{set,get}, t1_services): Add - Properties service. - - * src/cid/cidobjs.c (cid_driver_init), src/type1/t1objs.c - (T1_Driver_Init): Add default property values. - -2017-10-12 Ewald Hew - - Add T1_CONFIG_OPTION_OLD_ENGINE configuration option. - - This controls whether the old Type 1 engine gets compiled into FreeType. - It is disabled by default. - - * devel/ftoption.h, include/freetype/config/ftoption.h - (T1_CONFIG_OPTION_OLD_ENGINE): New macro. - - * include/freetype/internal/psaux.h (PS_Decoder): Remove unused field. - * include/freetype/internal/psaux.h, src/cid/cidgload.c - (cid_load_glyph), src/psaux/psauxmod.c, src/psaux/psobjs.c - (ps_builder_add_point), src/psaux/t1decode.c - (t1_lookup_glyph_by_stdcharcode, t1_decoder_parse_glyph, - t1operator_seac, t1_decoder_parse_charstrings), src/psaux/t1decode.h, - src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Surround - relevant code with macro. - Minor code changes. - -2017-10-12 Ewald Hew - - Extract width parsing from Type 1 parser. - - Duplicate the fast advance width calculations from the old parser. - This is to facilitate adding options for compiling out the old parser. - - * src/psaux/t1decode.{c,h} (t1_decoder_parse_metrics): New function. - * include/freetype/internal/psaux.h (T1_Decoder_Funcs): New entry - `parse_metrics'. - * src/psaux/psauxmod.c: Set the new entry. - - * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String), - src/cid/cidgload.c (cid_load_glyph): Separate - conditional for selecting engine. - -2017-10-09 Werner Lemberg - - * src/base/ftoutln.c (FT_Outline_Translate): Fix integer overflow. - - Reported as - - https://bugs.chromium.org/p/chromium/issues/detail?id=772775 - -2017-10-08 Werner Lemberg - - * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Integer overflows. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3579 - -2017-10-07 Werner Lemberg - - [sfnt] Adjust behaviour of PS font names for variation fonts. - - * src/sfnt/sfdriver.c (sfnt_get_var_ps_name): Use a named instance's - PS name only if no variation is applied. - -2017-10-07 Werner Lemberg - - [cff, truetype] Adjust behaviour of named instances. - - This commit completely separates the interaction between named - instances and variation functions. In particular, resetting the - variation returns to the current named instance (if set) and not to - the base font. - - As a side effect, variation functions no longer change the named - instance index. - - * src/cff/cffobjs.c (cff_face_init): Use MM service's `set_instance' - function. - Also apply `MVAR' table to named instances. - - * src/truetype/ttgxvar.c (TT_Get_MM_Var): Add cast. - (tt_set_mm_blend): No longer check whether requested variation - coincides with a named instance. - (TT_Set_Var_Design): Use current named instance for default - coordinates. - * src/truetype/ttobjs.c (tt_face_init): Use `TT_Set_Named_Instance'. - -2017-10-07 Werner Lemberg - - Make `FT_Set_Named_Instance' work. - - * src/cff/cffdrivr.c (cff_set_instance): New function. - (cff_service_multi_masters): Register it. - - * src/truetype/ttgxvar.c (TT_Set_Named_Instance): New function. - * src/truetype/ttgxvar.h: Updated. - * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Register - it. - - * src/type1/t1load.c (T1_Reset_MM_Blend): New function. - * src/type1/t1load.h: Updated. - * src/type1/t1driver.c (t1_service_multi_masters): Register it. - -2017-10-07 Werner Lemberg - - Make `FT_FACE_FLAG_VARIATION' work. - - * include/freetype/internal/tttypes.h (TT_Face): Remove - `is_default_instance'; this can be replaced with a combination of - `FT_IS_VARIATION' and `FT_IS_INSTANCE'. - - * src/cff/cffdrivr.c (cff_get_advances): Updated. - - * src/sfnt/sfdriver.c (sfnt_get_ps_name), src/sfnt/sfobjs.c - (sfnt_init_face): Updated. - - * src/truetype/ttdriver.c (tt_get_advances), src/truetype/ttgload.c - (TT_Process_Simple_Glyph, load_truetype_glyph, IS_DEFAULT_INSTANCE), - src/truetype/ttgxvar.c (tt_set_mm_blend): Updated. - * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design): - Handle `FT_FACE_FLAG_VARIATION'. - - * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Handle - `FT_FACE_FLAG_VARIATION'. - -2017-10-07 Werner Lemberg - - New function `FT_Set_Named_Instance'. - - No effect yet. - - * src/base/ftmm.c (FT_Set_Named_Instance): New function. - - * include/freetype/ftmm.h: Updated. - -2017-10-07 Werner Lemberg - - Add macros for checking whether a font variation is active. - - * include/freetype/freetype.h (FT_FACE_FLAG_VARIATION, - FT_IS_VARIATION): New macros. - No effect yet. - -2017-10-07 Werner Lemberg - - Add framework for setting named instance in MM service. - - * include/freetype/internal/services/svmm.h (FT_Set_Instance_Func): - New function typedef. - (MultiMasters): Add `set_instance' member. - (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. - - * src/cff/cffdrivr.c (cff_service_multi_masters), - src/truetype/ttdriver (tt_service_gx_multi_masters), - src/type1/t1driver.c (t1_service_multi_masters): Updated. - -2017-10-07 Werner Lemberg - - [type1] Minor code shuffling. - - * src/type1/t1load.c (T1_Set_MM_Blend): Make it a wrapper of... - (t1_set_mm_blend): ...this new function. - (T1_Set_MM_Design): Use `t1_set_mm_blend'. - -2017-10-05 Werner Lemberg - - * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Fix integer - overflow. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3539 - -2017-10-05 Werner Lemberg - - Fix compiler warnings. - - * src/cff/cffdrivr.c (cff_ps_get_font_extra): Avoid code that relies - on numeric overflow. - Add cast. - - * src/smooth/ftsmooth.c (ft_smooth_render_generic): Fix variable - types, add cast. - -2017-10-04 John Tytgat - - [cff] Add support for `FSType'. - - * include/freetype/internal/cfftypes.h (CFF_FontRec): Add - `font_extra' entry. - - * src/cff/cffdrivr.c (cff_ps_get_font_extra): New function to - retrieve FSType info from the embedded PostScript data. - (cff_service_ps_info): Register function. - - * src/cff/cffload.c (cff_font_done): Free `font_extra'. - -2017-09-30 Alexei Podtelezhnikov - - Signedness fixes in bitmap presetting. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3514. - - * src/raster/ftrend1.c (ft_raster1_render): Exlicitly signed height. - * src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto. - * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Explicitly unsigned - subtraction. - -2017-09-29 Alexei Podtelezhnikov - - Bitmap metrics presetting [2/2]. - - * src/base/ftobjs.c (FT_Load_Glyph): Preset the bitmap metrics when - appropriate but `FT_Render_Glyph' is not called. - * include/freetype/freetype.h (FT_GlyphSlotRec): Document the change. - -2017-09-28 Alexei Podtelezhnikov - - [smooth, raster] Miscellaneous cleanups. - - * src/raster/ftrend1.c (ft_raster1_render): Clean up the exit. - * src/smooth/ftsmooth.c (ft_smooth_render_generic): Reduce - translations and clean up the exit. - (ft_smooth_render_lcd, ft_smooth_render_lcd): Remove unused `error'. - -2017-09-28 Ben Wagner - - [truetype] Really, really fix #52082. - - * src/truetype/ttinterp.c (Ins_MDRP): Correct conditional. - -2017-09-28 Werner Lemberg - - * src/psaux/psintrp.c (cf2_doStems): Fix integer overflow. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3510 - -2017-09-28 Ewald Hew - - * src/cid/cidgload.c (cid_slot_load_glyph): Fix memory leak. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3489 - -2017-09-28 Alexei Podtelezhnikov - - Bitmap metrics presetting [1/2]. - - This mainly just extracts the code for presetting the bitmap metrics - from the monochrome, grayscale, and LCD renderers into a separate - function. - - * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): New function that - calculates prospective bitmap metrics for the given rendering mode. - * include/freetype/internal/ftobjs.h (ft_glyphslot_preset_bitmap): - Declare it. - - * src/base/ftlcdfil.c (ft_lcd_padding): New helper function that adds - padding to CBox taking into account pecularities of LCD rendering. - * include/freetype/ftlcdfil.h (ft_lcd_padding): Declare it. - - * src/raster/ftrend1.c (ft_raster1_render): Reworked to use - `ft_glyphslot_preset_bitmap'. - * src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto. - (ft_smooth_render_lcd, ft_smooth_render_lcd): The pixel_mode setting - is moved to `ft_glyphslot_preset_bitmap'. - -2017-09-28 Ewald Hew - - [psaux] Fix compiler warning. - - * src/psaux/pshints.c (cf2_hintmap_dump): Add switch for tracing - code. - -2017-09-27 Werner Lemberg - - * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning. - -2017-09-25 Werner Lemberg - - [psaux] Fix compiler warnings. - - * src/psaux/psft.c (cf2_initLocalRegionBuffer): Remove redundant - test. - - * src/psaux/psintrp.c (cf2_interpT2CharString) - : Add casts. - - * src/psaux/psobjs.c (ps_decoder_init): Add cast. - -2017-09-25 Ewald Hew - - [psaux] Minor fixes. - - * include/freetype/internal/psaux.h, src/psaux/psobjs.{c,h}: - Rearrange `ps_builder_init' arguments to conventional order. - - * src/psaux/psft.c (cf2_decoder_parse_charstrings): Add a check and - notice for `SubFont' in Type 1 mode. - -2017-09-25 Ewald Hew - - [psaux] Move `psdecode' into `psobjs'. - - As the former only contains a single procedure, move it into - `psobjs' for simplicity. Also change the parameter order to the - conventional one. - - * src/psaux/psdecode.c (ps_decoder_init): Moved to... - * src/psaux/psobjs.c: ...Here. - * src/psaux/psdecode.h, src/psaux/psobjs.h: Ditto. - - * include/freetype/internal/psaux.h (PSAux_ServiceRec): Update - `ps_decoder_init' function signature. - - * src/cff/cffgload.c, src/cid/cidgload.c, src/type1/t1gload.c: - Update calls. - - * src/psaux/psaux.c, src/psaux/psauxmod.c: Update includes. - - * src/psaux/Jamfile (_sources), src/psaux/rules.mk (PSAUX_DRV_SRC): - Update file references. - -2017-09-25 Ewald Hew - - [psaux] Fix Type 1 hinting. - - Type 1 hinting breaks sometimes when mid-charstring hints should - have been in the initial hintmap. This fix adds a preprocessing - pass that reads all hints and builds the correct initial hintmap - first, before proceeding to build the glyph outline. - - * src/psaux/psintrp.c (cf2_interpT2CharString): New - `initial_map_ready' boolean flag. - Ignore outline commands and hint changes on first pass. - : Add section to build hintmap and rewind. - -2017-09-25 Ewald Hew - - [psaux] Add tracing for hints. - - * src/psaux/pshints.c (cf2_hintmap_dump): New function. - (cf2_hintmap_insertHint): Trace incoming and inserted hints. - (cf2_hintmap_build): Dump hintmap before and after hint adjustment. - -2017-09-25 Ewald Hew - - [psaux] Minor fixes. - - * src/psaux/psintrp.c (cf2_interpT2CharString): Fix check for pop - results. - s/font->decoder/decoder/ where necessary. - : Use - offset parameter in `cf2_doStems' instead of doing correction for - left-sidebearing. - -2017-09-25 Ewald Hew - - [cid] Use the new engine. - - * src/cid/cidgload.c: Update includes. - (cid_load_glyph, cid_slot_load_glyph): Implement changes to glyph - loading code as with `type1' module. - -2017-09-25 Ewald Hew - - [cid] Add Adobe engine configuration. - - This is similar to what was done in the `type1' module. - - * src/cid/cidriver.c (t1cid_driver_class): Update declaration. - * src/cid/cidobjs.c: Include FT_TYPE1_DRIVER_H. - (cid_driver_init): Update code. - -2017-09-25 Ewald Hew - - [psaux] Change subfont synthesis for CID fonts. - - Change `t1_make_subfont' to take in the Private dict record as an - argument. This is because Type 1 and CID font records in FreeType - have this in different places. - - * src/psaux/psobjs.c (t1_make_subfont): Change `T1_Face' to - `FT_Face' so that CID is also accepted. - Take `PS_Private' as an argument and let caller figure out where the - Private dict actually is. - Update references. - - * include/freetype/internal/psaux.h, src/psaux/psobjs.h: Update - declaration. - - * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Update - call. - -2017-09-25 Ewald Hew - - [type1] Switch to Adobe engine. - - * src/type1/t1objs.c (T1_Driver_Init): Set default to Adobe engine. - -2017-09-25 Ewald Hew - - [psaux] Extend Adobe interpreter (seac). - - This concludes the changes needed to add Type 1 support. - - * src/psaux/psintrp.c: Update includes. - (cf2_interpT2CharString) : Implement this similarly to - implied seac for CFF. - - * src/psaux/t1decode.c (t1_lookup_glyph_by_stdcharcode_ps): New - function to look up the glyph index. - - * src/psaux/psft.c (cf2_getT1SeacComponent, - cf2_freeT1SeacComponent): New functions to get the charstrings for - seac components. - - * src/psaux/t1decode.h, src/psaux/psft.h: Update declarations. - -2017-09-25 Ewald Hew - - [psaux] Extend Adobe interpreter (flex in callothersubr). - - * src/psaux/psintrp.c (cf2_interpT2CharString) - : Fix Flex feature handling (OtherSubrs 0, 1, - 2). - : Do not actually move the `glyphPath' while doing - flex. This is to avoid closing the current contour. - -2017-09-25 Ewald Hew - - [psaux] Extend Adobe interpreter (callothersubr). - - * src/psaux/psintrp.c (cf2_interpT2CharString) - : Copy code from - `t1_decoder_parse_charstrings' (in `t1decode.c'). - OtherSubr 3 (change hints) should reset the hintmask, so that the - new hints are applied. - Fix function calls and stack access. - -2017-09-25 Ewald Hew - - [psaux] Extend Adobe interpreter (pop). - - * src/psaux/psintrp.c (cf2_interpT2CharString): Change how unhandled - OtherSubr results are stored. Implement the PostScript stack using - an array. - : Ensure that the stack is not cleared after getting - `OtherSubr' results. - Fix stack access. - -2017-09-25 Ewald Hew - - [psaux] Extend Adobe interpreter (callsubr). - - * src/psaux/psintrp.c (cf2_interpT2CharString) : - Type 1 mode. - - * src/psaux/psft.c (cf2_initLocalRegionBuffer): Add Type 1 mode. - -2017-09-25 Ewald Hew - - [psaux] Extend Adobe interpreter (div, four-byte numbers). - - * src/psaux/psintrp.c (cf2_interpT2CharString) : Add - Type 1 mode. Type 1 requires large integers to be followed by - `div'; cf. `Adobe Type 1 Font Format', section 6.2. - : Push Type 1 four-byte numbers as `Int' always. This is - to ensure `div' and `callsubr' get values they can use. - -2017-09-25 Ewald Hew - - [psaux] Extend Adobe interpreter (hints). - - * src/psaux/psintrp.c (cf2_interpT2CharString) : Add correction for left sidebearing in Type 1 mode. - Allow adding hints mid-charstring. - : Translate into equivalent commands - for three normal stem hints. This requires some recalculation of - stem positions. - Correction for left sidebearing. - -2017-09-25 Ewald Hew - - [psaux] Extend Adobe interpreter (hsbw, sbw). - - * src/psaux/psintrp.c (cf2_doStems): `hsbw' or `sbw' must be the - first operation in a Type 1 charstring. - (cf2_interpT2CharString): Remove unused variables. - : `hsbw' or `sbw' - must be the first operation in a Type 1 charstring. - : Fix data access and add correction for - left sidebearing. - -2017-09-25 Ewald Hew - - [psaux] Extend Adobe interpreter (setcurrentpoint). - - * src/psaux/psintrp.c (cf2_interpT2CharString) - : Fix stack access. - -2017-09-25 Ewald Hew - - [psaux] Extend Adobe interpreter (closepath). - - * src/psaux/psintrp.c (cf2_interpT2CharString) : - Use the right builder function. We can use the `haveWidth' boolean - already present, instead of implementing `parse_state'. - -2017-09-25 Ewald Hew - - [psaux] Add Type 1 operations to Adobe CFF interpreter. - - The following Type 1 specific ops have been added (copied from - `t1decode'): - - closepath - vstem3 - hstem3 - seac - sbw - callothersubr - pop - setcurrentpoint - hsbw - - The following require a Type 1 mode, because of differences in - specification: - - hstem - vstem - vmoveto - callsubr - div - rmoveto - hmoveto - Numbers - - The subsequent commits will implement these changes and adapt - accesses of data and objects to the new interpreter. - - NOTE: Will not compile in the meantime! - - * src/psaux/psintrp.c: Add opcodes to enum. - (cf2_interpT2CharString): Copy relevant code over from - `t1_decoder_parse_charstrings' (in `t1decode.c'). - -2017-09-25 Ewald Hew - - [type1] Fixes for rendering. - - The Type 1 advance width calculation passes null for glyph slot, - etc, which can cause null pointer access in the new interpreter. - Fall back to the old one for now. - - Fix the large glyph retry code and ensure hinting and scaling flags - are set properly. - - * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Add a - check for metrics_only. - Set the `force_scaling' flag. - (T1_Parse_Glyph): Updated. - (T1_Load_Glyph): Add `hinting' and `scaled' flags. - -2017-09-25 Ewald Hew - - [psaux] Add missing objects (2/2). - - Synthesize a `SubFont' object for Type 1 fonts. This is used in the - interpreter to access Private dict data, which are stored in - different places for Type 1 and CFF. This allows the same data to - be used in either mode. - - * src/psaux/psobjs.c (t1_make_subfont): New procedure to copy - required values to a dummy `CFF_SubFont' object. This is similar to - `cff_make_private_dict'. - * src/psaux/psobjs.h: Add the new declaration. - - * include/freetype/internal/psaux.h, src/psaux/psauxmod.c: Ditto. - Add this to the PSAux Service for future use with CID fonts. - - * src/type1/t1gload.c: Include FT_INTERNAL_CFF_TYPES_H. - (T1_Parse_Glyph_And_Get_Char_String): Add the call. - -2017-09-25 Ewald Hew - - [psaux] Add missing objects for Type 1 (1/2). - - Move `CF2_Font' instance to `PS_Decoder'. This is the context for - the interpreter and since it is currently stored in `CFF_Font', is - unavailable in Type 1 mode. - - * include/freetype/internal/psaux.h (T1_Decoder, PS_Decoder): New - `cf2_instance' field. - - * src/psaux/psdecode.c (ps_decoder_init): Copy `cf2_instance' to - `PS_Decoder'. - - * src/psaux/t1decode.c (t1_decoder_done): Add finalization code. - - * src/psaux/psft.c (cf2_decoder_parse_charstrings): Update accesses. - -2017-09-25 Ewald Hew - - Allow `type1' module to use the Adobe engine. - - Add the callback and some conditionals to switch between the two - engines. - - * include/freetype/internal/psaux.h (T1_Decoder_FuncsRec): Change - function declarations. - * src/psaux/psauxmod.c (T1_Decoder_FuncsRec): Register the - callbacks. - - * src/psaux/psobjs.c (ps_builder_add_point): Add conditionals for - number conversion. - - * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Add code - to choose which renderer to use. - - * src/cid/cidgload.c (cid_load_glyph): Update call. - * src/base/ftobjs.c, src/psaux/psobjs.c, src/type1/t1gload.c: Update - includes. - -2017-09-25 Ewald Hew - - [type1] Add Adobe engine configuration. - - Use the previously changed PS_Driver in type1 module to store - hinting engine configuration. - - * include/freetype/ftt1drv.h: New file. - Duplicate and rename config options from CFF. - * include/freetype/config/ftheader.h (FT_TYPE1_DRIVER_H): New macro. - - * src/type1/t1driver.c (t1_driver_class): Update declaration. - * src/type1/t1objs.c: Include FT_TYPE1_DRIVER_H. - (T1_Driver_Init): Update code. - -2017-09-25 Ewald Hew - - [cff] Move and rename `CFF_Driver'. - - This is so that we can use the same hinting engine parameters for - Type 1. - - * include/freetype/internal/cffotypes.h (CFF_Driver): Rename and - move to... - * include/freetype/internal/psaux.h (PS_Driver): ...here. - - * src/cff/cffdrivr.c, src/cff/cffgload.c, src/cff/cffload.c, - src/cff/cffobjs.c, src/cff/cffobjs.h, src/psaux/psft.c, - src/psaux/psobjs.c: Update references. - -2017-09-25 Ewald Hew - - [psaux, type1] Reorganize object fields. - - Make some fields more generic, so that we can access them the same - way regardless of Type 1 or CFF. - - * include/freetype/internal/psaux.h (PS_Builder): Change `TT_Face' - to `FT_Face'. - Remove unused fields. - - * src/psaux/psft.c: Update all accesses of `PS_Builder.face'. - Add some asserts to guard against casting `T1_Face' as `TT_Face'. - - * src/type1/t1objs.h (T1_GlyphSlot): Reorder fields to follow - `CFF_GlyphSlot', so that we can pretend they are the same in the - interpreter. - - * src/psaux/psobjs.c (ps_builder_init, ps_builder_add_point): - Updated with above changes. - -2017-09-25 Ewald Hew - - [psaux] Prepare for Type 1 mode. - - Add some checks for Type 1 data passing through. - - * src/psaux/psfont.h (CF2_Font): Add `isT1' flag. - * src/psaux/psfont.c (cf2_font_setup): Skip the variations and blend - code which is not applicable for Type 1. - - * src/psaux/psft.c (cf2_decoder_parse_charstrings): Avoid accessing - `decoder->cff' in Type 1 mode. - Copy `is_t1' flag to `CF2_Font'. - -2017-09-25 Ewald Hew - - [psaux, cff] Use the new objects. - - * include/freetype/internal/psaux.h, src/psaux/psauxmod.c: Fix - switching between new and old engines. - - * src/cff/cffgload.c, src/cff/cffparse.c: Update calls. - - * src/psaux/psblues.c, src/psaux/psfont.c, src/psaux/psfont.h, - src/psaux/psft.c, src/psaux/psft.h, src/psaux/psintrp.c: Update all - to use new objects. - -2017-09-24 Ewald Hew - - [psaux] Objects for new interpreter (part 2). - - Make the new objects copy over values. They are essentially wrapper - types for the different decoders/builders. - - * include/freetype/internal/psaux.h: Update declarations. - (PS_Builder): Add `is_t1' flag. - (PS_Decoder_{Get,Free}_Glyph_Callback): Renamed to... - (CFF_Decoder_{Get,Free}_Glyph_Callback: ... this. - (PS_Decoder): Updated. - Add `t1_parse_callback' member. - (PSAux_ServiceRec): Add `ps_decoder_init' member. - - * src/psaux/psdecode.h, src/psaux/psobjs.h: Update declarations. - - * src/psaux/psdecode.c, src/psaux/psobjs.c: Implement copy with two - modes. - - * src/psaux/psauxmod.c: Add builder and decoder functions to `PSAux' - service. - -2017-09-24 Ewald Hew - - [psaux] Add objects for new interpreter. - - Introduce `PS_Decoder' and `PS_Builder' which include all fields - from either Type 1 or CFF decoders/builders. - - * include/freetype/internal/psaux.h (PS_Builder, PS_Decoder): New - structs. - - * src/psaux/psobjs.c, src/psaux/psobjs.h: Add `PS_Builder' - functions. - - * src/psaux/psdecode.c, src/psaux/psdecode.h: New files to hold - `PS_Decoder' initialization functions. - - * src/psaux/psaux.c, src/psaux/Jamfile (_sources), - src/psaux/rules.mk (PSAUX_DRV_SRC): Updated. - -2017-09-24 Ewald Hew - - [psaux] Rename files. - - Replace the `cf2' file name prefix with `ps' as the Adobe engine - will be used for both PostScript Types 1 and 2 (CFF) instead of just - CFF. - - s/cf2/ps/ for all following. - - * src/psaux/cf2*: Rename files. - * src/psaux/*: Update includes. - - * src/psaux/Jamfile (_sources), src/psaux/rules.mk (PSAUX_DRC_SRC, - PSAUX_DRV_H): Update file references. - -2017-09-24 Ewald Hew - - [psaux] Minor fix. - - Use `MultiMasters' service in `psaux' instead of a call to `cff'. - The project builds if CFF_CONFIG_OPTION_OLD_ENGINE is not defined. - - * src/psaux/cf2ft.c: Update includes. - (cf2_getNormalizedVector): Use `mm->get_var_blend' instead of - `cff_get_var_blend'. - -2017-09-24 Ewald Hew - - [psaux, cff] Move `cff_random' into `psaux' service. - - NOTE: Does not compile! - - Minor fix to allow both `cff' and `psaux' to use `cff_random'. - - * src/cff/cffload.c (cff_random): Move to... - * src/psaux/psobjs.c: Here. - * src/cff/cffload.h: Move corresponding declaration to - `src/psaux/psobjs.h'. - - * include/freetype/internal/psaux.h (PSAux_ServiceRec): Register the - function here... - * src/psaux/psauxmod.c: And here. - - * src/cff/cffload.c, src/psaux/cf2intrp.c: Update code. - -2017-09-24 Ewald Hew - - [cff] Move struct declarations to `freetype/internal'. - - NOTE: Does not compile! - - This is so that the CFF functions moved to `psaux' can access the - same structs that they need. - - * src/cff/cfftypes.h: Moved to... - * include/freetype/internal/cfftypes.h: ...Here. - - * src/cff/cffobjs.h: Moved the struct declarations to... - * include/freetype/internal/cffotypes.h: ... this new file. - - * include/freetype/internal/internal.h (FT_INTERNAL_CFF_TYPES_H, - FT_INTERNAL_CFF_OBJECT_TYPES_H): New macros. - - * src/cff/cffcmap.h, src/cff/cffdrivr.c, src/cff/cffgload.c, - src/cff/cffgload.h, src/cff/cffload.h, src/cff/cffobjs.c, - src/cff/cffobjs.h, src/cff/cffparse.h, src/psaux/psobjs.h, - include/freetype/internal/psaux.h, - include/freetype/internal/services/svcfftl.h: Update includes. - - * src/cff/rules.mk (CFF_DRV_H): Updated. - -2017-09-24 Ewald Hew - - [psaux, cff] Add new service for inter-module calls. - - NOTE: Does not compile! - - This is to allow CFF functions moved to `psaux' to call functions - declared in `src/cff/cffload.h'. - - * include/freetype/internal/services/svcfftl.h: New file, setting up - a `CFFLoad' service. - - * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC10, - FT_DEFINE_SERVICEDESCREC): New macros. - (FT_SERVICE_CFF_TABLE_LOAD_H): New macro. - - * src/cff/cffdrivr.c, src/cff/cffpic.h: Register the new service. - - * src/cff/cfftypes.h (CFF_FontRec), src/psaux/cf2font.h - (CF2_FontRec): Add service interface. - - * src/cff/cffobjs.c, src/psaux/cf2font.c, src/psaux/cf2ft.c, - src/psaux/cf2intrp.c, src/psaux/cffdecode.c: Use the new service. - -2017-09-24 Ewald Hew - - [psaux, cff] Add callbacks for inter-module calls. - - NOTE: Does not compile! - - * include/freetype/internal/psaux.h: Add function pointer - declarations. - - * src/psaux/cffdecode.c (cff_decoder_init): Update to take in - callbacks. - * src/psaux/cffdecode.h: Ditto. - - * src/cff/cffgload.c (cff_compute_max_advance, cff_slot_load): - Update calls to pass in callbacks. - * src/psaux/cf2ft.c, src/psaux/cffdecode.c: Use them. - -2017-09-24 Ewald Hew - - [psaux, cff] Create new `PSAux' service interface entries. - - NOTE: Does not compile! - - * include/freetype/internal/psaux.h: Include - FT_INTERNAL_TRUETYPE_TYPES_H. - (CFF_Builder_FuncsRec, CFF_Decocer_FuncsRec): New function tables. - (CFF_Builder): Updated. - Fix for forward declaration. - (PSAux_ServiceRec): New field `cff_decoder_funcs'. - - * src/psaux/psauxmod.c (cff_builder_funcs, cff_decoder_funcs): New - function tables. - (PSAux_Interface): Updated. - - * include/freetype/internal/tttypes.h (TT_FaceRec): Add `psaux' - service interface. - - * src/cff/cffgload.c, src/cff/cffobjs.c, src/cff/cffparse.c: Update - function calls to use psaux service. - -2017-09-24 Ewald Hew - - [psaux, cff] Move CFF builder components into `psaux' module. - - NOTE: Does not compile! - - * src/cff/cffgload.c - (cff_builder_{init,done,add_point,add_point1,add_contour,start_point,close_contour}, - cff_check_points): Move to... - * src/psaux/psobjs.c: Here. - - * src/cff/cffgload.h: Move corresponding declarations to - `src/psaux/psobjs.h'. - - * src/cff/cffgload.h (CFF_Builder): Move struct declaration to... - * include/freetype/internal/psaux.h: Here. - -2017-09-24 Ewald Hew - - [psaux, cff] Move CFF decoder components into `psaux' module. - - NOTE: Does not compile! - - * src/cff/cffgload.c (CFF_Operator, - CFF_COUNT_{CHECK_WIDTH,EXACT,CLEAR_STACK}, cff_argument_counts, - cff_operator_seac, cff_compute_bias, - cff_lookup_glyph_by_stdcharcode, - cff_decoder_{parse_charstrings,init,prepare}): Move to... - * src/psaux/cffdecode.c: This new file. - - * src/cff/cffgload.h: Move corresponding declarations to... - * src/psaux/cffdecode.h: This new file. - - * src/cff/cffgload.h (CFF_MAX_{OPERANDS,SUBRS_CALLS,TRANS_ELEMENTS}, - CFF_Decoder_Zone, CFF_Decoder): Move declarations to... - * include/freetype/internal/psaux.h: Here. - - * src/psaux/cf2ft.h: Update include. - - * src/psaux/psaux.c, src/psaux/rules.mk (PSAUX_DRV_SRC): Update with - the new file. - -2017-09-24 Ewald Hew - - [psaux, cff] Move Adobe's engine components into `psaux' module. - - This is the first patch of a sequence to move the Type 2 charstring - processing capability from the `cff' module to the `psaux' module. - - NOTE: Does not compile! - - * src/cff/cf2*: Move these files to... - * src/psaux/cf2*: Here. - - * src/cff/Jamfile (_sources), src/cff/rules.mk (CFF_DRV_SRC, - CFF_DRV_H), src/cff/cff.c, src/cff/cffgload.c: Remove file - references. - - * src/psaux/Jamfile (_sources), src/psaux/rules.mk, src/psaux/psaux.c - (PSAUX_DRV_SRC, PSAUX_DRV_H): Add file references. - -2017-09-24 Alexei Podtelezhnikov - - Tweak per-face LCD filtering controls. - - Thing are simpler with a NULL-function pointer. - - * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): New - pointer to the filter function. - (FT_LibraryRec): Remove unused `lcd_filter'. - (FT_Bitmap_LcdFilterFunc, ft_lcd_filter_fir): Move from here... - * include/freetype/ftlcdfil.h (FT_Bitmap_LcdFilterFunc, - ft_lcd_filter_fir): ... to here. - - * src/base/ftobjs.c (ft_open_face_internal): NULL-initialize the - per-face filter. - (FT_Face_Properties): Set it. - * src/smooth/ftsmooth.c (ft_smooth_render_generic): Simplify. - - * src/base/ftlcdfil.c (ft_lcd_filter_fir, FT_Libary_SetLcdFilter): - Minor. - -2017-09-24 Jonathan Kew - - [sfnt] Fix `premultiply_data' (#52092). - - * src/sfnt/pngshim.c (premultiply_data): Don't use vector extension - if we have less than 16 bytes of data. - -2017-09-24 Werner Lemberg - - [otvalid] Fix handling of ValueRecords. - - For GPOS pair positioning format 1 the description of ValueRecords - in the OpenType specification (1.8.2, from today) is wrong – the - offset has to be taken from the parent structure; in this case the - `PairSet' table. - - * src/otvalid/otvgpos.c (otv_PairSet_validate): Set `extra3'. - (otv_PairPos_validate): Adjust. - -2017-09-23 Werner Lemberg - - [otvalid] Handle `GSUB' and `GPOS' v1.1 tables. - - * src/otvalid/otvgsub.c (otv_GSUB_validate), src/otvalid/otvgpos.c - (otv_GPOS_validate): Implement it. - -2017-09-23 Werner Lemberg - - [otvalid] Update common table handling to OpenType 1.8.2. - - * src/otvalid/otvcommn.c (otv_Device_validate): Handle - VariationIndex subtable. - (otv_Lookup_validate): Handle MarkFilteringSet. - -2017-09-23 Alexei Podtelezhnikov - - [build] Windows-style DLL versioning. - - * build/windows/ftver.rc: New VERSIONINFO resource. - * build/windows/vc2010/freetype.vcxproj: Further improvements. - -2017-09-23 Ben Wagner - - [truetype] Really fix #52082. - - * src/truetype/ttinterp.c (Ins_MDRP): Correct conditional. - -2017-09-23 Werner Lemberg - - [otvalid] Handle `GDEF' v1.2 and v1.3 tables. - - No validation of variation stuff yet. - - * src/otvalid/otvgdef.c (otv_MarkGlyphSets_validate): New function. - (otv_GDEF_validate): Implement it. - -2017-09-22 Werner Lemberg - - [otvalid] Handle `BASE' v1.1 table. - - No validation of variation stuff yet. - - * src/otvalid/otvbase.c (otv_BASE_validate): Implement it. - -2017-09-22 Werner Lemberg - - [otvalid] Macros for 32bit offset support. - - * src/otvalid/otvcommn.h (OTV_OPTIONAL_TABLE32, - OTV_OPTIONAL_OFFSET32, OTV_SIZE_CHECK32): New macros. - -2017-09-21 Alexei Podtelezhnikov - - [build] Simplify Visual C++ 2010 project. - - * build/windows/vc2010/freetype.vcxproj: Remove fake singlethreaded - configurations and tweak. - -2017-09-21 Werner Lemberg - - [truetype] Integer overflow (#52082). - - * src/truetype/ttinterp.c (Ins_MDRP): Avoid FT_ABS. - -2017-09-21 Werner Lemberg - - [sfnt] Fix postscript name for default instance of variation fonts. - - Problem reported by Behdad. - - * src/sfnt/sfdriver.c (sfnt_get_ps_name): Test - `is_default_instance'. - -2017-09-21 Werner Lemberg - - [truetype] Fix `mmvar' array pointers, part 2. - - The previous commit was incomplete. - - * src/truetype/ttgxvar.c: Properly initialize sub-array offsets for - `master' also. - -2017-09-21 Werner Lemberg - - [truetype] Fix `mmvar' array pointers. - - Without this change, clang's AddressSanitizer reports many runtime - errors due to misaligned addresses. - - * src/truetype/ttgxvar.c (TT_Get_MM_Var): Use multiples of pointer - size for sub-array offsets into `mmvar'. - -2017-09-20 Werner Lemberg - - [truetype] Integer overflows. - - Changes triggered by - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3429 - - * src/truetype/ttinterp.c (Ins_SHPIX, Ins_DELTAP): Use NEG_LONG. - (Ins_MIAP): Use SUB_LONG. - -2017-09-19 Alexei Podtelezhnikov - - [build] Fix DLL builds in Visual C++ project. - - * build/windows/vc2010/freetype.vcxproj: Use DynamicLibrary in Debug - and Release configurations. - * include/freetype/config/ftconfig.h (FT_EXPORT, FT_EXPORT_DEF) - [_DLL]: Use Visual C++ extensions. - -2017-09-19 John Tytgat - - [cff] Fix family name logic of pure CFF fontdata (#52056). - - 1. If `FamilyName' is present in the CFF font, use this for - FT_Face's `family_name'. - 2. Otherwise, use the face name and chop off any subset prefix. - 3. If at this point FT_Face's `family_name' is set, use this - together with the full name to determine the style. - 4. Otherwise, use `CIDFontName' as FT_Face's `family_name'. - 5. If we don't have a valid style, use "Regular". - - Previously, FT_Face's `family_name' entry for pure CFF fontdata - nearly always was the fontname itself, instead of the `FamilyName' - entry in the CFF font (assuming there is one). - - * src/cff/cffobjs.c (cff_face_init) [pure_cff]: Implement it. - -2017-09-18 Alexei Podtelezhnikov - - [build] Declutter Visual C++ 2010-2017 project. - - * build/windows/vc2010/freetype.vcxproj: Use MaxSpeed (/02) - optimization for Release configuration throughout the project. - - ----------------------------------------------------------------------------- - -Copyright 2017-2018 by -David Turner, Robert Wilhelm, and Werner Lemberg. - -This file is part of the FreeType project, and may only be used, modified, -and distributed under the terms of the FreeType project license, -LICENSE.TXT. By continuing to use, modify, or distribute this file you -indicate that you have read the license and understand and accept it -fully. - - -Local Variables: -version-control: never -coding: utf-8 -End: diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/ChangeLog.27 b/extensions/gdx-freetype/jni/freetype-2.9.1/ChangeLog.27 deleted file mode 100644 index 0e82b2fb3..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/ChangeLog.27 +++ /dev/null @@ -1,2106 +0,0 @@ -2016-12-30 Werner Lemberg - - * Version 2.7.1 released. - ========================= - - - Tag sources with `VER-2-7-1'. - - * docs/VERSION.TXT: Add entry for version 2.7.1. - - * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, - builds/windows/vc2005/index.html, - builds/windows/vc2008/freetype.vcproj, - builds/windows/vc2008/index.html, - builds/windows/vc2010/freetype.vcxproj, - builds/windows/vc2010/index.html, - builds/windows/visualc/freetype.dsp, - builds/windows/visualc/freetype.vcproj, - builds/windows/visualc/index.html, - builds/windows/visualce/freetype.dsp, - builds/windows/visualce/freetype.vcproj, - builds/windows/visualce/index.html, - builds/wince/vc2005-ce/freetype.vcproj, - builds/wince/vc2005-ce/index.html, - builds/wince/vc2008-ce/freetype.vcproj, - builds/wince/vc2008-ce/index.html: s/2.7/2.7.1/, s/27/271/. - - * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. - - * builds/unix/configure.raw (version_info): Set to 19:0:13. - * CMakeLists.txt (VERSION_PATCH): Set to 1. - -2016-12-30 Werner Lemberg - - [ftfuzzer] Replace `rand' with an xorshift algorithm. - - * src/tools/ftfuzzer/ftfuzzer.cc: Don't include `stdlib.h'. - (Random): Implement and use a 32bit `xorshift' algorithm. - -2016-12-30 Werner Lemberg - - [ftfuzzer] Restrict number of tested bitmap strikes. - - Malformed fonts often have large values for the number of bitmap - strikes, and FreeType doesn't check the validity of all bitmap - strikes in advance. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=353 - - * src/tools/ftfuzzer/ftfuzzer.cc: Include `stdlib.h' for `rand'. - (Random): Small class to provide n randomly selected numbers - (without repetition) out of the value set [1,N]. - (LLVMFuzzerTestOneInput): Use it to test only up to 10 bitmap - strikes. - -2016-12-29 Werner Lemberg - - [truetype] Variation font API stability issues. - - Make some functions work before a call to `TT_Set_MM_Blend'. - - * src/truetype/ttgxvar.c (tt_hadvance_adjust): Exit immediately if - we don't blend. - (TT_Get_MM_Blend, TT_Get_Var_Design): Return default values if we - don't blend. - -2016-12-29 Werner Lemberg - - * src/truetype/ttgxvar.c (TT_Get_MM_Var): Check axis data. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=348 - -2016-12-29 Werner Lemberg - - [truetype] Tracing fixes. - - * src/truetype/ttgxvar.c (tt_hadvance_adjust): Emit correct - information. - (TT_Set_Var_Design): Fix typo. - (TT_Get_Var_Design): Fix typos. - -2016-12-29 Werner Lemberg - - */*: Use `0.5f' for tracing 16.16 numbers. - -2016-12-29 Werner Lemberg - - [pcf] Protect against gzip bombs. - - Fix suggested by Kostya; reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=345 - - * src/pcf/pcfread.c (pcf_read_TOC): Limit number of TOC entries to - 1024. - -2016-12-28 Werner Lemberg - - [psnames] Only declare, not define, data in `pstables.h' (#49949). - - Pdfium includes `pstables.h' a second time; moving the definition - from `pstables.h' to `psmodule.c' saves more than 60kByte data - segment space for this case. - - * src/tools/glnames.py (StringTable::dump, - StringTable::dump_sublist, dump_encoding, dump_array): Emit - additional code to only define tables if `DEFINE_PS_TABLES' is set. - - * src/psnames/pstables.h: Regenerated. - * src/psnames/psmodule.c (DEFINE_PS_TABLES): Define. - -2016-12-28 Werner Lemberg - - [cff] Catch `blend' op in non-variant fonts. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=334 - - * src/cff/cf2intrp.c (cf2_interpT2CharString) : Don't - allow `blend' op for non-variant fonts. - -2016-12-28 Werner Lemberg - - [cff] Better check of number of blends. - - * src/cff/cf2intrp.c (cf2_interpT2CharString) , - src/cff/cffparse.c (cff_parse_blend): Compare number of blends with - stack size. - -2016-12-27 Werner Lemberg - - Documentation updates. - - * docs/CHANGES: Add missing information. - - * docs/formats.txt: Rewritten and updated. - -2016-12-27 Werner Lemberg - - [truetype, type1] Implement `FT_Get_Var_Design_Coordinates'. - - * src/truetype/ttgxvar.c (TT_Get_Var_Design): Implement. - (TT_Set_Var_Design): Fix tracing. - - * src/type1/t1load.c (T1_Get_Var_Design): Implement. - -2016-12-24 Werner Lemberg - - * src/truetype/ttpload.c (tt_face_load_hdmx): Ignore `version'. - - Problem reported by 張俊芝 <418092625@qq.com>. - -2016-12-24 Werner Lemberg - - * src/sfnt/ttsbit.c (tt_face_load_sbit): Allow more version values. - - Some fonts seem to have the `version' field in the wrong byte order. - - Problem reported by 張俊芝 <418092625@qq.com>. - -2016-12-24 Werner Lemberg - - * src/truetype/ttpload.c (tt_face_load_loca): Sanitize table length. - - This trivial fix allows us to accept more fonts. - - Problem reported by 張俊芝 <418092625@qq.com>. - -2016-12-24 Werner Lemberg - - * src/sfnt/sfobjs.c (sfnt_init_face): Fix tracing. - -2016-12-22 Werner Lemberg - - * CMakeLists.txt: Make it work with cmake 2.8.11.2 (#49909). - -2016-12-22 Werner Lemberg - - Ensure used preprocessor symbols are defined (#49790). - - * builds/unix/ftconfig.in, builds/vms/ftconfig.h, - include/freetype/config/ftconfig.h: Check `__GNUC__', `__IBMC__', - and `__SUNPRO_C' correctly. - -2016-12-22 Werner Lemberg - - * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Check `count'. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=308 - -2016-12-22 Werner Lemberg - - [cff] Protect against invalid `vsindex' and `blend' values. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=305 - - * src/cff/cf2intrp.c (cf2_interpT2CharString) : Implement it. - -2016-12-22 Werner Lemberg - - [ftfuzzer] Always use Adobe CFF engine. - - * src/tools/ftfuzzer/ftfuzzer.cc (FT_Global::FT_Global): Implement - it. - -2016-12-21 Werner Lemberg - - * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Thinko. - - I should really stop coding late in the evening... - - Thanks again to Ben for checking. - -2016-12-21 Werner Lemberg - - [autofit] Support variation fonts. - - (This ChangeLog entry was added later on.) - - * src/autofit/afglobal.c (af_face_globals_free): Remove useless - code. - - * src/base/ftmm.c (FT_Set_MM_Design_Coordinates, - * FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, - FT_Set_Var_Blend_Coordinates): Finalize - auto-hinter data to enforce recomputation. Note that this is a - brute-force method which should be improved. - -2016-12-21 Werner Lemberg - - * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Thinko. - - Don't apply deltas twice for non-phantom points. - - Spotted by Ben Wagner. - -2016-12-21 Werner Lemberg - - [cff, truetype] Another try for #49829. - - * src/cff/cffdrivr.c: Don't include - `FT_SERVICE_METRICS_VARIATIONS_H'. - (cff_get_advances): Use `ttface->variation_support'. - - * src/truetype/ttdriver.c (tt_get_advances): Use - `ttface->variation_support'. - - * src/truetype/ttgload.c (TT_Process_Simple_Glyph, - load_truetype_glyph): Use `ttface->variation_support'. - -2016-12-21 Werner Lemberg - - [truetype, sfnt] Introduce font variation flags to `TT_Face'. - - * include/freetype/internal/tttypes.h (TT_FACE_FLAG_VAR_XXX): - New macros describing available functionality of various OpenType - tables related to font variation. - (TT_Face): New fields `variation_support' and `mvar_support', - replacing and extending `use_fvar'. - - * src/sfnt/sfobjs.c (sfnt_init_face, sfnt_load_face): Use - `variation_support'. - - * src/truetype/ttgxvar.c (ft_var_load_hvar): Set `variation_support' - field. - (TT_Vary_Apply_Glyph_Deltas): Updated. - -2016-12-21 Werner Lemberg - - [base] Improve sanity check for Mac resources (#49888). - - * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Abort if `rlen' is not - positive. - -2016-12-20 Werner Lemberg - - [base] More sanity checks for Mac resources. - - We use - - https://github.com/kreativekorp/ksfl/wiki/Macintosh-Resource-File-Format - - and - - https://developer.apple.com/legacy/library/documentation/mac/pdf/MoreMacintoshToolbox.pdf#page=151 - - as references. - - * include/freetype/internal/ftrfork.h (FT_RFork_Ref): Use FT_Short - for `res_id'. - - * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Extract map length - and use it to improve sanity checks. - Follow the specification more closely;in particular, all data types - are signed, not unsigned. - (FT_Raccess_Get_DataOffsets): Follow the specification more closely; - in particular, all data types are signed, not unsigned. - Add some sanity checks. - -2016-12-20 Werner Lemberg - - [truetype] Improve logic for getting fast advance widths. - - * src/cff/cffdrivr.c (cff_get_advances), src/truetype/ttdriver.c - (tt_get_advances): Use `is_default_instance' for test; this gets - recomputed after changing blend coordinates. - -2016-12-20 Ben Wagner - Werner Lemberg - - [truetype] Fix linear metrics of GX variation fonts (#49829). - - When asking for an unhinted non-default variations, - `linearVertAdvance' is currently the value from the `hmtx' table - instead of the actual value after applying the variation. `HVAR' - support fixes this, but fonts will exist without that table and will - need sane fallback. - - Problem also reported as - - https://bugs.chromium.org/p/skia/issues/detail?id=5917 - - * src/truetype/ttgload.c (TT_Process_Simple_Glyph, - load_truetype_glyph): Implement linear advance adjustments if `HVAR' - or `VVAR' tables are missing. - -2016-12-20 Werner Lemberg - - [cff, truetype] Fast advance width retrieval for fonts with HVAR. - - Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. - - * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Don't handle MM. - - * src/cff/cffdrivr.c: Include FT_SERVICE_METRICS_VARIATIONS_H. - (cff_get_advances): Test for HVAR and VVAR. - - * src/truetype/ttdriver.c (tt_get_advances): Test for HVAR and VVAR. - -2016-12-18 Werner Lemberg - - [base] Fix invalid mac font recursion. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=304 - - * src/base/ftobjs.c (FT_Open_Face): Code moved to... - (ft_open_face_internal): ... this function. - Add a parameter to control whether we try special Mac font handling - in case of failure. - (FT_Open_Face, FT_New_Face, FT_New_Memory_Face, - open_face_from_buffer): Use `ft_open_face_internal'. - -2016-12-18 Werner Lemberg - - * src/cff/cffobjs.c (cff_face_init): Make named instances work. - -2016-12-18 Werner Lemberg - - [truetype, cff] Extend `get_var_blend' function of MM service. - - In particular, we need access to named instance data. - - * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func): - Add argument for `FT_MM_Var'. - - * src/cff/cffload.c (cff_get_var_blend): Updated. - * src/cff/cffload.h: Updated. - - * src/cff/cf2ft.c (cf2_getNormalizedVector): Updated. - - * src/truetype/ttgxvar.c (tt_get_var_blend): Updated. - Accept value `NULL' for arguments. - * src/truetype/ttgxvar.h: Updated. - -2016-12-18 Werner Lemberg - - [sfnt] Handle `fvar' with zero axes as a non-MM font. - - This is better behaviour than exiting with an error. - - * include/freetype/internal/tttypes.h (TT_Face): Add `use_fvar' - field. - - * src/sfnt/sfobjs.c (sfnt_init_face): Compute `use_fvar', also - updating the validation code. - Use `use_fvar' to compute FT_FACE_FLAG_MULTIPLE_MASTERS. - - * src/truetype/ttgxvar.c (TT_Get_MM_Var): Remove `fvar' validation - code. - -2016-12-18 Werner Lemberg - - Minor GX code shuffling. - - * include/freetype/internal/tttypes.h (TT_Face): Move - `is_default_instance' into TT_CONFIG_OPTION_GX_VAR_SUPPORT - block. - - * src/sfnt/sfobjs.c (sfnt_init_face): Updated. - * src/truetype/ttgload.c (IS_DEFAULT_INSTANCE): New macro. - (TT_Load_Glyph): Use it. - -2016-12-18 Werner Lemberg - - [cff] Better handling of non-CFF font formats. - - * src/cff/cffload.c (cff_font_load): Pure CFFs don't have a - signature, so return `FT_Err_Unknown_File_Format' more often. - -2016-12-17 Werner Lemberg - - * src/cff/cffload.c (cff_build_blend_vector): Remove redundant code. - -2016-12-17 Werner Lemberg - - * src/truetype/ttobjs.c (tt_face_init): Simplify conditional code. - -2016-12-17 Werner Lemberg - - [sfnt, truetype] Various sanitizing fixes. - - * src/sfnt/sfobjs.c (sfnt_init_face): If the axis count in `fvar' is - zero, set `num_instances' to zero. - - * src/truetype/ttgxvar.c (TT_Get_MM_Var): Handle `fvar' table with - zero axes as invalid. - - * src/truetype/ttobjs.c (tt_face_init): Improve logic of loading - `loca', `cvt', `fpgm', and `prep' table. - -2016-12-17 Werner Lemberg - - Improve tracing of `FT_Open_Face'. - - * src/base/ftobjs.c (FT_Open_Face): Return info on number of - available faces and numbered instances, or the indices of the - requested face and numbered instance. - - * src/sfnt/sfobjs. (sfnt_open_font): Trace number of subfonts. - -2016-12-17 Werner Lemberg - - * src/cff/cffload.c (cff_load_private_dict): Always init `blend'. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=295 - -2016-12-16 Werner Lemberg - - [truetype] Fix `cvar' sanity test. - - Reported by Dave Arnold. - - * src/truetype/ttgxvar.c (tt_face_vary_cvt): Use tuple count mask. - -2016-12-16 Werner Lemberg - - [cff, truetype] Remove compiler warnings; fix `make multi'. - - * src/cff/cf2font.h: Include `cffload.h'. - - * src/cff/cffload.c: Include FT_MULTIPLE_MASTERS_H and - FT_SERVICE_MULTIPLE_MASTERS_H. - (cff_vstore_load): Eliminate `vsSize'. - (cff_load_private_dict): Tag as `FT_LOCAL_DEF'. - - * src/cff/cffload.h: Include `cffobjs.h'. - Provide declaration for `cff_load_private_dict'. - - * src/truetype/ttgxvar.c (ft_var_load_hvar): Eliminate - `minorVersion' and `map_offset'. - -2016-12-16 Werner Lemberg - - [cff] Fix heap buffer overflow (#49858). - - * src/cff/cffparse.c (cff_parser_run): Add one more stack size - check. - -2016-12-15 Werner Lemberg - - Fix clang warnings. - - * src/cff/cffload.c (cff_blend_doBlend): Add cast. - (cff_subfont_load): Set `error' correctly. - - * src/sfnt/ttmtx.c (tt_face_get_metrics): Typo. - -2016-12-15 Dave Arnold - Werner Lemberg - - [cff] Implement CFF2 support (2/2). - - The font variation code. All parts dependent on the GX code in the - `truetype' module are guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. - In other words, you can still compile the `cff' module without - defining TT_CONFIG_OPTION_GX_VAR_SUPPORT (which brings you CFF2 - support without font variation). - - * src/cff/cf2font.c (cf2_font_setup): Add support for font - variation. - * src/cff/cf2font.h (CF2_Font): Add fields for variation data. - - * src/cff/cf2ft.c (cf2_free_instance): Free blend data. - (cf2_getVStore, cf2_getNormalizedVector): New functions. - * src/cff/cf2ft.h: Updated. - - * src/cff/cf2intrp.c: Include `cffload.h'. - (cf2_cmdRESERVED_15, cf2_cmdRESERVED_16): Replace with... - (cf2_cmdVSINDEX, cf2_cmdBLEND): ... this new enum values. - (cf2_doBlend): New function. - (cf2_interpT2CharString): Handle `vsindex' and `blend' opcodes. - - * src/cff/cffload.c (FT_fdot14ToFixed): New macro. - (cff_vstore_done, cff_vstore_load): New functions. - (cff_blend_clear, cff_blend_doBlend, cff_blend_build_vector, - cff_blend_check_vector): New functions. - (cff_load_private_dict): Add arguments for blend vector. - Handle blend data. - (cff_subfont_load, cff_subfont_done): Updated. - (cff_font_load): Handle CFF2 variation store data. - (cff_font_done): Updated. - * src/cff/cffload.h: Include `cffparse.h'. - Updated. - - * src/cff/cffobjs.c (cff_face_done): Updated. - - * src/cff/cffparse.c: Include `cffload.h'. - (cff_parse_num): Handle internal value 255. - (cff_parse_vsindex, cff_parse_blend): New functions. - (CFF_FIELD_BLEND): New macro. - (cff_parser_run): Updated. - * src/cff/cffparse.h (cff_kind_blend): New enum value. - - * src/cff/cfftoken.h: Handle `vstore', `vsindex', and `blend' - dictionary values. - - * src/cff/cfftypes.h (CFF_VarData, CFF_AxisCoords, CFF_VarRegion, - CFF_VStore, CFF_Blend): New structures. - (CFF_FontRecDict): Add `vstore_offset' field. - (CFF_Private): Add `vsindex' field. - (CFF_SubFont): Add fields for blend data. - (CFF_Font): Add `vstore' field. - - * src/truetype/ttgxvar.c (TT_Get_MM_Var): `CFF2' is equal to `gvar', - since glyph variation data is directly embedded. - (TT_Set_MM_Blend): Don't load `gvar' table for CFF2 fonts. - -2016-12-15 Dave Arnold - Werner Lemberg - - [cff] Implement CFF2 support (1/2). - - This commit does not contain the blend code for font variation - support, which follows in another commit. - - You should ignore whitespace while inspecting this commit. - - * include/freetype/internal/tttypes.h (TT_Face): Add `isCFF2' - member. - - * src/cff/cf2font.h (CF2_Font): Add `isCFF2' member. - - * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Handle `isCFF2' - flag. - (cf2_getMaxstack): New function. - * src/cff/cf2ft.h: Updated. - - * src/cff/cf2intrp.c (cf2_escRESERVED_38): New enum. - (cf2_interpT2CharString): Handle CFF2 differences. - Add tracing message for errors. - - * src/cff/cffdrivr.c (cff_get_glyph_name, cff_get_name_index): - Update for CFF2. - - * src/cff/cffload.c (FT_FIXED_ONE): New macro. - (cff_index_init, cff_index_load_offsets, cff_index_access_element, - cff_index_get_name, cff_ft_select_get, cff_load_private_dict, - cff_subfont_load, cff_font_load): Handle CFF2. - * src/cff/cffload.h: Updated. - - * src/cff/cffobjs.c (cff_face_init): Handle CFF2. - - * src/cff/cffparse.c (cff_parse_maxstack): New function. - (CFFCODE_TOPDICT, CFFCODE_PRIVATE): Removed - * src/cff/cffparse.h (CFF2_MAX_STACK, CFF2_DEFAULT_STACK): New - macros. - (CFF2_CODE_TOPDICT, CFF2_CODE_FONTDICT, CFF2_CODE_PRIVATE): New - macros. - - * src/cff/cfftoken.h: Add fields for CFF2 dictionaries (but no blend - stuff). - - * src/cff/cfftypes.h (CFF_Index): Add `hdr_size' field. - (CFF_FontRecDict): Add `maxstack' field. - (CFF_Private): Add `subfont' field. - (CFF_Font): Add `top_dict_length' and `cff2' fields. - - * src/sfnt/sfobjs.c (sfnt_load_face): Handle `CFF2' table. - -2016-12-15 Werner Lemberg - Dave Arnold - - [truetype] Provide HVAR advance width variation as a service. - - Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. - - * src/truetype/ttdriver.c (tt_service_metrics_variations): Updated. - - * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Prevent - double adjustment of advance width. - - * src/sfnt/ttmtx.c: Include FT_SERVICE_METRICS_VARIATIONS_H. - (tt_face_get_metrics): Apply metrics variations. - -2016-12-15 Dave Arnold - Werner Lemberg - - [truetype] Provide function to apply `HVAR' advance width variation. - - Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. - - * src/truetype/ttgxvar.c (tt_hadvance_adjust): New function. - * src/truetype/ttgxvar.h: Updated. - -2016-12-15 Dave Arnold - Werner Lemberg - - [truetype] Add `HVAR' table parsing. - - Note that this is not complete yet; it only handles advance width - variation. - - Activation of the code follows in another commit. - - Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. - - * include/freetype/ftmm.h (FT_Var_Named_Style): Add `psid' member. - - * src/truetype/ttgxvar.h (GX_HVarData, GX_AxisCoords, GX_HVarRegion, - GX_HVStore, GX_WidthMap): New auxiliary structures for... - (GX_HVarTable): ... HVAR main structure. - (GX_BlendRec): Add data for HVAR loading. - - * src/truetype/ttgxvar.c (FT_FIXED_ONE, FT_fdot14ToFixed, - FT_intToFixed, FT_fixedToInt): New macros. - (ft_var_load_hvar): New function. - (TT_Get_MM_Var): Updated. - (tt_done_blend): Deallocate HVAR data. - -2016-12-15 Dave Arnold - - [cff] Extend number parsing. - - The forthcoming CFF2 support needs a dynamic parsing limit. - - * src/cff/cffparse.c (cff_parse_num, do_fixed, cff_parse_fixed, - cff_parse_fixed_scaled, cff_parse_fixed_dynamic): Add argument for - parser. - (cff_parse_font_matrix, cff_parse_font_bbox, cff_parse_private_dict, - cff_parse_multiple_master, cff_parse_cid_ros, cff_parser_run): Updated. - - * src/cff/cffparse.h (cff_parse_num): Export locally. - -2016-12-15 Dave Arnold - - [cff] Implement dynamic stack size for Adobe engine. - - This also adds `cf2_stack_setReal' and `cf2_stack_pop', needed for - the forthcoming CFF2 support. - - * src/cff/cf2stack.c (cf2_stack_init): Add argument for stack size. - (cf2_stack_free): Deallocate stack. - (cf2_stack_count, cf2_stack_pushInt, cf2_stack_pushFixed, - cf2_stack_popInt, cf2_stack_popFixed, cf2_stack_getReal, - cf2_stack_clear): Updated. - (cf2_stack_setReal, cf2_stack_pop): New functions. - - * src/cff/cf2stack.h (CF2_Stack): Add `stackSize' member. - Update function declarations. - - * src/cff/cf2intrp.c (cf2_interpT2CharString): Updated. - - * src/cff/cffparse.c (cff_parser_init): Add parameter for stack - size; return error code. - (cff_parser_done): New function. - (cff_parser_run): Updated. - - * src/cff/cffparse.h (CFF_Parser): Add `stackSize' member and make - `stack' a pointer. - Update function declarations. - - * src/cff/cffload.c (cff_load_private_dict, cff_subfont_load): - Updated. - -2016-12-15 Dave Arnold - Werner Lemberg - - [cff] Code shuffling. - - * src/cff/cfftypes.h (CFF_Font): Add `library' and `base_offset' - fields. - - * src/cff/cffload.c (cff_subfont_load): Change last argument to - `CFF_Font' - Split off parsing of private dictionary into... - (cff_load_private_dict): ...this new function. - (cff_font_load): Updated. - -2016-12-14 Werner Lemberg - - [sfnt, truetype] Add framework for Metrics Variations service. - - No effect yet; service functions will be implemented later on. - - Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. - - * include/freetype/internal/services/svmetric.h: New file. - - * include/freetype/internal/ftserv.h - (FT_SERVICE_METRICS_VARIATIONS_H): New macro. - - * include/freetype/internal/tttypes.h (TT_Face): New field `var'. - - * src/sfnt/sfobjs.c: Include FT_SERVICE_METRICS_VARIATIONS_H. - (sfnt_init_face): Initialize `face->var'. - - * src/truetype/ttdriver.c: Include FT_SERVICE_METRICS_VARIATIONS_H. - (tt_service_metrics_variations): New service. - (tt_services): Updated. - - * src/truetype/ttpic.h: Updated. - -2016-12-14 Werner Lemberg - - [cff] Add Multiple Masters service. - - The code simply uses the MM functions from the `truetype' module. - - Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. - - * include/freetype/internal/tttypes.h (TT_Face): New field `mm'. - - * src/cff/cffdrivr.c: Include FT_SERVICE_MULTIPLE_MASTERS_H. - (cff_set_mm_blend, cff_get_mm_blend, cff_get_mm_var, - cff_set_var_design, cff_get_var_design): New functions. - (cff_service_multi_masters): New service. - (cff_services): Updated. - - * src/cff/cffload.c (cff_get_var_blend, cff_done_blend): New - functions. - * src/cff/cffload.h: Updated. - - * src/cff/cffpic.h (CFF_SERVICE_MULTI_MASTERS_GET): New macro. - - * src/sfnt/sfobjs.c: Include FT_SERVICE_MULTIPLE_MASTERS_H. - (sfnt_init_face): Initialize `face->mm'. - -2016-12-14 Werner Lemberg - - Extend functionality of `ft_module_get_service'. - - It can now differentiate between local and global searches. - - * src/base/ftobjs.c (ft_module_get_service): Add `global' argument. - (FT_Get_TrueType_Engine_Type): Updated. - - * src/cff/cffdrivr.c (cff_get_ps_name, cff_get_cmap_info): Updated. - - * include/freetype/internal/ftobjs.h: Updated. - * include/freetype/internal/ftserv.h (FT_FACE_FIND_GLOBAL_SERVICE): - Updated. - -2016-12-14 Werner Lemberg - - * src/truetype/ttgxvar.c (tt_get_var_blend): Fix compiler warning. - -2016-12-14 Dave Arnold - Werner Lemberg - - [sfnt, cff] Minor preparations. - - * include/freetype/tttags.h (TTAG_CFF2, TTAG_HVAR, TTAG_MVAR, - TTAG_VVAR): New SFNT table tags. - - * src/cff/cf2fixed.h (CF2_FIXED_ONE, CF2_FIXED_EPSILON): Add cast. - -2016-12-10 Werner Lemberg - - [truetype, type1] Add `get_var_blend' to MM service. - - For internal use; we want to share code between the forthcoming CFF2 - support and TrueType. - - * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func): - New typedef. - (MultiMasters): Add `get_var_blend'. - (FT_Service_MultiMasters): Updated. - - * src/truetype/ttgxvar.c (tt_get_var_blend): New function. - * src/truetype/ttgxvar.h: Updated. - - * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. - * src/type1/t1driver.c (t1_service_multi_masters): Updated. - -2016-12-10 Werner Lemberg - - [truetype, type1] Add `done_blend' to MM service. - - For internal use; we want to share code between the forthcoming CFF2 - support and TrueType. - - * include/freetype/internal/services/svmm.h (FT_Done_Blend_Func): - New typedef. - (MultiMasters): Add `done_blend'. - (FT_Service_MultiMasters): Updated. - - * src/truetype/ttgxvar.c (tt_done_blend): Use `TT_Face' as argument. - * src/truetype/ttgxvar.h: Updated. - - * src/truetype/ttobjs.c (TT_Face_Done): Updated. - - * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. - * src/type1/t1driver.c (t1_service_multi_masters): Updated. - -2016-12-09 Werner Lemberg - - [sfnt] Revert change from 2016-12-08. - - I missed the functionality of `ft_module_get_service', which makes - the change unnecessary. - -2016-12-08 Werner Lemberg - - Add framework to support services with 8 functions. - - We will need this for CFF variation font support. - - * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC8): - New macro. - -2016-12-08 Werner Lemberg - - [sfnt] Add `get_glyph_name' and `get_name_index' to SFNT interface. - - CFF2 fonts will need access to those two functions. - - * include/freetype/internal/sfnt.h: Include FT_SERVICE_GLYPH_DICT_H. - (SFNT_Interface): Add `get_glyph_name' and `get_name_index' members. - (FT_DEFINE_SFNT_INTERFACE): Updated. - - * src/sfnt/sfdriver.c (sfnt_get_glyph_name, sfnt_get_name_index): - Fix signatures to exactly correspond to the glyph dict service - function typedefs. - (sfnt_interface): Updated. - -2016-12-06 Dave Arnold - - Add `FT_Get_Var_Design_Coordinates' function. - - Note that the low-level functions aren't implemented yet. - - * include/freetype/ftmm.h: Declare. - - * include/freetype/internal/services/svmm.h - (FT_Get_Var_Design_Func): New typedef. - (MultiMasters): New MM service function `get_var_design'. - (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. - Update all callers. - - * src/base/ftmm.c (FT_Get_Var_Design_Coordinates): Implement. - - * src/truetype/ttdriver.c: Updated. - - * src/truetype/ttgxvar.c (TT_Get_Var_Design): New dummy function to - handle `get_var_design' service. - * src/truetype/ttgxvar.h: Updated. - - * src/type1/t1driver.c: Updated. - - * src/type1/t1load.c (T1_Get_Var_Design): New dump function to - handle `get_var_design' service. - * src/type1/t1load.h: Updated. - -2016-12-06 Werner Lemberg - - * src/type1/t1load.c (parse_subrs): Fix memory leak. - - The `subrs' keyword might erroneously occur multiple times. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=231 - -2016-12-01 Werner Lemberg - - [gzip] Improve building with external zlib (#49673). - - Building FreeType with external zlib 1.2.8 makes msvc 14 stop with - the following error. - - ftgzip.c - zlib-1.2.8\zlib.h(86): error C2061: - syntax error: identifier 'z_const' - zlib-1.2.8\zlib.h(94): error C2054: - expected '(' to follow 'z_const' - zlib-1.2.8\zlib.h(94): error C2085: - 'msg': not in formal parameter list - ... - zlib-1.2.8\zlib.h(877): fatal error C1003: - error count exceeds 100; stopping compilation - - The error happens because FreeType keeps an own copy of zlib-1.1.4 - under `src/gzip'. When building `src/gzip/ftgzip.c' with - FT_CONFIG_OPTION_SYSTEM_ZLIB defined, it uses - - #include - - which correctly finds an external `zlib.h', but `zlib.h' itself has - a line - - #include "zconf.h" - - which makes Visual Studio 2015 find `src/gzip/zconf.h' while - compiling the files in `src/gzip'. - - * src/gzip/zconf.h: Rename to... - * src/gzip/ftzconf.h: ... this. - * src/gzip/zlib.h, src/gzip/rules.mk (GZIP_DRV_SRCS): Updated. - -2016-12-01 Oleksandr Chekhovskyi - - [autofit] Fix Emscripten crash (patch #9180). - - Function calls through pointers must use a matching signature to - work on Emscripten, since such calls are dispatched through lookup - tables grouped by signature. - - * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Fix - typedef. - -2016-11-29 Werner Lemberg - - [smooth] Revert previous commit. Already fixed with 6ca54c64. - -2016-11-29 Werner Lemberg - - [smooth] Avoid conditional jump on uninitialized value (#49711). - - * src/smooth/ftgrays.c (gray_raster_render): Initialize `worker'. - -2016-11-27 Nikolaus Waxweiler - - [autofit] Code shuffling. - - Also improve some comments and remove unused code. - - No functional change. - - * src/autofit/afloader.c (af_loader_load_g): Merged with... - (af_loader_load_glyph): ...this function. - Split off emboldening code into... - (af_loader_embolden_glyph_in_slot): ... this function. - -2016-11-17 Werner Lemberg - - Better support of LLP64 systems with gcc (and clang). - - * builds/unix/configure.raw: Call `AC_TYPE_LONG_LONG_INT'. - - * builds/unix/ftconfig.in (FT_LONG64): Enable for LLP64 systems (and - suppress warnings) even without `FT_CONFIG_OPTION_FORCE_INT64'. - -2016-11-10 Werner Lemberg - - Fix `lcd_weights' array size. - - * include/freetype/internal/ftobjs.h (FT_LibraryRec): Do it. - - Reported by Nikolaus. - -2016-11-06 Werner Lemberg - - * src/base/ftobjs.c (FT_Render_Glyph_Internal): Fix tracing. - -2016-11-06 Werner Lemberg - - [sfnt] Improve FT_LOAD_BITMAP_METRICS_ONLY for `sbix' format. - - It's unavoidable to call the PNG engine, but to get the metrics it - is sufficient to read the PNG image's header only. - - * src/sfnt/pngshim.c (Load_SBit_Png): Add argument to control the - allocation of the glyph slot. - * src/sfnt/pngshim.h: Updated. - * src/sfnt/ttsbit.c (tt_sbit_decoder_load_png, - tt_face_load_sbix_image, tt_face_load_sbit_image): Updated. - -2016-11-06 Werner Lemberg - - [sfnt] Speed up `sbix' lookup. - - This also fixes a bug introduced in 2016-10-01 which prevents - display of embedded bitmap fonts that use the `sbix' format. - - * src/sfnt/ttsbit.c (tt_face_load_sbit): Store `sbix' size and - offset also in `ebdt_size' and `ebdt_start', respectively. This - makes the test for an embedded bitmap data table succeed for this - format. - - (tt_face_load_strike_metrics) : Use - `ebdt_size' and `ebdt_start' - (tt_face_load_sbix_image): Ditto. - -2016-11-06 Seigo Nonaka - Werner Lemberg - - Introduce a way of quickly retrieving (embedded) bitmap metrics. - - `FT_Load_Glyph' doesn't generate a bitmap for a non-bitmap glyph - until the user calls `FT_Render_Glyph'. However, it always - allocates memory for bitmaps and copies or decodes the contents of a - bitmap glyph, which can be quite slow for PNG data. - - * include/freetype/freetype.h (FT_LOAD_BITMAP_METRICS_ONLY): New - macro. - - * src/base/ftobjs.c (FT_Load_Glyph): Unset FT_LOAD_RENDER if - FT_LOAD_BITMAP_METRICS_ONLY is used. - - * src/sfnt/ttsbit.c (tt_sbit_decoder_alloc_bitmap, - tt_sbit_decoder_load_bitmap): Add argument to control allocation of - the glyph slot. - (tt_sbit_decoder_load_image, tt_sbit_decoder_load_compound, - tt_face_load_sbit_image): Updated. - - * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Quickly exit if - `FT_LOAD_BITMAP_METRICS_ONLY' is set. - - * src/pfr/pfrsbit.c, src/pfr/pfrsbit.h (pfr_slot_load_bitmap): Add - argument to control allocation of the glyph slot. - * src/pfr/pfrobjs (pfr_slot_load): Updated. - - * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto. - - * docs/CHANGES: Updated. - -2016-11-06 Werner Lemberg - - Synchronize with gnulib (#49448). - - * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in, - builds/vms/ftconfig.h (FT_TYPEOF): Update code to use definition in - current version of `intprops.h'. - Other minor synchronization to reduce code differences between the - three files. - -2016-11-03 Behdad Esfahbod - - [truetype] Clamp variation requests to valid range. - - This is required by OpenType 1.8; it also avoids rounding surprises. - - * src/truetype/ttgxvar.c (TT_Set_Var_Design): Clamp design coordinates - outside of the allowed range to always stay within the range instead - of producing an error. - -2016-10-29 Werner Lemberg - - [truetype] Remove clang warnings. - - * src/truetype/ttinterp.h (TT_ExecContextRec): Using `FT_ULong' for - loop counter handling. - - * src/truetype/ttinterp.c: Updated. - (Ins_SCANTYPE): Use signed constant. - (TT_RunIns): Ensure `num_twilight_points' is 16bit. - -2016-10-27 Werner Lemberg - - [truetype] Fix commit from 2014-11-24. - - Problem reported by Hin-Tak Leung . - - * src/truetype/ttpload.c (tt_face_load_hdmx): Fix file checking - logic. - -2016-10-26 Werner Lemberg - - Add `FT_Get_{MM,Var}_Blend_Coordinates' functions. - - * include/freetype/ftmm.h: Declare. - - * include/freetype/internal/services/svmm.h (FT_Get_MM_Blend_Func): - New typedef. - (MultiMasters): New MM service function `get_mm_blend'. - (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. - Update all callers. - - * src/base/ftmm.c (FT_Get_MM_Blend_Coordinates, - FT_Get_Var_Blend_Coordinates): Implement. - - * src/truetype/ttdriver.c: Updated. - - * src/truetype/ttgxvar.c (TT_Get_MM_Blend): New function to handle - `get_mm_blend' service. - * src/truetype/ttgxvar.h: Updated. - - * src/type1/t1driver.c: Updated. - - * src/type1/t1load.c (T1_Get_MM_Blend): New function to handle - `get_mm_blend' service. - * src/type1/t1load.h: Updated. - - * docs/CHANGES: Document. - -2016-10-26 Werner Lemberg - - * src/type1/t1load.c (parse_subrs): Fix limit check. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=81 - -2016-10-25 Alexei Podtelezhnikov - - [cff] Correct cmap format reporting (#24819). - - * src/cff/cffdrivr.c (cff_get_cmap_info): Throw an error on synthetic - charmap instead of guessing its format and language. - -2016-10-22 Werner Lemberg - - [truetype] Fix SCANTYPE instruction (#49394). - - * src/truetype/ttinterp.c (Ins_SCANTYPE): Only use lower 16bits. - -2016-10-22 Werner Lemberg - - [sfnt] Improve handling of invalid post 2.5 tables [#49393]. - - * src/sfnt/ttpost.c (load_format_25): We need at least a single - table entry. - -2016-10-14 Werner Lemberg - - [truetype] Fix handling of `cvar' table data. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53 - - * src/truetype/ttgxvar.c (tt_face_vary_cvt): Ignore invalid CVT - indices. - -2016-10-11 Werner Lemberg - - [psaux] Fix handling of invalid flex subrs. - - Problem reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52 - - * src/psaux/t1decode.c (t1_decoder_parse_charstrings) - : Set `flex_state' after error checking. - -2016-10-11 Werner Lemberg - - * src/truetype/ttgxvar.c (tt_done_blend): Fix deallocation. - -2016-10-08 Werner Lemberg - - * src/cid/cidload.c (cid_face_open): Properly propagate `error'. - -2016-10-08 Werner Lemberg - - [cid] Fix parsing of subr offsets. - - Bug introduced 2016-05-16. - - * src/cid/cidparse.c (cid_parser_new): Fix off-by-one error. - -2016-10-01 Werner Lemberg - - [sfnt] Disable bitmap strikes if we don't have a bitmap data table. - - * src/sfnt/ttsbit.c (tt_face_load_sbit): Check whether we have - a bitmap data table. - -2016-10-01 Alexei Podtelezhnikov - - [smooth] Remove impossibility. - - * src/smooth/ftgrays.c (TWorker): Rearrange fields. - (gray_convert_glyph): Remove impossible condition and clean up. - -2016-09-29 Werner Lemberg - - [pcf] Enrich family name with foundry name and glyph width info. - - This is a very old patch from openSuSE (from 2006, submitted to - FreeType in 2011) that I forgot to apply. - - https://build.opensuse.org/package/view_file/openSUSE:Factory/freetype2/freetype2-bitmap-foundry.patch - - Prepend the foundry name plus a space to the family name. There are - many fonts just called `Fixed' which look completely different, and - which have nothing to do with each other. When selecting `Fixed' in - KDE or Gnome one gets results that appear rather random, the style - changes often if one changes the size and one cannot select some - fonts at all. - - We also check whether we have `wide' characters; all put together, - we get family names like `Sony Fixed' or `Misc Fixed Wide'. - - * src/pcf/pcfread.c (pcf_load_font): Implement it. - - * docs/CHANGES: Document it. - -2016-09-29 Werner Lemberg - - [ftfuzzer] Speed up. - - * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Don't - check for embedded bitmaps if we have a non-default instance. - -2016-09-29 Werner Lemberg - - [truetype] Disallow bitmap strikes for non-default instances. - - Also speed up access of default instances if GX variations are - active. - - * include/freetype/internal/tttypes.h (TT_FaceRec): Add - `is_default_instance' member. - - * src/sfnt/sfobjs.c (sfnt_init_face): Initialize - `is_default_instance'. - - * src/truetype/ttgload.c (TT_Process_Simple_Glyph, - load_truetype_glyph): Add test for default instance. - (TT_Load_Glyph): Load embedded bitmaps for default instance only. - - * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Compute - `is_default_instance'. - -2016-09-29 Werner Lemberg - - [truetype] Clean up `TT_Face' structure. - - * include/freetype/internal/tttypes.h (TT_FaceRec): Remove unused - fields `horz_metrics' and `vert_metrics'. - Update documentation. - - * src/sfnt/sfobjs.c (sfnt_done_face): Updated. - -2016-09-28 Werner Lemberg - - More FT_ZERO usage. - - * src/gxvalid/gxvcommn.c (gxv_ClassTable_validate): - s/ft_memset/FT_MEM_ZERO/. - - * src/psaux/t1decode.c (t1_decoder_parse_charstrings): - s/ft_memset/FT_ARRAY_ZERO/. - - * src/raster/ftraster.c (FT_ZERO): Define. - (ft_black_new): Use it. - * src/raster/ftrend1.c (ft_raster1_get_cbox): - s/FT_MEM_ZERO/FT_ZERO/. - - * src/smooth/ftgrays.c (FT_ZERO): Define. - (gray_raster_new): Use it. - * src/smooth/ftsmooth.c (ft_smooth_get_cbox): - s/FT_MEM_ZERO/FT_ZERO/. - -2016-09-28 Werner Lemberg - - */*: s/FT_MEM_ZERO/FT_ZERO/ where appropriate. - -2016-09-27 Werner Lemberg - - [truetype] Trace number of executed opcodes. - - * src/truetype/ttinterp.c (TT_RunIns): Implement it. - -2016-09-27 Werner Lemberg - - [truetype] Speed up `TT_Load_Glyph'. - - This avoids additional calls to `tt_face_lookup_table' for the - `glyf' table, which can be expensive. - - * include/freetype/internal/tttypes.h (TT_LoaderRec): Move - `glyf_offset' field to ... - (TT_FaceRec): ... this structure. - * src/truetype/ttgload.c (load_truetype_glyph): Updated. - (tt_loader_init): Move initialization of `glyf_offset' to ... - * src/truetype/ttpload.c (tt_face_load_loca): ... this function. - -2016-09-27 Werner Lemberg - - [truetype] Introduce dynamic limits for some bytecode opcodes. - - This speeds up FreeType's handling of malformed fonts. - - * src/truetype/ttinterp.c (TT_RunIns): Set up limits for the number - of twilight points, the total number of negative jumps, and the - total number of loops in LOOPCALL opcodes. The values are based on - the number of points and entries in the CVT table. - (Ins_JMPR): Test negative jump counter. - (Ins_LOOPCALL): Test loopcall counter. - - * src/truetype/ttinterp.h (TT_ExecContext): Updated. - - * docs/CHANGES: Updated. - -2016-09-25 Werner Lemberg - - [truetype] Sanitize only last entry of `loca' table. - - Without this patch, a loca sequence like `0 100000 0 100000 ...', - where value 100000 is larger than the `glyf' table size, makes - FreeType handle the whole `glyf' table as a single glyph again and - again, which is certainly invalid (and can be very slow, too). - - * src/truetype/ttpload.c (tt_face_get_location): Implement. - Improve tracing messages. - -2016-09-25 Werner Lemberg - - * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Fix typo. - -2016-09-24 Werner Lemberg - - [autofit] Tracing fixes. - - * src/autofit/afmodule.c (af_autofitter_load_glyph): Call dumping - functions only if we actually do tracing. - -2016-09-22 Alexei Podtelezhnikov - - [smooth] Reduce divisions in the line renderer. - - We don't need some divisions if a line segments stays within a single - row or a single column of pixels. - - * src/smooth/ftgrays.c (gray_render_line) [FT_LONG64]: Make divisions - conditional. - -2016-09-15 Alexei Podtelezhnikov - - * src/smooth/ftgrays.c (gray_sweep): Remove check for empty table. - -2016-09-14 Alexei Podtelezhnikov - - [smooth] Another tiny speed-up. - - * src/smooth/ftgrays.c (gray_find_cell): Merge into... - (gray_record_cell): ... this function. - -2016-09-11 Alexei Podtelezhnikov - - * src/smooth/ftgrays.c (gray_{find,set}_cell): Remove dubious code. - -2016-09-11 Alexei Podtelezhnikov - - [smooth] Fix valgrind warning and reoptimize. - - The algorithm calls `gray_set_cell' at the start of each new contour - or when the contours cross the cell boundaries. Double-checking for - that is wasteful. - - * src/smooth/ftgrays.c (gray_set_cell): Remove check for a new cell. - (gray_convert_glyph): Remove initialization introduced by 44b172e88. - -2016-09-10 Werner Lemberg - - [sfnt] Fix previous commit. - - Problems reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40 - - We now map the strike index right before accessing the physical - data, not earlier. - - * src/sfnt/sfobjs.c (sfnt_load_face): Set `face->sbit_strike_map' - after creating the map so that... - - * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): ... this function - can be used before and after setting up `sbit_strike_map'. - (tt_face_set_sbit_strike): Revert change. - (tt_sbit_decoder_init, tt_face_load_sbix_image): Map strike index. - - * src/truetype/ttdriver.c (tt_size_select): Revert change. - -2016-09-09 Werner Lemberg - - [ftfuzzer] Minor improvements. - - * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Ignore - invalid strikes. - Use better values for call to `FT_Set_Char_Size'. - -2016-09-09 Werner Lemberg - - [sfnt] Don't provide (completely) broken strike data. - - FreeType tries to sanitize strike header data; we now reject - completely broken ones. - - * include/freetype/internal/tttypes.h (TT_FaceRec): New - `sbit_strike_map' array pointer. - - * src/base/ftobjs.c (FT_Match_Size): Reject matches where either - width or height would be zero. - Add tracing message in case of error. - - * src/sfnt/sfobjs.c (sfnt_load_face): Populate `sbit_strike_map', - only using (more or less) valid strike header data for - FT_Face's `available_sizes' array. - (sfnt_done_face): Updated. - - * src/sfnt/ttsbit.c (tt_face_set_sbit_strike): Use - `sbit_strike_map'. - (tt_face_load_strike_metrics): Improve tracing. - - * src/truetype/ttdriver.c (tt_size_select): Use `sbit_strike_map'. - -2016-09-08 Werner Lemberg - - * Version 2.7 released. - ======================= - - - Tag sources with `VER-2-7'. - - * docs/VERSION.TXT: Add entry for version 2.7. - - * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, - builds/windows/vc2005/index.html, - builds/windows/vc2008/freetype.vcproj, - builds/windows/vc2008/index.html, - builds/windows/vc2010/freetype.vcxproj, - builds/windows/vc2010/index.html, - builds/windows/visualc/freetype.dsp, - builds/windows/visualc/freetype.vcproj, - builds/windows/visualc/index.html, - builds/windows/visualce/freetype.dsp, - builds/windows/visualce/freetype.vcproj, - builds/windows/visualce/index.html, - builds/wince/vc2005-ce/freetype.vcproj, - builds/wince/vc2005-ce/index.html, - builds/wince/vc2008-ce/freetype.vcproj, - builds/wince/vc2008-ce/index.html: s/2.6.5/2.7/, s/265/27/. - - * include/freetype/freetype.h (FREETYPE_MINOR): Set to 7. - (FREETYPE_PATCH): Set to 0. - - * builds/unix/configure.raw (version_info): Set to 18:6:12. - * CMakeLists.txt (VERSION_MINOR): Set to 7. - (VERSION_PATCH): Set to 0. - - * docs/CHANGES: Updated. - -2016-09-08 Werner Lemberg - - * src/truetype/ttinterp.c: Include `ttgxvar.h'. - - This fixes the `multi' build. - -2016-09-08 Werner Lemberg - - [autofit] Another improvement to Armenian support. - - Suggested by Hrant H Papazian . - - * src/autofit/afscript.h: Use better suited characters to derive - default stem widths. - -2016-09-07 Alexei Podtelezhnikov - - * src/smooth/ftgrays.c (gray_hline): Micro-optimize. - -2016-09-06 Alexei Podtelezhnikov - - [smooth] Operate in absolute bitmap coordinates. - - Simpler bitmap addressing improves performance by 1.5%. - - * src/smooth/ftgrays.c (gray_TWorker): Remove count fields. - (gray_dump_cells, gray_find_cell, gray_set_cell, gray_hline, - gray_sweep, gray_convert_glyph, gray_raster_render): Updated. - -2016-09-06 Alexei Podtelezhnikov - - [smooth] Improve contour start (take 2). - - * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly - instead of... - (gray_start_cell): ... this function, which is removed. - (gray_convert_glyph): Make initial y-coordinate invalid. - -2016-09-06 Werner Lemberg - - [type1] MM fonts support exactly zero named instances (#48748). - - * src/type1/t1load.c (T1_Get_MM_Var): Set `num_namedstyles' to zero. - -2016-09-06 Jonathan Kew - - [cff] Fix uninitialized memory. - - Problem reported as - - https://bugzilla.mozilla.org/show_bug.cgi?id=1270288 - - * src/cff/cf2intrp.c (cf2_interpT2CharString): Initialize `storage' - array to handle a `get' opcode without a previous `put'. - -2016-09-05 Alexei Podtelezhnikov - - * src/smooth/ftgrays.c (gray_move_to, gray_start_cell): Revert. - -2016-09-05 Alexei Podtelezhnikov - - [smooth] Improve contour start. - - * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly - instead of... - (gray_start_cell): ... this function, which is removed. - -2016-09-05 Werner Lemberg - - [cff] Fix memory initialization. - - * src/cff/cf2stack.c (cf2_stack_init): Use `FT_NEW'. The `Q' - variants of FreeType's memory allocation macros don't do zeroing. - -2016-09-05 Werner Lemberg - - [ftrandom] Minor improvements. - - * src/tools/ftrandom/ftrandom.c (_XOPEN_SOURCE): New macro, set to - 500. - - * src/tools/ftrandom/Makefile (CFLAGS): Split off include - directories to ... - (INCLUDES): ... this new variable. - (LDFLAGS): New variable. - (ftrandom.o, ftrandom): Updated. - -2016-09-05 Werner Lemberg - - [autofit] Improve Armenian support. - - Thanks to Hrant H Papazian for help. - - * src/autofit/afblue.dat (AF_BLUE_STRING_ARMENIAN_*): Improve - selection of characters. - - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - -2016-09-04 Werner Lemberg - - [ftrandom] Improve Makefile. - - It now supports both a normal build (`./configure && make') and a - development build (`make devel'). - - * src/tools/ftrandom/Makefile (VPATH): Set it so that - `libfreetype.a' gets searched in both `objs' (for the development - build) and `objs/.libs' (for a normal build which uses libtool). - (LIBS): Add missing libraries. - (ftrandom.o): New rule. - (ftrandom): Use automatic variables. - -2016-09-03 Werner Lemberg - - [truetype] More fixes for handling of GX deltas. - - Problems reported by Bob Taylor . - - * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix rough - sanity test for glyph variation array header size. - Always set stream position before reading packed x and y deltas. - Fix thinko w.r.t. `localpoints' array. - -2016-09-03 Werner Lemberg - - [ftrandom] Various fixes. - - * src/tools/ftrandom/ftrandom.c (GOOD_FONTS_DIR): Provide better - default. - (error_fraction): Make it of type `double' to work as advertized – - this was completely broken. - Update all related code. - (error_count, fcnt): Make it unsigned to fix compiler warnings. - Update all related code. - (fontlist): Change `len' member to `long' to fix compiler warnings. - (FT_MoveTo, FT_LineTo, FT_ConicTo, FT_CubicTo, abort_test): Tag - unused variables. - (TestFace, FindFonts, copyfont, do_test): Fix compiler warnings. - (ExecuteTest): Ditto. - Call `FT_Done_FreeType'. - (getErrorCnt): Replace `ceil' with an ordinary cast to `unsigned - int'. - (usage): Improve output. - (main): Fix compiler warnings. - - * src/tools/ftrandom/README: Updated. - -2016-09-03 Werner Lemberg - - [base] Avoid negative bitmap strike dimensions (#48985). - - * src/base/ftobjs.c (FT_Open_Face): Check whether negation was - actually successful. For example, this can fail for value - -32768 if the type is `signed short'. If there are problems, - disable the strike. - -2016-09-03 Werner Lemberg - - [cff] Avoid null pointer passed to FT_MEM_COPY (#48984). - - * src/cff/cffload.c (cff_index_get_name): Check `byte_len'. - -2016-09-02 Werner Lemberg - - [unix] Enable 64bit support in file system access (#48962). - - * builds/unix/configure.raw: Call `AC_SYS_LARGEFILE'. - -2016-09-02 Werner Lemberg - - [sfnt] Avoid left shift of negative value (#48980). - - * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Use unsigned - constant. - -2016-09-02 Werner Lemberg - - * src/smooth/ftgrays.c (gray_hline): Fix clang compiler warnings. - -2016-09-02 Werner Lemberg - - Some preparations for the next release. - - * include/freetype/config/ftoption.h - (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Enable. - - * docs/CHANGES: Updated. - -2016-09-01 Alexei Podtelezhnikov - - [smooth] Simplify span rendering more. - - It turns out that there is significant cost associated with `FT_Span' - creation and calls to `gray_render_span' because it happens so - frequently. This removes these steps from our internal use but leaves - it alone for `FT_RASTER_FLAG_DIRECT" to preserve API. The speed gain - is about 5%. - - * src/smooth/ftgrays.c (gray_render_span): Removed. The code is - migrated to... - (gray_hline): ... here. - -2016-08-30 Alexei Podtelezhnikov - - [smooth] Streamline pixmap drawing a bit more. - - Zero coverage is unlikely (1 out of 256) to warrant checking. This - gives 0.5% speed improvement in rendering simple glyphs. - - * src/smooth/ftgrays.c (gray_hline, gray_render_span): Remove checks. - -2016-08-29 Alexei Podtelezhnikov - - [smooth] Streamline pixmap drawing. - - This gives 2% speed improvement in rendering simple glyphs. - - * src/smooth/ftgrays.c (TPixmap): Reduced pixmap descriptor with a - pointer to its bottom-left and pitch to be used in... - (gray_TWorker): ... here. - (gray_render_span): Move pixmap flow check from here... - (gray_raster_render): .. to here. - -2016-08-27 Alexei Podtelezhnikov - - [smooth] Reduce stack of band boundaries. - - * src/smooth/ftgrays.c (gray_TBand): Removed. - (gray_convert_glyph): Updated to stack band boundaries concisely. - -2016-08-26 Werner Lemberg - - * src/cid/cidload.c (cid_face_open): Improve handling of `SDBytes'. - -2016-08-26 Werner Lemberg - - [cid] Fix commit from 2016-05-16. - - * src/cid/cidparse.c (cid_parser_new): Fix off-by-one errors. - -2016-08-26 Werner Lemberg - - [sfnt] Cache offset and size to bitmap data table. - - This commit avoids `EBDT' and friends being looked up again and - again while loading a single embedded bitmap. - - * include/freetype/internal/tttypes.h (TT_FaceRec) - [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: New fields `ebdt_start' and - `ebdt_size'. - - * src/sfnt/ttsbit.c (tt_sbit_decoder_init): Move table lookup to ... - (tt_face_load_sbit): ... this function; also store the table size - and offset. - -2016-08-26 Alexei Podtelezhnikov - - * src/smooth/ftgrays.c (gray_raster_render): Minor tweaks. - -2016-08-26 Werner Lemberg - - [type1] Fix heap buffer overflow. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36 - - * src/type1/t1load.c (parse_charstrings): Reject fonts that don't - contain glyph names. - -2016-08-25 Werner Lemberg - - [sfnt] Fix previous commit (#48901). - - * src/sfnt/ttcmap.c (tt_cmap4_char_map_binary): Thinkos. - -2016-08-25 Werner Lemberg - - [sfnt] Speed up handling of invalid format 4 cmaps. - - * src/sfnt/ttcmap.c (tt_cmap4_next, tt_cmap4_char_map_binary): Add - tests for `num_glyph' from `tt_cmap4_char_map_linear'. - -2016-08-25 Werner Lemberg - - * include/freetype/internal/ftdriver.h: Remove unused typedefs. - -2016-08-22 Alexei Podtelezhnikov - - [smooth] Simplify span rendering. - - This removes unnecessary complexity of span merging and buffering. - Instead, the spans are rendered as they come, speeding up the - rendering by about 5% as a result. - - * src/smooth/ftgrays.c [FT_MAX_GRAY_SPANS]: Macro removed. - (gray_TWorker): Remove span buffer and related fields. - (gray_sweep, gray_hline): Updated. - - * include/freetype/ftimage.h: Remove documentation note about - `FT_MAX_GRAY_SPANS', which was never in `ftoption.h' and is now gone. - -2016-08-16 Werner Lemberg - - [truetype] Fix `MPS' instruction. - - According to Greg Hitchcock, MPS in DWrite really returns the point - size. - - * src/truetype/ttobjs.h (TT_SizeRec): Add `point_size' member. - - * src/truetype/ttdriver.c (tt_size_request): Set `point_size'. - - * src/truetype/ttinterp.h (TT_ExecContextRec): Add `pointSize' - member. - - * src/truetype/ttinterp.c (TT_Load_Context): Updated. - (Ins_MPS): Fix instruction. - -2016-08-16 Werner Lemberg - - [lzw] Optimize last commit. - - * src/lzw/ftzopen.c (ft_lzwstate_get_code): Move check into - conditional clause. - -2016-08-16 Werner Lemberg - - [lzw] Avoid invalid left shift. - - Reported as - - https://bugzilla.mozilla.org/show_bug.cgi?id=1295366 - - * src/lzw/ftzopen.c (ft_lzwstate_get_code): Limit `num_bits'. - -2016-08-16 Werner Lemberg - - [lzw] Avoid buffer overrun. - - Reported as - - https://bugzilla.mozilla.org/show_bug.cgi?id=1273283 - - * src/lzw/ftzopen.c (ft_lzwstate_refill): Ensure `buf_size' doesn't - underflow. - -2016-08-16 Werner Lemberg - - [truetype] Fix compiler warning. - - * src/truetype/ttgload.c (load_truetype_glyph): Add cast. - -2016-08-13 Werner Lemberg - - [winfonts] Avoid zero bitmap width and height. - - Reported as - - https://bugzilla.mozilla.org/show_bug.cgi?id=1272173 - - * src/winfonts/winfnt.c (FNT_Face_Init): Check zero pixel height. - (FNT_Load_Glyph): Check for zero pitch. - -2016-08-11 Alexei Podtelezhnikov - - * src/truetype/ttinterp.c (Pop_Push_Count): Revert changes. - -2016-08-11 Alexei Podtelezhnikov - - * src/truetype/ttinterp.c (TT_RunIns): Minor and formatting. - -2016-08-11 Alexei Podtelezhnikov - - * src/truetype/ttinterp.c (Pop_Push_Count): Fix some entries. - -2016-08-10 Peter Klotz - - * src/smooth/ftgrays.c (gray_hline): Fix uninitialized access. - -2016-08-10 Werner Lemberg - - [sfnt] Use correct type for `italicAngle' field (#48732). - - * src/sfnt/ttload.c (tt_face_load_post): Fix types. - -2016-08-06 Jon Spencer - - [sfnt] Fix `FT_Get_Advance' for bitmap strikes. - - `FT_Get_Advance' returns 0 for bitmap fonts. It first gets the - advance value from the font table and then scales it by the - `font->size->metrics->x_scale' field. But `FT_Select_Size' doesn't - set that value for bitmap fonts and the advance gets scaled to zero. - - Taken from - - https://github.com/behdad/harfbuzz/issues/252 - - * src/sfnt/ttsbit.c (tt_face_load_strike_metrics) - : Set scale values. - -2016-08-06 Behdad Esfahbod - - [truetype] Fix GX variation handling of composites. - - * src/truetype/ttgload.c (load_truetype_glyph) - [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check `ARGS_ARE_XY_VALUES' flag. - -2016-08-05 Alexei Podtelezhnikov - - [smooth] Minor refactoring. - - * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line): - Updated. - -2016-07-29 Werner Lemberg - - [sfnt, truetype] Don't abort on invalid `maxComponentDepth'. - - Since 2016-05-16 we detect infinite recursion directly. - - * src/sfnt/ttload.c (tt_face_load_maxp): Don't adjust - `maxComponentDepth'. - * src/truetype/ttgload.c (load_truetype_glyph): Don't abort if - `maxComponentDepth' is not valid. Instead, simply adjust its value - and emit a tracing message. - -2016-07-26 Werner Lemberg - - * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Minor. - - No functional change. - -2016-07-22 Hin-Tak Leung - - [truetype] Record the end of IDEFs. - - To match the logic in FDEF. The value of the end is only used for - bound-checking in `Ins_JMPR', so it may not have been obvious that - it was not recorded. Tested (as part of Font Validator 2.0) all the - fonts on Fedora and did not see any change. - - * src/truetype/ttinterp.c (Ins_IDEF): Updated. - -2016-07-19 Werner Lemberg - - [truetype] Sanitizer fix, second try. - - * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary - tests and use only one slot more. - -2016-07-19 Werner Lemberg - - [truetype] Sanitizer fix. - - * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Increase array - to fix nested loops. - -2016-07-18 Werner Lemberg - - [truetype] Make GETDATA work only for GX fonts. - - * src/truetype/ttinterp.c (opcode_name): Updated. - (Ins_GETDATA): Only define for `TT_CONFIG_OPTION_GX_VAR_SUPPORT'. - (TT_RunIns): Updated. - -2016-07-17 Werner Lemberg - - [truetype] Add support for Apple's - - GETDATA[], opcode 0x92 - - bytecode instruction. It always returns 17, and we have absolutely - no idea what it is good for... - - * src/truetype/ttinterp.c (Pop_Push_Count, opcode_name): Updated. - (Ins_GETDATA): New function. - (TT_RunIns): Add it. - -2016-07-16 Werner Lemberg - - [truetype] Add bytecode support for GX variation fonts. - - This commit implements undocumented (but confirmed) stuff from - Apple's old bytecode engine. - - GETVARIATION[], opcode 0x91 - This opcode pushes normalized variation coordinates for all axes - onto the stack (in 2.14 format). Coordinate of first axis gets - pushed first. - - GETINFO[], selector bit 3 - If GX variation support is enabled, bit 10 of the result is set - to 1. - - * src/truetype/ttinterp.c: Include FT_MULTIPLE_MASTERS_H. - (opcode_name) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Updated. - (Ins_GETINFO) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle selector - bit 3, checking support for variation glyph hinting. - (Ins_GETVARIATION) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New function - to implement opcode 0x91. - (TT_RunIns) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle opcode 0x91. - -2016-07-16 Werner Lemberg - - [truetype] Fix GETINFO bytecode instruction. - - * src/truetype/ttinterp.c (Ins_GETINFO): Fix return value for - stretching information. - -2016-07-16 Behdad Esfahbod - - [truetype] Make all glyphs in `Zycon' GX font work. - - * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary - tests. - -2016-07-16 Werner Lemberg - - [truetype] Fix GX delta tracing. - - * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Trace - relative point movements. - -2016-07-16 Behdad Esfahbod - - [truetype] More fixes for GX. - - This finally fixes the rendering of the cyclist and the lizard in - the `Zycon' font. - - * src/truetype/ttgxvar.c (ft_var_readpackedpoints): `first' point - index is always cumulative. - - (tt_handle_deltas): Rename to... - (tt_interpolate_deltas): ... This. - Add new parameter for output point array. - Update caller. - - (TT_Vary_Apply_Glyph_Deltas): Add `points_out' array; it now holds - the intermediate results of `tt_interpolate_deltas' that are to be - added to `outline->points'. - -2016-07-15 Werner Lemberg - - * src/autofit/aflatin.c (af_latin_hints_compute_segments): Thinko. - - `max_pos' is always larger than `min_pos' so `FT_ABS' is not needed. - - Reported by Alexei. - -2016-07-16 Nikolaus Waxweiler - - * src/truetype/ttinterp.c (Ins_MIRP): Fix copy-and-paste error. - - Problem reported by Hin-Tak Leung. - -2016-07-15 Werner Lemberg - - [autofit] Update and improve segment and edge tracing. - - * src/autofit/afhints.c (af_glyph_hints_dump_segments): Trace - `delta' also. - Don't show first point of segment as a replacement for `pos'; this - is (a) misleading, since the difference to `pos' can be almost - arbitrarily large in corner cases, and (b) it is better to have all - segment data in font units instead of a single value given in output - space coordinates. - Improve layout. - (af_glyph_hints_dump_edges): Show px->units and units->px conversion - values for convenience. - Improve layout. - -2016-07-15 Werner Lemberg - - [autofit] For edges, reject segments wider than 1px (#41334). - - * src/autofit/afhints.h (AF_SegmentRec): New member `delta'. - - * src/autofit/aflatin.c (af_latin_hints_compute_segments): Compute - `delta'. - (af_latin_hints_compute_edges): Reject segments with a delta larger - than 0.5px. - -2016-07-14 Werner Lemberg - - * include/freetype/freetype.h (FT_IS_NAMED_INSTANCE): New macro. - -2016-07-14 Werner Lemberg - - [sfnt] Fix `face_index' value in `FT_Face' for named instances. - - * src/sfnt/sfobjs.c (sfnt_init_face): Don't strip off higher 16bits. - -2016-07-14 Werner Lemberg - - * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix tracing. - -2016-07-14 Behdad Esfahbod - - [truetype] Fix gxvar delta interpolation. - - The coordinates of the base font should be used for interpolation - purposes, NOT the current points (i.e., the result of accumulation - of previous deltas). - - * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Initialize - `points_org' before looping over all tuples. - - ----------------------------------------------------------------------------- - -Copyright 2016-2018 by -David Turner, Robert Wilhelm, and Werner Lemberg. - -This file is part of the FreeType project, and may only be used, modified, -and distributed under the terms of the FreeType project license, -LICENSE.TXT. By continuing to use, modify, or distribute this file you -indicate that you have read the license and understand and accept it -fully. - - -Local Variables: -version-control: never -coding: utf-8 -End: diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/ChangeLog.28 b/extensions/gdx-freetype/jni/freetype-2.9.1/ChangeLog.28 deleted file mode 100644 index ca1ff3850..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/ChangeLog.28 +++ /dev/null @@ -1,3136 +0,0 @@ -2017-09-16 Werner Lemberg - - * Version 2.8.1 released. - ========================= - - - Tag sources with `VER-2-8-1'. - - * docs/VERSION.TXT: Add entry for version 2.8.1. - * docs/CHANGES: Updated. - - * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, - builds/windows/vc2005/index.html, - builds/windows/vc2008/freetype.vcproj, - builds/windows/vc2008/index.html, - builds/windows/vc2010/freetype.vcxproj, - builds/windows/vc2010/index.html, - builds/windows/visualc/freetype.dsp, - builds/windows/visualc/freetype.vcproj, - builds/windows/visualc/index.html, - builds/windows/visualce/freetype.dsp, - builds/windows/visualce/freetype.vcproj, - builds/windows/visualce/index.html, - builds/wince/vc2005-ce/freetype.vcproj, - builds/wince/vc2005-ce/index.html, - builds/wince/vc2008-ce/freetype.vcproj, - builds/wince/vc2008-ce/index.html: s/2.8/2.8.1/, s/28/281/. - - * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. - - * builds/unix/configure.raw (version_info): Set to 21:0:15. - * CMakeLists.txt (VERSION_PATCH): Set to 1. - -2017-09-13 suzuki toshiya - - [sfnt] lowest gcc for vectors (e1d0249e) is changed to 4.7. - - __builtin_shuffle() was introduced in gcc-4.7. The lowest - gcc to enable vector operation is delayed from 4.6 to 4.7. - - * src/sfnt/pngshim.c (premultiply_data): Fix cpp-macro to - enable the vector operation, to change the lowest gcc version - from 4.6 to 4.7. - -2017-09-13 suzuki toshiya - - [cache] Fix a possible overflow by signed integer comparison. - - Improve the code by 5d3ff05615dda6d1325ed612381a17a0df04c975 , - issues are found by Behdad Esfahbod and Werner Lemberg. - - * src/cache/ftcbasic.c (FTC_ImageCache_Lookup): Replace - a subtraction to check higher bit by a bit operation, - and cpp-conditionalize for appropriate systems. Add better - documentation to the comment. - (FTC_ImageCache_LookupScaler): Ditto. - (FTC_SBitCache_Lookup): Ditto. - (FTC_SBitCache_LookupScaler): Ditto. - -2017-09-13 Werner Lemberg - - [autofit] Really fix #41334 (#52000). - - * src/autofit/aflatin.c (af_latin_hints_compute_segments): Set - `segment->delta' everywhere. - -2017-09-12 suzuki toshiya - - [autofit, sfnt] Fix for `make multi'. - - * src/autofit/afshaper.c: Include FT_ADVANCE_H, to use - FT_Get_Advance() in it. - * src/sfnt/ttcmap.c: Include FT_SERVICE_POSTSCRIPT_CMAPS_H - to use PS_Unicodes in it, also include `ttpost.h' to use - tt_face_get_ps_name() in it. - -2017-09-11 Azzuro - - [build] Improve builds with different MS Visual Studio versions. - - * builds/windows/vc2010/freetype.vcxproj: Switch platform toolset - according to the Visual Studio version. - -2017-09-11 Werner Lemberg - - * src/sfnt/ttkern.c (tt_face_load_kern): Reject format 2 tables. - - Reported by Behdad. - -2017-09-09 Werner Lemberg - - [autofit] Improve communication with ftgrid. - - * src/autofit/afhints.c (af_glyph_hints_get_segment_offset): - Provide values in font units. - -2017-09-08 suzuki toshiya - - [base] Remove a check for resource ID in the resource fork driver. - - LastResort.dfont has a marginal resource ID 0xFFFF for sfnt - resource. Inside Macintosh: More Macintosh Toolbox, `Resource IDs' - (1-46), tells that some IDs are reserved and should not be used. - FreeType2 just uses resource ID to sort the fragmented resource. - To accept the marginal fonts, the checking is removed. - - * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Remove res_id - validity check, fix a trace message format. - -2017-09-08 suzuki toshiya - - [sfnt, truetype] Register the tags for marginal fonts. - - The first 32bit of standard TrueType variants is 0x00010000, - `OTTO', `ttcf', `true' or `typ1'. 2 marginal dfonts on legacy Mac - OS X, Keyboard.dfont and LastResort.dfont, have the sfnt resources - starting 0xA5 followed by `kbd' or `lst'. Considering the following - data could be parsed as conventional TrueType fonts, the header - checking is updated to allow these tags. It seems that recent Mac - OS X has already switched to normal TTF for these fonts. - - See the discussion at - http://u88.n24.queensu.ca/exiftool/forum/index.php?topic=3931.0 - - * include/freetype/tttags.h (TTAG_0xA5kbd, TTAG_0xA5lst): New header - tags for Keyboard.dfont and LastResort.dfont. - * src/sfnt/sfobjs.c (sfnt_open_font): Accept the sfnt resource - starts with TTAG_0xA5kbd or TTAG_0xA5lst. - * src/truetype/ttobjs.c (tt_face_init): Accept the face with the - format tag is TTAG_0xA5kbd or TTAG_0xA5lst. - -2017-09-05 Werner Lemberg - - Fix multiple calls of `FT_Bitmap_Convert'. - - The documentation of `FT_Bitmap_Convert' says that multiple calls do - proper reallocation of the target FT_Bitmap object. However, this - failed for the sequence - - non-empty bitmap - empty bitmap - non-empty bitmap - - Reason was that `FT_Bitmap_Convert' only reallocated the bitmap - buffer if it became too small; it didn't make the buffer smaller. - For an empty bitmap following a non-empty one, only the buffer - dimension got set to zero, without deallocation. If the next call - was a non-empty buffer again, an assertion in `ft_mem_qrealloc' was - triggered. - - * src/base/ftbitmap.c (FT_Bitmap_Convert): Always reallocate target - buffer to the correct size. - - * docs/CHANGES: Document it. - -2017-09-05 Werner Lemberg - - [bdf] Fix size and resolution handling. - - * src/bdf/bdfdrivr.c (BDF_Face_Init): Use `SIZE' values if - `POINT_SIZE', `RESOLUTION_X', or `RESOLUTION_Y' properties are - missing. - - * docs/CHANGES: Document it. - -2017-08-25 Alexei Podtelezhnikov - - Swap `ALLOC_MULT' arguments (#51833). - - * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Updated. - * src/winfonts/winfnt.c (FNT_Load_Glyph): Updated. - * src/raster/ftrend1.c (ft_raster1_render): Updated. - -2017-08-23 Werner Lemberg - - [sfnt] Fix clang compilation (#51788). - - * src/sfnt/pngshim.c (premultiply_data): Use vectors instead of - scalars. - (vector_shuffle): New macro to take care of a different built-in - function name on clang. - -2017-08-22 Werner Lemberg - - [base] Don't zero out allocated memory twice (#51816). - - Patch applied from bug report. - - * src/base/ftutil.c (ft_mem_qrealloc): Use low-level allocation to - avoid unnecessary overhead. - -2017-08-22 Werner Lemberg - - [truetype] Integer overflow. - - Changes triggered by - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3107 - - * src/truetype/ttinterp.c (Ins_MDRP, Ins_MIRP, Ins_ALIGNPTS): Use - NEG_LONG. - -2017-08-17 Alexei Podtelezhnikov - - [sfnt] Avoid synthetic unicode for symbol fonts with PUA. - - Reported as - - https://bugs.chromium.org/p/chromium/issues/detail?id=754574 - - * src/sfnt/sfobjs.c (sfnt_load_face): Check for FT_ENCODING_MS_SYMBOL. - -2017-08-16 Werner Lemberg - - * src/sfnt/pngshim.c (premultiply_data): Fix compiler warnings. - -2017-08-15 Behdad Esfahbod - - [sfnt] Speed up PNG image loading. - - This reduces the overhead of `premultiply_data' by 60%. - - * src/sfnt/pngshim.c (premultiply_data): Provide code which uses - gcc's (and clang's) `vector_byte' attribute to process 4 pixels at a - time. - -2017-08-11 Werner Lemberg - - [sfnt, truetype] Improve handling of missing sbits. - - Requested by Behdad. - - Modern bitmap-only SFNTs like `NotoColorEmoji.ttf' don't contain - entries in the bitmap strike(s) for empty glyphs. Instead, they - rely that a space glyph gets created from the font's metrics data. - This commit makes FreeType behave accordingly. - - * include/freetype/fterrdef.h (FT_Err_Missing_Bitmap): New error - code. - - * src/sfnt/ttsbit.c (tt_sbit_decoder_load_image): Change error codes - to make a distinction between a missing bitmap in a composite and a - simple missing bitmap. - - * src/truetype/ttgload.c (TT_Load_Glyph): For a missing bitmap (in a - bitmap-only font), synthesize an empty bitmap glyph if metrics are - available. - -2017-08-10 Werner Lemberg - - [base] Minor API improvement for default variation axis setting. - - * src/base/ftmm.c (FT_Set_MM_Design_Coordinates, - FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, - FT_Set_Var_Blend_Coordinates): Allow coords==NULL if num_coords==0. - - * docs/CHANGES: Updated. - -2017-08-08 Werner Lemberg - - [psnames] Really fix issue #49949. - - We now use a separate preprocessor macro to handle both definition - and declaration of the glyph name arrays. - - * src/psnames/psmodule.c (DEFINE_PS_TABLE_DATA): New macro. - - * src/tools/glnames.py (StringTable::dump, - StringTable::dump_sublist): Use `DEFINE_PS_TABLE_DATA'. - (dump_encoding): Ditto. - (main): Use `wb' mode for writing the output file, which works on - Windows also. - - * src/psnames/pstables.h: Regenerated. - -2017-08-08 Alexei Podtelezhnikov - - [smooth] Harmony LCD rendering. - - This is a new technology for LCD-optimized rendering. It capitalizes - on the fact that each color channel grid is shifted by a third of a - pixel. Therefore it is logical to render 3 separate monochrome - bitmaps shifting the outline by 1/3 pixel, and then combine them. - Importantly, the resulting output does not require additional LCD - filtering. - - * src/smooth/ftsmooth.c (ft_smooth_render_generic) - [!FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Implement new LCD-optimized - rendering. - - * include/freetype/ftlcdfil.h, include/freetype/freetype.h, - include/freetype/config/ftoption.h, devel/ftoption.h: Updated - documentation. - -2017-08-08 Alexei Podtelezhnikov - - * src/smooth/ftsmooth.c (ft_smooth_render_generic): Clean up. - -2017-08-08 Alexei Podtelezhnikov - - * src/sfnt/ttpost.c (format): Use otspec-compliant versions. - -2017-08-05 Werner Lemberg - - [truetype] Integer overflow. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2868 - - * src/truetype/ttinterp.c (Ins_ALIGNRP): Use NEG_LONG. - -2017-08-05 Werner Lemberg - - [base, truetype] New function `FT_Get_Var_Axis_Flags'. - - The reserved `flags' field got a value in OpenType version 1.8.2; - unfortunately, the public `FT_Var_Axis' structure misses the - corresponding element. Since we can't add a new field, we add an - access function. - - * src/base/ftmm.c (FT_Get_Var_Axis_Flags): New function. - - * include/freetype/ftmm.h (FT_VAR_AXIS_FLAG_HIDDEN): New macro. - Updated. - - * src/truetype/ttgxvar.c (TT_Get_MM_Var): Increase allocated memory - of `mmvar' to hold axis flags. - Fill the axis flags array. - - * docs/CHANGES: Updated. - -2017-08-03 Nikolaus Waxweiler - - [truetype] Fix metrics of B/W hinting in v40 mode. - - Phantom points are now saved outside v40 backwards compatibility - mode. This fixes the jumping glyphs when switching between v35 and - v40 monochrome mode. - - * src/truetype/ttgload.c (TT_Hint_Glyph): Fix inversed bool logic. - -2017-08-03 Nikolaus Waxweiler - - [truetype] Do not set any ClearType flags in v40 monochrome mode. - - This fixes weird behavior of instructions that resulted in rendering - differences between v35 and v40 in monochrome mode, e.g., in - `timesbi.ttf'. - - * src/truetype/ttinterp.c (Ins_GETINFO) - [TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL]: Check - `subpixel_hinting_lean'. - -2017-08-01 Werner Lemberg - - * src/truetype/ttgxvar.c (TT_Get_MM_Var): Fix thinko. - -2017-08-01 Behdad Esfahbod - - [truetype] Fix loading of named instances. - - * src/truetype/ttgxvar.c (TT_Get_MM_Var): Preserve file position - while loading the `avar' table. - -2017-08-01 Werner Lemberg - - [sfnt, truetype] Minor adjustments for OpenType 1.8.2. - - * src/sfnt/sfobjs.c (sfnt_load_face): The units per EM value has now - (tighter) limits. - - * src/truetype/ttgload.c (load_truetype_glyph): The new OpenType - version explicitly allows all negative values for the number of - contours if we have a composite glyph (this is for better backwards - compatibility I guess), but it still recommends value -1. - -2017-07-26 Werner Lemberg - - [cff] Integer overflow. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2738 - - * src/cff/cf2hints.c (cf2_glyphpath_computeOffset, - cf2_glyphpath_curveTo): Use ADD_INT32. - -2017-07-13 Werner Lemberg - - [base] Fix memory leak. - - Reported as - - https://bugs.chromium.org/p/chromium/issues/detail?id=738362 - - * src/base/ftglyph.c (FT_Get_Glyph): Do proper deallocation in case - of error. - -2017-07-12 Werner Lemberg - - [base] Integer overflow. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2573 - - * src/base/ftobjs.c (ft_glyphslot_grid_fit_metrics): Use - FT_PIX_CEIL_LONG and FT_PIX_ROUND_LONG. - -2017-07-12 Werner Lemberg - - * src/truetype/ttpload.c (tt_face_get_location): Off-by-one typo. - - Also improve tracing message. - - Problem reported as - - https://bugs.chromium.org/p/chromium/issues/detail?id=738919 - -2017-07-07 Werner Lemberg - - [cff] Integer overflow. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2517 - - * src/cff/cf2blues.c (cf2_blues_capture): Use SUB_INT32. - -2017-07-05 Werner Lemberg - - * src/sfnt/ttcmap.c (tt_cmap_unicode_class_rec): Fix warning. - -2017-07-05 Werner Lemberg - - * src/truetype/ttgxvar.c (FT_Stream_SeekSet): Fix warning (#51395). - -2017-07-04 Werner Lemberg - - [truetype] Prevent address overflow (#51365). - - * src/truetype/ttgxvar.c (FT_Stream_SeekSet): Add guard. - -2017-07-03 Alexei Podtelezhnikov - - * src/base/ftlcdfil.c (ft_lcd_filter_fir): Improve code. - -2017-07-03 Werner Lemberg - - [truetype] Integer overflow. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2455 - - * src/truetype/ttinterp.c (Ins_SCFS): Use SUB_LONG. - -2017-07-01 Alexei Podtelezhnikov - - * src/sfnt/sfobjs.c (sfnt_load_face): Ignore No_Unicode_Glyph_Name. - -2017-06-28 Ben Wagner - - Avoid Microsoft compiler warnings (#51331). - - While clang's sanitizer recommends a cast to unsigned for safe - negation (to handle -INT_MIN), both MSVC and Visualc emit warning - C4146 if an unsigned value gets negated. - - * include/freetype/internal/ftcalc.h (NEG_LONG, NEG_INT32), - src/base/ftcalc.c (FT_MOVE_SIGN): Replace negation with a - subtraction. - -2017-06-27 Werner Lemberg - - * src/cff/cffparse.c (do_fixed): Fix typo. - - Spotted by chris . - -2017-06-27 Werner Lemberg - - [truetype] Integer overflows. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2384 - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2391 - - * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_DivFix): Use - NEG_LONG. - - * src/truetype/ttinterp.c (Ins_SxVTL): Use NEG_LONG. - -2017-06-24 Werner Lemberg - - [truetype] Integer overflows. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2364 - - * src/truetype/ttinterp.c (Ins_ISECT): Use NEG_LONG. - -2017-06-22 Werner Lemberg - - [cff, truetype] Integer overflows. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2323 - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2328 - - * src/cff/cf2blues.c (cf2_blues_capture): Use ADD_INT32 and - SUB_INT32. - - * src/truetype/ttinterp.c (Ins_SDPVTL): Use SUB_LONG and NEG_LONG. - -2017-06-21 Alexei Podtelezhnikov - - [sfnt] Synthesize a Unicode charmap if one is missing. - - * src/sfnt/ttcmap.h (tt_cmap_unicode_class_rec): Declare it. - * src/sfnt/ttcmap.c (tt_get_glyph_name, tt_cmap_unicode_init, - tt_cmap_unicode_done, tt_cmap_unicode_char_index, - tt_cmap_unicode_char_next, tt_cmap_unicode_class_rec): Implement - synthetic Unicode charmap class. - (tt_get_cmap_info): Make sure the callback is available. - - * src/sfnt/sfobjs.c (sfnt_load_face) - [FT_CONFIG_OPTION_POSTSCRIPT_NAMES]: If Unicode charmap is missing, - synthesize one. - - * include/freetype/config/ftoption.h: Document it. - * devel/ftoption.h: Ditto. - -2017-06-20 Tony Theodore - - Fix pkg-config in freetype-config for cross-compiling (#51274). - - * builds/unix/unix-def.in (PKG_CONFIG): New variable. - (freetype-config): Use it in sed expression. - - * builds/unix/freetype-config.in: s/pkg-config/%PKG_CONFIG%/. - -2017-06-20 Werner Lemberg - - [cff, truetype] Integer overflows. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2300 - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2313 - - * src/cff/cf2hints.c (cf2_hintmap_adjustHints): Use ADD_INT32. - - * src/truetype/ttinterp.c (Ins_ABS): Avoid FT_ABS. - -2017-06-17 Alexei Podtelezhnikov - - [base, smooth] LCD filtering cleanups. - - * src/base/ftlcdfil.c (ft_lcd_filter_fir, _ft_lcd_filter_legacy): - Clean up, start filtering from the bottom-left origin. - - * src/smooth/ftsmooth.c (ft_smooth_render_generic): Updated. - -2017-06-16 Werner Lemberg - - [truetype] Integer overflows. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2270 - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2276 - - * src/truetype/ttinterp.c (Ins_MDRP, _iup_worker_interpolate): Use - ADD_LONG and SUB_LONG. - -2017-06-15 Werner Lemberg - - [bdf, cff] Integer overflows. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2244 - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2261 - - * src/bdf/bdfdrivr.c (BDF_Face_Init): Replace calls to FT_ABS with - direct code to avoid value negation. - - * src/cff/cf2blues.c (cf2_blues_capture): Use SUB_INT32 and - ADD_INT32. - -2017-06-13 Werner Lemberg - - * src/winfonts/winfnt.c (FNT_Face_Init): Don't set active encoding. - - FreeType only sets a default active encoding for Unicode. - -2017-06-13 Werner Lemberg - - [cff, truetype] Integer overflows. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2216 - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2218 - - * src/cff/cf2fixed.h (cf2_fixedAbs): Use NEG_INT32. - - * src/truetype/ttinterp.c (Ins_IP): Use SUB_LONG. - -2017-06-11 Werner Lemberg - - [cff] Integer overflows. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2200 - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2210 - - * src/cff/cf2hints.c (cf2_hintmap_insertHint): Use SUB_INT32 and - ADD_INT32. - - * src/cff/cf2intrp.c (cf2_interpT2CharString) : Use - ADD_INT32. - -2017-06-10 Werner Lemberg - - [truetype] Fix TT_Set_Var_Design. - - Reported by Nikolaus Waxweiler . - - * src/truetype/ttgxvar.c (TT_Set_Var_Design): Correctly handle the - case where we have less input coordinates than axes. - -2017-06-10 Werner Lemberg - - * src/base/ftcalc.c (FT_DivFix): Fix embarrassing typo. - - Bug introduced 2017-05-28. - -2017-06-09 Werner Lemberg - - [cff, truetype] Integer overflows. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2144 - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2151 - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2153 - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2173 - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2186 - - * src/cff/cf2blues.c (cf2_blues_init): Use SUB_INT32. - - * src/truetype/ttinterp.c (Round_None, Round_To_Grid, - Round_To_Half_Grid, Round_Down_To_Grid, Round_Up_To_Grid, - Round_To_Double_Grid, Round_Super, Round_Super_45): Use ADD_LONG, - SUB_LONG, NEG_LONG, FT_PIX_ROUND_LONG, FT_PIX_CEIL_LONG, - FT_PAD_ROUND_LONG - (Ins_SxVTL, Ins_MIRP): Use SUB_LONG. - (_iup_worker_shift): Use SUB_LONG and ADD_LONG. - -2017-06-09 Werner Lemberg - - Provide more macros for flooring, ceiling, and rounding. - - These versions don't produce run-time errors due to integer - overflow. - - * include/freetype/internal/ftobjs.h: Include FT_INTERNAL_CALC_H. - (FT_PAD_ROUND_LONG, FT_PAD_CEIL_LONG, FT_PIX_ROUND_LONG, - FT_PIX_CEIL_LONG): New macros. - (FT_PAD_ROUND_INT32, FT_PAD_CEIL_INT32, FT_PIX_ROUND_INT32, - FT_PIX_CEIL_INT32): New macros. - -2017-06-09 Werner Lemberg - - Remove unused macros. - - * include/freetype/internal/ftcalc.h (ADD_INT, SUB_INT, MUL_INT, - NEG_INT): Deleted. - -2017-06-09 Werner Lemberg - - */*: Remove `OVERFLOW_' prefix. - - This increases readability. - -2017-06-07 Werner Lemberg - - [cff, truetype] Integer overflows. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2133 - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2137 - - * src/cff/cf2hints.c (cf2_hint_init): Use OVERFLOW_SUB_INT32. - - * src/truetype/ttinterp.c (PROJECT, DUALPROJ): Use - OVERFLOW_SUB_LONG. - -2017-06-06 Werner Lemberg - - [cff] Integer overflows. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2109 - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2110 - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2122 - - * src/cff/cf2blues.c (cf2_blues_init): Use OVERFLOW_SUB_INT32. - - * src/cff/cf2hints.c (cf2_hintmap_map): Synchronize if-else - branches. - -2017-06-05 Werner Lemberg - - [cff] Integer overflow. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2089 - - * src/cff/cffload.c (cff_blend_doBlend): User OVERFLOW_ADD_INT32. - -2017-06-04 Werner Lemberg - - [cff, truetype] Integer overflows. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2075 - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2088 - - * src/cff/cf2font.c (cf2_font_setup): Use OVERFLOW_MUL_INT32. - - * src/truetype/ttinterp.c (Ins_ISECT): Use OVERFLOW_MUL_LONG, - OVERFLOW_ADD_LONG, and OVERFLOW_SUB_LONG. - -2017-06-03 Werner Lemberg - - [base, cff, truetype] Integer overflows. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2060 - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2062 - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2063 - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2068 - - * src/base/ftobjs.c (ft_glyphslot_grid_fit_metrics): Use - OVERFLOW_ADD_LONG and OVERFLOW_SUB_LONG. - - * src/cff/cf2blues.c (cf2_blues_capture), src/cff/cf2hints.c - (cf2_hintmap_adjustHints): Use OVERFLOW_SUB_INT32. - - * src/truetype/ttgload.c (compute_glyph_metrics): User - OVERFLOW_SUB_LONG. - - * src/truetype/ttinterp.c (Direct_Move, Direct_Move_Orig, - Direct_Move_X, Direct_Move_Y, Direct_Move_Orig_X, - Direct_Move_Orig_Y, Move_Zp2_Point, Ins_MSIRP): Use - OVERFLOW_ADD_LONG and OVERFLOW_SUB_LONG. - -2017-06-03 Werner Lemberg - - * builds/unix/freetype-config.in: Fix pkg-config test (#51162). - - Patch directly taken from bug report. - -2017-06-03 Werner Lemberg - - [bdf] Synchronize sanity checks with pcf driver. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2054 - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2058 - - * src/bdf/bdfdrivr.c (BDF_Face_Init): Check font ascent and descent. - Check AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X, and - RESOLUTION_Y properties. - -2017-06-03 Werner Lemberg - - [cff, truetype] Integer overflows. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2047 - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2057 - - * src/cff/cf2hints.c (cf2_hintmap_map): Use OVERFLOW_SUB_INT32. - - * src/truetype/ttinterp.c (Ins_ADD): Use OVERFLOW_ADD_LONG. - (Ins_SUB): Use OVERFLOW_SUB_LONG. - (Ins_NEG): Use NEG_LONG. - -2017-06-03 Werner Lemberg - - ftcalc.h: Avoid left-shift of negative numbers. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2055 - - * include/freetype/internal/ftcalc.h (INT_TO_F26DOT6, - INT_TO_F2DOT14, INT_TO_FIXED, F2DOT14_TO_FIXED): Use multiplication. - -2017-06-02 Werner Lemberg - - [cff] Even more integer overflows. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2046 - - * src/cff/cf2intrp.c (cf2_doStems, cf2_interpT2CharString): Use - OVERFLOW_ADD_INT32. - -2017-06-02 Werner Lemberg - - [cff] More integer overflows. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2032 - - * src/cff/cf2blues.c (cf2_blues_init): Use OVERFLOW_SUB_INT32. - -2017-06-02 Werner Lemberg - - [bdf] Don't left-shift negative numbers. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2031 - - * src/bdf/bdfdrivr.c (BDF_Face_Init): Use multiplication. - -2017-06-02 Werner Lemberg - - [bdf] Fix integer scanning routines. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2029 - - * src/bdf/bdflib.c (_bdf_atoul, _bdf_atol, _bdf_atous, _bdf_atos): - Stop scanning if result would overflow. - -2017-06-02 Werner Lemberg - - [cff] Fix integer overflows. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2027 - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2028 - - * src/cff/cf2hints.c (cf2_hintmap_insertHint), src/cff/cf2intrp.c - (cf2_doFlex): Use OVERFLOW_ADD_INT32 and OVERFLOW_SUB_INT32. - -2017-06-01 Werner Lemberg - - [smooth] Some 32bit integer overflow run-time errors. - - * src/smooth/ftgrays.c [STANDALONE] (OVERFLOW_ADD_LONG, - OVERFLOW_SUB_LONG, OVERFLOW_MUL_LONG, NEG_LONG): New macros. - [!STANDALONE]: Include FT_INTERNAL_CALC_H. - (gray_render_cubic): Use those macros where appropriate. - -2017-06-01 Werner Lemberg - - * src/base/ftglyph.c (FT_Get_Glyph): Check `slot->advance'. - -2017-06-01 Werner Lemberg - - [psaux] 32bit integer overflow tun-time errors (#46149). - - * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Use - OVERFLOW_ADD_LONG and OVERFLOW_SUB_LONG where appropriate. - -2017-06-01 Werner Lemberg - - * src/truetype/ttinterp.c (TT_RunIns): Adjust loop counter again. - - Problem reported by Marek Kašík . - - The problematic font that exceeds the old limit is Padauk-Bold, - version 3.002, containing bytecode generated by a buggy version of - ttfautohint. - -2017-05-31 Werner Lemberg - - [cff] 32bit integer overflow run-time errors 2/2 (#46149). - - This commit handles the new engine. - - * include/freetype/internal/ftcalc.h (OVERFLOW_ADD_INT32, - OVERFLOW_SUB_INT32, OVERFLOW_MUL_INT32, NEG_INT, NEG_LONG, - NEG_INT32): New macros. - - * src/cff/cf2ft.c (cf2_getScaleAndHintFlag): Use OVERFLOW_ADD_INT32. - - * src/cff/cf2hints.c (cf2_getWindingMomentum, cf2_hint_init, - cf2_hintmap_map, cf2_glyphpath_hintPoint, - cf2_glyphpath_computeIntersection, cf2_glyphpath_computeOffset, - cf2_glyphpath_lineTo, cf2_glyphpath_curveTo): Use - OVERFLOW_ADD_INT32, OVERFLOW_SUB_INT32, OVERFLOW_MUL_INT32, and - NEG_INT32 where appropriate. - - * src/cff/cf2intrp.c (cf2_doFlex, cf2_doBlend, - cf2_interpT2CharString): Ditto. - Also add some other code where needed to avoid overflow. - -2017-05-30 Werner Lemberg - - [cff] 32bit integer overflow run-time errors 1/2 (#46149). - - This commit handles the old engine. - - * src/cff/cffgload.c: Include FT_INTERNAL_CALC_H. - (cff_decoder_parse_charstrings): Use OVERFLOW_ADD_LONG and - OVERFLOW_SUB_LONG where needed. - - * src/cff/cffparse.c: Include FT_INTERNAL_CALC_H. - (power_ten_limits): New static array. - (do_fixed): Use it to prevent multiplication overflow. - (cff_parser_run): Use OVERFLOW_ADD_LONG. - -2017-05-30 Werner Lemberg - - [psaux] Correctly handle sequences of multiple number signs. - - * src/psaux/psconv.c (PS_Conv_Strtol, PS_Conv_ToFixed): Return zero - if we encounter more than a single sign. - -2017-05-29 Werner Lemberg - - [pcf] 32bit integer overflow run-time errors (#46149). - - * src/pcf/pcfread.c (pcf_get_accel): Add sanity checks for - `fontAscent' and `fontDescent'. - (pcf_load_font): Add sanity checks for global height. - Add sanity checks for AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, - RESOLUTION_X, and RESOLUTION_Y properties. - -2017-05-29 Werner Lemberg - - Handle some integer overflow run-time errors (#46149, #48979). - - This commit (mainly for 32bit CPUs) is the first of a series of - similar commits to handle known integer overflows. Basically, all - of them are harmless, since they affect rendering of glyphs only, - not posing security threats. It is expected that fuzzying will show - up more overflows, to be fixed in due course. - - The idea is to mark places where overflows can occur, using macros - that simply cast to unsigned integers, because overflow arithmetic - is well defined in this case. Doing so suppresses run-time errors - of sanitizers without adding computational overhead. - - * include/freetype/internal/ftcalc.h (OVERFLOW_ADD_INT, - OVERFLOW_SUB_INT, OVERFLOW_MUL_INT, OVERFLOW_ADD_LONG, - OVERFLOW_SUB_LONG, OVERFLOW_MUL_LONG): New macros. - - * src/base/ftcalc.c (FT_RoundFix, FT_CeilFix, FT_Matrix_Multiply, - FT_Matrix_Multiply_Scaled, FT_Vector_Transform_Scaled, - ft_corner_orientation): Use new macros. - - * src/base/ftoutln.c (FT_Outline_Get_Orientation): Use new macros. - -2017-05-28 Werner Lemberg - - * include/freetype/internal/ftcalc.h (FLOAT_TO_FIXED): Remove. - - This macro is not used. - -2017-05-28 Werner Lemberg - - [cff] s/cf2_floatToFixed/cf2_doubleToFixed/. - - The new name better describes what the macro actually does; - additionally, we don't need a trailing `f' for literals (there was - only a single such instance in the code, but this caused a clang - warning because the macro itself uses `double' literals). - - * src/cff/cf2blues.c, src/cff/cf2blues.h, src/cff/cf2fixed.h, - src/cff/cf2font.c, src/cff/cf2hints.c: Updated. - -2017-05-28 Werner Lemberg - - Fix negation of INT_MIN and LONG_MIN (#46149). - - * src/base/ftcalc.c (FT_MOVE_SIGN): Add argument to pass unsigned - value, to be used as the result. - (FT_MulDiv, FT_MulDiv_No_Round, FT_DivFix, FT_MulFix, - FT_Vector_NormLen): Updated. - -2017-05-27 Werner Lemberg - - [truetype] Fix handling of design coordinates (#51127). - - * src/truetype/ttgxvar.c (tt_set_mm_blend): Compute all design - coordinates if we have to create the `blends->coord' array. - (TT_Get_MM_Blend, TT_Get_Var_Design): Select default instance - coordinates if no instance is selected yet. - -2017-05-24 Werner Lemberg - - [bdf, pcf] Support ISO646.1991-IRV character encoding (aka ASCII). - - Problem reported by Marek Kašík , cf. - - https://bugzilla.redhat.com/show_bug.cgi?id=1451795 - - * src/bdf/bdfdrivr.c (BDF_Face_Init), src/pcf/pcfdrivr.c - (PCF_Face_Init): Implement it. - -2017-05-20 Nikolaus Waxweiler - - [truetype] Always use interpreter v35 for B/W rendering (#51051). - - * src/truetype/ttgload.c (tt_loader_init) - [TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL]: Adjust - `subpixel_hinting_lean', `grayscale_cleartype', and - `vertical_lcd_lean' accordingly. - - * src/truetype/ttinterp.c (Ins_GETINFO): Updated. - (TT_RunIns): Update `backward_compatibility' flag. - -2017-05-20 Alexei Podtelezhnikov - - [smooth] Implement minimal dynamic padding for LCD filtering. - - Extra bitmap padding for LCD filtering depends on the filter. The - default 5-tap filter needs 2 extra subpixels. The light 3-tap filter - needs only 1 extra subpixel. This space could be already available - due to rounding. In order to optimize the padding, we now expand - CBox for the given filter weights before rounding. - - This change breaks current Skia (and Firefox). - - * include/freetype/internal/ftobjs.h (FT_LibraryRec) - [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Remove `lcd_extra' field. - - * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights, - FT_Library_SetLcdFilter): Remove `lcd_extra' initializations. - - * src/smooth/ftsmooth.c (ft_smooth_render_generic): Implement dymanic - LCD padding. - -2017-05-15 Werner Lemberg - - [sfnt] Return proper scaling values for SBIX bitmaps. - - Problem reported by Hin-Tak Leung . - - * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Implement it. - -2017-05-15 Werner Lemberg - - [truetype] Fix error handling for embedded bitmaps. - - Problem reported by Hin-Tak Leung . - - * src/truetype/ttgload.c (TT_Load_Glyph) - [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Handle error if font is not - scalable. - -2017-05-15 Alexei Podtelezhnikov - - [autofit] Make autohint warping NORMAL option. - - This moves warping option from LIGHT to NORMAL mode. This makes LIGHT - truly void of hinting in x-direction, with left side bearing never - changed and right side bearing only altered by advance rounding. - Therefore, LIGHT is now ready to return fractional advance. As a - NORMAL option, warping substitutes normal hinting. - - * src/autofit/afcjk.c (af_cjk_hints_apply): Updated. - * src/autofit/aflatin.c (af_latin_hints_apply): Updated. - * src/autofit/aflatin2.c (af_latin2_hints_apply): Updated. - - * src/autofit/afloader.c (af_loader_load_glyph): Handle warping - phantom points as normal. - -2017-05-14 Werner Lemberg - - Remove remnants of raster pool. - - * include/freetype/internal/ftobjs.h (FT_LibraryRec): Remove - `raster_pool' and `raster_pool_size' fields. - - * src/base/ftobjs.c (FT_New_Library), src/raster/ftrend1.c - (ft_raster1_init), src/smooth/ftsmooth.c (ft_smooth_init): Updated. - -2017-05-13 Werner Lemberg - - * Version 2.8 released. - ======================= - - - Tag sources with `VER-2-8'. - - * docs/VERSION.TXT: Add entry for version 2.8. - * docs/CHANGES: Updated. - - * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, - builds/windows/vc2005/index.html, - builds/windows/vc2008/freetype.vcproj, - builds/windows/vc2008/index.html, - builds/windows/vc2010/freetype.vcxproj, - builds/windows/vc2010/index.html, - builds/windows/visualc/freetype.dsp, - builds/windows/visualc/freetype.vcproj, - builds/windows/visualc/index.html, - builds/windows/visualce/freetype.dsp, - builds/windows/visualce/freetype.vcproj, - builds/windows/visualce/index.html, - builds/wince/vc2005-ce/freetype.vcproj, - builds/wince/vc2005-ce/index.html, - builds/wince/vc2008-ce/freetype.vcproj, - builds/wince/vc2008-ce/index.html: s/2.7.1/2.8/, s/271/28/. - - * include/freetype/freetype.h (FREETYPE_MINOR): Set to 8. - (FREETYPE_PATCH): Set to 0. - - * builds/unix/configure.raw (version_info): Set to 20:0:14. - * CMakeLists.txt (VERSION_MINOR): Set to 8. - (VERSION_PATCH): Set to 0. - -2017-05-12 Hin-Tak Leung - - Fix `FT_UINT_TO_POINTER' macro for Windows. - - * builds/unix/ftconfig.in, builds/vms/ftconfig.h, - include/freetype/config/ftconfig.h (FT_UINT_TO_POINTER) [_WIN64]: - Fix definition. - -2017-05-11 Sascha Brawer - Werner Lemberg - Werner Lemberg - Werner Lemberg - Werner Lemberg - Werner Lemberg - Werner Lemberg - Werner Lemberg - Werner Lemberg - Werner Lemberg - Werner Lemberg - - [truetype] Add tricky font `DFGirl-W6-WIN-BF' (from Dynalab). - - Reported by Roy Tam . - - * src/truetype/ttobjs.c (tt_check_trickyness_family): Implement it. - -2017-05-07 Roy Tam - Werner Lemberg - - [truetype] More tricky fonts (mainly from Dynalab). - - * src/truetype/ttobjs.c (tt_check_trickyness_family, - tt_check_trickyness_sfnt_ids): Add them. - -2017-05-07 Werner Lemberg - - [truetype] Add tricky font `DLCHayMedium' (from Dynalab). - - Reported by Roy Tam . - - * src/truetype/ttobjs.c (tt_check_trickyness_family): Implement it. - -2017-05-03 Werner Lemberg - - */*: s/backwards compatibility/backward compatibility/. - -2017-05-03 Sascha Brawer - Werner Lemberg - Werner Lemberg - - [autofit] Add blue-zone support for Sundanese script. - - This essentially moves the Sundanese script from the `Indic' hinter - to the `Latin' hinter. - - * src/autofit/afblue.dat: Add blue zone data for Sundanese. - - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - - * src/autofit/afscript.h: Add Sundanese standard character and move - data out of AF_CONFIG_OPTION_INDIC block. - - * src/autofit/afranges.c: Move Sundanese data out of - AF_CONFIG_OPTION_INDIC block. - - * src/autofit/afstyles.h: Update Sundanese data; in particular, use - AF_WRITING_SYSTEM_LATIN. - -2017-05-03 Sascha Brawer - Werner Lemberg - - [truetype] Make `IUP' gvar deltas do the same as Apple (#50832). - - When points are not touched by gvar interpolation deltas, FreeType - gave a slightly different result than Apple's CoreText. - - The OpenType working group will update the specification to document - the following behaviour: If the two points with deltas to the `left' - and `right' of the untouched point have the same coordinate, then - the inferred delta for the untouched point should be zero. - - * src/truetype/ttgxvar.c (tt_delta_interpolate): Implement new - behaviour. - -2017-05-02 Werner Lemberg - - [autofit] Remove `slight' auto-hint mode again. - - A poll on freetype-devel favoured changes directly applied to - `light'. - - * include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT, - FT_RENDER_MODE_SLIGHT): Removed. - - * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c - (af_latin_hints_init), src/autofit/aflatin2.c - (af_latin2_hints_init): Revert change from 2017-04-22. - - * src/autofit/afloader.c (af_loader_load_glyph) Remove references to - FT_RENDER_MODE_SLIGHT. - [AF_CONFIG_OPTION_TT_SIZE_METRICS]: Enable TrueType-like metrics - unconditionally. - - * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Revert change from - 2017-04-22. - - * src/base/ftobjs.c (FT_Load_Glyph): Revert change from 2017-04-22. - - * src/pshinter/pshalgo.c (ps_hints_apply): Revert change from - 2017-04-22. - - * src/smooth/ftsmooth.c (ft_smooth_render): Revert change from - 2017-04-22. - - * docs/CHANGES: Updated. - -2017-04-30 Werner Lemberg - - [autofit] Fix metrics computation. - - Problem reported by Markus Trippelsdorf and - Nikolaus Waxweiler . - - * src/base/ftobjs.c (FT_Request_Size): Trigger recomputation of - auto-hinter metrics. Without this change, multiple size changing - calls for a single face fail. - -2017-04-29 Werner Lemberg - - * src/truetype/ttdriver.c (tt_size_request): Properly check `error'. - - Reported by Earnestly in - - https://lists.nongnu.org/archive/html/freetype/2017-04/msg00031.html - -2017-04-27 Werner Lemberg - - Introduce AF_CONFIG_OPTION_TT_SIZE_METRICS configuration option. - - * include/freetype/config/ftoption.h - (AF_CONFIG_OPTION_TT_SIZE_METRICS): New option, commented out by - default. - - * src/autofit/afloader.c (af_loader_load_glyph): Use - AF_CONFIG_OPTION_TT_SIZE_METRICS to guard the corresponding code. - -2017-04-26 Werner Lemberg - - * include/freetype/freetype.h (FT_Render_Mode): Fix order. - - This retains backward compatibility. - - Noted by Alexei. - -2017-04-22 Werner Lemberg - - [truetype] Do linear scaling for FT_LOAD_NO_HINTING (#50470). - - * src/truetype/ttobjs.h (TT_SizeRec): Add field `hinted_metrics' to - hold hinted metrics. - Make `metrics' a pointer so that `tt_glyph_load' can easily switch - between metrics. - - * src/truetype/ttdriver.c (tt_size_request): Updated. - (tt_glyph_load): Use top-level metrics if FT_LOAD_NO_HINTING is - used. - - * src/truetype/ttgload.c (TT_Hint_Glyph, TT_Process_Simple_Glyph, - TT_Process_Composite_Component, load_truetype_glyph, - compute_glyph_metrics, TT_Load_Glyph): Updated. - - * src/truetype/ttinterp.c (TT_Load_Context): Updated. - - * src/truetype/ttobjs.c (tt_size_reset): Updated. - - * src/truetype/ttsubpix.c (sph_set_tweaks): Updated. - -2017-04-22 Werner Lemberg - - Add new `slight' auto-hinting mode. - - This mode uses fractional advance widths and doesn't scale glyphs - horizontally, only applying vertical scaling and hinting. - - At the same time, the behaviour of the `light' auto-hinter gets - restored for backward compatibility: Both vertical and horizontal - scaling is again based on rounded metrics values (this was changed - in a commit from 2017-03-30 as a side effect). To be more precise, - the behaviour is restored for TrueType fonts only; for other font - formats like Type 1, this is a new feature of the `light' hinting - mode. - - * include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT): New macro. - (FT_RENDER_MODE_SLIGHT): New render mode. - - * include/freetype/internal/ftobjs.h (FT_Size_InternalRec): Add - `autohint_mode' and `autohint_metrics' fields. - - * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c - (af_latin_hints_init), src/autofit/aflatin2 (af_latin2_hints_init): - Updated. - - * src/autofit/afloader.c (af_loader_embolden_glyph_in_slot): Use - `autohint_metrics'. - (af_loader_load_glyph): s/internal/slot_internal/. - Initialize `autohint_metrics' and `autohint_mode' depending on - current auto-hint mode. - Use `autohint_metrics'. - Updated. - - * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Updated. - - * src/base/ftobjs.c (FT_Load_Glyph): Updated. - (FT_New_Size): Allocate `internal' object. - - * src/pshinter/pshalgo.c (ps_hints_apply): Updated. - - * src/smooth/ftsmooth.c (ft_smooth_render): Updated. - -2017-04-22 Werner Lemberg - - Introduce `FT_Size_InternalRec' structure. - - We are going to extend this later on. - - * include/freetype/internal/ftobjs.h (FT_Size_InternalRec): New - structure with a single field `module_data'. - - * src/base/ftobjs.c (FT_New_Size): Allocate `internal' field of - `FT_Size' structure. - - * src/cff/cffgload.c (cff_builder_init, cff_decoder_prepare): Use - `size->internal->module_data' instead of `size->internal'. - - * src/cff/cffobjs.c (cff_size_done): Deallocate `module_data'. - (cff_size_init, cff_size_select, cff_size_request): Use - `size->internal->module_data' instead of `size->internal'. - - * src/cif/cidobjs.c (cid_size_done, cid_size_init, - cid_size_request): Use `size->internal->module_data' instead of - `size->internal'. - - * src/psaux/psobjs.c (t1_builder_ini): Use - `size->internal->module_data' instead of `size->internal'. - - * src/type1/t1objs.c (T1_Size_Done, T1_Size_Init, T1_Size_Request): - Use `size->internal->module_data' instead of `size->internal'. - -2017-04-21 Alexei Podtelezhnikov - - * src/smooth/ftsmooth.h: Remove unused guards and declaration. - -2017-04-16 Hin-Tak Leung - - Fix tracing messages. - - * src/base/ftobjs.c (FT_Face_GetCharVariantIndex, - FT_Face_GetCharVariantIsDefault, FT_Face_GetVariantsOfChar): Print - correct function name. - -2017-04-08 Sascha Brawer - Werner Lemberg - Werner Lemberg - Werner Lemberg - Werner Lemberg - - [autofit] Fix invalid character range description (#50745). - - Also reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1034 - - * src/autofit/afranges.c (af_glag_nonbase_uniranges): Fix typo in - recent commit. - -2017-04-07 Werner Lemberg - - [ftfuzzer] Fix clang warnings. - - * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Add - casts. - -2017-04-06 Sascha Brawer - Werner Lemberg - Werner Lemberg - Werner Lemberg - Werner Lemberg - Werner Lemberg - Werner Lemberg - - [autofit] Add support for Adlam script. - - * src/autofit/afblue.dat: Add blue zone data for Adlam. - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - - * src/autofit/afscript.h: Add Adlam standard characters. - - * src/autofit/afranges.c, src/autofit/afstyles.h: Add Adlam data. - -2017-04-06 Sascha Brawer - - [autofit] Add support for Ol Chiki script. - - * src/autofit/afblue.dat: Add blue zone data for Ol Chiki. - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - - * src/autofit/afscript.h: Add Ol Chiki standard character. - - * src/autofit/afranges.c, src/autofit/afstyles.h: Add Ol Chiki data. - -2017-04-03 Werner Lemberg - - [truetype] Avoid reexecution of `fpgm' and `prep' in case of error. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=981 - - * include/freetype/fterrdef.h (FT_Err_DEF_In_Glyf_Bytecode): New - error code. - - * src/truetype/ttinterp.c (Ins_FDEF, Ins_IDEF): Prohibit execution - of these two opcodes in `glyf' bytecode. - (TT_RunIns): Don't enforce reexecution of `fpgm' and `prep' bytecode - in case of error since function tables can no longer be modified - (due to the changes in `Ins_FDEF' and `Ins_IDEF'). This change can - enormously speed up handling of broken fonts. - -2017-04-02 Alexei Podtelezhnikov - - [autofit] Disable metrics adjustment for `FT_LOAD_TARGET_LCD'. - - * src/autofit/aflatin.c (af_latin_hints_init): Updated. - * src/autofit/aflatin2.c (af_latin2_hints_init): Ditto. - -2017-04-01 Werner Lemberg - - * src/truetype/ttgload.c: Include FT_CONFIG_CONFIG_H. - - Otherwise FT_UINT_TO_POINTER might not be defined. - - Problem reported by Alexei. - -2017-03-31 Alexei Podtelezhnikov - - [autofit] Disable stem adjustment for `FT_LOAD_TARGET_LCD'. - - * include/freetype/freetype.h (FT_LOAD_TARGET_LCD): Document it. - * src/autofit/afcjk.c (af_cjk_hints_init): Updated. - * src/autofit/aflatin.c (af_latin_hints_init): Ditto. - * src/autofit/aflatin2.c (af_latin2_hints_init): Ditto. - -2017-03-31 Werner Lemberg - - * src/cff/cffload.c (cff_font_load): Improve fix from 2017-01-04. - - Allow CFFs containing a single font to have an empty font name. - - Problem reported by 張俊芝 <418092625@qq.com> in - - https://lists.nongnu.org/archive/html/freetype-devel/2017-03/msg00074.html - -2017-03-30 Werner Lemberg - - * src/cff/cffparse.h (CFF2_DEFAULT_STACK): Set to 513 also. - - Requested by Dave Arnold. - -2017-03-30 Werner Lemberg - - [truetype] Fix HVAR and VVAR handling (#50678). - - * src/truetype/ttgxvar.c (tt_hvadvance_adjust): Handle - glyph indices larger than `mapCount' as described in the - specification. - -2017-03-30 Werner Lemberg - - [truetype] Allow linear scaling for unhinted rendering (#50470). - - * src/truetype/ttdriver.c (tt_size_request): Revert change from - 2011-07-16; the intended metrics fix seems now to be implemented in - a different way, making the patch unnecessary. Note that this - change was usually patched out by all major GNU/Linux distributions - due to heavy side effects. - - * src/truetype/ttgload.c (compute_glyph_metrics, TT_Load_Glyph): - Refer to the metrics of the `TT_Size' object. - -2017-03-29 Werner Lemberg - - [truetype] Fix thinko related to PS name of default named instance. - - * src/truetype/ttgxvar.c (TT_Get_MM_Var): `strid' and `psid' are - name ID values, not indices into the array of name entries. - -2017-03-27 Werner Lemberg - - [cid, truetype] Don't use `index' as a variable name. - - At least on FreeBSD there is a global declaration of `index' in file - `/usr/include/strings.h'. - - * src/cff/cf2intrp.c, src/truetype/ttgload.c: s/index/idx/ where - appropriate. - -2017-03-27 Wojciech Mamrak - - [sfnt] Minor improvement for handling kern tables. - - * src/sfnt/ttkern.c (tt_face_load_kern): Don't check for - cross-stream kerning tables since we reject format 2 tables later - on anyways. - Modify code for limit test... - (tt_face_get_kerning): ... to avoid a limit test here. - -2017-03-27 Werner Lemberg - - [pcf] Fix compiler warnings. - - Reported by Alexander Hedges . - - * src/pcf/pcfdrivr.c (pcf_property_set, pcf_property_get): Tag - `property_name' with `FT_UNUSED' where necessary. - -2017-03-26 Werner Lemberg - - * src/psaux/psobjs.c (t1_builder_close_contour): Add safety guard. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=941 - -2017-03-23 Werner Lemberg - - [psaux] Better protect `flex' handling. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=935 - - * src/psaux/t1decode.c (t1_decoder_parse_charstrings) - : Since there is not a single flex operator but a - series of subroutine calls, malformed fonts can call arbitrary other - operators after the start of a flex, possibly adding points. For - this reason we have to check the available number of points before - inserting a point. - -2017-03-23 Werner Lemberg - - [sfnt] Fix check for default named instance. - - * src/sfnt/sfobjs.c (sfnt_init_face): A `fixed' number needs four - bytes, not two... - -2017-03-23 Werner Lemberg - - Make MM fonts work (again). - - * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, - FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Ignore - return value of `ft_face_get_mvar_service'; instead, check whether a - service is actually returned. - -2017-03-20 Werner Lemberg - - [truetype] Some variable renamings. - - Too much local variables holding different structures were called - `metrics'. - - * src/truetype/ttdriver.c (tt_size_select): s/metrics/size_metrics/. - - * src/truetype/ttgload.c (tt_get_metrics_incr_overrides, - compute_glyph_metrics): s/metrics/incr_metrics/. - (load_sbit_image): s/metrics/sbit_metrics/. - - * src/truetype/ttobjs.c (tt_size_run_fpgm): s/metrics/size_metrics/. - (tt_size_init_bytecode): s/metrics/tt_metrics/. - (tt_size_reset): s/metrics/size_metrics/. - -2017-03-20 Werner Lemberg - - [sfnt] Don't add instances to non-variation fonts. - - * src/sfnt/sfobjs.c (sfnt_init_face): Fix it. - -2017-03-20 Werner Lemberg - - * src/cff/cffgload.c (cff_builder_init): Add safety guard (#50578). - -2017-03-18 Werner Lemberg - - Introduce FT_UINT_TO_POINTER macro (#50560). - - We have to make a separate case for Windows 64's LLP64 data model. - - * builds/unix/ftconfig.in, builds/vms/ftconfig.h, - include/freetype/config/ftconfig.h (FT_UINT_TO_POINTER): New macro. - - * src/truetype/ttgload.c (load_truetype_glyph): Use it. - -2017-03-18 Werner Lemberg - - * src/truetype/ttinterp.c (TT_RunIns): Adjust loop counter (#50573). - - The problematic font that exceeds the old limit is Lato-Regular, - version 2.007, containing bytecode generated by a buggy version of - ttfautohint. - -2017-03-18 Werner Lemberg - - [truetype] Another limitation for bytecode loop count maximum. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=900 - - * src/truetype/ttinterp.c (TT_RunIns): Limit `loopcall_counter_max' - by number of glyphs also. - -2017-03-18 Werner Lemberg - - [ftfuzzer] Minor improvement. - - * src/tools/ftfuzzer/ftfuzzer.cc: Don't set intermediate axis if - bitmap strikes are active. - -2017-03-18 Werner Lemberg - - Improve `make multi'. - - * src/autofit/aflatin2.c: Guard file with FT_OPTION_AUTOFIT2. - - * src/base/ftmac.c: Guard more parts of the file with FT_MACINTOSH. - - * src/psaux/afmparse.c: Guard file with T1_CONFIG_OPTION_NO_AFM. - - * src/sfnt/pngshim.c: Guard file with - TT_CONFIG_OPTION_EMBEDDED_BITMAPS also. - - * src/sfnt/ttbdf.c: Avoid empty source file. - * src/sfnt/ttpost.c: Guard file with - TT_CONFIG_OPTION_POSTSCRIPT_NAMES. - * src/sfnt/ttsbit.c: Guard file with - TT_CONFIG_OPTION_EMBEDDED_BITMAPS. - - * src/truetype/ttgxvar.c, src/truetype/ttinterp.c: Avoid empty - source file. - - * src/truetype/ttsubpix.c: Guard file with - TT_USE_BYTECODE_INTERPRETER also. - - * src/type1/t1afm.c: Guard file with T1_CONFIG_OPTION_NO_AFM. - - * src/autofit/autofit.c, src/base/ftbase.c, src/cache/ftcache.c, - src/cff/cff.c, src/cid/type1cid.c, src/gxvalid/gxvalid.c, - src/pcf/pcf.c, src/pfr/pfr.c, src/psaux/psaux.c, - src/pshinter/pshinter.c, src/psnames/psnames.c, src/raster/raster.c, - src/sfnt/sfnt.c, src/smooth/smooth.c, src/truetype/truetype.c, - src/type1/type1.c, src/type42/type42.c: Remove conditionals; sort - entries. - -2017-03-17 Werner Lemberg - - Fixes for conditional compilation. - - * src/autofit/afcjk.c, src/autofit/afindic.c: Include `afcjk.h' - earlier. - - * src/sfnt/sfobjs.c (sfnt_init_face): Put `memory' variable into - TT_CONFIG_OPTION_GX_VAR_SUPPORT block. - (sfnt_done_face): Protect some code with - TT_CONFIG_OPTION_GX_VAR_SUPPORT. - - * src/sfnt/ttsbit.c (tt_face_load_sbix_image): Remove compiler - warning. - - * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Put `tmp' variable - into TT_USE_BYTECODE_INTERPRETER block. - - (tt_loader_init): Put `error' variable into - TT_USE_BYTECODE_INTERPRETER block. - -2017-03-17 Werner Lemberg - - Fix preprocessor warning. - - * devel/ftoption.h, include/freetype/config/ftoption.h: Test whether - TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined before checking its - value. - -2017-03-17 Werner Lemberg - - `make multi' fixes; compiler warnings. - - * src/base/ftsnames.c: Include FT_INTERNAL_DEBUG_H. - - * src/cff/cffobjs.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include - FT_MULTIPLE_MASTERS_H and FT_SERVICE_MULTIPLE_MASTERS_H. - - * src/sfnt/sfdriver.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include - FT_MULTIPLE_MASTERS_H and FT_SERVICE_MULTIPLE_MASTERS_H. - (get_win_string, get_apple_string): Initialize `result'. - -2017-03-17 Dave Arnold - - [cff] Fix potential bugs in default NDV for CFF2. - - * src/cff/cffload.c (cff_blend_build_vector): Explicitly build blend - vector when `lenNDV' is zero; don't rely on zero-init. - Save `lenNDV' as part of cache key even when `lenNDV' is zero. - -2017-03-17 Dave Arnold - - [cff] Fix CFF2 stack allocation. - - * src/cff/cffparse.c (cff_parser_init) add 1 for operator. - -2017-03-16 Werner Lemberg - - * src/truetype/ttgxvar.c (tt_done_blend): Free `vvar_table'. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=883 - -2017-03-15 Werner Lemberg - - Remove clang compiler warnings (#50548). - - * include/freetype/internal/tttypes.h (TT_FaceRec): Make - `var_postscript_prefix_len' unsigned. - - * src/autofit/afwarp.c (af_warper_compute_line_best): Remove - redundant assignment. - - * src/cff/cffload.c (cff_subfont_load): Add casts. - - * src/cff/cffparse.c (cff_parse_blend): Remove redundant assignment. - - * src/sfnt/sfdriver.c (fmix32, murmur_hash_3_128): Add `static' - keyword. - Add casts. - (fixed2float): Add cast. - (sfnt_get_var_ps_name): Make `p' always initialized. - Add casts. - - * src/truetype/ttgxvar.c (TT_Get_MM_Var): Add casts. - -2017-03-15 Werner Lemberg - - [ftfuzzer] Limit number of tested faces and instances. - - This is inspired by the discussion in and analysis of - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=859 - - * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Use only - up to 20 face indices. - Use only up to 20 instance indices. - -2017-03-15 Werner Lemberg - - * src/tools/ftfuzzer/ftfuzzer.cc: Improve readability; formatting. - -2017-03-14 Werner Lemberg - - [sfnt] Implement PS names for font instances [3/3]. - - Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. - - * include/freetype/internal/tttypes.h (TT_FaceRec): New fields - `var_postscript_prefix' and `var_postscript_prefix_len'. - - * src/sfnt/sfdriver.c: Include FT_TRUETYPE_IDS_H. - (sfnt_is_alphanumeric): New wrapperfunction for `ft_isalnum'. - (get_win_string, get_apple_string): Remove `const' from return - value. - (MAX_VALUE_DESCRIPTOR_LEN, MAX_PS_NAME_LEN): New macros. - (hexdigits): New array. - (sfnt_get_var_ps_name): New function, implementing Adobe TechNote - 5902 to construct a PS name for a variation font instance. - (sfnt_get_ps_name): Call `sfnt_get_var_ps_name' for font instances. - - * src/sfnt/sfobjs.c (sfnt_done_face): Updated. - - * src/truetype/ttgxvar.c (tt_set_mm_blend): Reset - `face->postscript_name' to trigger recalculation for new instance - parameters. - -2017-03-14 Werner Lemberg - - [sfnt] Implement PS names for font instances [2/3]. - - * src/sfnt/sfdriver.c (fix2float) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: - New function to find the shortest representation of a 16.16 - fractional number. - -2017-03-14 Werner Lemberg - - [sfnt] Implement PS names for font instances [1/3]. - - Add 128bit MurmurHash 3 function. - - Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. - - * src/sfnt/sfdriver.c (ROTL32): New macro. - (fmix32, murmur_hash_3_128): New functions. - -2017-03-13 Werner Lemberg - - [truetype] Ignore invalid MVAR tags. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=838 - - * src/truetype/ttgxvar.c (ft_var_load_mvar): Ignore value and emit - warning for invalid tags. - (tt_apply_mvar): Ignore invalid tags. - -2017-03-12 Werner Lemberg - - [truetype] Store and use design coordinates also. - - * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func): - Add `normalizedcoords' argument. - - * src/truetype/ttgxvar.h (GX_BlendRec): Add `coords' field to store - the design coordinates of the current instance. - Updated. - - * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Move functionality to... - (tt_set_mm_blend): ... New function. - Convert data in `normalizedcoords' array to `coords' array on - demand. - (TT_Set_Var_Design): Store argument data in `coords' array. - (TT_Get_Var_Design): Get data from `coords' array. - (tt_get_var_blend): Updated. - (tt_done_blend): Updated. - - * src/cff/cffload.c, src/cff/cffload.h (cff_get_var_blend): Updated. - - * src/cff/cf2ft.c (cf2_getNormalizedVector): Updated. - - * src/cff/cffobjs.c (cff_face_init): Updated. - -2017-03-12 Werner Lemberg - - src/truetype/ttgxvar.[ch]: s/avar_checked/avar_loaded/. - -2017-03-08 Werner Lemberg - - [sfnt] Another fix for buggy variation fonts. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=759 - - * src/sfnt/sfobjs.c (sfnt_init_face): While setting number of - instances to zero for `CFF' fonts table, ensure that there is no - `CFF2' present also (which gets priority). - -2017-03-07 Werner Lemberg - - [sfnt] Improve handling for buggy variation fonts. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=738 - - * src/sfnt/sfobjs.c (sfnt_init_face): While setting number of - instances to zero for `CFF' fonts table, ensure that there is no - `glyf' table present also (which gets priority). - -2017-03-06 Werner Lemberg - - [sfnt, truetype] Always provide default instance. - - As documented in the OpenType specification, an entry for the - default instance may be omitted in the named instance table. In - particular this means that even if there is no named instance table - in the font we actually do have a named instance, namely the default - instance. - - For consistency, we always want the default instance in our list of - named instances. If it is missing, we try to synthesize it. - - * src/sfnt/sfobjs.c (sfnt_init_face): Check whether the default - instance is in the table of named instances. Otherwise adjust - number of instances. - - * src/truetype/ttgxvar.c: Include FT_TRUETYPE_IDS_H. - (TT_Get_MM_Var): Use `face->root.style_flags' as the number of named - instances. - Sythesize a named instance entry if necessary. - (tt_done_blend): Free `normalized_stylecoords'. - -2017-03-05 Werner Lemberg - - [sfnt] Remove redundant code. - - * src/sfnt/sfobjs.c (sfnt_init_face): Remove second test for - `num_instances', which will always succeed. - -2017-03-04 Werner Lemberg - - [sfnt] Add `get_name_id' service. - - * include/freetype/internal/sfnt.h (TT_Get_Name_ID_Func): New - typedef. - (SFNT_Interface): Add `get_name_id' field. - (FT_DEFINE_SFNT_INTERFACE): Updated. - - * src/sfnt/sfdriver.c (search_name_id): Rename to... - (sfnt_get_name_id): ... this. - (sfnt_get_ps_name, sfnt_interface): Updated. - -2017-03-04 Werner Lemberg - - [truetype] Make `TT_Set_MM_Blend' set named instance index. - - * src/truetype/ttgxvar.h (GX_Blend): New array - `normalized_stylecoords'. - - * src/truetype/ttgxvar.c (TT_Get_MM_Var): Allocate and fill - `normalized_stylecoords'. - (TT_Set_MM_Blend): Check instance tuple and adjust `face_index' - accordingly. - -2017-03-02 Werner Lemberg - - [truetype] Split off designer/normalized conversion routines. - - * src/truetype/ttgxvar.c (TT_Set_Var_Design): Split off conversion - code designer->normalized coordinates to... - (ft_var_to_normalized): ... New function. - (TT_Get_Var_Design): Split off conversion code normalized->designer - coordinates to... - (ft_var_to_design): ... New function. - -2017-02-28 Werner Lemberg - - [sfnt] Further generalize `sfnt_get_ps_name'; report invalid data. - - * src/sfnt/sfdriver.c (sfnt_ps_map): New array. - (sfnt_is_postscript): New function. - (char_type_func): New typedef. - (get_win_string, get_apple_string): Add argument to specify - character checking function. - Add argument whether argument checking failures should be reported. - Update callers. - (search_name_id): Fix return value. - -2017-02-23 Werner Lemberg - - [sfnt] Split off another bit of `sfnt_get_ps_name'. - - * src/sfnt/sfdriver.c (sfnt_get_ps_name): Split off some - functionality into... - (search_name_id): ... New function. - -2017-02-23 Werner Lemberg - - [sfnt] Modularize `sfnt_get_ps_name'. - - * src/sfnt/sfdriver.c (sfnt_get_ps_name): Split off some - functionality into... - (IS_WIN, IS_APPLE): ... New macros. - (get_win_string, get_apple_string): ... New functions. - -2017-02-23 Werner Lemberg - - [truetype] Minor improvement. - - * src/truetype/ttgload.c (TT_Process_Simple_Glyph, - load_truetype_glyph): Remove unnecessary tests. - -2017-02-23 Werner Lemberg - - * include/freetype/internal/tttypes.h (TT_Face): s/isCFF2/is_cff2/. - - For orthogonality with other structure field names. - - Update all users. - -2017-02-22 Alexei Podtelezhnikov - - * src/smooth/ftgrays.c (gray_hline): Improve code. - -2017-02-20 Dominik Röttsches - - Fix some `ttnameid.h' entries (#50313). - - * include/freetype/ttnameid.h: - s/TT_MS_LANGID_SPANISH_INTERNATIONAL_SORT/TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT/, - s/TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIA/TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN/. - -2017-02-20 Werner Lemberg - - [cff] Finish support for `random' operator. - - * src/cff/cfftypes.h (CFF_SubFontRec): Add `random' field. - - * src/cff/cffobjs.c: Updated. - (cff_driver_init): Initialize random seed value. - - * src/cff/cffload.c (cff_random): New function. - (cff_subfont_load): Add `face' argument. - Update all callers. - Initialize random number generator with a proper seed value. - (cff_font_load): Add `face' argument. - Update all callers. - - * src/cff/cffload.h: Updated. - - * src/cff/cf2intrp.c (CF2_FIXME): Removed. - (cf2_interpT2CharString) : Implement opcode. - - * src/cff/cffgload.c (cff_decoder_parse_charstrings): Don't - initialize random seed value. - : Use new random seed framework. - -2017-02-20 Werner Lemberg - - [cff] Sanitize `initialRandomSeed'. - - * src/cff/cffload.c (cff_load_private_dict): Make - `initial_random_seed' value always positive. - -2017-02-20 Werner Lemberg - - [cff] Introduce `random-seed' property (2/2). - - * src/base/ftobjs.c: Include `FT_CFF_DRIVER_H'. - (open_face): Initialize `face->internal->random_seed'. - (FT_Face_Properties): Handle `FT_PARAM_TAG_RANDOM_SEED'. - - * src/cff/cffdrivr.c (cff_property_set): Handle `random-seed' - property. - -2017-02-20 Werner Lemberg - - [cff] Introduce `random-seed' property (1/2). - - We need this for support of the `random' operator. - - * include/freetype/ftcffdrv.h (FT_PARAM_TAG_RANDOM_SEED): New macro. - - * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): New - field `random_seed'. - - * src/cff/cffobjs.h (CFF_DriverRec): New field `random_seed'. - -2017-02-17 Werner Lemberg - - Remove clang warnings. - - * src/autofit/aflatin.c (af_latin_sort_blue): Add missing `static' - keyword. - - * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, - FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): - Initialize some variables. - -2017-02-16 Nikolaus Waxweiler - Werner Lemberg - - Add face property for stem darkening. - - * include/freetype/ftautoh.h (FT_PARAM_TAG_STEM_DARKENING): New - macro. - - * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Add - `no_stem_darkening' field. - - * src/autofit/afloader.c (af_loader_load_glyph), - src/autofit/afmodule.c (af_property_set): Updated. - - * src/base/ftobjs.c: Include FT_AUTOHINTER_H. - (ft_open_face_internal): Updated. - (FT_Face_Properties): Handle FT_PARAM_TAG_STEM_DARKENING. - - * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Updated. - - * src/cff/cffdrivr.c (cff_property_set): Updated. - -2017-02-16 Nikolaus Waxweiler - Werner Lemberg - - Add face property for LCD filter weights. - - * include/freetype/ftlcdfil.h (FT_PARAM_TAG_LCD_FILTER_WEIGHTS, - FT_LCD_FILTER_FIVE_TAPS): New macros. - (FT_LcdFiveTapFilter): New typedef. - - * include/freetype/ftobjs.h (FT_Face_InternalRec) - [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Add `lcd_weights' field. - (FT_Bitmap_LcdFilterFunc): Change third argument to weights array. - (ft_lcd_filter_fir): New prototype. - (FT_LibraryRec): Updated. - - * src/base/ftlcdfil.c (_ft_lcd_filter_fir): Renamed to... - (ft_lcd_filter_fir): ... this base function. - Updated. - (_ft_lcd_filter_legacy): Updated. - (FT_Library_SetLcdFilterWeights, FT_Library_SetLcdFilter): Updated. - - * src/base/ftobjs.c (ft_open_face_internal): Updated. - (FT_Face_Properties): Handle FT_PARAM_TAG_LCD_FILTER_WEIGHTS. - - * src/smooth/ftsmooth.c (ft_smooth_render_generic) - [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Handle LCD weights from - `FT_Face_Internal'. - -2017-02-14 Nikolaus Waxweiler - Werner Lemberg - - Add new function `FT_Face_Properties'. - - This commit provides the framework, to be filled with something - useful in the next commits. - - * include/freetype/freetype.h (FT_Face_Properties): Declare. - - * src/base/ftobjs.c (FT_Face_Properties): New function. - -2017-02-13 Werner Lemberg - - [autofit] Prevent overlapping blue zones. - - Problem reported as - - https://github.com/google/fonts/issues/632 - - The font in question (Nunito) has values 705 and 713 for the - reference and overshoot values, respectively, of the first blue - zone. Blue zone 2, however, has value 710 for both the reference - and overshoot. At 12ppem, reference and overshoot of blue zone 0 - becomes 8px, while blue zone 2 becomes 9px. - - A peculiarity of this font is that the tops of isolated vertical - stems like `N' have a slight overshoot also. The auto-hinter tries - to find the nearest blue zone using the *original* coordinates. For - vertical stems, this is value 713. For normal horizontal tops like - in character `E', this is value 710. Since value 713 is mapped to - 8px but value 710 to 9px, `N' and similar characters are one pixel - higher than `E', which looks very bad. - - This commit sanitizes blue zones to avoid such a behaviour. - - * src/autofit/aflatin.c (af_latin_sort_blue): New function. - (af_latin_metrics_init_blues): Sort blue values and remove overlaps. - -2017-02-12 Alexei Podtelezhnikov - - * src/smooth/ftgrays.c (gray_sweep): Improve code. - -2017-02-06 Werner Lemberg - - [truetype] Implement `VVAR' table support. - - * src/truetype/ttgxvar.h (GX_HVarTable): Renamed to... - (GX_HVVarTable): ...This. - (GX_Blend): Add fields for `VVAR' table handling. - Other minor updates. - - * src/truetype/ttgxvar.c (ft_var_load_hvar): Renamed to... - (ft_var_load_hvvar): ...This. - Handle VVAR loading also (controlled by an additional parameter). - (tt_hadvance_adjust): Renamed to... - (tt_hvadvance_adjust): ...This. - Handle application of advance height also (controlled by an - additional parameter). - (tt_hadvance_adjust, tt_vadvance_adjust): Wrappers for - `tt_hvadvance_adjust'. - - * src/truetype/ttdriver.c (tt_service_metrics_variations): Updated. - -2017-02-05 Werner Lemberg - - [autofit] Use better blue zone characters for lowercase latin. - - The number of lowercase characters for computing the top flat blue - zone value was too small (in most cases only `x' and `z'). If one - of the two characters has a large serif, say, it can happen that - FreeType must select between two different values, having a 50% - chance to use the wrong one. As a result, rendering at larger PPEM - values could yield uneven lowercase glyph heights. - - Problem reported by Christoph Koeberlin . - - * src/autofit/afblue.dat (AF_BLUE_STRING_LATIN_SMALL): Replaced - with... - (AF_BLUE_STRING_LATIN_SMALL_TOP, AF_BLUE_STRING_LATIN_SMALL_BOTTOM): - ... New, extended sets. - (AF_BLUE_STRINGSET_LATN): Updated. - - * src/autofit/afblue.c, scr/autofit/afblue.h: Regenerated. - -2017-02-04 Werner Lemberg - - Make `freetype-config' a wrapper of `pkg-config' if possible. - - Based on ideas taken from - - http://pkgs.fedoraproject.org/cgit/rpms/freetype.git/tree/freetype-multilib.patch - http://pkgs.fedoraproject.org/cgit/rpms/freetype.git/tree/freetype-2.5.3-freetype-config-prefix.patch - - * builds/unix/freetype-config.in: Rewritten. Use `pkg-config' to - set output variables if program is available. - - * docs/CHANGES, docs/freetype-config.1: Updated. - -2017-02-04 Werner Lemberg - - * builds/unix/unix-def.in (freetype-config): Fix permissions. - -2017-02-03 Werner Lemberg - - * src/autofit/afglobal.c (af_face_globals_free): Erase useless code. - -2017-02-03 Werner Lemberg - - * include/freetype/ftgasp.h (FT_GASP_SYMMETRIC_GRIDFIT): Fix value. - - Reported by Behdad. - -2017-02-02 Werner Lemberg - - [truetype] Fix MVAR post-action handling. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=509 - - * src/truetype/ttobjs.c (tt_size_reset): Do nothing for CFF2. This - is important to make `tt_size_reset_iterator' (called in - `tt_apply_mvar') always work. - -2017-02-02 Werner Lemberg - - Make compilation with FT_CONFIG_OPTION_PIC work again. - - All code committed here is guarded with `FT_CONFIG_OPTION_PIC'. - - * include/freetype/internal/services/svmetric.h - (FT_DEFINE_SERVICE_METRICSVARIATIONSREC): Remove trailing semicolon. - - * src/autofit/aflatin.c (af_latin_hints_compute_edges, - af_latin_hint_edges): Provide `globals' variable. - - * src/autofit/afloader.c (af_loader_load_glyph): Remove shadowing - variable. - - * src/autofit/afmodule.c (AF_SCRIPT_CLASSES_GET, - AF_STYLE_CLASSES_GET): Redefine. - - * src/autofit/aftypes.h (AF_DEFINE_WRITING_SYSTEM_CLASS): Fix typo. - - * src/cff/cffparse.c (CFF_FIELD_BLEND): Provide it. - - * src/cff/cffpic.h (CffModulePIC): Fix typo. - -2017-01-31 Alexei Podtelezhnikov - - * src/smooth/ftgrays.c (gray_render_scanline): Improve code. - -2017-01-31 Werner Lemberg - - [cff] Provide metrics variation service interface (#50196). - - Only now I've got an OTF with an HVAR table for testing... - - The code in `ftmm.c' uses `FT_FACE_LOOKUP_SERVICE' to get the - metrics variations interface. However, this didn't work with - `FT_FACE_FIND_GLOBAL_SERVICE' used in `sfnt_init_face'. - - * src/cff/cffdrivr.c: Include FT_SERVICE_METRICS_VARIATIONS_H. - (cff_hadvance_adjust, cff_metrics_adjust): Wrapper functions for - metric service functions from the `truetype' module. - (cff_service_metrics_variations): New service. - (cff_services): Updated. - - * src/cff/cffpic.h (CFF_SERVICE_METRICS_VAR_GET): New macro. - [FT_CONFIG_OPTION_PIC]: Synchronize code. - - * src/sfnt/sfobjs.c (sfnt_init_face): Replace call to - FT_FACE_FIND_GLOBAL_SERVICE with `ft_module_get_service' to always - load the service from the `truetype' module. - -2017-01-31 Werner Lemberg - - Add framework to support services with 9 functions. - - * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC9): - New macro. - -2017-01-31 Werner Lemberg - - [base] Fix error handing in MM functions. - - * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, - FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): - Implement it. - -2017-01-31 Werner Lemberg - - [truetype] Fix sanity check for `gvar' table (#50184). - - * src/truetype/ttgxvar.c (ft_var_load_gvar): There might be missing - variation data for some glyphs. - -2017-01-31 Werner Lemberg - - [autofit] Avoid uninitialized jumps (#50191). - - * src/autofit/afcjk.c (af_cjk_metrics_check_digits), - src/autofit/aflatin.c (af_latin_metrics_check_digits): Initialize - `advance'. - -2017-01-27 Werner Lemberg - - s/GB2312/PRC/. - - * include/freetype/freetype.h (FT_ENCODING_PRC): New enum value. - (FT_ENCODING_GB2312): Deprecated. - - * include/freetype/ttnameid.h (TT_MS_ID_PRC): New macro. - (TT_MS_ID_GB2312): Deprecated. - - * src/sfnt/sfobjs.c (sfnt_find_encoding): Updated. - - * docs/CHANGES: Updated. - -2017-01-26 Werner Lemberg - - [base] Add `FT_Get_Sfnt_LangTag' function. - - * include/freetype/ftsnames.h (FT_SfntLangTag): New structure. - (FT_Get_Sfnt_LangTag): New declaration. - - * src/base/ftsnames.c (FT_Get_Sfnt_LangTag): New function. - - * docs/CHANGES: Updated. - -2017-01-26 Werner Lemberg - - [sfnt] Support `name' table format 1. - - * include/freetype/internal/tttypes.h (TT_LangTagRec): New - structure. - (TT_NameTableRec): Add fields `numLangTagRecords' and `langTags'. - - * src/sfnt/ttload.c (tt_face_load_name): Add support for language - tags. - Reduce array size of name strings in case of invalid entries. - (tt_face_free_name): Updated. - - * docs/CHANGES: Updated. - -2017-01-25 Werner Lemberg - - [sfnt] s/TT_NameEntry/TT_Name/. - - * include/freetype/internal/tttypes.h (TT_NameEntryRec): Renamed - to... - (TT_NameRec): This. - (TT_NameTableRec): Updated. - - * src/base/ftsnames.c (FT_Get_Sfnt_Name): Updated. - - * src/sfnt/sfdriver.c (sfnt_get_ps_name): Updated. - - * src/sfnt/sfobjs.c (tt_name_entry_ascii_from_utf16, - tt_name_entry_ascii_from_other): Renamed to... - (tt_name_ascii_from_utf16, tt_name_entry_ascii_from_other): This, - respectively. - (TT_NameEntry_ConvertFunc): Renamed to... - (TT_Name_ConvertFunc): This. - (tt_face_get_name): Updated. - - * src/sfnt/ttload.c (tt_face_load_name, tt_face_free_name): - Updated. - -2017-01-24 Werner Lemberg - - [sfnt] Fix Postscript name service for symbol fonts. - - * src/sfnt/sfdriver.c (sfnt_get_ps_name): Accept PID/EID=3/0 - entries also. - -2017-01-24 Werner Lemberg - - [truetype] For OpenType 1.7: s/preferred/typographic/ (sub)family. - - * include/freetype/ftsnames.h - (FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY, - FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY): New macros. - (FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY, - FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY): Deprecated. - - * include/freetype/ttnameid.h (TT_NAME_ID_TYPOGRAPHIC_FAMILY, - TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY): New macros. - (TT_NAME_ID_PREFERRED_FAMILY, TT_NAME_ID_PREFERRED_SUBFAMILY): - Deprecated. - - * src/sfnt/sfobjs.c (sfnt_load_face): Updated. - - * docs/CHANGES: Updated. - -2017-01-23 Werner Lemberg - - [base] Add `FT_Set_Default_Properties' (#49187). - - * include/freetype/ftmodapi.h: Add declaration. - - * src/base/ftinit.c (ft_set_default_properties): Renamed to... - (FT_Set_Default_Properties): ... this. - (FT_Init_FreeType): Updated. - - * docs/CHANGES: Updated. - -2017-01-23 Werner Lemberg - - [truetype] Minor updates for OpenType 1.8.1. - - * src/truetype/ttgxvar.h (GX_MVarTable): `axisCount' has been - removed from the specification; it is now reserved. - - * src/truetype/ttgxvar.c (ft_var_load_mvar): Updated. - (GX_FVar_Head): Remove `countSizePairs'; the corresponding data - field in the `MVAR' table is now reserved. - (fvar_fields): Updated. - -2017-01-23 Werner Lemberg - - [truetype] Avoid segfault for invalid variation data. - - * src/truetype/ttgxvar.c (ft_var_load_item_variation_store): Assure - `itemCount' is not zero. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=441 - -2017-01-20 Werner Lemberg - - * src/truetype/ttinterp.c (TT_RunIns): Adjust loop detector limits. - -2017-01-17 Werner Lemberg - - * include/freetype/ttnameid.h: Updated to OpenType 1.8.1. - - (TT_APPLE_ID_FULL_UNICODE): New macro. - - (TT_MS_LANGID_BOSNIAN_BOSNIA_HERZ_CYRILLIC, - TT_MS_LANGID_UPPER_SORBIAN_GERMANY, - TT_MS_LANGID_LOWER_SORBIAN_GERMANY, TT_MS_LANGID_IRISH_IRELAND, - TT_MS_LANGID_INUKTITUT_CANADA_LATIN, TT_MS_LANGID_BASHKIR_RUSSIA, - TT_MS_LANGID_LUXEMBOURGISH_LUXEMBOURG, - TT_MS_LANGID_GREENLANDIC_GREENLAND, TT_MS_LANGID_MAPUDUNGUN_CHILE, - TT_MS_LANGID_MOHAWK_MOHAWK, TT_MS_LANGID_BRETON_FRANCE, - TT_MS_LANGID_OCCITAN_FRANCE, TT_MS_LANGID_CORSICAN_FRANCE, - TT_MS_LANGID_ALSATIAN_FRANCE, TT_MS_LANGID_YAKUT_RUSSIA, - TT_MS_LANGID_KICHE_GUATEMALA, TT_MS_LANGID_KINYARWANDA_RWANDA, - TT_MS_LANGID_WOLOF_SENEGAL, TT_MS_LANGID_DARI_AFGHANISTAN): New - macros. - - (TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC): Fix value. - - (TT_MS_LANGID_GERMAN_LIECHTENSTEIN, TT_MS_LANGID_CATALAN_CATALAN, - TT_MS_LANGID_CHINESE_MACAO, TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT, - TT_MS_LANGID_KOREAN_KOREA, TT_MS_LANGID_ROMANSH_SWITZERLAND, - TT_MS_LANGID_SLOVENIAN_SLOVENIA, TT_MS_LANGID_BASQUE_BASQUE, - TT_MS_LANGID_SETSWANA_SOUTH_AFRICA, - TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA, - TT_MS_LANGID_ISIZULU_SOUTH_AFRICA, TT_MS_LANGID_KAZAKH_KAZAKHSTAN, - TT_MS_LANGID_KYRGYZ_KYRGYZSTAN, TT_MS_LANGID_KISWAHILI_KENYA, - TT_MS_LANGID_TATAR_RUSSIA, TT_MS_LANGID_ODIA_INDIA, - TT_MS_LANGID_MONGOLIAN_PRC, TT_MS_LANGID_TIBETAN_PRC, - TT_MS_LANGID_WELSH_UNITED_KINGDOM, TT_MS_LANGID_GALICIAN_GALICIAN, - TT_MS_LANGID_SINHALA_SRI_LANKA, TT_MS_LANGID_TAMAZIGHT_ALGERIA, - TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA, TT_MS_LANGID_YI_PRC, - TT_MS_LANGID_UIGHUR_PRC): New aliases. - - Remove commented out code. - - (TT_NAME_ID_LIGHT_BACKGROUND, TT_NAME_ID_DARK_BACKGROUND, - TT_NAME_ID_VARIATIONS_PREFIX): New macros. - - (HAVE_LIMIT_ON_IDENTS): Remove macro (which was useless since many - years), use guarded long macros by default and define short versions - as aliases for the long ones. - -2017-01-15 Werner Lemberg - - * src/truetype/ttgxvar.c (tt_apply_var): Handle underline parameters - also. - -2017-01-11 Werner Lemberg - - * src/base/ftobjs.c (ft_open_face_internal): Improve tracing. - -2017-01-11 Werner Lemberg - - [truetype] Actually use metrics variation service. - - * src/base/ftmm.c: Include FT_SERVICE_METRICS_VARIATIONS_H. - (ft_face_get_mvar_service): New auxiliary function to look up - metrics variation service. - (FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, - FT_Set_Var_Blend_Coordinates): Call metrics variation service. - - * src/truetype/ttobjs.c (tt_face_init): Use metrics variations for - named instances. - -2017-01-11 Werner Lemberg - - [truetype] Provide metrics variation service. - - * include/freetype/internal/services/svmetric.h - (FT_Metrics_Adjust_Func): Reduce number of necessary parameters. - - * src/truetype/ttgxvar.c: Include FT_LIST_H. - (tt_size_reset_iterator): New auxiliary function for... - (tt_apply_var): New function. - - * src/truetype/ttgxvar.h: Updated. - - * src/truetype/ttdriver.c (tt_service_metrics_variations): Add - `tt_apply_mvar'. - - * include/freetype/internal/ftserv.h (FT_ServiceCache): Add metrics - variation service. - -2017-01-11 Werner Lemberg - - [truetype] Parse `MVAR' table. - - * src/truetype/ttgxvar.h (MVAR_TAG_XXX): New macros for MVAR tags. - (GX_Value, GX_MVarTable): New structures. - (GX_Blend): Add it. - - * src/truetype/ttgxvar.c (GX_VALUE_SIZE, GX_VALUE_CASE, - GX_GASP_CASE): New macros. - (ft_var_get_value_pointer): New auxiliary function to get a pointer - to a value from various SFNT tables already stored in `TT_Face'. - (ft_var_load_mvar): New function. - (TT_Get_MM_Var): Call it. - (tt_done_blend): Updated. - -2017-01-11 Werner Lemberg - - [truetype] More preparations for MVAR support. - - * src/truetype/ttobjs.c (tt_size_reset): Add argument to make - function only recompute ascender, descender, and height. - - * src/truetype/ttobjs.h: Updated. - - * src/truetype/ttdriver.c (tt_size_select, tt_size_request): - Updated. - -2017-01-09 Werner Lemberg - - [pcf] Disable long family names by default. - - * include/freetype/config/ftoption.h - (PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): Comment out. - -2017-01-09 Werner Lemberg - - [pcf] Make long family names configurable. - - The change from 2016-09-29 was too radical (except for people using - the openSuSE GNU/Linux distribution). To ameliorate the situation, - PCF_CONFIG_OPTION_LONG_FAMILY_NAMES gets introduced which controls - the feature; if set, a new PCF property option - `no-long-family-names' can be used to switch this feature off. - - * include/freetype/config/ftoption.h, devel/ftoption.h - (PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): New option. - - * include/freetype/ftpcfdrv.h: New header file (only containing - comments currently, used for building the documentation). - - * include/freetype/config/ftheader.h (FT_PCF_DRIVER_H): New macro. - - * src/pcf/pcf.h (PCF_Driver): Add `no_long_family_names' field. - - * src/pcf/pcfdrivr.c: Include FT_SERVICE_PROPERTIES_H and - FT_PCF_DRIVER_H. - (pcf_property_set, pcf_property_get): New functions. - (pcf_service_properties): New service. - (pcf_services): Updated. - (pcf_driver_init) [PCF_CONFIG_OPTION_LONG_FAMILY_NAMES]: Handle - `no_long_family_names'. - - * src/pcf/pcfread.c (pcf_load_font): Handle `no_long_family_names' - and PCF_CONFIG_OPTION_LONG_FAMILY_NAMES. - - * docs/CHANGES: Updated. - -2017-01-09 Werner Lemberg - - [pcf] Introduce a driver structure. - - To be filled later on with something useful. - - * src/pcf/pcf.h (PCF_Driver): New structure. - - * src/pcf/pcfdrivr.c (pcf_driver_init, pcf_driver_done): New dummy - functions. - (pcf_driver_class): Updated. - -2017-01-08 Werner Lemberg - - [truetype] Again some GX code shuffling. - - We need this later on for MVAR also. - - * src/truetype/ttgxvar.c (tt_hadvance_adjust): Split off computing - an item store variation delta into... - (ft_var_get_item_delta): ...new function. - -2017-01-08 Werner Lemberg - - [truetype] Adjust font variation flags for MVAR. - - * include/freetype/internal/tttypes.h (TT_FACE_FLAG_VAR_XXX): - Remove all flags related to MVAR; replace it with... - (TT_FACE_FLAG_VAR_MVAR): ...this new macro. - (TT_Face): Remove `mvar_support' field (which was still unused). - -2017-01-06 Werner Lemberg - - [truetype] More GX code shuffling. - - We need this later on for MVAR also. - - * src/truetype/ttgxvar.c (tt_done_blend): Split off handling of item - variation store into... - (ft_var_done_item_variation_store): ...new function. - -2017-01-06 Werner Lemberg - - [truetype] More generalization of GX stuff. - - We need this later on for MVAR also. - - * src/truetype/ttgxvar.c (ft_var_load_delta_set_index_mapping): Add - parameters for delta-set index mapping and item variation store. - (ft_var_load_item_variation_store): Add parameter for item variation - store. - s/hvarData/varData/. - Move allocation of `hvar_table' to... - (ft_var_load_hvar): ...this function. - Updated. - -2017-01-06 Werner Lemberg - - [truetype] Some GX structure renames for generalization. - - We need this later on for MVAR also. - - * src/truetype/ttgxvar.h (GX_HVarData): Renamed to... - (GX_ItemVarData): ...this. - (GX_HVarRegion): Renamed to... - (GX_VarRegion): ...this. - (GX_HVStore): Renamed to... - (GX_ItemVarStore): ...this. - (GX_WidthMap): Renamed to... - (GX_DeltaSetIdxMap): ...this. - - (GX_HVarTable): Updated. - - * src/truetype/ttgxvar.c: Updated. - -2017-01-06 Werner Lemberg - - [truetype] Code shuffling. - - * src/truetype/ttgxvar.c (ft_var_load_hvar): Split off loading of - item variation store and delta set index mapping into... - (ft_var_load_item_variation_store, - ft_var_load_delta_set_index_mapping): ...new functions. - -2017-01-06 Werner Lemberg - - [truetype] Add HVAR access without advance width map. - - * src/truetype/ttgxvar.c (ft_var_load_hvar): Handle case where - `offsetToAdvanceWidthMapping' is zero. - (tt_hadvance_adjust): Implement direct deltaSet access by glyph - index. - -2017-01-06 Werner Lemberg - - [pcf] Revise driver. - - This commit improves tracing and handling of malformed fonts. In - particular, the changes to `pcf_get_properties' fix - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=379 - - * src/pcf/pcfread.c (tableNames): Use long names for better - readability. - (pcf_read_TOC): Allow at most 9 tables. - (pcf_get_properties): Allow at most 256 properties. - Limit strings array length to 256 * (65536 + 1) bytes. - Better tracing. - (pcf_get_metric): Trace metric data. - (pcf_get_metrics): Allow at most 65536 metrics. - Fix comparison of `metrics->ascent' and `metrics->descent' to avoid - potential overflow. - Better tracing. - (pcf_get_bitmaps): Allow at most 65536 bitmaps. - Better tracing. - (pcf_get_encodings, pcf_get_accel): Better tracing. - - * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Don't trace `format' details. - These are now shown by `pcf_get_bitmaps'. - -2017-01-04 Werner Lemberg - - * src/pcf/pcfdrivr.c (PCF_Face_Init): Trace compression format. - -2017-01-04 Werner Lemberg - - [cff] More consistency checks for pure CFFs. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=378 - - * src/cff/cffload.c (cff_font_load): Check element number and size - of Name and Top DICT indices. - -2017-01-04 Werner Lemberg - - [cff, truetype] Minor tracing improvement. - - * src/cff/cffobjs.c (cff_face_init), src/truetype/ttobjs.c - (tt_face_init): Indent first tracing message from SFNT driver. - -2017-01-03 Werner Lemberg - - [truetype] Various minor fixes. - - * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check instruction - size only if we do native hinting. - (TT_Load_Glyph): Trace returned error code. - - * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Trace - returned error code. - (tt_size_ready_bytecode): Don't run `prep' table if `fpgm' table is - invalid. - -2017-01-03 Werner Lemberg - - [sfnt] Don't fail if PCLT, EBLC (and similar tables) are invalid. - - These tables are optional. - - * src/sfnt/sfobjs.c (sfnt_load_face): Implement it. - -2017-01-03 Werner Lemberg - - * src/cff/cffparse.c (cff_parse_num): Simplify. - -2017-01-03 Werner Lemberg - - Various fixes for clang's undefined behaviour sanitizer. - - * src/cff/cffload.c (FT_fdot14ToFixed): Fix casting. - (cff_blend_doBlend): Don't left-shift negative numbers. - Handle 5-byte numbers byte by byte to avoid alignment issues. - - * src/cff/cffparse.c (cff_parse_num): Handle 5-byte numbers byte by - byte to avoid alignment issues. - - * src/cid/cidload (cid_read_subrs): Do nothing if we don't have any - subrs. - - * src/psaux/t1decode.c (t1_decode_parse_charstring): Fix tracing. - - * src/tools/glnames.py (main): Put `DEFINE_PSTABLES' guard around - definition of `ft_get_adobe_glyph_index'. - - * src/psnames/pstables.h: Regenerated. - - * src/psnames/psmodule.c: Include `pstables.h' twice to get both - declaration and definition. - - * src/truetype/ttgxvar.c (FT_fdot14ToFixed, FT_intToFixed): Fix - casting. - -2017-01-01 Werner Lemberg - - [cff] Handle multiple `blend' operators in a row correctly. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=368 - - * src/cff/cffload.c (cff_blend_doBlend): Adjust `parser->stack' - pointers into `subFont->blend_stack' after reallocation. - -2017-01-01 Werner Lemberg - - [sfnt] Return correct number of named instances for TTCs. - - Without this patch, requesting information for face index N returned - the data for face index N+1 (or index 0). - - * src/sfnt/sfobjs.c (sfnt_init_face): Correctly adjust `face_index' - for negative `face_instance_index' values. - -2016-12-31 Werner Lemberg - - */*: Use hex numbers for errors in tracing messages. - -2016-12-31 Werner Lemberg - - [truetype] Check axis count in HVAR table. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=362 - - * src/truetype/ttgxvar.c (ft_var_load_hvar): Check axis count. - (ft_var_load_avar): Fix tracing message. - - ----------------------------------------------------------------------------- - -Copyright 2016-2018 by -David Turner, Robert Wilhelm, and Werner Lemberg. - -This file is part of the FreeType project, and may only be used, modified, -and distributed under the terms of the FreeType project license, -LICENSE.TXT. By continuing to use, modify, or distribute this file you -indicate that you have read the license and understand and accept it -fully. - - -Local Variables: -version-control: never -coding: utf-8 -End: diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/builds/wince/vc2005-ce/freetype.vcproj b/extensions/gdx-freetype/jni/freetype-2.9.1/builds/wince/vc2005-ce/freetype.vcproj deleted file mode 100644 index 1ca45a80f..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/builds/wince/vc2005-ce/freetype.vcproj +++ /dev/null @@ -1,874 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/builds/wince/vc2008-ce/freetype.vcproj b/extensions/gdx-freetype/jni/freetype-2.9.1/builds/wince/vc2008-ce/freetype.vcproj deleted file mode 100644 index 7a5445e9c..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/builds/wince/vc2008-ce/freetype.vcproj +++ /dev/null @@ -1,3508 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/builds/windows/vc2005/freetype.vcproj b/extensions/gdx-freetype/jni/freetype-2.9.1/builds/windows/vc2005/freetype.vcproj deleted file mode 100644 index b1e2ae681..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/builds/windows/vc2005/freetype.vcproj +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/builds/windows/vc2008/freetype.vcproj b/extensions/gdx-freetype/jni/freetype-2.9.1/builds/windows/vc2008/freetype.vcproj deleted file mode 100644 index f526cd2f6..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/builds/windows/vc2008/freetype.vcproj +++ /dev/null @@ -1,668 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/builds/windows/vc2010/freetype.sln b/extensions/gdx-freetype/jni/freetype-2.9.1/builds/windows/vc2010/freetype.sln deleted file mode 100644 index 8698207a9..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/builds/windows/vc2010/freetype.sln +++ /dev/null @@ -1,37 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio Express 2012 for Windows Desktop -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype", "freetype.vcxproj", "{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Debug Static|Win32 = Debug Static|Win32 - Debug Static|x64 = Debug Static|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - Release Static|Win32 = Release Static|Win32 - Release Static|x64 = Release Static|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.ActiveCfg = Debug|Win32 - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.Build.0 = Debug|Win32 - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|x64.ActiveCfg = Debug|x64 - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|x64.Build.0 = Debug|x64 - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Static|Win32.ActiveCfg = Debug Static|Win32 - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Static|Win32.Build.0 = Debug Static|Win32 - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Static|x64.ActiveCfg = Debug Static|x64 - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Static|x64.Build.0 = Debug Static|x64 - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.ActiveCfg = Release|Win32 - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.Build.0 = Release|Win32 - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.ActiveCfg = Release|x64 - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.Build.0 = Release|x64 - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Static|Win32.ActiveCfg = Release Static|Win32 - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Static|Win32.Build.0 = Release Static|Win32 - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Static|x64.ActiveCfg = Release Static|x64 - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Static|x64.Build.0 = Release Static|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/builds/windows/vc2010/freetype.vcxproj b/extensions/gdx-freetype/jni/freetype-2.9.1/builds/windows/vc2010/freetype.vcxproj deleted file mode 100644 index 521e84722..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/builds/windows/vc2010/freetype.vcxproj +++ /dev/null @@ -1,444 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Debug Static - Win32 - - - Debug Static - x64 - - - Release - Win32 - - - Release - x64 - - - Release Static - Win32 - - - Release Static - x64 - - - - - - 4.0 - - - - v100 - - - - v120 - - - - v140 - - - - v141 - - - - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} - FreeType - - - - DynamicLibrary - false - Unicode - - - DynamicLibrary - false - Unicode - - - StaticLibrary - false - Unicode - - - StaticLibrary - false - Unicode - - - DynamicLibrary - false - Unicode - - - DynamicLibrary - false - Unicode - - - StaticLibrary - false - Unicode - - - StaticLibrary - false - Unicode - - - - - - ..\..\..\objs\$(Platform)\$(Configuration)\ - ..\..\..\objs\$(Platform)\$(Configuration)\ - AllRules.ruleset - - - freetype - - - - - Disabled - $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - true - Level4 - ProgramDatabase - Default - 4001 - true - false - $(OutDir)$(TargetName).pdb - Disabled - - - _DEBUG;_DLL;$(UserDefines);%(PreprocessorDefinitions) - 0x0409 - - - true - MachineX86 - $(UserLibraryDirectories);%(AdditionalLibraryDirectories) - $(UserDependencies);%(AdditionalDependencies) - - - - - Disabled - $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - true - Level4 - ProgramDatabase - Default - 4001 - true - false - $(OutDir)$(TargetName).pdb - Disabled - - - _DEBUG;_DLL;$(UserDefines);%(PreprocessorDefinitions) - 0x0409 - - - true - MachineX64 - $(UserLibraryDirectories);%(AdditionalLibraryDirectories) - $(UserDependencies);%(AdditionalDependencies) - - - - - Disabled - $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebug - true - Level4 - ProgramDatabase - Default - 4001 - true - false - $(OutDir)$(TargetName).pdb - Disabled - - - _DEBUG;$(UserDefines);%(PreprocessorDefinitions) - 0x0409 - - - true - MachineX86 - $(UserLibraryDirectories);%(AdditionalLibraryDirectories) - $(UserDependencies);%(AdditionalDependencies) - - - - - Disabled - $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebug - true - Level4 - ProgramDatabase - Default - 4001 - true - false - $(OutDir)$(TargetName).pdb - Disabled - - - _DEBUG;$(UserDefines);%(PreprocessorDefinitions) - 0x0409 - - - true - MachineX64 - $(UserLibraryDirectories);%(AdditionalLibraryDirectories) - $(UserDependencies);%(AdditionalDependencies) - - - - - MaxSpeed - AnySuitable - $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - true - Level4 - Default - 4001 - true - false - StreamingSIMDExtensions2 - false - false - false - - - true - - - true - Neither - true - - - NDEBUG;_DLL;$(UserDefines);%(PreprocessorDefinitions) - 0x0409 - - - true - true - MachineX86 - $(UserLibraryDirectories);%(AdditionalLibraryDirectories) - $(UserDependencies);%(AdditionalDependencies) - - - - - MaxSpeed - AnySuitable - $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - true - Level4 - Default - 4001 - true - false - StreamingSIMDExtensions2 - false - false - false - - - true - - - true - Neither - true - - - NDEBUG;_DLL;$(UserDefines);%(PreprocessorDefinitions) - 0x0409 - - - true - true - MachineX64 - $(UserLibraryDirectories);%(AdditionalLibraryDirectories) - $(UserDependencies);%(AdditionalDependencies) - - - - - MaxSpeed - AnySuitable - $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) - true - MultiThreaded - true - true - Level4 - Default - 4001 - true - false - StreamingSIMDExtensions2 - false - false - false - false - - - true - - - true - Neither - true - - - NDEBUG;$(UserDefines);%(PreprocessorDefinitions) - 0x0409 - - - true - true - MachineX86 - $(UserLibraryDirectories);%(AdditionalLibraryDirectories) - $(UserDependencies);%(AdditionalDependencies) - - - - - MaxSpeed - AnySuitable - $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) - true - MultiThreaded - true - true - Level4 - Default - 4001 - true - false - StreamingSIMDExtensions2 - false - false - false - false - - - true - - - true - Neither - true - - - NDEBUG;$(UserDefines);%(PreprocessorDefinitions) - 0x0409 - - - true - true - MachineX64 - $(UserLibraryDirectories);%(AdditionalLibraryDirectories) - $(UserDependencies);%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - - - - - - - - - - diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/builds/windows/vc2010/index.html b/extensions/gdx-freetype/jni/freetype-2.9.1/builds/windows/vc2010/index.html deleted file mode 100644 index c3e604034..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/builds/windows/vc2010/index.html +++ /dev/null @@ -1,40 +0,0 @@ - -
- - FreeType 2 Project Files for Visual C++ 2010 or newer - - - -

- FreeType 2 Project Files for Visual C++ 2010 or newer -

- -

This directory contains solution and project files for -Visual C++ 2010 or newer, named freetype.sln, -and freetype.vcxproj. It compiles the following libraries -from the FreeType 2.9.1 sources:

- -
    -
  • freetype.dll using 'Release' or 'Debug' configurations
  • -
  • freetype.lib using 'Release Static' or 'Debug Static' configurations
  • -
- -

Both Win32 and x64 builds are supported. Build directories and target -files are placed in the top-level objs directory.

- -

Customization of the FreeType library is done by editing the -ftoption.h header file in the top-level devel path. -Alternatively, you may copy the file to another directory and change the -include directory in freetype.users.props.

- -

To configure library dependencies like zlib and libpng, -edit the freetype.users.props file in this directory. It also -simplifies automated (command-line) builds using msbuild.

- -

To link your executable with FreeType DLL, you may want to define -FT2_DLLIMPORT so that the imported functions are appropriately -attributed with dllimport.

- - - diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/builds/windows/visualc/freetype.vcproj b/extensions/gdx-freetype/jni/freetype-2.9.1/builds/windows/visualc/freetype.vcproj deleted file mode 100644 index dd0c41801..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/builds/windows/visualc/freetype.vcproj +++ /dev/null @@ -1,667 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/builds/windows/visualce/freetype.vcproj b/extensions/gdx-freetype/jni/freetype-2.9.1/builds/windows/visualce/freetype.vcproj deleted file mode 100644 index b79731175..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/builds/windows/visualce/freetype.vcproj +++ /dev/null @@ -1,3697 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/docs/INSTALL.MAC b/extensions/gdx-freetype/jni/freetype-2.9.1/docs/INSTALL.MAC deleted file mode 100644 index 2587e24a6..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/docs/INSTALL.MAC +++ /dev/null @@ -1,32 +0,0 @@ -Please follow the instructions in INSTALL.UNIX to install FreeType on -Mac OS X. - -Currently FreeType2 functions based on some deprecated Carbon APIs -return `FT_Err_Unimplemented_Feature' always, even if FreeType2 is -configured and built on the system that deprecated Carbon APIs are -available. To enable deprecated FreeType2 functions as far as -possible, replace `src/base/ftmac.c' by `builds/mac/ftmac.c'. - -Starting with Mac OS X 10.5, gcc defaults the deployment target to -10.5. In previous versions of Mac OS X, this defaulted to 10.1. If -you want your built binaries to run only on 10.5, this change does not -concern you. If you want them to also run on older versions of Mac -OS X, then you must either set the MACOSX_DEPLOYMENT_TARGET -environment variable or pass `-mmacosx-version-min' to gcc. You -should specify the oldest version of Mac OS you want the code to run -on. For example, if you use Bourne shell: - - export MACOSX_DEPLOYMENT_TARGET=10.2 - -or, if you use C shell: - - setenv MACOSX_DEPLOYMENT_TARGET 10.2 - -Alternatively, you could pass `-mmacosx-version-min=10.2' to gcc. - -Here the number 10.2 is the lowest version that the built binaries can -run on. In the above cases, the built binaries will run on Mac OS X -10.2 and later, but _not_ earlier. If you want to run on earlier, you -have to set lower version, e.g., 10.0. - -For classic Mac OS (Mac OS 7, 8, 9) please refer to builds/mac/README. diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/docs/VERSIONS.TXT b/extensions/gdx-freetype/jni/freetype-2.9.1/docs/VERSIONS.TXT deleted file mode 100644 index 377415702..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/docs/VERSIONS.TXT +++ /dev/null @@ -1,127 +0,0 @@ -Due to our use of `libtool' to generate and install the FreeType 2 -libraries on Unix systems, as well as other historical events, it is -generally very difficult to know precisely which release of the font -engine is installed on a given system. - -This file tries to explain why and to document ways to properly detect -FreeType on Unix. - - -1. Version and Release numbers ------------------------------- - -For each new public release of FreeType 2, there are generally *three* -distinct `version' numbers to consider: - - * The official FreeType 2 release number, like 2.3.1 or 2.4.10. - - * The libtool (and Unix) specific version number, like 13.0.7. This - is what `freetype-config --version' returns. - - * The platform-specific shared object number, used for example when - the library is installed as `/usr/lib/libfreetype.so.6.7.1'. - -The platform-specific number is, unsurprisingly, platform-specific and -varies with the operating system you are using (several variants of -Linux, FreeBSD, Solaris, etc.). You should thus _never_ use it, even -for simple tests. - -The libtool-specific number does not equal the release number but is -tied to it. - -The release number is available at *compile* time through the following -macros defined in FT_FREETYPE_H: - - - FREETYPE_MAJOR: major release number - - FREETYPE_MINOR: minor release number - - FREETYPE_PATCH: patch release number - -See below for a small autoconf fragment. - -The release number is also available at *runtime* through the -`FT_Library_Version' API. - - -2. History ----------- - -The following table gives, for all releases since 2.4.0, the -corresponding libtool number, as well as the shared object number found -on _most_ systems, but not all of them: - - - release libtool so - ------------------------------- - 2.9.1 22.1.16 6.16.1 - 2.9.0 22.0.16 6.16.0 - 2.8.1 21.0.15 6.15.0 - 2.8.0 20.0.14 6.14.0 - 2.7.1 19.0.13 6.13.0 - 2.7.0 18.6.12 6.12.6 - 2.6.5 18.5.12 6.12.5 - 2.6.4 18.4.12 6.12.4 - 2.6.3 18.3.12 6.12.3 - 2.6.2 18.2.12 6.12.2 - 2.6.1 18.1.12 6.12.1 - 2.6.0 18.0.12 6.12.0 - 2.5.5 17.4.11 6.11.4 - 2.5.4 17.3.11 6.11.3 - 2.5.3 17.2.11 6.11.2 - 2.5.2 17.1.11 6.11.1 - 2.5.1 17.0.11 6.11.0 - 2.5.0 16.2.10 6.10.2 - 2.4.12 16.1.10 6.10.1 - 2.4.11 16.0.10 6.10.0 - 2.4.10 15.0.9 6.9.0 - 2.4.9 14.1.8 6.8.1 - 2.4.8 14.0.8 6.8.0 - 2.4.7 13.2.7 6.7.2 - 2.4.6 13.1.7 6.7.1 - 2.4.5 13.0.7 6.7.0 - 2.4.4 12.2.6 6.6.2 - 2.4.3 12.1.6 6.6.1 - 2.4.2 12.0.6 6.6.0 - 2.4.1 11.1.5 6.5.1 - 2.4.0 11.0.5 6.5.0 - - -3. Autoconf Code Fragment -------------------------- - -Lars Clausen contributed the following autoconf fragment to detect which -version of FreeType is installed on a system. This one tests for a -version that is at least 2.0.9; you should change it to check against -other release numbers. - - - AC_MSG_CHECKING([whether FreeType version is 2.0.9 or higher]) - old_CPPFLAGS="$CPPFLAGS" - CPPFLAGS=`freetype-config --cflags` - AC_TRY_CPP([ - -#include -#include FT_FREETYPE_H -#if (FREETYPE_MAJOR*1000 + FREETYPE_MINOR)*1000 + FREETYPE_PATCH < 2000009 -#error FreeType version too low. -#endif - ], - [AC_MSG_RESULT(yes) - FREETYPE_LIBS=`freetype-config --libs` - AC_SUBST(FREETYPE_LIBS) - AC_DEFINE(HAVE_FREETYPE,1,[Define if you have the FreeType2 library]) - CPPFLAGS="$old_CPPFLAGS"], - [AC_MSG_ERROR([Need FreeType library version 2.0.9 or higher])]) - ------------------------------------------------------------------------- - -Copyright 2002-2018 by -David Turner, Robert Wilhelm, and Werner Lemberg. - -This file is part of the FreeType project, and may only be used, -modified, and distributed under the terms of the FreeType project -license, LICENSE.TXT. By continuing to use, modify, or distribute this -file you indicate that you have read the license and understand and -accept it fully. - - ---- end of VERSIONS.TXT --- diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/docs/formats.txt b/extensions/gdx-freetype/jni/freetype-2.9.1/docs/formats.txt deleted file mode 100644 index 75aba92e3..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/docs/formats.txt +++ /dev/null @@ -1,208 +0,0 @@ -This file contains a list of various font formats. It gives the -reference document and whether it is supported in FreeType 2. - -Table fields ------------- - - wrapper format - The format used to represent the font data. In the table below it - is used only if the font format differs. Possible values are - - SFNT binary - PFB binary - PS a text header, followed by binary or text data - LZW compressed with either `gzip' or `compress' - BZ2 compressed with `bzip2'. - - font format - How the font is to be accessed, possibly after converting the file - type and wrapper format into a generic form. Bitmap formats are - `BDF', `PCF', and one form of `WINFNT'; all others are vector - formats. `PS' indicates third-order, `TT' second-order Bézier - curves. - - font type - Sub-formats of the font format. `SBIT' and `MACSBIT' are bitmap - formats, `MM' and `VAR' support optical axes. `CFF2' supports - optical axes also. - - glyph access - If not specified, the glyph access is `standard' to the font - format. Values are `CID' for CID-keyed fonts, `SYNTHETIC' for - fonts that are modified versions of other fonts by means of a - transformation matrix, and `TYPE_0' for PS fonts which are to be - accessed in a tree-like structure. - - FreeType driver - The module in the FreeType library which handles the specific font - format. A missing entry means that FreeType doesn't support the - font format (yet). - - -Notes ------ - - The SFNT container format also provides `collections' (usually - having the file extension `.ttc' or `.otc'). A collection contains - multiple font faces that share some tables to avoid redundancy, thus - reducing the file size. In FreeType, elements of a collection can - be accessed with a proper face index. - - Both the GX and the OpenType 1.8 variation fonts provide `named - instances'. FreeType maps them to face indices (they can also be - accessed with the standard MM interface). - - Other font formats (not using the SFNT wrapper) also provide - multiple faces within one file; they are marked with an asterisk - (`*') in the table below. - - FreeType can be configured to support Mac files (on older Mac OS - versions, a `file' is stored as a data and a resource fork, this is, - within two separate data chunks). If a file can't be opened as a - font, FreeType then checks whether it is a resource fork, trying to - extract the contained font data from either a `POST' or `sfnt' - resource. - - -Please send additions and/or corrections to wl@gnu.org or to the -FreeType developer's list at freetype-devel@nongnu.org (for -subscribers only). If you can provide a font example for a format -which isn't supported yet please send a mail too. - - - wrapper font font glyph FreeType reference - format format type access driver documents - ----------------------------------------------------------------------------- - - --- BDF --- --- bdf 5005.BDF_Spec.pdf, X11 - - - SFNT PS TYPE_1 --- type1 Type 1 GX Font Format - (for the Mac) [3] - SFNT PS TYPE_1 CID cid 5180.sfnt.pdf (for the Mac) - [3] - SFNT PS CFF --- cff OT spec, 5176.CFF.pdf - (`OTTO' format) - SFNT PS CFF CID cff OT spec, 5176.CFF.pdf - SFNT PS CFF SYNTHETIC --- OT spec, 5176.CFF.pdf - SFNT PS CFF2 --- cff OT spec 1.8 - - SFNT TT SBIT --- sfnt XFree86 (bitmaps only; - with `head' table) - SFNT TT MACSBIT --- sfnt OT spec (for the Mac; - bitmaps only; `bhed' table) - SFNT TT --- --- truetype OT spec (`normal' TT font) - SFNT TT VAR --- truetype GX spec (`?var' tables) - SFNT TT VAR --- truetype OT spec 1.8 - (`?var' + `?VAR' tables) - - - --- PS TYPE_1 --- type1 T1_SPEC.pdf - (PFA, Type 1 font resource) - PFB PS TYPE_1 --- type1 T1_SPEC.pdf, - 5040.Download_Fonts.pdf - (`normal' Type 1 font) - --- PS TYPE_1 CID cid PLRM.pdf (CID Font Type 0; - Type 9 font) - --- PS MM --- type1 5015.Type1_Supp.pdf - (Multiple Masters) - --- PS CFF --- cff 5176.CFF.pdf (`pure' CFF) - --- PS* CFF CID cff 5176.CFF.pdf (`pure' CFF) - --- PS CFF SYNTHETIC --- 5176.CFF.pdf (`pure' CFF) - --- PS CFF/MM --- cff old 5167.CFF.pdf (`pure' CFF) - [3] - --- PS* CFF/MM CID cff old 5167.CFF.pdf (`pure' CFF) - [3] - --- PS CFF/MM SYNTHETIC --- old 5167.CFF.pdf (`pure' CFF) - [3] - PS PS CFF --- --- PLRM.pdf (Type 2) [1] - PS PS* CFF CID --- PLRM.pdf (Type 2) [1] - PS PS CFF SYNTHETIC --- PLRM.pdf (Type 2) [1] - PS PS CFF/MM --- --- PLRM.pdf (Type 2) [1] - PS PS* CFF/MM CID --- PLRM.pdf (Type 2) [1] - PS PS CFF/MM SYNTHETIC --- PLRM.pdf (Type 2) [1] - --- PS --- TYPE_0 --- PLRM.pdf - --- PS TYPE_3 --- --- PLRM.pdf (never supported) - --- PS TYPE_3 CID --- PLRM.pdf (CID Font Type 1; - Type 10 font; never supported) - PS PS TYPE_14 --- --- PLRM.pdf (Chameleon font; - Type 14 font; never supported?) - --- PS TYPE_32 CID --- PLRM.pdf (CID Font Type 4; - Type 32 font; never supported?) - PS TT --- --- type42 5012.Type42_Spec.pdf - (Type 42 font) - PS TT --- CID --- PLRM.pdf (CID Font Type 2; - Type 11 font) - - - ? ? CEF ? cff ? - - - --- PCF --- --- pcf X11 [4] - LZW PCF --- --- pcf X11 [4] - BZ2 PCF --- --- pcf X11 [4] - - - --- PFR* PFR0 --- pfr [2] - --- PFR PFR1 --- --- (undocumented, proprietary; - probably never supported) - - - --- WINFNT* --- --- winfonts Windows developer's notes [5] - --- WINFNT VECTOR --- --- Windows developer's notes [5] - - -[1] Support should be rather simple since this is identical to `CFF' - but in a PS wrapper. - -[2] The official PFR specification is no longer available, but - archive.org has archived it: - - https://web.archive.org/web/20091014062300/http://www.bitstream.com/font_rendering/products/truedoc/pfrspec.html - https://web.archive.org/web/20081115152605/http://www.bitstream.com/font_rendering/pdfs/pfrspec1.3.pdf - - The syntax of the auxiliary data is not defined there, but is - partially defined in MHP 1.0.3 (also called ETSI TS 101812 V1.3.1) - section 7.4. - - http://www.etsi.org/ - http://webapp.etsi.org/workprogram/Report_WorkItem.asp?WKI_ID=18799 - -[3] Support is rudimentary currently; some tables or data are not - loaded yet. - -[4] See - - THE X WINDOW SYSTEM SERVER: X VERSION 11, RELEASE 5 - Elias Israel, Erik Fortune, Digital Press, 1992 - ISBN 1-55558-096-3 - - for a specification given in Appendix D on pgs. 436-450. However, - this information might be out of date; unfortunately, there is no - PCF specification available online, and this book is out of print. - George Williams deduced the font format from the X11 sources and - documented it for his FontForge font editor: - - https://fontforge.github.io/pcf-format.html - -[5] This is from MS Windows 3; see Microsoft's Knowledge Base article at - - https://support.microsoft.com/kb/65123 - ------------------------------------------------------------------------- - -Copyright 2004-2018 by -David Turner, Robert Wilhelm, and Werner Lemberg. - -This file is part of the FreeType project, and may only be used, -modified, and distributed under the terms of the FreeType project -license, LICENSE.TXT. By continuing to use, modify, or distribute this -file you indicate that you have read the license and understand and -accept it fully. - - ---- end of formats.txt --- - -Local Variables: -coding: utf-8 -End: diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/docs/reference/ft2-auto_hinter.html b/extensions/gdx-freetype/jni/freetype-2.9.1/docs/reference/ft2-auto_hinter.html deleted file mode 100644 index 884d87ad6..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/docs/reference/ft2-auto_hinter.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - -FreeType-2.9.1 API Reference - - - - - -

FreeType-2.9.1 API Reference

- -

The auto-hinter

- -

While FreeType's auto-hinter doesn't expose API functions by itself, it is possible to control its behaviour with FT_Property_Set and FT_Property_Get. The following lists the available properties together with the necessary macros and structures.

-

Note that the auto-hinter's module name is ‘autofitter’ for historical reasons.

-

Available properties are increase-x-height, no-stem-darkening (experimental), darkening-parameters (experimental), warping (experimental), glyph-to-script-map (experimental), fallback-script (experimental), and default-script (experimental), as documented in the ‘Driver properties’ section.

- - - diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/docs/reference/ft2-cff_driver.html b/extensions/gdx-freetype/jni/freetype-2.9.1/docs/reference/ft2-cff_driver.html deleted file mode 100644 index 6e7c1d967..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/docs/reference/ft2-cff_driver.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - -FreeType-2.9.1 API Reference - - - - - -

FreeType-2.9.1 API Reference

- -

The CFF driver

- -

While FreeType's CFF driver doesn't expose API functions by itself, it is possible to control its behaviour with FT_Property_Set and FT_Property_Get.

-

The CFF driver's module name is ‘cff’.

-

Available properties are hinting-engine, no-stem-darkening, darkening-parameters, and random-seed, as documented in the ‘Driver properties’ section.

-

Hinting and antialiasing principles of the new engine

-

The rasterizer is positioning horizontal features (e.g., ascender height & x-height, or crossbars) on the pixel grid and minimizing the amount of antialiasing applied to them, while placing vertical features (vertical stems) on the pixel grid without hinting, thus representing the stem position and weight accurately. Sometimes the vertical stems may be only partially black. In this context, ‘antialiasing’ means that stems are not positioned exactly on pixel borders, causing a fuzzy appearance.

-

There are two principles behind this approach.

-

1) No hinting in the horizontal direction: Unlike ‘superhinted’ TrueType, which changes glyph widths to accommodate regular inter-glyph spacing, Adobe's approach is ‘faithful to the design’ in representing both the glyph width and the inter-glyph spacing designed for the font. This makes the screen display as close as it can be to the result one would get with infinite resolution, while preserving what is considered the key characteristics of each glyph. Note that the distances between unhinted and grid-fitted positions at small sizes are comparable to kerning values and thus would be noticeable (and distracting) while reading if hinting were applied.

-

One of the reasons to not hint horizontally is antialiasing for LCD screens: The pixel geometry of modern displays supplies three vertical subpixels as the eye moves horizontally across each visible pixel. On devices where we can be certain this characteristic is present a rasterizer can take advantage of the subpixels to add increments of weight. In Western writing systems this turns out to be the more critical direction anyway; the weights and spacing of vertical stems (see above) are central to Armenian, Cyrillic, Greek, and Latin type designs. Even when the rasterizer uses greyscale antialiasing instead of color (a necessary compromise when one doesn't know the screen characteristics), the unhinted vertical features preserve the design's weight and spacing much better than aliased type would.

-

2) Alignment in the vertical direction: Weights and spacing along the y axis are less critical; what is much more important is the visual alignment of related features (like cap-height and x-height). The sense of alignment for these is enhanced by the sharpness of grid-fit edges, while the cruder vertical resolution (full pixels instead of 1/3 pixels) is less of a problem.

-

On the technical side, horizontal alignment zones for ascender, x-height, and other important height values (traditionally called ‘blue zones’) as defined in the font are positioned independently, each being rounded to the nearest pixel edge, taking care of overshoot suppression at small sizes, stem darkening, and scaling.

-

Hstems (this is, hint values defined in the font to help align horizontal features) that fall within a blue zone are said to be ‘captured’ and are aligned to that zone. Uncaptured stems are moved in one of four ways, top edge up or down, bottom edge up or down. Unless there are conflicting hstems, the smallest movement is taken to minimize distortion.

- - - diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/docs/reference/ft2-index.html b/extensions/gdx-freetype/jni/freetype-2.9.1/docs/reference/ft2-index.html deleted file mode 100644 index ee99e2ff2..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/docs/reference/ft2-index.html +++ /dev/null @@ -1,379 +0,0 @@ - - - - -FreeType-2.9.1 API Reference - - - - - -

FreeType-2.9.1 API Reference

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
BDF_PROPERTY_TYPE_ATOMFT_KERNING_UNFITTEDFT_Stroker_Done
BDF_PROPERTY_TYPE_CARDINALFT_KERNING_UNSCALEDFT_Stroker_EndSubPath
BDF_PROPERTY_TYPE_INTEGERFT_Kerning_ModeFT_Stroker_Export
BDF_PROPERTY_TYPE_NONEFT_LCD_FILTER_DEFAULTFT_Stroker_ExportBorder
BDF_PropertyFT_LCD_FILTER_HFT_Stroker_GetBorderCounts
BDF_PropertyRecFT_LCD_FILTER_LEGACYFT_Stroker_GetCounts
BDF_PropertyTypeFT_LCD_FILTER_LEGACY1FT_Stroker_LineCap
CID_FaceDictFT_LCD_FILTER_LIGHTFT_Stroker_LineJoin
CID_FaceDictRecFT_LCD_FILTER_NONEFT_Stroker_LineTo
CID_FaceInfoFT_LcdFilterFT_Stroker_New
CID_FaceInfoRecFT_LIST_HFT_Stroker_ParseOutline
CID_FontDictFT_LibraryFT_Stroker_Rewind
CID_InfoFT_Library_SetLcdFilterFT_Stroker_Set
darkening-parametersFT_Library_SetLcdFilterWeightsFT_StrokerBorder
default-scriptFT_Library_VersionFT_SUBGLYPH_FLAG_2X2
FREETYPE_MAJORFT_ListFT_SUBGLYPH_FLAG_ARGS_ARE_WORDS
FREETYPE_MINORFT_List_AddFT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES
FREETYPE_PATCHFT_List_DestructorFT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID
FREETYPE_XXXFT_List_FinalizeFT_SUBGLYPH_FLAG_SCALE
FT_Activate_SizeFT_List_FindFT_SUBGLYPH_FLAG_USE_MY_METRICS
FT_ADVANCE_FLAG_FAST_ONLYFT_List_InsertFT_SUBGLYPH_FLAG_XXX
FT_ADVANCES_HFT_List_IterateFT_SUBGLYPH_FLAG_XY_SCALE
FT_Add_Default_ModulesFT_List_IteratorFT_SubGlyph
FT_Add_ModuleFT_List_RemoveFT_SYNTHESIS_H
FT_Alloc_FuncFT_List_UpFT_SYSTEM_H
FT_ANGLE_2PIFT_ListNodeFT_Tag
FT_ANGLE_PIFT_ListNodeRecFT_Tan
FT_ANGLE_PI2FT_ListRecFT_TRIGONOMETRY_H
FT_ANGLE_PI4FT_LOAD_BITMAP_METRICS_ONLYFT_TRUETYPE_DRIVER_H
FT_AngleFT_LOAD_COLORFT_TRUETYPE_ENGINE_TYPE_NONE
FT_Angle_DiffFT_LOAD_COMPUTE_METRICSFT_TRUETYPE_ENGINE_TYPE_PATENTED
FT_Atan2FT_LOAD_CROP_BITMAPFT_TRUETYPE_ENGINE_TYPE_UNPATENTED
FT_Attach_FileFT_LOAD_DEFAULTFT_TRUETYPE_IDS_H
FT_Attach_StreamFT_LOAD_FORCE_AUTOHINTFT_TRUETYPE_TABLES_H
FT_AUTOHINTER_HFT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTHFT_TRUETYPE_TAGS_H
FT_AUTOHINTER_SCRIPT_CJKFT_LOAD_IGNORE_TRANSFORMFT_TrueTypeEngineType
FT_AUTOHINTER_SCRIPT_INDICFT_LOAD_LINEAR_DESIGNFT_TrueTypeGX_Free
FT_AUTOHINTER_SCRIPT_LATINFT_LOAD_MONOCHROMEFT_TrueTypeGX_Validate
FT_AUTOHINTER_SCRIPT_NONEFT_LOAD_NO_AUTOHINTFT_TYPE1_TABLES_H
FT_AUTOHINTER_SCRIPT_XXXFT_LOAD_NO_BITMAPFT_TYPES_H
FT_BBOX_HFT_LOAD_NO_HINTINGFT_UFWord
FT_BBoxFT_LOAD_NO_RECURSEFT_UInt
FT_BDF_HFT_LOAD_NO_SCALEFT_UInt16
FT_BITMAP_HFT_LOAD_PEDANTICFT_UInt32
FT_BitmapFT_LOAD_RENDERFT_UInt64
FT_Bitmap_ConvertFT_LOAD_TARGET_LCDFT_ULong
FT_Bitmap_CopyFT_LOAD_TARGET_LCD_VFT_UnitVector
FT_Bitmap_DoneFT_LOAD_TARGET_LIGHTFT_UShort
FT_Bitmap_EmboldenFT_LOAD_TARGET_MODEFT_VALIDATE_APPLE
FT_Bitmap_InitFT_LOAD_TARGET_MONOFT_VALIDATE_BASE
FT_Bitmap_SizeFT_LOAD_TARGET_NORMALFT_VALIDATE_bsln
FT_BitmapGlyphFT_LOAD_TARGET_XXXFT_VALIDATE_CKERN
FT_BitmapGlyphRecFT_LOAD_VERTICAL_LAYOUTFT_VALIDATE_CKERNXXX
FT_BoolFT_LOAD_XXXFT_VALIDATE_feat
FT_ByteFT_Load_CharFT_VALIDATE_GDEF
FT_BytesFT_Load_GlyphFT_VALIDATE_GPOS
FT_BZIP2_HFT_Load_Sfnt_TableFT_VALIDATE_GSUB
FT_CACHE_HFT_LongFT_VALIDATE_GX
FT_CeilFixFT_LZW_HFT_VALIDATE_GX_LENGTH
FT_CFF_DRIVER_HFT_MAC_HFT_VALIDATE_GXXXX
FT_CharFT_MAKE_TAGFT_VALIDATE_JSTF
FT_CharMapFT_MatrixFT_VALIDATE_just
FT_CharMapRecFT_Matrix_InvertFT_VALIDATE_kern
FT_CID_HFT_Matrix_MultiplyFT_VALIDATE_lcar
FT_ClassicKern_FreeFT_MemoryFT_VALIDATE_MATH
FT_ClassicKern_ValidateFT_MemoryRecFT_VALIDATE_MS
FT_CONFIG_CONFIG_HFT_MM_AxisFT_VALIDATE_mort
FT_CONFIG_MODULES_HFT_MM_VarFT_VALIDATE_morx
FT_CONFIG_OPTIONS_HFT_MODULE_ERRORS_HFT_VALIDATE_OT
FT_CONFIG_STANDARD_LIBRARY_HFT_MODULE_HFT_VALIDATE_OTXXX
FT_CosFT_ModuleFT_VALIDATE_opbd
FT_DataFT_Module_ClassFT_VALIDATE_prop
FT_DivFixFT_Module_ConstructorFT_VALIDATE_trak
FT_Done_FaceFT_Module_DestructorFT_VAR_AXIS_FLAG_HIDDEN
FT_Done_FreeTypeFT_Module_RequesterFT_VAR_AXIS_FLAG_XXX
FT_Done_GlyphFT_MULTIPLE_MASTERS_HFT_Var_Axis
FT_Done_LibraryFT_MulDivFT_Var_Named_Style
FT_Done_MM_VarFT_MulFixFT_Vector
FT_Done_SizeFT_Multi_MasterFT_Vector_From_Polar
FT_DRIVER_HFT_New_FaceFT_Vector_Length
FT_DriverFT_New_Face_From_FONDFT_Vector_Polarize
FT_ENC_TAGFT_New_Face_From_FSRefFT_Vector_Rotate
FT_ENCODING_ADOBE_CUSTOMFT_New_Face_From_FSSpecFT_Vector_Transform
FT_ENCODING_ADOBE_EXPERTFT_New_LibraryFT_Vector_Unit
FT_ENCODING_ADOBE_LATIN_1FT_New_Memory_FaceFT_WINFONTS_H
FT_ENCODING_ADOBE_STANDARDFT_New_SizeFT_WinFNT_Header
FT_ENCODING_APPLE_ROMANFT_OffsetFT_WinFNT_HeaderRec
FT_ENCODING_BIG5FT_OPEN_DRIVERFT_WinFNT_ID_CP1250
FT_ENCODING_JOHABFT_OPEN_MEMORYFT_WinFNT_ID_CP1251
FT_ENCODING_MS_BIG5FT_OPEN_PARAMSFT_WinFNT_ID_CP1252
FT_ENCODING_MS_GB2312FT_OPEN_PATHNAMEFT_WinFNT_ID_CP1253
FT_ENCODING_MS_JOHABFT_OPEN_STREAMFT_WinFNT_ID_CP1254
FT_ENCODING_MS_SJISFT_OPEN_XXXFT_WinFNT_ID_CP1255
FT_ENCODING_MS_SYMBOLFT_OPENTYPE_VALIDATE_HFT_WinFNT_ID_CP1256
FT_ENCODING_MS_WANSUNGFT_Open_ArgsFT_WinFNT_ID_CP1257
FT_ENCODING_NONEFT_Open_FaceFT_WinFNT_ID_CP1258
FT_ENCODING_OLD_LATIN_2FT_OpenType_FreeFT_WinFNT_ID_CP1361
FT_ENCODING_PRCFT_OpenType_ValidateFT_WinFNT_ID_CP874
FT_ENCODING_SJISFT_ORIENTATION_FILL_LEFTFT_WinFNT_ID_CP932
FT_ENCODING_UNICODEFT_ORIENTATION_FILL_RIGHTFT_WinFNT_ID_CP936
FT_ENCODING_WANSUNGFT_ORIENTATION_NONEFT_WinFNT_ID_CP949
FT_EncodingFT_ORIENTATION_POSTSCRIPTFT_WinFNT_ID_CP950
FT_ERRORS_HFT_ORIENTATION_TRUETYPEFT_WinFNT_ID_DEFAULT
FT_Err_XXXFT_OrientationFT_WinFNT_ID_MAC
FT_ErrorFT_OUTLINE_EVEN_ODD_FILLFT_WinFNT_ID_OEM
FT_F26Dot6FT_OUTLINE_HFT_WinFNT_ID_SYMBOL
FT_F2Dot14FT_OUTLINE_HIGH_PRECISIONFT_WinFNT_ID_XXX
FT_FACE_FLAG_CID_KEYEDFT_OUTLINE_IGNORE_DROPOUTSFTC_CMapCache
FT_FACE_FLAG_COLORFT_OUTLINE_INCLUDE_STUBSFTC_CMapCache_Lookup
FT_FACE_FLAG_EXTERNAL_STREAMFT_OUTLINE_NONEFTC_CMapCache_New
FT_FACE_FLAG_FAST_GLYPHSFT_OUTLINE_OWNERFTC_Face_Requester
FT_FACE_FLAG_FIXED_SIZESFT_OUTLINE_REVERSE_FILLFTC_FaceID
FT_FACE_FLAG_FIXED_WIDTHFT_OUTLINE_SINGLE_PASSFTC_ImageCache
FT_FACE_FLAG_GLYPH_NAMESFT_OUTLINE_SMART_DROPOUTSFTC_ImageCache_Lookup
FT_FACE_FLAG_HINTERFT_OUTLINE_XXXFTC_ImageCache_LookupScaler
FT_FACE_FLAG_HORIZONTALFT_OutlineFTC_ImageCache_New
FT_FACE_FLAG_KERNINGFT_Outline_CheckFTC_ImageType
FT_FACE_FLAG_MULTIPLE_MASTERSFT_Outline_ConicToFuncFTC_ImageTypeRec
FT_FACE_FLAG_SCALABLEFT_Outline_CopyFTC_Manager
FT_FACE_FLAG_SFNTFT_Outline_CubicToFuncFTC_Manager_Done
FT_FACE_FLAG_TRICKYFT_Outline_DecomposeFTC_Manager_LookupFace
FT_FACE_FLAG_VARIATIONFT_Outline_DoneFTC_Manager_LookupSize
FT_FACE_FLAG_VERTICALFT_Outline_EmboldenFTC_Manager_New
FT_FACE_FLAG_XXXFT_Outline_EmboldenXYFTC_Manager_RemoveFaceID
FT_FaceFT_Outline_FuncsFTC_Manager_Reset
FT_Face_CheckTrueTypePatentsFT_Outline_Get_BBoxFTC_Node
FT_Face_GetCharsOfVariantFT_Outline_Get_BitmapFTC_Node_Unref
FT_Face_GetCharVariantIndexFT_Outline_Get_CBoxFTC_SBit
FT_Face_GetCharVariantIsDefaultFT_Outline_Get_OrientationFTC_SBitCache
FT_Face_GetVariantSelectorsFT_Outline_GetInsideBorderFTC_SBitCache_Lookup
FT_Face_GetVariantsOfCharFT_Outline_GetOutsideBorderFTC_SBitCache_LookupScaler
FT_Face_InternalFT_Outline_LineToFuncFTC_SBitCache_New
FT_Face_PropertiesFT_Outline_MoveToFuncFTC_SBitRec
FT_Face_SetUnpatentedHintingFT_Outline_NewFTC_Scaler
FT_FaceRecFT_Outline_RenderFTC_ScalerRec
FT_FixedFT_Outline_Reversefallback-script
FT_FloorFixFT_Outline_Transformglyph-to-script-map
FT_FONT_FORMATS_HFT_Outline_Translatehinting-engine
FT_FREETYPE_HFT_OutlineGlyphincrease-x-height
FT_Free_FuncFT_OutlineGlyphRecinterpreter-version
FT_FSTYPE_BITMAP_EMBEDDING_ONLYFT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILYno-long-family-names
FT_FSTYPE_EDITABLE_EMBEDDINGFT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILYno-stem-darkening
FT_FSTYPE_INSTALLABLE_EMBEDDINGFT_PARAM_TAG_INCREMENTALPS_DICT_BLUE_FUZZ
FT_FSTYPE_NO_SUBSETTINGFT_PARAM_TAG_LCD_FILTER_WEIGHTSPS_DICT_BLUE_SCALE
FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDINGFT_PARAM_TAG_RANDOM_SEEDPS_DICT_BLUE_SHIFT
FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDINGFT_PARAM_TAG_STEM_DARKENINGPS_DICT_BLUE_VALUE
FT_FSTYPE_XXXFT_PARAM_TAG_UNPATENTED_HINTINGPS_DICT_CHAR_STRING
FT_FWordFT_ParameterPS_DICT_CHAR_STRING_KEY
FT_GASP_DO_GRAYFT_PCF_DRIVER_HPS_DICT_ENCODING_ENTRY
FT_GASP_DO_GRIDFITFT_PFR_HPS_DICT_ENCODING_TYPE
FT_GASP_HFT_PIXEL_MODE_BGRAPS_DICT_FAMILY_BLUE
FT_GASP_NO_TABLEFT_PIXEL_MODE_GRAYPS_DICT_FAMILY_NAME
FT_GASP_SYMMETRIC_GRIDFITFT_PIXEL_MODE_GRAY2PS_DICT_FAMILY_OTHER_BLUE
FT_GASP_SYMMETRIC_SMOOTHINGFT_PIXEL_MODE_GRAY4PS_DICT_FONT_BBOX
FT_GASP_XXXFT_PIXEL_MODE_LCDPS_DICT_FONT_MATRIX
FT_GenericFT_PIXEL_MODE_LCD_VPS_DICT_FONT_NAME
FT_Generic_FinalizerFT_PIXEL_MODE_MONOPS_DICT_FONT_TYPE
FT_Get_AdvanceFT_PIXEL_MODE_NONEPS_DICT_FORCE_BOLD
FT_Get_AdvancesFT_Pixel_ModePS_DICT_FS_TYPE
FT_Get_BDF_Charset_IDFT_PointerPS_DICT_FULL_NAME
FT_Get_BDF_PropertyFT_PosPS_DICT_IS_FIXED_PITCH
FT_Get_Char_IndexFT_Prop_GlyphToScriptMapPS_DICT_ITALIC_ANGLE
FT_Get_Charmap_IndexFT_Prop_IncreaseXHeightPS_DICT_LANGUAGE_GROUP
FT_Get_CID_From_Glyph_IndexFT_Property_GetPS_DICT_LEN_IV
FT_Get_CID_Is_Internally_CID_KeyedFT_Property_SetPS_DICT_MIN_FEATURE
FT_Get_CID_Registry_Ordering_SupplementFT_PtrDistPS_DICT_NOTICE
FT_Get_CMap_FormatFT_RASTER_FLAG_AAPS_DICT_NUM_BLUE_VALUES
FT_Get_CMap_Language_IDFT_RASTER_FLAG_CLIPPS_DICT_NUM_CHAR_STRINGS
FT_Get_First_CharFT_RASTER_FLAG_DEFAULTPS_DICT_NUM_FAMILY_BLUES
FT_Get_Font_FormatFT_RASTER_FLAG_DIRECTPS_DICT_NUM_FAMILY_OTHER_BLUES
FT_Get_FSType_FlagsFT_RASTER_FLAG_XXXPS_DICT_NUM_OTHER_BLUES
FT_Get_GaspFT_RasterPS_DICT_NUM_STEM_SNAP_H
FT_Get_GlyphFT_Raster_BitSet_FuncPS_DICT_NUM_STEM_SNAP_V
FT_Get_Glyph_NameFT_Raster_BitTest_FuncPS_DICT_NUM_SUBRS
FT_Get_KerningFT_Raster_DoneFuncPS_DICT_OTHER_BLUE
FT_Get_MM_Blend_CoordinatesFT_Raster_FuncsPS_DICT_PAINT_TYPE
FT_Get_MM_VarFT_Raster_NewFuncPS_DICT_PASSWORD
FT_Get_ModuleFT_Raster_ParamsPS_DICT_RND_STEM_UP
FT_Get_Multi_MasterFT_Raster_RenderFuncPS_DICT_STD_HW
FT_Get_Name_IndexFT_Raster_ResetFuncPS_DICT_STD_VW
FT_Get_Next_CharFT_Raster_SetModeFuncPS_DICT_STEM_SNAP_H
FT_Get_PFR_AdvanceFT_RENDER_HPS_DICT_STEM_SNAP_V
FT_Get_PFR_KerningFT_RENDER_MODE_LCDPS_DICT_SUBR
FT_Get_PFR_MetricsFT_RENDER_MODE_LCD_VPS_DICT_UNDERLINE_POSITION
FT_Get_Postscript_NameFT_RENDER_MODE_LIGHTPS_DICT_UNDERLINE_THICKNESS
FT_Get_PS_Font_InfoFT_RENDER_MODE_MONOPS_DICT_UNIQUE_ID
FT_Get_PS_Font_PrivateFT_RENDER_MODE_NORMALPS_DICT_VERSION
FT_Get_PS_Font_ValueFT_Realloc_FuncPS_DICT_WEIGHT
FT_Get_RendererFT_Reference_FacePS_Dict_Keys
FT_Get_Sfnt_LangTagFT_Reference_LibraryPS_FontInfo
FT_Get_Sfnt_NameFT_Remove_ModulePS_FontInfoRec
FT_Get_Sfnt_Name_CountFT_Render_GlyphPS_Private
FT_Get_Sfnt_TableFT_Render_ModePS_PrivateRec
FT_Get_SubGlyph_InfoFT_Rendererrandom-seed
FT_Get_Track_KerningFT_Renderer_ClassT1_BLEND_BLUE_SCALE
FT_Get_TrueType_Engine_TypeFT_Request_SizeT1_BLEND_BLUE_SHIFT
FT_Get_Var_Axis_FlagsFT_RoundFixT1_BLEND_BLUE_VALUES
FT_Get_Var_Blend_CoordinatesFT_Select_CharmapT1_BLEND_FAMILY_BLUES
FT_Get_Var_Design_CoordinatesFT_Select_SizeT1_BLEND_FAMILY_OTHER_BLUES
FT_Get_WinFNT_HeaderFT_Set_Char_SizeT1_BLEND_FORCE_BOLD
FT_GetFile_From_Mac_ATS_NameFT_Set_CharmapT1_BLEND_ITALIC_ANGLE
FT_GetFile_From_Mac_NameFT_Set_Debug_HookT1_BLEND_OTHER_BLUES
FT_GetFilePath_From_Mac_ATS_NameFT_Set_Default_PropertiesT1_BLEND_STANDARD_HEIGHT
FT_GLYPH_BBOX_GRIDFITFT_Set_MM_Blend_CoordinatesT1_BLEND_STANDARD_WIDTH
FT_GLYPH_BBOX_PIXELSFT_Set_MM_Design_CoordinatesT1_BLEND_STEM_SNAP_HEIGHTS
FT_GLYPH_BBOX_SUBPIXELSFT_Set_Named_InstanceT1_BLEND_STEM_SNAP_WIDTHS
FT_GLYPH_BBOX_TRUNCATEFT_Set_Pixel_SizesT1_BLEND_UNDERLINE_POSITION
FT_GLYPH_BBOX_UNSCALEDFT_Set_RendererT1_BLEND_UNDERLINE_THICKNESS
FT_GLYPH_FORMAT_BITMAPFT_Set_TransformT1_Blend_Flags
FT_GLYPH_FORMAT_COMPOSITEFT_Set_Var_Blend_CoordinatesT1_ENCODING_TYPE_ARRAY
FT_GLYPH_FORMAT_NONEFT_Set_Var_Design_CoordinatesT1_ENCODING_TYPE_EXPERT
FT_GLYPH_FORMAT_OUTLINEFT_SFNT_HEADT1_ENCODING_TYPE_ISOLATIN1
FT_GLYPH_FORMAT_PLOTTERFT_SFNT_HHEAT1_ENCODING_TYPE_NONE
FT_GLYPH_HFT_SFNT_MAXPT1_ENCODING_TYPE_STANDARD
FT_GlyphFT_SFNT_NAMES_HT1_EncodingType
FT_Glyph_BBox_ModeFT_SFNT_OS2T1_FontInfo
FT_Glyph_CopyFT_SFNT_PCLTT1_Private
FT_Glyph_FormatFT_SFNT_POSTTT_ADOBE_ID_CUSTOM
FT_Glyph_Get_CBoxFT_SFNT_VHEATT_ADOBE_ID_EXPERT
FT_Glyph_MetricsFT_Sfnt_Table_InfoTT_ADOBE_ID_LATIN_1
FT_Glyph_StrokeFT_Sfnt_TagTT_ADOBE_ID_STANDARD
FT_Glyph_StrokeBorderFT_SfntLangTagTT_ADOBE_ID_XXX
FT_Glyph_To_BitmapFT_SfntNameTT_APPLE_ID_DEFAULT
FT_Glyph_TransformFT_ShortTT_APPLE_ID_FULL_UNICODE
FT_GlyphRecFT_SIZE_REQUEST_TYPE_BBOXTT_APPLE_ID_ISO_10646
FT_GlyphSlotFT_SIZE_REQUEST_TYPE_CELLTT_APPLE_ID_UNICODE_1_1
FT_GlyphSlot_Own_BitmapFT_SIZE_REQUEST_TYPE_NOMINALTT_APPLE_ID_UNICODE_2_0
FT_GlyphSlotRecFT_SIZE_REQUEST_TYPE_REAL_DIMTT_APPLE_ID_UNICODE_32
FT_GX_VALIDATE_HFT_SIZE_REQUEST_TYPE_SCALESTT_APPLE_ID_VARIANT_SELECTOR
FT_GZIP_HFT_SIZES_HTT_APPLE_ID_XXX
FT_Gzip_UncompressFT_SinTT_Header
FT_HAS_COLORFT_SizeTT_HoriHeader
FT_HAS_FAST_GLYPHSFT_Size_InternalTT_INTERPRETER_VERSION_35
FT_HAS_FIXED_SIZESFT_Size_MetricsTT_INTERPRETER_VERSION_38
FT_HAS_GLYPH_NAMESFT_Size_RequestTT_INTERPRETER_VERSION_40
FT_HAS_HORIZONTALFT_Size_Request_TypeTT_INTERPRETER_VERSION_XXX
FT_HAS_KERNINGFT_Size_RequestRecTT_ISO_ID_10646
FT_HAS_MULTIPLE_MASTERSFT_SizeRecTT_ISO_ID_7BIT_ASCII
FT_HAS_VERTICALFT_Slot_InternalTT_ISO_ID_8859_1
FT_Has_PS_Glyph_NamesFT_SpanTT_ISO_ID_XXX
FT_HINTING_ADOBEFT_SpanFuncTT_MAC_ID_XXX
FT_HINTING_FREETYPEFT_STROKER_BORDER_LEFTTT_MAC_LANGID_XXX
FT_HINTING_XXXFT_STROKER_BORDER_RIGHTTT_MaxProfile
FT_IMAGE_HFT_STROKER_HTT_MS_ID_BIG_5
FT_IMAGE_TAGFT_STROKER_LINECAP_BUTTTT_MS_ID_JOHAB
FT_INCREMENTAL_HFT_STROKER_LINECAP_ROUNDTT_MS_ID_PRC
FT_IncrementalFT_STROKER_LINECAP_SQUARETT_MS_ID_SJIS
FT_Incremental_FreeGlyphDataFuncFT_STROKER_LINEJOIN_BEVELTT_MS_ID_SYMBOL_CS
FT_Incremental_FuncsRecFT_STROKER_LINEJOIN_MITERTT_MS_ID_UCS_4
FT_Incremental_GetGlyphDataFuncFT_STROKER_LINEJOIN_MITER_FIXEDTT_MS_ID_UNICODE_CS
FT_Incremental_GetGlyphMetricsFuncFT_STROKER_LINEJOIN_MITER_VARIABLETT_MS_ID_WANSUNG
FT_Incremental_InterfaceFT_STROKER_LINEJOIN_ROUNDTT_MS_ID_XXX
FT_Incremental_InterfaceRecFT_STYLE_FLAG_BOLDTT_MS_LANGID_XXX
FT_Incremental_MetricsFT_STYLE_FLAG_ITALICTT_NAME_ID_XXX
FT_Incremental_MetricsRecFT_STYLE_FLAG_XXXTT_OS2
FT_Init_FreeTypeFT_StreamTT_PCLT
FT_IntFT_Stream_CloseFuncTT_PLATFORM_ADOBE
FT_Int16FT_Stream_IoFuncTT_PLATFORM_APPLE_UNICODE
FT_Int32FT_Stream_OpenBzip2TT_PLATFORM_CUSTOM
FT_Int64FT_Stream_OpenGzipTT_PLATFORM_ISO
FT_IS_CID_KEYEDFT_Stream_OpenLZWTT_PLATFORM_MACINTOSH
FT_IS_FIXED_WIDTHFT_StreamDescTT_PLATFORM_MICROSOFT
FT_IS_NAMED_INSTANCEFT_StreamRecTT_PLATFORM_XXX
FT_IS_SCALABLEFT_StringTT_Postscript
FT_IS_SFNTFT_StrokerTT_UCR_XXX
FT_IS_TRICKYFT_Stroker_BeginSubPathTT_VertHeader
FT_IS_VARIATIONFT_Stroker_ConicTowarping
FT_KERNING_DEFAULTFT_Stroker_CubicTo
-
- - -
generated on Tue May 1 23:34:43 2018
- diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/docs/reference/ft2-parameter_tags.html b/extensions/gdx-freetype/jni/freetype-2.9.1/docs/reference/ft2-parameter_tags.html deleted file mode 100644 index b1d1e642d..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/docs/reference/ft2-parameter_tags.html +++ /dev/null @@ -1,232 +0,0 @@ - - - - -FreeType-2.9.1 API Reference - - - - - -

FreeType-2.9.1 API Reference

- -

Parameter Tags

-

Synopsis

- - - - - - - - -
FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY
FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY
FT_PARAM_TAG_INCREMENTAL
FT_PARAM_TAG_LCD_FILTER_WEIGHTS
FT_PARAM_TAG_RANDOM_SEED
FT_PARAM_TAG_STEM_DARKENING
FT_PARAM_TAG_UNPATENTED_HINTING
- - -

This section contains macros for the FT_Parameter structure that are used with various functions to activate some special functionality or different behaviour of various components of FreeType.

- -
-

FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY

-
-#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY \
-          FT_MAKE_TAG( 'i', 'g', 'p', 'f' )
-
-
-  /* this constant is deprecated */
-#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY \
-          FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY
-
- -

A tag for FT_Parameter to make FT_Open_Face ignore typographic family names in the ‘name’ table (introduced in OpenType version 1.4). Use this for backward compatibility with legacy systems that have a four-faces-per-family restriction.

- -

since

-

2.8

- -
-
- -
-

FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY

-
-#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY \
-          FT_MAKE_TAG( 'i', 'g', 'p', 's' )
-
-
-  /* this constant is deprecated */
-#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY \
-          FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY
-
- -

A tag for FT_Parameter to make FT_Open_Face ignore typographic subfamily names in the ‘name’ table (introduced in OpenType version 1.4). Use this for backward compatibility with legacy systems that have a four-faces-per-family restriction.

- -

since

-

2.8

- -
-
- -
-

FT_PARAM_TAG_INCREMENTAL

-
-#define FT_PARAM_TAG_INCREMENTAL \
-          FT_MAKE_TAG( 'i', 'n', 'c', 'r' )
-
- -

An FT_Parameter tag to be used with FT_Open_Face to indicate incremental glyph loading.

- -
-
- -
-

FT_PARAM_TAG_LCD_FILTER_WEIGHTS

-
-#define FT_PARAM_TAG_LCD_FILTER_WEIGHTS \
-          FT_MAKE_TAG( 'l', 'c', 'd', 'f' )
-
- -

An FT_Parameter tag to be used with FT_Face_Properties. The corresponding argument specifies the five LCD filter weights for a given face (if using FT_LOAD_TARGET_LCD, for example), overriding the global default values or the values set up with FT_Library_SetLcdFilterWeights.

- -

since

-

2.8

- -
-
- -
-

FT_PARAM_TAG_RANDOM_SEED

-
-#define FT_PARAM_TAG_RANDOM_SEED \
-          FT_MAKE_TAG( 's', 'e', 'e', 'd' )
-
- -

An FT_Parameter tag to be used with FT_Face_Properties. The corresponding 32bit signed integer argument overrides the font driver's random seed value with a face-specific one; see random-seed.

- -

since

-

2.8

- -
-
- -
-

FT_PARAM_TAG_STEM_DARKENING

-
-#define FT_PARAM_TAG_STEM_DARKENING \
-          FT_MAKE_TAG( 'd', 'a', 'r', 'k' )
-
- -

An FT_Parameter tag to be used with FT_Face_Properties. The corresponding Boolean argument specifies whether to apply stem darkening, overriding the global default values or the values set up with FT_Property_Set (see no-stem-darkening).

-

This is a passive setting that only takes effect if the font driver or autohinter honors it, which the CFF, Type 1, and CID drivers always do, but the autohinter only in ‘light’ hinting mode (as of version 2.9).

- -

since

-

2.8

- -
-
- -
-

FT_PARAM_TAG_UNPATENTED_HINTING

-
-#define FT_PARAM_TAG_UNPATENTED_HINTING \
-          FT_MAKE_TAG( 'u', 'n', 'p', 'a' )
-
- -

Deprecated, no effect.

-

Previously: A constant used as the tag of an FT_Parameter structure to indicate that unpatented methods only should be used by the TrueType bytecode interpreter for a typeface opened by FT_Open_Face.

- -
-
- - - diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/docs/reference/ft2-pcf_driver.html b/extensions/gdx-freetype/jni/freetype-2.9.1/docs/reference/ft2-pcf_driver.html deleted file mode 100644 index 2bc4c966f..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/docs/reference/ft2-pcf_driver.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - -FreeType-2.9.1 API Reference - - - - - -

FreeType-2.9.1 API Reference

- -

The PCF driver

- -

While FreeType's PCF driver doesn't expose API functions by itself, it is possible to control its behaviour with FT_Property_Set and FT_Property_Get. Right now, there is a single property no-long-family-names available if FreeType is compiled with PCF_CONFIG_OPTION_LONG_FAMILY_NAMES.

-

The PCF driver's module name is ‘pcf’.

- - - diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/docs/reference/ft2-properties.html b/extensions/gdx-freetype/jni/freetype-2.9.1/docs/reference/ft2-properties.html deleted file mode 100644 index 60f067a19..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/docs/reference/ft2-properties.html +++ /dev/null @@ -1,704 +0,0 @@ - - - - -FreeType-2.9.1 API Reference - - - - - -

FreeType-2.9.1 API Reference

- -

Driver properties

-

Synopsis

- - - - - - - - - -
FT_HINTING_XXXglyph-to-script-map
hinting-engineFT_AUTOHINTER_SCRIPT_XXX
no-stem-darkeningFT_Prop_GlyphToScriptMap
darkening-parametersfallback-script
random-seeddefault-script
no-long-family-namesincrease-x-height
TT_INTERPRETER_VERSION_XXXFT_Prop_IncreaseXHeight
interpreter-versionwarping
- - -

Driver modules can be controlled by setting and unsetting properties, using the functions FT_Property_Set and FT_Property_Get. This section documents the available properties, together with auxiliary macros and structures.

- -
-

FT_HINTING_XXX

-

Defined in FT_DRIVER_H (freetype/ftdriver.h).

-
-#define FT_HINTING_FREETYPE  0
-#define FT_HINTING_ADOBE     1
-
-  /* these constants (introduced in 2.4.12) are deprecated */
-#define FT_CFF_HINTING_FREETYPE  FT_HINTING_FREETYPE
-#define FT_CFF_HINTING_ADOBE     FT_HINTING_ADOBE
-
- -

A list of constants used for the hinting-engine property to select the hinting engine for CFF, Type 1, and CID fonts.

- -

values

- - - -
FT_HINTING_FREETYPE -

Use the old FreeType hinting engine.

-
FT_HINTING_ADOBE -

Use the hinting engine contributed by Adobe.

-
- -

since

-

2.9

- -
-
- -
-

hinting-engine

- -

Thanks to Adobe, which contributed a new hinting (and parsing) engine, an application can select between ‘freetype’ and ‘adobe’ if compiled with CFF_CONFIG_OPTION_OLD_ENGINE. If this configuration macro isn't defined, ‘hinting-engine’ does nothing.

-

The same holds for the Type 1 and CID modules if compiled with T1_CONFIG_OPTION_OLD_ENGINE.

-

For the ‘cff’ module, the default engine is ‘freetype’ if CFF_CONFIG_OPTION_OLD_ENGINE is defined, and ‘adobe’ otherwise.

-

For both the ‘type1’ and ‘t1cid’ modules, the default engine is ‘freetype’ if T1_CONFIG_OPTION_OLD_ENGINE is defined, and ‘adobe’ otherwise.

-

The following example code demonstrates how to select Adobe's hinting engine for the ‘cff’ module (omitting the error handling).

-
-  FT_Library  library;
-  FT_UInt     hinting_engine = FT_CFF_HINTING_ADOBE;
-
-
-  FT_Init_FreeType( &library );
-
-  FT_Property_Set( library, "cff",
-                            "hinting-engine", &hinting_engine );
-
- -

note

-

This property can be used with FT_Property_Get also.

-

This property can be set via the ‘FREETYPE_PROPERTIES’ environment variable (using values ‘adobe’ or ‘freetype’).

- -

since

-

2.4.12 (for ‘cff’ module)

-

2.9 (for ‘type1’ and ‘t1cid’ modules)

- -
-
- -
-

no-stem-darkening

- -

All glyphs that pass through the auto-hinter will be emboldened unless this property is set to TRUE. The same is true for the CFF, Type 1, and CID font modules if the ‘Adobe’ engine is selected (which is the default).

-

Stem darkening emboldens glyphs at smaller sizes to make them more readable on common low-DPI screens when using linear alpha blending and gamma correction, see FT_Render_Glyph. When not using linear alpha blending and gamma correction, glyphs will appear heavy and fuzzy!

-

Gamma correction essentially lightens fonts since shades of grey are shifted to higher pixel values (= higher brightness) to match the original intention to the reality of our screens. The side-effect is that glyphs ‘thin out’. Mac OS X and Adobe's proprietary font rendering library implement a counter-measure: stem darkening at smaller sizes where shades of gray dominate. By emboldening a glyph slightly in relation to its pixel size, individual pixels get higher coverage of filled-in outlines and are therefore ‘blacker’. This counteracts the ‘thinning out’ of glyphs, making text remain readable at smaller sizes.

-

By default, the Adobe engines for CFF, Type 1, and CID fonts darken stems at smaller sizes, regardless of hinting, to enhance contrast. Setting this property, stem darkening gets switched off.

-

For the auto-hinter, stem-darkening is experimental currently and thus switched off by default (this is, ‘no-stem-darkening’ is set to TRUE by default). Total consistency with the CFF driver is not achieved right now because the emboldening method differs and glyphs must be scaled down on the Y-axis to keep outline points inside their precomputed blue zones. The smaller the size (especially 9ppem and down), the higher the loss of emboldening versus the CFF driver.

-

Note that stem darkening is never applied if FT_LOAD_NO_SCALE is set.

-
-  FT_Library  library;
-  FT_Bool     no_stem_darkening = TRUE;
-
-
-  FT_Init_FreeType( &library );
-
-  FT_Property_Set( library, "cff",
-                            "no-stem-darkening", &no_stem_darkening );
-
- -

note

-

This property can be used with FT_Property_Get also.

-

This property can be set via the ‘FREETYPE_PROPERTIES’ environment variable (using values 1 and 0 for ‘on’ and ‘off’, respectively). It can also be set per face using FT_Face_Properties with FT_PARAM_TAG_STEM_DARKENING.

- -

since

-

2.4.12 (for ‘cff’ module)

-

2.6.2 (for ‘autofitter’ module)

-

2.9 (for ‘type1’ and ‘t1cid’ modules)

- -
-
- -
-

darkening-parameters

- -

By default, the Adobe hinting engine, as used by the CFF, Type 1, and CID font drivers, darkens stems as follows (if the ‘no-stem-darkening’ property isn't set):

-
-  stem width <= 0.5px:   darkening amount = 0.4px
-  stem width  = 1px:     darkening amount = 0.275px
-  stem width  = 1.667px: darkening amount = 0.275px
-  stem width >= 2.333px: darkening amount = 0px
-
-

and piecewise linear in-between. At configuration time, these four control points can be set with the macro ‘CFF_CONFIG_OPTION_DARKENING_PARAMETERS’; the CFF, Type 1, and CID drivers share these values. At runtime, the control points can be changed using the ‘darkening-parameters’ property, as the following example demonstrates for the Type 1 driver.

-
-  FT_Library  library;
-  FT_Int      darken_params[8] = {  500, 300,   // x1, y1
-                                   1000, 200,   // x2, y2
-                                   1500, 100,   // x3, y3
-                                   2000,   0 }; // x4, y4
-
-
-  FT_Init_FreeType( &library );
-
-  FT_Property_Set( library, "type1",
-                            "darkening-parameters", darken_params );
-
-

The x values give the stem width, and the y values the darkening amount. The unit is 1000th of pixels. All coordinate values must be positive; the x values must be monotonically increasing; the y values must be monotonically decreasing and smaller than or equal to 500 (corresponding to half a pixel); the slope of each linear piece must be shallower than -1 (e.g., -.4).

-

The auto-hinter provides this property, too, as an experimental feature. See no-stem-darkening for more.

- -

note

-

This property can be used with FT_Property_Get also.

-

This property can be set via the ‘FREETYPE_PROPERTIES’ environment variable, using eight comma-separated integers without spaces. Here the above example, using ‘\’ to break the line for readability.

-
-  FREETYPE_PROPERTIES=\
-  type1:darkening-parameters=500,300,1000,200,1500,100,2000,0
-
- -

since

-

2.5.1 (for ‘cff’ module)

-

2.6.2 (for ‘autofitter’ module)

-

2.9 (for ‘type1’ and ‘t1cid’ modules)

- -
-
- -
-

random-seed

- -

By default, the seed value for the CFF ‘random’ operator and the similar ‘0 28 callothersubr pop’ command for the Type 1 and CID drivers is set to a random value. However, mainly for debugging purposes, it is often necessary to use a known value as a seed so that the pseudo-random number sequences generated by ‘random’ are repeatable.

-

The ‘random-seed’ property does that. Its argument is a signed 32bit integer; if the value is zero or negative, the seed given by the ‘intitialRandomSeed’ private DICT operator in a CFF file gets used (or a default value if there is no such operator). If the value is positive, use it instead of ‘initialRandomSeed’, which is consequently ignored.

- -

note

-

This property can be set via the ‘FREETYPE_PROPERTIES’ environment variable. It can also be set per face using FT_Face_Properties with FT_PARAM_TAG_RANDOM_SEED.

- -

since

-

2.8 (for ‘cff’ module)

-

2.9 (for ‘type1’ and ‘t1cid’ modules)

- -
-
- -
-

no-long-family-names

- -

If PCF_CONFIG_OPTION_LONG_FAMILY_NAMES is active while compiling FreeType, the PCF driver constructs long family names.

-

There are many PCF fonts just called ‘Fixed’ which look completely different, and which have nothing to do with each other. When selecting ‘Fixed’ in KDE or Gnome one gets results that appear rather random, the style changes often if one changes the size and one cannot select some fonts at all. The improve this situation, the PCF module prepends the foundry name (plus a space) to the family name. It also checks whether there are ‘wide’ characters; all put together, family names like ‘Sony Fixed’ or ‘Misc Fixed Wide’ are constructed.

-

If ‘no-long-family-names’ is set, this feature gets switched off.

-
-  FT_Library  library;
-  FT_Bool     no_long_family_names = TRUE;
-
-
-  FT_Init_FreeType( &library );
-
-  FT_Property_Set( library, "pcf",
-                            "no-long-family-names",
-                            &no_long_family_names );
-
- -

note

-

This property can be used with FT_Property_Get also.

-

This property can be set via the ‘FREETYPE_PROPERTIES’ environment variable (using values 1 and 0 for ‘on’ and ‘off’, respectively).

- -

since

-

2.8

- -
-
- -
-

TT_INTERPRETER_VERSION_XXX

-

Defined in FT_DRIVER_H (freetype/ftdriver.h).

-
-#define TT_INTERPRETER_VERSION_35  35
-#define TT_INTERPRETER_VERSION_38  38
-#define TT_INTERPRETER_VERSION_40  40
-
- -

A list of constants used for the interpreter-version property to select the hinting engine for Truetype fonts.

-

The numeric value in the constant names represents the version number as returned by the ‘GETINFO’ bytecode instruction.

- -

values

- - - - -
TT_INTERPRETER_VERSION_35 -

Version 35 corresponds to MS rasterizer v.1.7 as used e.g. in Windows 98; only grayscale and B/W rasterizing is supported.

-
TT_INTERPRETER_VERSION_38 -

Version 38 corresponds to MS rasterizer v.1.9; it is roughly equivalent to the hinting provided by DirectWrite ClearType (as can be found, for example, in the Internet Explorer 9 running on Windows 7). It is used in FreeType to select the ‘Infinality’ subpixel hinting code. The code may be removed in a future version.

-
TT_INTERPRETER_VERSION_40 -

Version 40 corresponds to MS rasterizer v.2.1; it is roughly equivalent to the hinting provided by DirectWrite ClearType (as can be found, for example, in Microsoft's Edge Browser on Windows 10). It is used in FreeType to select the ‘minimal’ subpixel hinting code, a stripped-down and higher performance version of the ‘Infinality’ code.

-
- -

note

-

This property controls the behaviour of the bytecode interpreter and thus how outlines get hinted. It does not control how glyph get rasterized! In particular, it does not control subpixel color filtering.

-

If FreeType has not been compiled with the configuration option TT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version 38 or 40 causes an ‘FT_Err_Unimplemented_Feature’ error.

-

Depending on the graphics framework, Microsoft uses different bytecode and rendering engines. As a consequence, the version numbers returned by a call to the ‘GETINFO’ bytecode instruction are more convoluted than desired.

-

Here are two tables that try to shed some light on the possible values for the MS rasterizer engine, together with the additional features introduced by it.

-
-  GETINFO framework               version feature
-  -------------------------------------------------------------------
-      3   GDI (Win 3.1),            v1.0  16-bit, first version
-          TrueImage
-     33   GDI (Win NT 3.1),         v1.5  32-bit
-          HP Laserjet
-     34   GDI (Win 95)              v1.6  font smoothing,
-                                          new SCANTYPE opcode
-     35   GDI (Win 98/2000)         v1.7  (UN)SCALED_COMPONENT_OFFSET
-                                            bits in composite glyphs
-     36   MGDI (Win CE 2)           v1.6+ classic ClearType
-     37   GDI (XP and later),       v1.8  ClearType
-          GDI+ old (before Vista)
-     38   GDI+ old (Vista, Win 7),  v1.9  subpixel ClearType,
-          WPF                             Y-direction ClearType,
-                                          additional error checking
-     39   DWrite (before Win 8)     v2.0  subpixel ClearType flags
-                                            in GETINFO opcode,
-                                          bug fixes
-     40   GDI+ (after Win 7),       v2.1  Y-direction ClearType flag
-          DWrite (Win 8)                    in GETINFO opcode,
-                                          Gray ClearType
-
-

The ‘version’ field gives a rough orientation only, since some applications provided certain features much earlier (as an example, Microsoft Reader used subpixel and Y-direction ClearType already in Windows 2000). Similarly, updates to a given framework might include improved hinting support.

-
-   version   sampling          rendering        comment
-            x        y       x           y
-  --------------------------------------------------------------
-    v1.0   normal  normal  B/W           B/W    bi-level
-    v1.6   high    high    gray          gray   grayscale
-    v1.8   high    normal  color-filter  B/W    (GDI) ClearType
-    v1.9   high    high    color-filter  gray   Color ClearType
-    v2.1   high    normal  gray          B/W    Gray ClearType
-    v2.1   high    high    gray          gray   Gray ClearType
-
-

Color and Gray ClearType are the two available variants of ‘Y-direction ClearType’, meaning grayscale rasterization along the Y-direction; the name used in the TrueType specification for this feature is ‘symmetric smoothing’. ‘Classic ClearType’ is the original algorithm used before introducing a modified version in Win XP. Another name for v1.6's grayscale rendering is ‘font smoothing’, and ‘Color ClearType’ is sometimes also called ‘DWrite ClearType’. To differentiate between today's Color ClearType and the earlier ClearType variant with B/W rendering along the vertical axis, the latter is sometimes called ‘GDI ClearType’.

-

‘Normal’ and ‘high’ sampling describe the (virtual) resolution to access the rasterized outline after the hinting process. ‘Normal’ means 1 sample per grid line (i.e., B/W). In the current Microsoft implementation, ‘high’ means an extra virtual resolution of 16x16 (or 16x1) grid lines per pixel for bytecode instructions like ‘MIRP’. After hinting, these 16 grid lines are mapped to 6x5 (or 6x1) grid lines for color filtering if Color ClearType is activated.

-

Note that ‘Gray ClearType’ is essentially the same as v1.6's grayscale rendering. However, the GETINFO instruction handles it differently: v1.6 returns bit 12 (hinting for grayscale), while v2.1 returns bits 13 (hinting for ClearType), 18 (symmetrical smoothing), and 19 (Gray ClearType). Also, this mode respects bits 2 and 3 for the version 1 gasp table exclusively (like Color ClearType), while v1.6 only respects the values of version 0 (bits 0 and 1).

-

Keep in mind that the features of the above interpreter versions might not map exactly to FreeType features or behavior because it is a fundamentally different library with different internals.

- -
-
- -
-

interpreter-version

- -

Currently, three versions are available, two representing the bytecode interpreter with subpixel hinting support (old ‘Infinality’ code and new stripped-down and higher performance ‘minimal’ code) and one without, respectively. The default is subpixel support if TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined, and no subpixel support otherwise (since it isn't available then).

-

If subpixel hinting is on, many TrueType bytecode instructions behave differently compared to B/W or grayscale rendering (except if ‘native ClearType’ is selected by the font). Microsoft's main idea is to render at a much increased horizontal resolution, then sampling down the created output to subpixel precision. However, many older fonts are not suited to this and must be specially taken care of by applying (hardcoded) tweaks in Microsoft's interpreter.

-

Details on subpixel hinting and some of the necessary tweaks can be found in Greg Hitchcock's whitepaper at ‘https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx’. Note that FreeType currently doesn't really ‘subpixel hint’ (6x1, 6x2, or 6x5 supersampling) like discussed in the paper. Depending on the chosen interpreter, it simply ignores instructions on vertical stems to arrive at very similar results.

-

The following example code demonstrates how to deactivate subpixel hinting (omitting the error handling).

-
-  FT_Library  library;
-  FT_Face     face;
-  FT_UInt     interpreter_version = TT_INTERPRETER_VERSION_35;
-
-
-  FT_Init_FreeType( &library );
-
-  FT_Property_Set( library, "truetype",
-                            "interpreter-version",
-                            &interpreter_version );
-
- -

note

-

This property can be used with FT_Property_Get also.

-

This property can be set via the ‘FREETYPE_PROPERTIES’ environment variable (using values ‘35’, ‘38’, or ‘40’).

- -

since

-

2.5

- -
-
- -
-

glyph-to-script-map

- -

Experimental only

-

The auto-hinter provides various script modules to hint glyphs. Examples of supported scripts are Latin or CJK. Before a glyph is auto-hinted, the Unicode character map of the font gets examined, and the script is then determined based on Unicode character ranges, see below.

-

OpenType fonts, however, often provide much more glyphs than character codes (small caps, superscripts, ligatures, swashes, etc.), to be controlled by so-called ‘features’. Handling OpenType features can be quite complicated and thus needs a separate library on top of FreeType.

-

The mapping between glyph indices and scripts (in the auto-hinter sense, see the FT_AUTOHINTER_SCRIPT_XXX values) is stored as an array with ‘num_glyphs’ elements, as found in the font's FT_Face structure. The ‘glyph-to-script-map’ property returns a pointer to this array, which can be modified as needed. Note that the modification should happen before the first glyph gets processed by the auto-hinter so that the global analysis of the font shapes actually uses the modified mapping.

-

The following example code demonstrates how to access it (omitting the error handling).

-
-  FT_Library                library;
-  FT_Face                   face;
-  FT_Prop_GlyphToScriptMap  prop;
-
-
-  FT_Init_FreeType( &library );
-  FT_New_Face( library, "foo.ttf", 0, &face );
-
-  prop.face = face;
-
-  FT_Property_Get( library, "autofitter",
-                            "glyph-to-script-map", &prop );
-
-  // adjust `prop.map' as needed right here
-
-  FT_Load_Glyph( face, ..., FT_LOAD_FORCE_AUTOHINT );
-
- -

since

-

2.4.11

- -
-
- -
-

FT_AUTOHINTER_SCRIPT_XXX

-

Defined in FT_DRIVER_H (freetype/ftdriver.h).

-
-#define FT_AUTOHINTER_SCRIPT_NONE   0
-#define FT_AUTOHINTER_SCRIPT_LATIN  1
-#define FT_AUTOHINTER_SCRIPT_CJK    2
-#define FT_AUTOHINTER_SCRIPT_INDIC  3
-
- -

Experimental only

-

A list of constants used for the glyph-to-script-map property to specify the script submodule the auto-hinter should use for hinting a particular glyph.

- -

values

- - - - - -
FT_AUTOHINTER_SCRIPT_NONE -

Don't auto-hint this glyph.

-
FT_AUTOHINTER_SCRIPT_LATIN -

Apply the latin auto-hinter. For the auto-hinter, ‘latin’ is a very broad term, including Cyrillic and Greek also since characters from those scripts share the same design constraints.

-

By default, characters from the following Unicode ranges are assigned to this submodule.

-
-  U+0020 - U+007F  // Basic Latin (no control characters)
-  U+00A0 - U+00FF  // Latin-1 Supplement (no control characters)
-  U+0100 - U+017F  // Latin Extended-A
-  U+0180 - U+024F  // Latin Extended-B
-  U+0250 - U+02AF  // IPA Extensions
-  U+02B0 - U+02FF  // Spacing Modifier Letters
-  U+0300 - U+036F  // Combining Diacritical Marks
-  U+0370 - U+03FF  // Greek and Coptic
-  U+0400 - U+04FF  // Cyrillic
-  U+0500 - U+052F  // Cyrillic Supplement
-  U+1D00 - U+1D7F  // Phonetic Extensions
-  U+1D80 - U+1DBF  // Phonetic Extensions Supplement
-  U+1DC0 - U+1DFF  // Combining Diacritical Marks Supplement
-  U+1E00 - U+1EFF  // Latin Extended Additional
-  U+1F00 - U+1FFF  // Greek Extended
-  U+2000 - U+206F  // General Punctuation
-  U+2070 - U+209F  // Superscripts and Subscripts
-  U+20A0 - U+20CF  // Currency Symbols
-  U+2150 - U+218F  // Number Forms
-  U+2460 - U+24FF  // Enclosed Alphanumerics
-  U+2C60 - U+2C7F  // Latin Extended-C
-  U+2DE0 - U+2DFF  // Cyrillic Extended-A
-  U+2E00 - U+2E7F  // Supplemental Punctuation
-  U+A640 - U+A69F  // Cyrillic Extended-B
-  U+A720 - U+A7FF  // Latin Extended-D
-  U+FB00 - U+FB06  // Alphab. Present. Forms (Latin Ligatures)
- U+1D400 - U+1D7FF // Mathematical Alphanumeric Symbols
- U+1F100 - U+1F1FF // Enclosed Alphanumeric Supplement
-
-

-
FT_AUTOHINTER_SCRIPT_CJK -

Apply the CJK auto-hinter, covering Chinese, Japanese, Korean, old Vietnamese, and some other scripts.

-

By default, characters from the following Unicode ranges are assigned to this submodule.

-
-  U+1100 - U+11FF  // Hangul Jamo
-  U+2E80 - U+2EFF  // CJK Radicals Supplement
-  U+2F00 - U+2FDF  // Kangxi Radicals
-  U+2FF0 - U+2FFF  // Ideographic Description Characters
-  U+3000 - U+303F  // CJK Symbols and Punctuation
-  U+3040 - U+309F  // Hiragana
-  U+30A0 - U+30FF  // Katakana
-  U+3100 - U+312F  // Bopomofo
-  U+3130 - U+318F  // Hangul Compatibility Jamo
-  U+3190 - U+319F  // Kanbun
-  U+31A0 - U+31BF  // Bopomofo Extended
-  U+31C0 - U+31EF  // CJK Strokes
-  U+31F0 - U+31FF  // Katakana Phonetic Extensions
-  U+3200 - U+32FF  // Enclosed CJK Letters and Months
-  U+3300 - U+33FF  // CJK Compatibility
-  U+3400 - U+4DBF  // CJK Unified Ideographs Extension A
-  U+4DC0 - U+4DFF  // Yijing Hexagram Symbols
-  U+4E00 - U+9FFF  // CJK Unified Ideographs
-  U+A960 - U+A97F  // Hangul Jamo Extended-A
-  U+AC00 - U+D7AF  // Hangul Syllables
-  U+D7B0 - U+D7FF  // Hangul Jamo Extended-B
-  U+F900 - U+FAFF  // CJK Compatibility Ideographs
-  U+FE10 - U+FE1F  // Vertical forms
-  U+FE30 - U+FE4F  // CJK Compatibility Forms
-  U+FF00 - U+FFEF  // Halfwidth and Fullwidth Forms
- U+1B000 - U+1B0FF // Kana Supplement
- U+1D300 - U+1D35F // Tai Xuan Hing Symbols
- U+1F200 - U+1F2FF // Enclosed Ideographic Supplement
- U+20000 - U+2A6DF // CJK Unified Ideographs Extension B
- U+2A700 - U+2B73F // CJK Unified Ideographs Extension C
- U+2B740 - U+2B81F // CJK Unified Ideographs Extension D
- U+2F800 - U+2FA1F // CJK Compatibility Ideographs Supplement
-
-

-
FT_AUTOHINTER_SCRIPT_INDIC -

Apply the indic auto-hinter, covering all major scripts from the Indian sub-continent and some other related scripts like Thai, Lao, or Tibetan.

-

By default, characters from the following Unicode ranges are assigned to this submodule.

-
-  U+0900 - U+0DFF  // Indic Range
-  U+0F00 - U+0FFF  // Tibetan
-  U+1900 - U+194F  // Limbu
-  U+1B80 - U+1BBF  // Sundanese
-  U+A800 - U+A82F  // Syloti Nagri
-  U+ABC0 - U+ABFF  // Meetei Mayek
- U+11800 - U+118DF // Sharada
-
-

Note that currently Indic support is rudimentary only, missing blue zone support.

-
- -

since

-

2.4.11

- -
-
- -
-

FT_Prop_GlyphToScriptMap

-

Defined in FT_DRIVER_H (freetype/ftdriver.h).

-
-  typedef struct  FT_Prop_GlyphToScriptMap_
-  {
-    FT_Face     face;
-    FT_UShort*  map;
-
-  } FT_Prop_GlyphToScriptMap;
-
- -

Experimental only

-

The data exchange structure for the glyph-to-script-map property.

- -

since

-

2.4.11

- -
-
- -
-

fallback-script

- -

Experimental only

-

If no auto-hinter script module can be assigned to a glyph, a fallback script gets assigned to it (see also the glyph-to-script-map property). By default, this is FT_AUTOHINTER_SCRIPT_CJK. Using the ‘fallback-script’ property, this fallback value can be changed.

-
-  FT_Library  library;
-  FT_UInt     fallback_script = FT_AUTOHINTER_SCRIPT_NONE;
-
-
-  FT_Init_FreeType( &library );
-
-  FT_Property_Set( library, "autofitter",
-                            "fallback-script", &fallback_script );
-
- -

note

-

This property can be used with FT_Property_Get also.

-

It's important to use the right timing for changing this value: The creation of the glyph-to-script map that eventually uses the fallback script value gets triggered either by setting or reading a face-specific property like glyph-to-script-map, or by auto-hinting any glyph from that face. In particular, if you have already created an FT_Face structure but not loaded any glyph (using the auto-hinter), a change of the fallback script will affect this face.

- -

since

-

2.4.11

- -
-
- -
-

default-script

- -

Experimental only

-

If FreeType gets compiled with FT_CONFIG_OPTION_USE_HARFBUZZ to make the HarfBuzz library access OpenType features for getting better glyph coverages, this property sets the (auto-fitter) script to be used for the default (OpenType) script data of a font's GSUB table. Features for the default script are intended for all scripts not explicitly handled in GSUB; an example is a ‘dlig’ feature, containing the combination of the characters ‘T’, ‘E’, and ‘L’ to form a ‘TEL’ ligature.

-

By default, this is FT_AUTOHINTER_SCRIPT_LATIN. Using the ‘default-script’ property, this default value can be changed.

-
-  FT_Library  library;
-  FT_UInt     default_script = FT_AUTOHINTER_SCRIPT_NONE;
-
-
-  FT_Init_FreeType( &library );
-
-  FT_Property_Set( library, "autofitter",
-                            "default-script", &default_script );
-
- -

note

-

This property can be used with FT_Property_Get also.

-

It's important to use the right timing for changing this value: The creation of the glyph-to-script map that eventually uses the default script value gets triggered either by setting or reading a face-specific property like glyph-to-script-map, or by auto-hinting any glyph from that face. In particular, if you have already created an FT_Face structure but not loaded any glyph (using the auto-hinter), a change of the default script will affect this face.

- -

since

-

2.5.3

- -
-
- -
-

increase-x-height

- -

For ppem values in the range 6 <= ppem <= ‘increase-x-height’, round up the font's x height much more often than normally. If the value is set to 0, which is the default, this feature is switched off. Use this property to improve the legibility of small font sizes if necessary.

-
-  FT_Library               library;
-  FT_Face                  face;
-  FT_Prop_IncreaseXHeight  prop;
-
-
-  FT_Init_FreeType( &library );
-  FT_New_Face( library, "foo.ttf", 0, &face );
-  FT_Set_Char_Size( face, 10 * 64, 0, 72, 0 );
-
-  prop.face  = face;
-  prop.limit = 14;
-
-  FT_Property_Set( library, "autofitter",
-                            "increase-x-height", &prop );
-
- -

note

-

This property can be used with FT_Property_Get also.

-

Set this value right after calling FT_Set_Char_Size, but before loading any glyph (using the auto-hinter).

- -

since

-

2.4.11

- -
-
- -
-

FT_Prop_IncreaseXHeight

-

Defined in FT_DRIVER_H (freetype/ftdriver.h).

-
-  typedef struct  FT_Prop_IncreaseXHeight_
-  {
-    FT_Face  face;
-    FT_UInt  limit;
-
-  } FT_Prop_IncreaseXHeight;
-
- -

The data exchange structure for the increase-x-height property.

- -
-
- -
-

warping

- -

Experimental only

-

If FreeType gets compiled with option AF_CONFIG_OPTION_USE_WARPER to activate the warp hinting code in the auto-hinter, this property switches warping on and off.

-

Warping only works in ‘normal’ auto-hinting mode replacing it. The idea of the code is to slightly scale and shift a glyph along the non-hinted dimension (which is usually the horizontal axis) so that as much of its segments are aligned (more or less) to the grid. To find out a glyph's optimal scaling and shifting value, various parameter combinations are tried and scored.

-

By default, warping is off. The example below shows how to switch on warping (omitting the error handling).

-
-  FT_Library  library;
-  FT_Bool     warping = 1;
-
-
-  FT_Init_FreeType( &library );
-
-  FT_Property_Set( library, "autofitter",
-                            "warping", &warping );
-
- -

note

-

This property can be used with FT_Property_Get also.

-

This property can be set via the ‘FREETYPE_PROPERTIES’ environment variable (using values 1 and 0 for ‘on’ and ‘off’, respectively).

-

The warping code can also change advance widths. Have a look at the ‘lsb_delta’ and ‘rsb_delta’ fields in the FT_GlyphSlotRec structure for details on improving inter-glyph distances while rendering.

-

Since warping is a global property of the auto-hinter it is best to change its value before rendering any face. Otherwise, you should reload all faces that get auto-hinted in ‘normal’ hinting mode.

- -

since

-

2.6

- -
-
- - - diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/docs/reference/ft2-t1_cid_driver.html b/extensions/gdx-freetype/jni/freetype-2.9.1/docs/reference/ft2-t1_cid_driver.html deleted file mode 100644 index a255eeb48..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/docs/reference/ft2-t1_cid_driver.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - -FreeType-2.9.1 API Reference - - - - - -

FreeType-2.9.1 API Reference

- -

The Type 1 and CID drivers

- -

It is possible to control the behaviour of FreeType's Type 1 and Type 1 CID drivers with FT_Property_Set and FT_Property_Get.

-

Behind the scenes, both drivers use the Adobe CFF engine for hinting; however, the used properties must be specified separately.

-

The Type 1 driver's module name is ‘type1’; the CID driver's module name is ‘t1cid’.

-

Available properties are hinting-engine, no-stem-darkening, darkening-parameters, and random-seed, as documented in the ‘Driver properties’ section.

-

Please see the ‘The CFF driver’ section for more details on the new hinting engine.

- - - diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/docs/reference/ft2-truetype_tables.html b/extensions/gdx-freetype/jni/freetype-2.9.1/docs/reference/ft2-truetype_tables.html deleted file mode 100644 index 9cddc35c9..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/docs/reference/ft2-truetype_tables.html +++ /dev/null @@ -1,1869 +0,0 @@ - - - - -FreeType-2.9.1 API Reference - - - - - -

FreeType-2.9.1 API Reference

- -

TrueType Tables

-

Synopsis

- - - - - - - - - - - -
TT_HeaderFT_Load_Sfnt_TableTT_MAC_ID_XXX
TT_HoriHeaderFT_Sfnt_Table_InfoTT_ISO_ID_XXX
TT_VertHeader TT_MS_ID_XXX
TT_OS2FT_Get_CMap_Language_IDTT_ADOBE_ID_XXX
TT_PostscriptFT_Get_CMap_FormatTT_MAC_LANGID_XXX
TT_PCLT TT_MS_LANGID_XXX
TT_MaxProfileFT_PARAM_TAG_UNPATENTED_HINTINGTT_NAME_ID_XXX
  TT_UCR_XXX
FT_Sfnt_TagTT_PLATFORM_XXX
FT_Get_Sfnt_TableTT_APPLE_ID_XXX
- - -

This section contains definitions of some basic tables specific to TrueType and OpenType as well as some routines used to access and process them.

- -
-

TT_Header

-

Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).

-
-  typedef struct  TT_Header_
-  {
-    FT_Fixed   Table_Version;
-    FT_Fixed   Font_Revision;
-
-    FT_Long    CheckSum_Adjust;
-    FT_Long    Magic_Number;
-
-    FT_UShort  Flags;
-    FT_UShort  Units_Per_EM;
-
-    FT_Long    Created [2];
-    FT_Long    Modified[2];
-
-    FT_Short   xMin;
-    FT_Short   yMin;
-    FT_Short   xMax;
-    FT_Short   yMax;
-
-    FT_UShort  Mac_Style;
-    FT_UShort  Lowest_Rec_PPEM;
-
-    FT_Short   Font_Direction;
-    FT_Short   Index_To_Loc_Format;
-    FT_Short   Glyph_Data_Format;
-
-  } TT_Header;
-
- -

A structure to model a TrueType font header table. All fields follow the OpenType specification.

- -
-
- -
-

TT_HoriHeader

-

Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).

-
-  typedef struct  TT_HoriHeader_
-  {
-    FT_Fixed   Version;
-    FT_Short   Ascender;
-    FT_Short   Descender;
-    FT_Short   Line_Gap;
-
-    FT_UShort  advance_Width_Max;      /* advance width maximum */
-
-    FT_Short   min_Left_Side_Bearing;  /* minimum left-sb       */
-    FT_Short   min_Right_Side_Bearing; /* minimum right-sb      */
-    FT_Short   xMax_Extent;            /* xmax extents          */
-    FT_Short   caret_Slope_Rise;
-    FT_Short   caret_Slope_Run;
-    FT_Short   caret_Offset;
-
-    FT_Short   Reserved[4];
-
-    FT_Short   metric_Data_Format;
-    FT_UShort  number_Of_HMetrics;
-
-    /* The following fields are not defined by the OpenType specification */
-    /* but they are used to connect the metrics header to the relevant    */
-    /* `hmtx' table.                                                      */
-
-    void*      long_metrics;
-    void*      short_metrics;
-
-  } TT_HoriHeader;
-
- -

A structure to model a TrueType horizontal header, the ‘hhea’ table, as well as the corresponding horizontal metrics table, ‘hmtx’.

- -

fields

- - - - - - - - - - - - - - - - - -
Version -

The table version.

-
Ascender -

The font's ascender, i.e., the distance from the baseline to the top-most of all glyph points found in the font.

-

This value is invalid in many fonts, as it is usually set by the font designer, and often reflects only a portion of the glyphs found in the font (maybe ASCII).

-

You should use the ‘sTypoAscender’ field of the ‘OS/2’ table instead if you want the correct one.

-
Descender -

The font's descender, i.e., the distance from the baseline to the bottom-most of all glyph points found in the font. It is negative.

-

This value is invalid in many fonts, as it is usually set by the font designer, and often reflects only a portion of the glyphs found in the font (maybe ASCII).

-

You should use the ‘sTypoDescender’ field of the ‘OS/2’ table instead if you want the correct one.

-
Line_Gap -

The font's line gap, i.e., the distance to add to the ascender and descender to get the BTB, i.e., the baseline-to-baseline distance for the font.

-
advance_Width_Max -

This field is the maximum of all advance widths found in the font. It can be used to compute the maximum width of an arbitrary string of text.

-
min_Left_Side_Bearing -

The minimum left side bearing of all glyphs within the font.

-
min_Right_Side_Bearing -

The minimum right side bearing of all glyphs within the font.

-
xMax_Extent -

The maximum horizontal extent (i.e., the ‘width’ of a glyph's bounding box) for all glyphs in the font.

-
caret_Slope_Rise -

The rise coefficient of the cursor's slope of the cursor (slope=rise/run).

-
caret_Slope_Run -

The run coefficient of the cursor's slope.

-
caret_Offset -

The cursor's offset for slanted fonts.

-
Reserved -

8 reserved bytes.

-
metric_Data_Format -

Always 0.

-
number_Of_HMetrics -

Number of HMetrics entries in the ‘hmtx’ table -- this value can be smaller than the total number of glyphs in the font.

-
long_metrics -

A pointer into the ‘hmtx’ table.

-
short_metrics -

A pointer into the ‘hmtx’ table.

-
- -

note

-

For an OpenType variation font, the values of the following fields can change after a call to FT_Set_Var_Design_Coordinates (and friends) if the font contains an ‘MVAR’ table: ‘caret_Slope_Rise’, ‘caret_Slope_Run’, and ‘caret_Offset’.

- -
-
- -
-

TT_VertHeader

-

Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).

-
-  typedef struct  TT_VertHeader_
-  {
-    FT_Fixed   Version;
-    FT_Short   Ascender;
-    FT_Short   Descender;
-    FT_Short   Line_Gap;
-
-    FT_UShort  advance_Height_Max;      /* advance height maximum */
-
-    FT_Short   min_Top_Side_Bearing;    /* minimum top-sb          */
-    FT_Short   min_Bottom_Side_Bearing; /* minimum bottom-sb       */
-    FT_Short   yMax_Extent;             /* ymax extents            */
-    FT_Short   caret_Slope_Rise;
-    FT_Short   caret_Slope_Run;
-    FT_Short   caret_Offset;
-
-    FT_Short   Reserved[4];
-
-    FT_Short   metric_Data_Format;
-    FT_UShort  number_Of_VMetrics;
-
-    /* The following fields are not defined by the OpenType specification */
-    /* but they are used to connect the metrics header to the relevant    */
-    /* `vmtx' table.                                                      */
-
-    void*      long_metrics;
-    void*      short_metrics;
-
-  } TT_VertHeader;
-
- -

A structure used to model a TrueType vertical header, the ‘vhea’ table, as well as the corresponding vertical metrics table, ‘vmtx’.

- -

fields

- - - - - - - - - - - - - - - - - -
Version -

The table version.

-
Ascender -

The font's ascender, i.e., the distance from the baseline to the top-most of all glyph points found in the font.

-

This value is invalid in many fonts, as it is usually set by the font designer, and often reflects only a portion of the glyphs found in the font (maybe ASCII).

-

You should use the ‘sTypoAscender’ field of the ‘OS/2’ table instead if you want the correct one.

-
Descender -

The font's descender, i.e., the distance from the baseline to the bottom-most of all glyph points found in the font. It is negative.

-

This value is invalid in many fonts, as it is usually set by the font designer, and often reflects only a portion of the glyphs found in the font (maybe ASCII).

-

You should use the ‘sTypoDescender’ field of the ‘OS/2’ table instead if you want the correct one.

-
Line_Gap -

The font's line gap, i.e., the distance to add to the ascender and descender to get the BTB, i.e., the baseline-to-baseline distance for the font.

-
advance_Height_Max -

This field is the maximum of all advance heights found in the font. It can be used to compute the maximum height of an arbitrary string of text.

-
min_Top_Side_Bearing -

The minimum top side bearing of all glyphs within the font.

-
min_Bottom_Side_Bearing -

The minimum bottom side bearing of all glyphs within the font.

-
yMax_Extent -

The maximum vertical extent (i.e., the ‘height’ of a glyph's bounding box) for all glyphs in the font.

-
caret_Slope_Rise -

The rise coefficient of the cursor's slope of the cursor (slope=rise/run).

-
caret_Slope_Run -

The run coefficient of the cursor's slope.

-
caret_Offset -

The cursor's offset for slanted fonts.

-
Reserved -

8 reserved bytes.

-
metric_Data_Format -

Always 0.

-
number_Of_VMetrics -

Number of VMetrics entries in the ‘vmtx’ table -- this value can be smaller than the total number of glyphs in the font.

-
long_metrics -

A pointer into the ‘vmtx’ table.

-
short_metrics -

A pointer into the ‘vmtx’ table.

-
- -

note

-

For an OpenType variation font, the values of the following fields can change after a call to FT_Set_Var_Design_Coordinates (and friends) if the font contains an ‘MVAR’ table: ‘Ascender’, ‘Descender’, ‘Line_Gap’, ‘caret_Slope_Rise’, ‘caret_Slope_Run’, and ‘caret_Offset’.

- -
-
- -
-

TT_OS2

-

Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).

-
-  typedef struct  TT_OS2_
-  {
-    FT_UShort  version;                /* 0x0001 - more or 0xFFFF */
-    FT_Short   xAvgCharWidth;
-    FT_UShort  usWeightClass;
-    FT_UShort  usWidthClass;
-    FT_UShort  fsType;
-    FT_Short   ySubscriptXSize;
-    FT_Short   ySubscriptYSize;
-    FT_Short   ySubscriptXOffset;
-    FT_Short   ySubscriptYOffset;
-    FT_Short   ySuperscriptXSize;
-    FT_Short   ySuperscriptYSize;
-    FT_Short   ySuperscriptXOffset;
-    FT_Short   ySuperscriptYOffset;
-    FT_Short   yStrikeoutSize;
-    FT_Short   yStrikeoutPosition;
-    FT_Short   sFamilyClass;
-
-    FT_Byte    panose[10];
-
-    FT_ULong   ulUnicodeRange1;        /* Bits 0-31   */
-    FT_ULong   ulUnicodeRange2;        /* Bits 32-63  */
-    FT_ULong   ulUnicodeRange3;        /* Bits 64-95  */
-    FT_ULong   ulUnicodeRange4;        /* Bits 96-127 */
-
-    FT_Char    achVendID[4];
-
-    FT_UShort  fsSelection;
-    FT_UShort  usFirstCharIndex;
-    FT_UShort  usLastCharIndex;
-    FT_Short   sTypoAscender;
-    FT_Short   sTypoDescender;
-    FT_Short   sTypoLineGap;
-    FT_UShort  usWinAscent;
-    FT_UShort  usWinDescent;
-
-    /* only version 1 and higher: */
-
-    FT_ULong   ulCodePageRange1;       /* Bits 0-31   */
-    FT_ULong   ulCodePageRange2;       /* Bits 32-63  */
-
-    /* only version 2 and higher: */
-
-    FT_Short   sxHeight;
-    FT_Short   sCapHeight;
-    FT_UShort  usDefaultChar;
-    FT_UShort  usBreakChar;
-    FT_UShort  usMaxContext;
-
-    /* only version 5 and higher: */
-
-    FT_UShort  usLowerOpticalPointSize;       /* in twips (1/20th points) */
-    FT_UShort  usUpperOpticalPointSize;       /* in twips (1/20th points) */
-
-  } TT_OS2;
-
- -

A structure to model a TrueType ‘OS/2’ table. All fields comply to the OpenType specification.

-

Note that we now support old Mac fonts that do not include an ‘OS/2’ table. In this case, the ‘version’ field is always set to 0xFFFF.

- -

note

-

For an OpenType variation font, the values of the following fields can change after a call to FT_Set_Var_Design_Coordinates (and friends) if the font contains an ‘MVAR’ table: ‘sCapHeight’, ‘sTypoAscender’, ‘sTypoDescender’, ‘sTypoLineGap’, ‘sxHeight’, ‘usWinAscent’, ‘usWinDescent’, ‘yStrikeoutPosition’, ‘yStrikeoutSize’, ‘ySubscriptXOffset’, ‘ySubScriptXSize’, ‘ySubscriptYOffset’, ‘ySubscriptYSize’, ‘ySuperscriptXOffset’, ‘ySuperscriptXSize’, ‘ySuperscriptYOffset’, and ‘ySuperscriptYSize’.

-

Possible values for bits in the ‘ulUnicodeRangeX’ fields are given by the TT_UCR_XXX macros.

- -
-
- -
-

TT_Postscript

-

Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).

-
-  typedef struct  TT_Postscript_
-  {
-    FT_Fixed  FormatType;
-    FT_Fixed  italicAngle;
-    FT_Short  underlinePosition;
-    FT_Short  underlineThickness;
-    FT_ULong  isFixedPitch;
-    FT_ULong  minMemType42;
-    FT_ULong  maxMemType42;
-    FT_ULong  minMemType1;
-    FT_ULong  maxMemType1;
-
-    /* Glyph names follow in the `post' table, but we don't */
-    /* load them by default.                                */
-
-  } TT_Postscript;
-
- -

A structure to model a TrueType ‘post’ table. All fields comply to the OpenType specification. This structure does not reference a font's PostScript glyph names; use FT_Get_Glyph_Name to retrieve them.

- -

note

-

For an OpenType variation font, the values of the following fields can change after a call to FT_Set_Var_Design_Coordinates (and friends) if the font contains an ‘MVAR’ table: ‘underlinePosition’ and ‘underlineThickness’.

- -
-
- -
-

TT_PCLT

-

Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).

-
-  typedef struct  TT_PCLT_
-  {
-    FT_Fixed   Version;
-    FT_ULong   FontNumber;
-    FT_UShort  Pitch;
-    FT_UShort  xHeight;
-    FT_UShort  Style;
-    FT_UShort  TypeFamily;
-    FT_UShort  CapHeight;
-    FT_UShort  SymbolSet;
-    FT_Char    TypeFace[16];
-    FT_Char    CharacterComplement[8];
-    FT_Char    FileName[6];
-    FT_Char    StrokeWeight;
-    FT_Char    WidthType;
-    FT_Byte    SerifStyle;
-    FT_Byte    Reserved;
-
-  } TT_PCLT;
-
- -

A structure to model a TrueType ‘PCLT’ table. All fields comply to the OpenType specification.

- -
-
- -
-

TT_MaxProfile

-

Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).

-
-  typedef struct  TT_MaxProfile_
-  {
-    FT_Fixed   version;
-    FT_UShort  numGlyphs;
-    FT_UShort  maxPoints;
-    FT_UShort  maxContours;
-    FT_UShort  maxCompositePoints;
-    FT_UShort  maxCompositeContours;
-    FT_UShort  maxZones;
-    FT_UShort  maxTwilightPoints;
-    FT_UShort  maxStorage;
-    FT_UShort  maxFunctionDefs;
-    FT_UShort  maxInstructionDefs;
-    FT_UShort  maxStackElements;
-    FT_UShort  maxSizeOfInstructions;
-    FT_UShort  maxComponentElements;
-    FT_UShort  maxComponentDepth;
-
-  } TT_MaxProfile;
-
- -

The maximum profile (‘maxp’) table contains many max values, which can be used to pre-allocate arrays for speeding up glyph loading and hinting.

- -

fields

- - - - - - - - - - - - - - - - -
version -

The version number.

-
numGlyphs -

The number of glyphs in this TrueType font.

-
maxPoints -

The maximum number of points in a non-composite TrueType glyph. See also ‘maxCompositePoints’.

-
maxContours -

The maximum number of contours in a non-composite TrueType glyph. See also ‘maxCompositeContours’.

-
maxCompositePoints -

The maximum number of points in a composite TrueType glyph. See also ‘maxPoints’.

-
maxCompositeContours -

The maximum number of contours in a composite TrueType glyph. See also ‘maxContours’.

-
maxZones -

The maximum number of zones used for glyph hinting.

-
maxTwilightPoints -

The maximum number of points in the twilight zone used for glyph hinting.

-
maxStorage -

The maximum number of elements in the storage area used for glyph hinting.

-
maxFunctionDefs -

The maximum number of function definitions in the TrueType bytecode for this font.

-
maxInstructionDefs -

The maximum number of instruction definitions in the TrueType bytecode for this font.

-
maxStackElements -

The maximum number of stack elements used during bytecode interpretation.

-
maxSizeOfInstructions -

The maximum number of TrueType opcodes used for glyph hinting.

-
maxComponentElements -

The maximum number of simple (i.e., non- composite) glyphs in a composite glyph.

-
maxComponentDepth -

The maximum nesting depth of composite glyphs.

-
- -

note

-

This structure is only used during font loading.

- -
-
- -
-

FT_Sfnt_Tag

-

Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).

-
-  typedef enum  FT_Sfnt_Tag_
-  {
-    FT_SFNT_HEAD,
-    FT_SFNT_MAXP,
-    FT_SFNT_OS2,
-    FT_SFNT_HHEA,
-    FT_SFNT_VHEA,
-    FT_SFNT_POST,
-    FT_SFNT_PCLT,
-
-    FT_SFNT_MAX
-
-  } FT_Sfnt_Tag;
-
-  /* these constants are deprecated; use the corresponding `FT_Sfnt_Tag' */
-  /* values instead                                                      */
-#define ft_sfnt_head  FT_SFNT_HEAD
-#define ft_sfnt_maxp  FT_SFNT_MAXP
-#define ft_sfnt_os2   FT_SFNT_OS2
-#define ft_sfnt_hhea  FT_SFNT_HHEA
-#define ft_sfnt_vhea  FT_SFNT_VHEA
-#define ft_sfnt_post  FT_SFNT_POST
-#define ft_sfnt_pclt  FT_SFNT_PCLT
-
- -

An enumeration to specify indices of SFNT tables loaded and parsed by FreeType during initialization of an SFNT font. Used in the FT_Get_Sfnt_Table API function.

- -

values

- - - - - - - - -
FT_SFNT_HEAD -

To access the font's TT_Header structure.

-
FT_SFNT_MAXP -

To access the font's TT_MaxProfile structure.

-
FT_SFNT_OS2 -

To access the font's TT_OS2 structure.

-
FT_SFNT_HHEA -

To access the font's TT_HoriHeader structure.

-
FT_SFNT_VHEA -

To access the font's TT_VertHeader structure.

-
FT_SFNT_POST -

To access the font's TT_Postscript structure.

-
FT_SFNT_PCLT -

To access the font's TT_PCLT structure.

-
- -
-
- -
-

FT_Get_Sfnt_Table

-

Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).

-
-  FT_EXPORT( void* )
-  FT_Get_Sfnt_Table( FT_Face      face,
-                     FT_Sfnt_Tag  tag );
-
- -

Return a pointer to a given SFNT table stored within a face.

- -

input

- - - -
face -

A handle to the source.

-
tag -

The index of the SFNT table.

-
- -

return

-

A type-less pointer to the table. This will be NULL in case of error, or if the corresponding table was not found OR loaded from the file.

-

Use a typecast according to ‘tag’ to access the structure elements.

- -

note

-

The table is owned by the face object and disappears with it.

-

This function is only useful to access SFNT tables that are loaded by the sfnt, truetype, and opentype drivers. See FT_Sfnt_Tag for a list.

-

Here an example how to access the ‘vhea’ table:

-
-  TT_VertHeader*  vert_header;
-
-
-  vert_header =
-    (TT_VertHeader*)FT_Get_Sfnt_Table( face, FT_SFNT_VHEA );
-
- -
-
- -
-

FT_Load_Sfnt_Table

-

Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).

-
-  FT_EXPORT( FT_Error )
-  FT_Load_Sfnt_Table( FT_Face    face,
-                      FT_ULong   tag,
-                      FT_Long    offset,
-                      FT_Byte*   buffer,
-                      FT_ULong*  length );
-
- -

Load any SFNT font table into client memory.

- -

input

- - - - -
face -

A handle to the source face.

-
tag -

The four-byte tag of the table to load. Use value 0 if you want to access the whole font file. Otherwise, you can use one of the definitions found in the FT_TRUETYPE_TAGS_H file, or forge a new one with FT_MAKE_TAG.

-
offset -

The starting offset in the table (or file if tag == 0).

-
- -

output

- - -
buffer -

The target buffer address. The client must ensure that the memory array is big enough to hold the data.

-
- -

inout

- - -
length -

If the ‘length’ parameter is NULL, try to load the whole table. Return an error code if it fails.

-

Else, if ‘*length’ is 0, exit immediately while returning the table's (or file) full size in it.

-

Else the number of bytes to read from the table or file, from the starting offset.

-
- -

return

-

FreeType error code. 0 means success.

- -

note

-

If you need to determine the table's length you should first call this function with ‘*length’ set to 0, as in the following example:

-
-  FT_ULong  length = 0;
-
-
-  error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length );
-  if ( error ) { ... table does not exist ... }
-
-  buffer = malloc( length );
-  if ( buffer == NULL ) { ... not enough memory ... }
-
-  error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length );
-  if ( error ) { ... could not load table ... }
-
-

Note that structures like TT_Header or TT_OS2 can't be used with this function; they are limited to FT_Get_Sfnt_Table. Reason is that those structures depend on the processor architecture, with varying size (e.g. 32bit vs. 64bit) or order (big endian vs. little endian).

- -
-
- -
-

FT_Sfnt_Table_Info

-

Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).

-
-  FT_EXPORT( FT_Error )
-  FT_Sfnt_Table_Info( FT_Face    face,
-                      FT_UInt    table_index,
-                      FT_ULong  *tag,
-                      FT_ULong  *length );
-
- -

Return information on an SFNT table.

- -

input

- - - -
face -

A handle to the source face.

-
table_index -

The index of an SFNT table. The function returns FT_Err_Table_Missing for an invalid value.

-
- -

inout

- - -
tag -

The name tag of the SFNT table. If the value is NULL, ‘table_index’ is ignored, and ‘length’ returns the number of SFNT tables in the font.

-
- -

output

- - -
length -

The length of the SFNT table (or the number of SFNT tables, depending on ‘tag’).

-
- -

return

-

FreeType error code. 0 means success.

- -

note

-

While parsing fonts, FreeType handles SFNT tables with length zero as missing.

- -
-
- -
-

FT_Get_CMap_Language_ID

-

Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).

-
-  FT_EXPORT( FT_ULong )
-  FT_Get_CMap_Language_ID( FT_CharMap  charmap );
-
- -

Return cmap language ID as specified in the OpenType standard. Definitions of language ID values are in file FT_TRUETYPE_IDS_H.

- -

input

- - -
charmap -

The target charmap.

-
- -

return

-

The language ID of ‘charmap’. If ‘charmap’ doesn't belong to an SFNT face, just return 0 as the default value.

-

For a format 14 cmap (to access Unicode IVS), the return value is 0xFFFFFFFF.

- -
-
- -
-

FT_Get_CMap_Format

-

Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).

-
-  FT_EXPORT( FT_Long )
-  FT_Get_CMap_Format( FT_CharMap  charmap );
-
- -

Return the format of an SFNT ‘cmap’ table.

- -

input

- - -
charmap -

The target charmap.

-
- -

return

-

The format of ‘charmap’. If ‘charmap’ doesn't belong to an SFNT face, return -1.

- -
-
- -
-

FT_PARAM_TAG_UNPATENTED_HINTING

-
-#define FT_PARAM_TAG_UNPATENTED_HINTING \
-          FT_MAKE_TAG( 'u', 'n', 'p', 'a' )
-
- -

Deprecated, no effect.

-

Previously: A constant used as the tag of an FT_Parameter structure to indicate that unpatented methods only should be used by the TrueType bytecode interpreter for a typeface opened by FT_Open_Face.

- -
-
- -
-

TT_PLATFORM_XXX

-

Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).

-
-#define TT_PLATFORM_APPLE_UNICODE  0
-#define TT_PLATFORM_MACINTOSH      1
-#define TT_PLATFORM_ISO            2 /* deprecated */
-#define TT_PLATFORM_MICROSOFT      3
-#define TT_PLATFORM_CUSTOM         4
-#define TT_PLATFORM_ADOBE          7 /* artificial */
-
- -

A list of valid values for the ‘platform_id’ identifier code in FT_CharMapRec and FT_SfntName structures.

- -

values

- - - - - - - -
TT_PLATFORM_APPLE_UNICODE -

Used by Apple to indicate a Unicode character map and/or name entry. See TT_APPLE_ID_XXX for corresponding ‘encoding_id’ values. Note that name entries in this format are coded as big-endian UCS-2 character codes only.

-
TT_PLATFORM_MACINTOSH -

Used by Apple to indicate a MacOS-specific charmap and/or name entry. See TT_MAC_ID_XXX for corresponding ‘encoding_id’ values. Note that most TrueType fonts contain an Apple roman charmap to be usable on MacOS systems (even if they contain a Microsoft charmap as well).

-
TT_PLATFORM_ISO -

This value was used to specify ISO/IEC 10646 charmaps. It is however now deprecated. See TT_ISO_ID_XXX for a list of corresponding ‘encoding_id’ values.

-
TT_PLATFORM_MICROSOFT -

Used by Microsoft to indicate Windows-specific charmaps. See TT_MS_ID_XXX for a list of corresponding ‘encoding_id’ values. Note that most fonts contain a Unicode charmap using (TT_PLATFORM_MICROSOFT, TT_MS_ID_UNICODE_CS).

-
TT_PLATFORM_CUSTOM -

Used to indicate application-specific charmaps.

-
TT_PLATFORM_ADOBE -

This value isn't part of any font format specification, but is used by FreeType to report Adobe-specific charmaps in an FT_CharMapRec structure. See TT_ADOBE_ID_XXX.

-
- -
-
- -
-

TT_APPLE_ID_XXX

-

Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).

-
-#define TT_APPLE_ID_DEFAULT           0 /* Unicode 1.0                   */
-#define TT_APPLE_ID_UNICODE_1_1       1 /* specify Hangul at U+34xx      */
-#define TT_APPLE_ID_ISO_10646         2 /* deprecated                    */
-#define TT_APPLE_ID_UNICODE_2_0       3 /* or later                      */
-#define TT_APPLE_ID_UNICODE_32        4 /* 2.0 or later, full repertoire */
-#define TT_APPLE_ID_VARIANT_SELECTOR  5 /* variation selector data       */
-#define TT_APPLE_ID_FULL_UNICODE      6 /* used with type 13 cmaps       */
-
- -

A list of valid values for the ‘encoding_id’ for TT_PLATFORM_APPLE_UNICODE charmaps and name entries.

- -

values

- - - - - - - - -
TT_APPLE_ID_DEFAULT -

Unicode version 1.0.

-
TT_APPLE_ID_UNICODE_1_1 -

Unicode 1.1; specifies Hangul characters starting at U+34xx.

-
TT_APPLE_ID_ISO_10646 -

Deprecated (identical to preceding).

-
TT_APPLE_ID_UNICODE_2_0 -

Unicode 2.0 and beyond (UTF-16 BMP only).

-
TT_APPLE_ID_UNICODE_32 -

Unicode 3.1 and beyond, using UTF-32.

-
TT_APPLE_ID_VARIANT_SELECTOR -

From Adobe, not Apple. Not a normal cmap. Specifies variations on a real cmap.

-
TT_APPLE_ID_FULL_UNICODE -

Used for fallback fonts that provide complete Unicode coverage with a type 13 cmap.

-
- -
-
- -
-

TT_MAC_ID_XXX

-

Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).

-
-#define TT_MAC_ID_ROMAN                 0
-#define TT_MAC_ID_JAPANESE              1
-#define TT_MAC_ID_TRADITIONAL_CHINESE   2
-#define TT_MAC_ID_KOREAN                3
-#define TT_MAC_ID_ARABIC                4
-#define TT_MAC_ID_HEBREW                5
-#define TT_MAC_ID_GREEK                 6
-#define TT_MAC_ID_RUSSIAN               7
-#define TT_MAC_ID_RSYMBOL               8
-#define TT_MAC_ID_DEVANAGARI            9
-#define TT_MAC_ID_GURMUKHI             10
-#define TT_MAC_ID_GUJARATI             11
-#define TT_MAC_ID_ORIYA                12
-#define TT_MAC_ID_BENGALI              13
-#define TT_MAC_ID_TAMIL                14
-#define TT_MAC_ID_TELUGU               15
-#define TT_MAC_ID_KANNADA              16
-#define TT_MAC_ID_MALAYALAM            17
-#define TT_MAC_ID_SINHALESE            18
-#define TT_MAC_ID_BURMESE              19
-#define TT_MAC_ID_KHMER                20
-#define TT_MAC_ID_THAI                 21
-#define TT_MAC_ID_LAOTIAN              22
-#define TT_MAC_ID_GEORGIAN             23
-#define TT_MAC_ID_ARMENIAN             24
-#define TT_MAC_ID_MALDIVIAN            25
-#define TT_MAC_ID_SIMPLIFIED_CHINESE   25
-#define TT_MAC_ID_TIBETAN              26
-#define TT_MAC_ID_MONGOLIAN            27
-#define TT_MAC_ID_GEEZ                 28
-#define TT_MAC_ID_SLAVIC               29
-#define TT_MAC_ID_VIETNAMESE           30
-#define TT_MAC_ID_SINDHI               31
-#define TT_MAC_ID_UNINTERP             32
-
- -

A list of valid values for the ‘encoding_id’ for TT_PLATFORM_MACINTOSH charmaps and name entries.

- -
-
- -
-

TT_ISO_ID_XXX

-

Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).

-
-#define TT_ISO_ID_7BIT_ASCII  0
-#define TT_ISO_ID_10646       1
-#define TT_ISO_ID_8859_1      2
-
- -

A list of valid values for the ‘encoding_id’ for TT_PLATFORM_ISO charmaps and name entries.

-

Their use is now deprecated.

- -

values

- - - - -
TT_ISO_ID_7BIT_ASCII -

ASCII.

-
TT_ISO_ID_10646 -

ISO/10646.

-
TT_ISO_ID_8859_1 -

Also known as Latin-1.

-
- -
-
- -
-

TT_MS_ID_XXX

-

Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).

-
-#define TT_MS_ID_SYMBOL_CS    0
-#define TT_MS_ID_UNICODE_CS   1
-#define TT_MS_ID_SJIS         2
-#define TT_MS_ID_PRC          3
-#define TT_MS_ID_BIG_5        4
-#define TT_MS_ID_WANSUNG      5
-#define TT_MS_ID_JOHAB        6
-#define TT_MS_ID_UCS_4       10
-
-  /* this value is deprecated */
-#define TT_MS_ID_GB2312  TT_MS_ID_PRC
-
- -

A list of valid values for the ‘encoding_id’ for TT_PLATFORM_MICROSOFT charmaps and name entries.

- -

values

- - - - - - - - - -
TT_MS_ID_SYMBOL_CS -

Microsoft symbol encoding. See FT_ENCODING_MS_SYMBOL.

-
TT_MS_ID_UNICODE_CS -

Microsoft WGL4 charmap, matching Unicode. See FT_ENCODING_UNICODE.

-
TT_MS_ID_SJIS -

Shift JIS Japanese encoding. See FT_ENCODING_SJIS.

-
TT_MS_ID_PRC -

Chinese encodings as used in the People's Republic of China (PRC). This means the encodings GB 2312 and its supersets GBK and GB 18030. See FT_ENCODING_PRC.

-
TT_MS_ID_BIG_5 -

Traditional Chinese as used in Taiwan and Hong Kong. See FT_ENCODING_BIG5.

-
TT_MS_ID_WANSUNG -

Korean Extended Wansung encoding. See FT_ENCODING_WANSUNG.

-
TT_MS_ID_JOHAB -

Korean Johab encoding. See FT_ENCODING_JOHAB.

-
TT_MS_ID_UCS_4 -

UCS-4 or UTF-32 charmaps. This has been added to the OpenType specification version 1.4 (mid-2001).

-
- -
-
- -
-

TT_ADOBE_ID_XXX

-

Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).

-
-#define TT_ADOBE_ID_STANDARD  0
-#define TT_ADOBE_ID_EXPERT    1
-#define TT_ADOBE_ID_CUSTOM    2
-#define TT_ADOBE_ID_LATIN_1   3
-
- -

A list of valid values for the ‘encoding_id’ for TT_PLATFORM_ADOBE charmaps. This is a FreeType-specific extension!

- -

values

- - - - - -
TT_ADOBE_ID_STANDARD -

Adobe standard encoding.

-
TT_ADOBE_ID_EXPERT -

Adobe expert encoding.

-
TT_ADOBE_ID_CUSTOM -

Adobe custom encoding.

-
TT_ADOBE_ID_LATIN_1 -

Adobe Latin 1 encoding.

-
- -
-
- -
-

TT_MAC_LANGID_XXX

-

Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).

-
-#define TT_MAC_LANGID_ENGLISH                       0
-#define TT_MAC_LANGID_FRENCH                        1
-#define TT_MAC_LANGID_GERMAN                        2
-#define TT_MAC_LANGID_ITALIAN                       3
-#define TT_MAC_LANGID_DUTCH                         4
-#define TT_MAC_LANGID_SWEDISH                       5
-#define TT_MAC_LANGID_SPANISH                       6
-#define TT_MAC_LANGID_DANISH                        7
-#define TT_MAC_LANGID_PORTUGUESE                    8
-#define TT_MAC_LANGID_NORWEGIAN                     9
-#define TT_MAC_LANGID_HEBREW                       10
-#define TT_MAC_LANGID_JAPANESE                     11
-#define TT_MAC_LANGID_ARABIC                       12
-#define TT_MAC_LANGID_FINNISH                      13
-#define TT_MAC_LANGID_GREEK                        14
-#define TT_MAC_LANGID_ICELANDIC                    15
-#define TT_MAC_LANGID_MALTESE                      16
-#define TT_MAC_LANGID_TURKISH                      17
-#define TT_MAC_LANGID_CROATIAN                     18
-#define TT_MAC_LANGID_CHINESE_TRADITIONAL          19
-#define TT_MAC_LANGID_URDU                         20
-#define TT_MAC_LANGID_HINDI                        21
-#define TT_MAC_LANGID_THAI                         22
-#define TT_MAC_LANGID_KOREAN                       23
-#define TT_MAC_LANGID_LITHUANIAN                   24
-#define TT_MAC_LANGID_POLISH                       25
-#define TT_MAC_LANGID_HUNGARIAN                    26
-#define TT_MAC_LANGID_ESTONIAN                     27
-#define TT_MAC_LANGID_LETTISH                      28
-#define TT_MAC_LANGID_SAAMISK                      29
-#define TT_MAC_LANGID_FAEROESE                     30
-#define TT_MAC_LANGID_FARSI                        31
-#define TT_MAC_LANGID_RUSSIAN                      32
-#define TT_MAC_LANGID_CHINESE_SIMPLIFIED           33
-#define TT_MAC_LANGID_FLEMISH                      34
-#define TT_MAC_LANGID_IRISH                        35
-#define TT_MAC_LANGID_ALBANIAN                     36
-#define TT_MAC_LANGID_ROMANIAN                     37
-#define TT_MAC_LANGID_CZECH                        38
-#define TT_MAC_LANGID_SLOVAK                       39
-#define TT_MAC_LANGID_SLOVENIAN                    40
-#define TT_MAC_LANGID_YIDDISH                      41
-#define TT_MAC_LANGID_SERBIAN                      42
-#define TT_MAC_LANGID_MACEDONIAN                   43
-#define TT_MAC_LANGID_BULGARIAN                    44
-#define TT_MAC_LANGID_UKRAINIAN                    45
-#define TT_MAC_LANGID_BYELORUSSIAN                 46
-#define TT_MAC_LANGID_UZBEK                        47
-#define TT_MAC_LANGID_KAZAKH                       48
-#define TT_MAC_LANGID_AZERBAIJANI                  49
-#define TT_MAC_LANGID_AZERBAIJANI_CYRILLIC_SCRIPT  49
-#define TT_MAC_LANGID_AZERBAIJANI_ARABIC_SCRIPT    50
-#define TT_MAC_LANGID_ARMENIAN                     51
-#define TT_MAC_LANGID_GEORGIAN                     52
-#define TT_MAC_LANGID_MOLDAVIAN                    53
-#define TT_MAC_LANGID_KIRGHIZ                      54
-#define TT_MAC_LANGID_TAJIKI                       55
-#define TT_MAC_LANGID_TURKMEN                      56
-#define TT_MAC_LANGID_MONGOLIAN                    57
-#define TT_MAC_LANGID_MONGOLIAN_MONGOLIAN_SCRIPT   57
-#define TT_MAC_LANGID_MONGOLIAN_CYRILLIC_SCRIPT    58
-#define TT_MAC_LANGID_PASHTO                       59
-#define TT_MAC_LANGID_KURDISH                      60
-#define TT_MAC_LANGID_KASHMIRI                     61
-#define TT_MAC_LANGID_SINDHI                       62
-#define TT_MAC_LANGID_TIBETAN                      63
-#define TT_MAC_LANGID_NEPALI                       64
-#define TT_MAC_LANGID_SANSKRIT                     65
-#define TT_MAC_LANGID_MARATHI                      66
-#define TT_MAC_LANGID_BENGALI                      67
-#define TT_MAC_LANGID_ASSAMESE                     68
-#define TT_MAC_LANGID_GUJARATI                     69
-#define TT_MAC_LANGID_PUNJABI                      70
-#define TT_MAC_LANGID_ORIYA                        71
-#define TT_MAC_LANGID_MALAYALAM                    72
-#define TT_MAC_LANGID_KANNADA                      73
-#define TT_MAC_LANGID_TAMIL                        74
-#define TT_MAC_LANGID_TELUGU                       75
-#define TT_MAC_LANGID_SINHALESE                    76
-#define TT_MAC_LANGID_BURMESE                      77
-#define TT_MAC_LANGID_KHMER                        78
-#define TT_MAC_LANGID_LAO                          79
-#define TT_MAC_LANGID_VIETNAMESE                   80
-#define TT_MAC_LANGID_INDONESIAN                   81
-#define TT_MAC_LANGID_TAGALOG                      82
-#define TT_MAC_LANGID_MALAY_ROMAN_SCRIPT           83
-#define TT_MAC_LANGID_MALAY_ARABIC_SCRIPT          84
-#define TT_MAC_LANGID_AMHARIC                      85
-#define TT_MAC_LANGID_TIGRINYA                     86
-#define TT_MAC_LANGID_GALLA                        87
-#define TT_MAC_LANGID_SOMALI                       88
-#define TT_MAC_LANGID_SWAHILI                      89
-#define TT_MAC_LANGID_RUANDA                       90
-#define TT_MAC_LANGID_RUNDI                        91
-#define TT_MAC_LANGID_CHEWA                        92
-#define TT_MAC_LANGID_MALAGASY                     93
-#define TT_MAC_LANGID_ESPERANTO                    94
-#define TT_MAC_LANGID_WELSH                       128
-#define TT_MAC_LANGID_BASQUE                      129
-#define TT_MAC_LANGID_CATALAN                     130
-#define TT_MAC_LANGID_LATIN                       131
-#define TT_MAC_LANGID_QUECHUA                     132
-#define TT_MAC_LANGID_GUARANI                     133
-#define TT_MAC_LANGID_AYMARA                      134
-#define TT_MAC_LANGID_TATAR                       135
-#define TT_MAC_LANGID_UIGHUR                      136
-#define TT_MAC_LANGID_DZONGKHA                    137
-#define TT_MAC_LANGID_JAVANESE                    138
-#define TT_MAC_LANGID_SUNDANESE                   139
-
-  /* The following codes are new as of 2000-03-10 */
-#define TT_MAC_LANGID_GALICIAN                    140
-#define TT_MAC_LANGID_AFRIKAANS                   141
-#define TT_MAC_LANGID_BRETON                      142
-#define TT_MAC_LANGID_INUKTITUT                   143
-#define TT_MAC_LANGID_SCOTTISH_GAELIC             144
-#define TT_MAC_LANGID_MANX_GAELIC                 145
-#define TT_MAC_LANGID_IRISH_GAELIC                146
-#define TT_MAC_LANGID_TONGAN                      147
-#define TT_MAC_LANGID_GREEK_POLYTONIC             148
-#define TT_MAC_LANGID_GREELANDIC                  149
-#define TT_MAC_LANGID_AZERBAIJANI_ROMAN_SCRIPT    150
-
- -

Possible values of the language identifier field in the name records of the SFNT ‘name’ table if the ‘platform’ identifier code is TT_PLATFORM_MACINTOSH. These values are also used as return values for function FT_Get_CMap_Language_ID.

-

The canonical source for Apple's IDs is

-

https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html

- -
-
- -
-

TT_MS_LANGID_XXX

-

Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).

-
-#define TT_MS_LANGID_ARABIC_SAUDI_ARABIA               0x0401
-#define TT_MS_LANGID_ARABIC_IRAQ                       0x0801
-#define TT_MS_LANGID_ARABIC_EGYPT                      0x0C01
-#define TT_MS_LANGID_ARABIC_LIBYA                      0x1001
-#define TT_MS_LANGID_ARABIC_ALGERIA                    0x1401
-#define TT_MS_LANGID_ARABIC_MOROCCO                    0x1801
-#define TT_MS_LANGID_ARABIC_TUNISIA                    0x1C01
-#define TT_MS_LANGID_ARABIC_OMAN                       0x2001
-#define TT_MS_LANGID_ARABIC_YEMEN                      0x2401
-#define TT_MS_LANGID_ARABIC_SYRIA                      0x2801
-#define TT_MS_LANGID_ARABIC_JORDAN                     0x2C01
-#define TT_MS_LANGID_ARABIC_LEBANON                    0x3001
-#define TT_MS_LANGID_ARABIC_KUWAIT                     0x3401
-#define TT_MS_LANGID_ARABIC_UAE                        0x3801
-#define TT_MS_LANGID_ARABIC_BAHRAIN                    0x3C01
-#define TT_MS_LANGID_ARABIC_QATAR                      0x4001
-#define TT_MS_LANGID_BULGARIAN_BULGARIA                0x0402
-#define TT_MS_LANGID_CATALAN_CATALAN                   0x0403
-#define TT_MS_LANGID_CHINESE_TAIWAN                    0x0404
-#define TT_MS_LANGID_CHINESE_PRC                       0x0804
-#define TT_MS_LANGID_CHINESE_HONG_KONG                 0x0C04
-#define TT_MS_LANGID_CHINESE_SINGAPORE                 0x1004
-#define TT_MS_LANGID_CHINESE_MACAO                     0x1404
-#define TT_MS_LANGID_CZECH_CZECH_REPUBLIC              0x0405
-#define TT_MS_LANGID_DANISH_DENMARK                    0x0406
-#define TT_MS_LANGID_GERMAN_GERMANY                    0x0407
-#define TT_MS_LANGID_GERMAN_SWITZERLAND                0x0807
-#define TT_MS_LANGID_GERMAN_AUSTRIA                    0x0C07
-#define TT_MS_LANGID_GERMAN_LUXEMBOURG                 0x1007
-#define TT_MS_LANGID_GERMAN_LIECHTENSTEIN              0x1407
-#define TT_MS_LANGID_GREEK_GREECE                      0x0408
-#define TT_MS_LANGID_ENGLISH_UNITED_STATES             0x0409
-#define TT_MS_LANGID_ENGLISH_UNITED_KINGDOM            0x0809
-#define TT_MS_LANGID_ENGLISH_AUSTRALIA                 0x0C09
-#define TT_MS_LANGID_ENGLISH_CANADA                    0x1009
-#define TT_MS_LANGID_ENGLISH_NEW_ZEALAND               0x1409
-#define TT_MS_LANGID_ENGLISH_IRELAND                   0x1809
-#define TT_MS_LANGID_ENGLISH_SOUTH_AFRICA              0x1C09
-#define TT_MS_LANGID_ENGLISH_JAMAICA                   0x2009
-#define TT_MS_LANGID_ENGLISH_CARIBBEAN                 0x2409
-#define TT_MS_LANGID_ENGLISH_BELIZE                    0x2809
-#define TT_MS_LANGID_ENGLISH_TRINIDAD                  0x2C09
-#define TT_MS_LANGID_ENGLISH_ZIMBABWE                  0x3009
-#define TT_MS_LANGID_ENGLISH_PHILIPPINES               0x3409
-#define TT_MS_LANGID_ENGLISH_INDIA                     0x4009
-#define TT_MS_LANGID_ENGLISH_MALAYSIA                  0x4409
-#define TT_MS_LANGID_ENGLISH_SINGAPORE                 0x4809
-#define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT    0x040A
-#define TT_MS_LANGID_SPANISH_MEXICO                    0x080A
-#define TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT         0x0C0A
-#define TT_MS_LANGID_SPANISH_GUATEMALA                 0x100A
-#define TT_MS_LANGID_SPANISH_COSTA_RICA                0x140A
-#define TT_MS_LANGID_SPANISH_PANAMA                    0x180A
-#define TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC        0x1C0A
-#define TT_MS_LANGID_SPANISH_VENEZUELA                 0x200A
-#define TT_MS_LANGID_SPANISH_COLOMBIA                  0x240A
-#define TT_MS_LANGID_SPANISH_PERU                      0x280A
-#define TT_MS_LANGID_SPANISH_ARGENTINA                 0x2C0A
-#define TT_MS_LANGID_SPANISH_ECUADOR                   0x300A
-#define TT_MS_LANGID_SPANISH_CHILE                     0x340A
-#define TT_MS_LANGID_SPANISH_URUGUAY                   0x380A
-#define TT_MS_LANGID_SPANISH_PARAGUAY                  0x3C0A
-#define TT_MS_LANGID_SPANISH_BOLIVIA                   0x400A
-#define TT_MS_LANGID_SPANISH_EL_SALVADOR               0x440A
-#define TT_MS_LANGID_SPANISH_HONDURAS                  0x480A
-#define TT_MS_LANGID_SPANISH_NICARAGUA                 0x4C0A
-#define TT_MS_LANGID_SPANISH_PUERTO_RICO               0x500A
-#define TT_MS_LANGID_SPANISH_UNITED_STATES             0x540A
-#define TT_MS_LANGID_FINNISH_FINLAND                   0x040B
-#define TT_MS_LANGID_FRENCH_FRANCE                     0x040C
-#define TT_MS_LANGID_FRENCH_BELGIUM                    0x080C
-#define TT_MS_LANGID_FRENCH_CANADA                     0x0C0C
-#define TT_MS_LANGID_FRENCH_SWITZERLAND                0x100C
-#define TT_MS_LANGID_FRENCH_LUXEMBOURG                 0x140C
-#define TT_MS_LANGID_FRENCH_MONACO                     0x180C
-#define TT_MS_LANGID_HEBREW_ISRAEL                     0x040D
-#define TT_MS_LANGID_HUNGARIAN_HUNGARY                 0x040E
-#define TT_MS_LANGID_ICELANDIC_ICELAND                 0x040F
-#define TT_MS_LANGID_ITALIAN_ITALY                     0x0410
-#define TT_MS_LANGID_ITALIAN_SWITZERLAND               0x0810
-#define TT_MS_LANGID_JAPANESE_JAPAN                    0x0411
-#define TT_MS_LANGID_KOREAN_KOREA                      0x0412
-#define TT_MS_LANGID_DUTCH_NETHERLANDS                 0x0413
-#define TT_MS_LANGID_DUTCH_BELGIUM                     0x0813
-#define TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL           0x0414
-#define TT_MS_LANGID_NORWEGIAN_NORWAY_NYNORSK          0x0814
-#define TT_MS_LANGID_POLISH_POLAND                     0x0415
-#define TT_MS_LANGID_PORTUGUESE_BRAZIL                 0x0416
-#define TT_MS_LANGID_PORTUGUESE_PORTUGAL               0x0816
-#define TT_MS_LANGID_ROMANSH_SWITZERLAND               0x0417
-#define TT_MS_LANGID_ROMANIAN_ROMANIA                  0x0418
-#define TT_MS_LANGID_RUSSIAN_RUSSIA                    0x0419
-#define TT_MS_LANGID_CROATIAN_CROATIA                  0x041A
-#define TT_MS_LANGID_SERBIAN_SERBIA_LATIN              0x081A
-#define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC           0x0C1A
-#define TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA       0x101A
-#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA        0x141A
-#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN         0x181A
-#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC      0x1C1A
-#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZ_CYRILLIC      0x201A
-#define TT_MS_LANGID_SLOVAK_SLOVAKIA                   0x041B
-#define TT_MS_LANGID_ALBANIAN_ALBANIA                  0x041C
-#define TT_MS_LANGID_SWEDISH_SWEDEN                    0x041D
-#define TT_MS_LANGID_SWEDISH_FINLAND                   0x081D
-#define TT_MS_LANGID_THAI_THAILAND                     0x041E
-#define TT_MS_LANGID_TURKISH_TURKEY                    0x041F
-#define TT_MS_LANGID_URDU_PAKISTAN                     0x0420
-#define TT_MS_LANGID_INDONESIAN_INDONESIA              0x0421
-#define TT_MS_LANGID_UKRAINIAN_UKRAINE                 0x0422
-#define TT_MS_LANGID_BELARUSIAN_BELARUS                0x0423
-#define TT_MS_LANGID_SLOVENIAN_SLOVENIA                0x0424
-#define TT_MS_LANGID_ESTONIAN_ESTONIA                  0x0425
-#define TT_MS_LANGID_LATVIAN_LATVIA                    0x0426
-#define TT_MS_LANGID_LITHUANIAN_LITHUANIA              0x0427
-#define TT_MS_LANGID_TAJIK_TAJIKISTAN                  0x0428
-#define TT_MS_LANGID_VIETNAMESE_VIET_NAM               0x042A
-#define TT_MS_LANGID_ARMENIAN_ARMENIA                  0x042B
-#define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN            0x042C
-#define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC         0x082C
-#define TT_MS_LANGID_BASQUE_BASQUE                     0x042D
-#define TT_MS_LANGID_UPPER_SORBIAN_GERMANY             0x042E
-#define TT_MS_LANGID_LOWER_SORBIAN_GERMANY             0x082E
-#define TT_MS_LANGID_MACEDONIAN_MACEDONIA              0x042F
-#define TT_MS_LANGID_SETSWANA_SOUTH_AFRICA             0x0432
-#define TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA             0x0434
-#define TT_MS_LANGID_ISIZULU_SOUTH_AFRICA              0x0435
-#define TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA            0x0436
-#define TT_MS_LANGID_GEORGIAN_GEORGIA                  0x0437
-#define TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS           0x0438
-#define TT_MS_LANGID_HINDI_INDIA                       0x0439
-#define TT_MS_LANGID_MALTESE_MALTA                     0x043A
-#define TT_MS_LANGID_SAMI_NORTHERN_NORWAY              0x043B
-#define TT_MS_LANGID_SAMI_NORTHERN_SWEDEN              0x083B
-#define TT_MS_LANGID_SAMI_NORTHERN_FINLAND             0x0C3B
-#define TT_MS_LANGID_SAMI_LULE_NORWAY                  0x103B
-#define TT_MS_LANGID_SAMI_LULE_SWEDEN                  0x143B
-#define TT_MS_LANGID_SAMI_SOUTHERN_NORWAY              0x183B
-#define TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN              0x1C3B
-#define TT_MS_LANGID_SAMI_SKOLT_FINLAND                0x203B
-#define TT_MS_LANGID_SAMI_INARI_FINLAND                0x243B
-#define TT_MS_LANGID_IRISH_IRELAND                     0x083C
-#define TT_MS_LANGID_MALAY_MALAYSIA                    0x043E
-#define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM           0x083E
-#define TT_MS_LANGID_KAZAKH_KAZAKHSTAN                 0x043F
-#define TT_MS_LANGID_KYRGYZ_KYRGYZSTAN /* Cyrillic*/   0x0440
-#define TT_MS_LANGID_KISWAHILI_KENYA                   0x0441
-#define TT_MS_LANGID_TURKMEN_TURKMENISTAN              0x0442
-#define TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN            0x0443
-#define TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC         0x0843
-#define TT_MS_LANGID_TATAR_RUSSIA                      0x0444
-#define TT_MS_LANGID_BENGALI_INDIA                     0x0445
-#define TT_MS_LANGID_BENGALI_BANGLADESH                0x0845
-#define TT_MS_LANGID_PUNJABI_INDIA                     0x0446
-#define TT_MS_LANGID_GUJARATI_INDIA                    0x0447
-#define TT_MS_LANGID_ODIA_INDIA                        0x0448
-#define TT_MS_LANGID_TAMIL_INDIA                       0x0449
-#define TT_MS_LANGID_TELUGU_INDIA                      0x044A
-#define TT_MS_LANGID_KANNADA_INDIA                     0x044B
-#define TT_MS_LANGID_MALAYALAM_INDIA                   0x044C
-#define TT_MS_LANGID_ASSAMESE_INDIA                    0x044D
-#define TT_MS_LANGID_MARATHI_INDIA                     0x044E
-#define TT_MS_LANGID_SANSKRIT_INDIA                    0x044F
-#define TT_MS_LANGID_MONGOLIAN_MONGOLIA /* Cyrillic */ 0x0450
-#define TT_MS_LANGID_MONGOLIAN_PRC                     0x0850
-#define TT_MS_LANGID_TIBETAN_PRC                       0x0451
-#define TT_MS_LANGID_WELSH_UNITED_KINGDOM              0x0452
-#define TT_MS_LANGID_KHMER_CAMBODIA                    0x0453
-#define TT_MS_LANGID_LAO_LAOS                          0x0454
-#define TT_MS_LANGID_GALICIAN_GALICIAN                 0x0456
-#define TT_MS_LANGID_KONKANI_INDIA                     0x0457
-#define TT_MS_LANGID_SYRIAC_SYRIA                      0x045A
-#define TT_MS_LANGID_SINHALA_SRI_LANKA                 0x045B
-#define TT_MS_LANGID_INUKTITUT_CANADA                  0x045D
-#define TT_MS_LANGID_INUKTITUT_CANADA_LATIN            0x085D
-#define TT_MS_LANGID_AMHARIC_ETHIOPIA                  0x045E
-#define TT_MS_LANGID_TAMAZIGHT_ALGERIA                 0x085F
-#define TT_MS_LANGID_NEPALI_NEPAL                      0x0461
-#define TT_MS_LANGID_FRISIAN_NETHERLANDS               0x0462
-#define TT_MS_LANGID_PASHTO_AFGHANISTAN                0x0463
-#define TT_MS_LANGID_FILIPINO_PHILIPPINES              0x0464
-#define TT_MS_LANGID_DHIVEHI_MALDIVES                  0x0465
-#define TT_MS_LANGID_HAUSA_NIGERIA                     0x0468
-#define TT_MS_LANGID_YORUBA_NIGERIA                    0x046A
-#define TT_MS_LANGID_QUECHUA_BOLIVIA                   0x046B
-#define TT_MS_LANGID_QUECHUA_ECUADOR                   0x086B
-#define TT_MS_LANGID_QUECHUA_PERU                      0x0C6B
-#define TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA     0x046C
-#define TT_MS_LANGID_BASHKIR_RUSSIA                    0x046D
-#define TT_MS_LANGID_LUXEMBOURGISH_LUXEMBOURG          0x046E
-#define TT_MS_LANGID_GREENLANDIC_GREENLAND             0x046F
-#define TT_MS_LANGID_IGBO_NIGERIA                      0x0470
-#define TT_MS_LANGID_YI_PRC                            0x0478
-#define TT_MS_LANGID_MAPUDUNGUN_CHILE                  0x047A
-#define TT_MS_LANGID_MOHAWK_MOHAWK                     0x047C
-#define TT_MS_LANGID_BRETON_FRANCE                     0x047E
-#define TT_MS_LANGID_UIGHUR_PRC                        0x0480
-#define TT_MS_LANGID_MAORI_NEW_ZEALAND                 0x0481
-#define TT_MS_LANGID_OCCITAN_FRANCE                    0x0482
-#define TT_MS_LANGID_CORSICAN_FRANCE                   0x0483
-#define TT_MS_LANGID_ALSATIAN_FRANCE                   0x0484
-#define TT_MS_LANGID_YAKUT_RUSSIA                      0x0485
-#define TT_MS_LANGID_KICHE_GUATEMALA                   0x0486
-#define TT_MS_LANGID_KINYARWANDA_RWANDA                0x0487
-#define TT_MS_LANGID_WOLOF_SENEGAL                     0x0488
-#define TT_MS_LANGID_DARI_AFGHANISTAN                  0x048C
-
- -

Possible values of the language identifier field in the name records of the SFNT ‘name’ table if the ‘platform’ identifier code is TT_PLATFORM_MICROSOFT. These values are also used as return values for function FT_Get_CMap_Language_ID.

-

The canonical source for Microsoft's IDs is

-

https://www.microsoft.com/globaldev/reference/lcid-all.mspx ,

-

however, we only provide macros for language identifiers present in the OpenType specification: Microsoft has abandoned the concept of LCIDs (language code identifiers), and format 1 of the ‘name’ table provides a better mechanism for languages not covered here.

-

More legacy values not listed in the reference can be found in the FT_TRUETYPE_IDS_H header file.

- -
-
- -
-

TT_NAME_ID_XXX

-

Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).

-
-#define TT_NAME_ID_COPYRIGHT              0
-#define TT_NAME_ID_FONT_FAMILY            1
-#define TT_NAME_ID_FONT_SUBFAMILY         2
-#define TT_NAME_ID_UNIQUE_ID              3
-#define TT_NAME_ID_FULL_NAME              4
-#define TT_NAME_ID_VERSION_STRING         5
-#define TT_NAME_ID_PS_NAME                6
-#define TT_NAME_ID_TRADEMARK              7
-
-  /* the following values are from the OpenType spec */
-#define TT_NAME_ID_MANUFACTURER           8
-#define TT_NAME_ID_DESIGNER               9
-#define TT_NAME_ID_DESCRIPTION            10
-#define TT_NAME_ID_VENDOR_URL             11
-#define TT_NAME_ID_DESIGNER_URL           12
-#define TT_NAME_ID_LICENSE                13
-#define TT_NAME_ID_LICENSE_URL            14
-  /* number 15 is reserved */
-#define TT_NAME_ID_TYPOGRAPHIC_FAMILY     16
-#define TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY  17
-#define TT_NAME_ID_MAC_FULL_NAME          18
-
-  /* The following code is new as of 2000-01-21 */
-#define TT_NAME_ID_SAMPLE_TEXT            19
-
-  /* This is new in OpenType 1.3 */
-#define TT_NAME_ID_CID_FINDFONT_NAME      20
-
-  /* This is new in OpenType 1.5 */
-#define TT_NAME_ID_WWS_FAMILY             21
-#define TT_NAME_ID_WWS_SUBFAMILY          22
-
-  /* This is new in OpenType 1.7 */
-#define TT_NAME_ID_LIGHT_BACKGROUND       23
-#define TT_NAME_ID_DARK_BACKGROUND        24
-
-  /* This is new in OpenType 1.8 */
-#define TT_NAME_ID_VARIATIONS_PREFIX      25
-
-  /* these two values are deprecated */
-#define TT_NAME_ID_PREFERRED_FAMILY     TT_NAME_ID_TYPOGRAPHIC_FAMILY
-#define TT_NAME_ID_PREFERRED_SUBFAMILY  TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY
-
- -

Possible values of the ‘name’ identifier field in the name records of an SFNT ‘name’ table. These values are platform independent.

- -
-
- -
-

TT_UCR_XXX

-

Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).

-
-  /* ulUnicodeRange1 */
-  /* --------------- */
-
-  /* Bit  0   Basic Latin */
-#define TT_UCR_BASIC_LATIN                     (1L <<  0) /* U+0020-U+007E */
-  /* Bit  1   C1 Controls and Latin-1 Supplement */
-#define TT_UCR_LATIN1_SUPPLEMENT               (1L <<  1) /* U+0080-U+00FF */
-  /* Bit  2   Latin Extended-A */
-#define TT_UCR_LATIN_EXTENDED_A                (1L <<  2) /* U+0100-U+017F */
-  /* Bit  3   Latin Extended-B */
-#define TT_UCR_LATIN_EXTENDED_B                (1L <<  3) /* U+0180-U+024F */
-  /* Bit  4   IPA Extensions                 */
-  /*          Phonetic Extensions            */
-  /*          Phonetic Extensions Supplement */
-#define TT_UCR_IPA_EXTENSIONS                  (1L <<  4) /* U+0250-U+02AF */
-                                                          /* U+1D00-U+1D7F */
-                                                          /* U+1D80-U+1DBF */
-  /* Bit  5   Spacing Modifier Letters */
-  /*          Modifier Tone Letters    */
-#define TT_UCR_SPACING_MODIFIER                (1L <<  5) /* U+02B0-U+02FF */
-                                                          /* U+A700-U+A71F */
-  /* Bit  6   Combining Diacritical Marks            */
-  /*          Combining Diacritical Marks Supplement */
-#define TT_UCR_COMBINING_DIACRITICAL_MARKS     (1L <<  6) /* U+0300-U+036F */
-                                                          /* U+1DC0-U+1DFF */
-  /* Bit  7   Greek and Coptic */
-#define TT_UCR_GREEK                           (1L <<  7) /* U+0370-U+03FF */
-  /* Bit  8   Coptic */
-#define TT_UCR_COPTIC                          (1L <<  8) /* U+2C80-U+2CFF */
-  /* Bit  9   Cyrillic            */
-  /*          Cyrillic Supplement */
-  /*          Cyrillic Extended-A */
-  /*          Cyrillic Extended-B */
-#define TT_UCR_CYRILLIC                        (1L <<  9) /* U+0400-U+04FF */
-                                                          /* U+0500-U+052F */
-                                                          /* U+2DE0-U+2DFF */
-                                                          /* U+A640-U+A69F */
-  /* Bit 10   Armenian */
-#define TT_UCR_ARMENIAN                        (1L << 10) /* U+0530-U+058F */
-  /* Bit 11   Hebrew */
-#define TT_UCR_HEBREW                          (1L << 11) /* U+0590-U+05FF */
-  /* Bit 12   Vai */
-#define TT_UCR_VAI                             (1L << 12) /* U+A500-U+A63F */
-  /* Bit 13   Arabic            */
-  /*          Arabic Supplement */
-#define TT_UCR_ARABIC                          (1L << 13) /* U+0600-U+06FF */
-                                                          /* U+0750-U+077F */
-  /* Bit 14   NKo */
-#define TT_UCR_NKO                             (1L << 14) /* U+07C0-U+07FF */
-  /* Bit 15   Devanagari */
-#define TT_UCR_DEVANAGARI                      (1L << 15) /* U+0900-U+097F */
-  /* Bit 16   Bengali */
-#define TT_UCR_BENGALI                         (1L << 16) /* U+0980-U+09FF */
-  /* Bit 17   Gurmukhi */
-#define TT_UCR_GURMUKHI                        (1L << 17) /* U+0A00-U+0A7F */
-  /* Bit 18   Gujarati */
-#define TT_UCR_GUJARATI                        (1L << 18) /* U+0A80-U+0AFF */
-  /* Bit 19   Oriya */
-#define TT_UCR_ORIYA                           (1L << 19) /* U+0B00-U+0B7F */
-  /* Bit 20   Tamil */
-#define TT_UCR_TAMIL                           (1L << 20) /* U+0B80-U+0BFF */
-  /* Bit 21   Telugu */
-#define TT_UCR_TELUGU                          (1L << 21) /* U+0C00-U+0C7F */
-  /* Bit 22   Kannada */
-#define TT_UCR_KANNADA                         (1L << 22) /* U+0C80-U+0CFF */
-  /* Bit 23   Malayalam */
-#define TT_UCR_MALAYALAM                       (1L << 23) /* U+0D00-U+0D7F */
-  /* Bit 24   Thai */
-#define TT_UCR_THAI                            (1L << 24) /* U+0E00-U+0E7F */
-  /* Bit 25   Lao */
-#define TT_UCR_LAO                             (1L << 25) /* U+0E80-U+0EFF */
-  /* Bit 26   Georgian            */
-  /*          Georgian Supplement */
-#define TT_UCR_GEORGIAN                        (1L << 26) /* U+10A0-U+10FF */
-                                                          /* U+2D00-U+2D2F */
-  /* Bit 27   Balinese */
-#define TT_UCR_BALINESE                        (1L << 27) /* U+1B00-U+1B7F */
-  /* Bit 28   Hangul Jamo */
-#define TT_UCR_HANGUL_JAMO                     (1L << 28) /* U+1100-U+11FF */
-  /* Bit 29   Latin Extended Additional */
-  /*          Latin Extended-C          */
-  /*          Latin Extended-D          */
-#define TT_UCR_LATIN_EXTENDED_ADDITIONAL       (1L << 29) /* U+1E00-U+1EFF */
-                                                          /* U+2C60-U+2C7F */
-                                                          /* U+A720-U+A7FF */
-  /* Bit 30   Greek Extended */
-#define TT_UCR_GREEK_EXTENDED                  (1L << 30) /* U+1F00-U+1FFF */
-  /* Bit 31   General Punctuation      */
-  /*          Supplemental Punctuation */
-#define TT_UCR_GENERAL_PUNCTUATION             (1L << 31) /* U+2000-U+206F */
-                                                          /* U+2E00-U+2E7F */
-
-  /* ulUnicodeRange2 */
-  /* --------------- */
-
-  /* Bit 32   Superscripts And Subscripts */
-#define TT_UCR_SUPERSCRIPTS_SUBSCRIPTS         (1L <<  0) /* U+2070-U+209F */
-  /* Bit 33   Currency Symbols */
-#define TT_UCR_CURRENCY_SYMBOLS                (1L <<  1) /* U+20A0-U+20CF */
-  /* Bit 34   Combining Diacritical Marks For Symbols */
-#define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \
-                                               (1L <<  2) /* U+20D0-U+20FF */
-  /* Bit 35   Letterlike Symbols */
-#define TT_UCR_LETTERLIKE_SYMBOLS              (1L <<  3) /* U+2100-U+214F */
-  /* Bit 36   Number Forms */
-#define TT_UCR_NUMBER_FORMS                    (1L <<  4) /* U+2150-U+218F */
-  /* Bit 37   Arrows                           */
-  /*          Supplemental Arrows-A            */
-  /*          Supplemental Arrows-B            */
-  /*          Miscellaneous Symbols and Arrows */
-#define TT_UCR_ARROWS                          (1L <<  5) /* U+2190-U+21FF */
-                                                          /* U+27F0-U+27FF */
-                                                          /* U+2900-U+297F */
-                                                          /* U+2B00-U+2BFF */
-  /* Bit 38   Mathematical Operators               */
-  /*          Supplemental Mathematical Operators  */
-  /*          Miscellaneous Mathematical Symbols-A */
-  /*          Miscellaneous Mathematical Symbols-B */
-#define TT_UCR_MATHEMATICAL_OPERATORS          (1L <<  6) /* U+2200-U+22FF */
-                                                          /* U+2A00-U+2AFF */
-                                                          /* U+27C0-U+27EF */
-                                                          /* U+2980-U+29FF */
-  /* Bit 39 Miscellaneous Technical */
-#define TT_UCR_MISCELLANEOUS_TECHNICAL         (1L <<  7) /* U+2300-U+23FF */
-  /* Bit 40   Control Pictures */
-#define TT_UCR_CONTROL_PICTURES                (1L <<  8) /* U+2400-U+243F */
-  /* Bit 41   Optical Character Recognition */
-#define TT_UCR_OCR                             (1L <<  9) /* U+2440-U+245F */
-  /* Bit 42   Enclosed Alphanumerics */
-#define TT_UCR_ENCLOSED_ALPHANUMERICS          (1L << 10) /* U+2460-U+24FF */
-  /* Bit 43   Box Drawing */
-#define TT_UCR_BOX_DRAWING                     (1L << 11) /* U+2500-U+257F */
-  /* Bit 44   Block Elements */
-#define TT_UCR_BLOCK_ELEMENTS                  (1L << 12) /* U+2580-U+259F */
-  /* Bit 45   Geometric Shapes */
-#define TT_UCR_GEOMETRIC_SHAPES                (1L << 13) /* U+25A0-U+25FF */
-  /* Bit 46   Miscellaneous Symbols */
-#define TT_UCR_MISCELLANEOUS_SYMBOLS           (1L << 14) /* U+2600-U+26FF */
-  /* Bit 47   Dingbats */
-#define TT_UCR_DINGBATS                        (1L << 15) /* U+2700-U+27BF */
-  /* Bit 48   CJK Symbols and Punctuation */
-#define TT_UCR_CJK_SYMBOLS                     (1L << 16) /* U+3000-U+303F */
-  /* Bit 49   Hiragana */
-#define TT_UCR_HIRAGANA                        (1L << 17) /* U+3040-U+309F */
-  /* Bit 50   Katakana                     */
-  /*          Katakana Phonetic Extensions */
-#define TT_UCR_KATAKANA                        (1L << 18) /* U+30A0-U+30FF */
-                                                          /* U+31F0-U+31FF */
-  /* Bit 51   Bopomofo          */
-  /*          Bopomofo Extended */
-#define TT_UCR_BOPOMOFO                        (1L << 19) /* U+3100-U+312F */
-                                                          /* U+31A0-U+31BF */
-  /* Bit 52   Hangul Compatibility Jamo */
-#define TT_UCR_HANGUL_COMPATIBILITY_JAMO       (1L << 20) /* U+3130-U+318F */
-  /* Bit 53   Phags-Pa */
-#define TT_UCR_CJK_MISC                        (1L << 21) /* U+A840-U+A87F */
-#define TT_UCR_KANBUN  TT_UCR_CJK_MISC /* deprecated */
-#define TT_UCR_PHAGSPA
-  /* Bit 54   Enclosed CJK Letters and Months */
-#define TT_UCR_ENCLOSED_CJK_LETTERS_MONTHS     (1L << 22) /* U+3200-U+32FF */
-  /* Bit 55   CJK Compatibility */
-#define TT_UCR_CJK_COMPATIBILITY               (1L << 23) /* U+3300-U+33FF */
-  /* Bit 56   Hangul Syllables */
-#define TT_UCR_HANGUL                          (1L << 24) /* U+AC00-U+D7A3 */
-  /* Bit 57   High Surrogates              */
-  /*          High Private Use Surrogates  */
-  /*          Low Surrogates               */
-
-  /* According to OpenType specs v.1.3+,   */
-  /* setting bit 57 implies that there is  */
-  /* at least one codepoint beyond the     */
-  /* Basic Multilingual Plane that is      */
-  /* supported by this font.  So it really */
-  /* means >= U+10000.                     */
-#define TT_UCR_SURROGATES                      (1L << 25) /* U+D800-U+DB7F */
-                                                          /* U+DB80-U+DBFF */
-                                                          /* U+DC00-U+DFFF */
-#define TT_UCR_NON_PLANE_0  TT_UCR_SURROGATES
-  /* Bit 58  Phoenician */
-#define TT_UCR_PHOENICIAN                      (1L << 26) /*U+10900-U+1091F*/
-  /* Bit 59   CJK Unified Ideographs             */
-  /*          CJK Radicals Supplement            */
-  /*          Kangxi Radicals                    */
-  /*          Ideographic Description Characters */
-  /*          CJK Unified Ideographs Extension A */
-  /*          CJK Unified Ideographs Extension B */
-  /*          Kanbun                             */
-#define TT_UCR_CJK_UNIFIED_IDEOGRAPHS          (1L << 27) /* U+4E00-U+9FFF */
-                                                          /* U+2E80-U+2EFF */
-                                                          /* U+2F00-U+2FDF */
-                                                          /* U+2FF0-U+2FFF */
-                                                          /* U+3400-U+4DB5 */
-                                                          /*U+20000-U+2A6DF*/
-                                                          /* U+3190-U+319F */
-  /* Bit 60   Private Use */
-#define TT_UCR_PRIVATE_USE                     (1L << 28) /* U+E000-U+F8FF */
-  /* Bit 61   CJK Strokes                             */
-  /*          CJK Compatibility Ideographs            */
-  /*          CJK Compatibility Ideographs Supplement */
-#define TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS    (1L << 29) /* U+31C0-U+31EF */
-                                                          /* U+F900-U+FAFF */
-                                                          /*U+2F800-U+2FA1F*/
-  /* Bit 62   Alphabetic Presentation Forms */
-#define TT_UCR_ALPHABETIC_PRESENTATION_FORMS   (1L << 30) /* U+FB00-U+FB4F */
-  /* Bit 63   Arabic Presentation Forms-A */
-#define TT_UCR_ARABIC_PRESENTATION_FORMS_A     (1L << 31) /* U+FB50-U+FDFF */
-
-  /* ulUnicodeRange3 */
-  /* --------------- */
-
-  /* Bit 64   Combining Half Marks */
-#define TT_UCR_COMBINING_HALF_MARKS            (1L <<  0) /* U+FE20-U+FE2F */
-  /* Bit 65   Vertical forms          */
-  /*          CJK Compatibility Forms */
-#define TT_UCR_CJK_COMPATIBILITY_FORMS         (1L <<  1) /* U+FE10-U+FE1F */
-                                                          /* U+FE30-U+FE4F */
-  /* Bit 66   Small Form Variants */
-#define TT_UCR_SMALL_FORM_VARIANTS             (1L <<  2) /* U+FE50-U+FE6F */
-  /* Bit 67   Arabic Presentation Forms-B */
-#define TT_UCR_ARABIC_PRESENTATION_FORMS_B     (1L <<  3) /* U+FE70-U+FEFE */
-  /* Bit 68   Halfwidth and Fullwidth Forms */
-#define TT_UCR_HALFWIDTH_FULLWIDTH_FORMS       (1L <<  4) /* U+FF00-U+FFEF */
-  /* Bit 69   Specials */
-#define TT_UCR_SPECIALS                        (1L <<  5) /* U+FFF0-U+FFFD */
-  /* Bit 70   Tibetan */
-#define TT_UCR_TIBETAN                         (1L <<  6) /* U+0F00-U+0FFF */
-  /* Bit 71   Syriac */
-#define TT_UCR_SYRIAC                          (1L <<  7) /* U+0700-U+074F */
-  /* Bit 72   Thaana */
-#define TT_UCR_THAANA                          (1L <<  8) /* U+0780-U+07BF */
-  /* Bit 73   Sinhala */
-#define TT_UCR_SINHALA                         (1L <<  9) /* U+0D80-U+0DFF */
-  /* Bit 74   Myanmar */
-#define TT_UCR_MYANMAR                         (1L << 10) /* U+1000-U+109F */
-  /* Bit 75   Ethiopic            */
-  /*          Ethiopic Supplement */
-  /*          Ethiopic Extended   */
-#define TT_UCR_ETHIOPIC                        (1L << 11) /* U+1200-U+137F */
-                                                          /* U+1380-U+139F */
-                                                          /* U+2D80-U+2DDF */
-  /* Bit 76   Cherokee */
-#define TT_UCR_CHEROKEE                        (1L << 12) /* U+13A0-U+13FF */
-  /* Bit 77   Unified Canadian Aboriginal Syllabics */
-#define TT_UCR_CANADIAN_ABORIGINAL_SYLLABICS   (1L << 13) /* U+1400-U+167F */
-  /* Bit 78   Ogham */
-#define TT_UCR_OGHAM                           (1L << 14) /* U+1680-U+169F */
-  /* Bit 79   Runic */
-#define TT_UCR_RUNIC                           (1L << 15) /* U+16A0-U+16FF */
-  /* Bit 80   Khmer         */
-  /*          Khmer Symbols */
-#define TT_UCR_KHMER                           (1L << 16) /* U+1780-U+17FF */
-                                                          /* U+19E0-U+19FF */
-  /* Bit 81   Mongolian */
-#define TT_UCR_MONGOLIAN                       (1L << 17) /* U+1800-U+18AF */
-  /* Bit 82   Braille Patterns */
-#define TT_UCR_BRAILLE                         (1L << 18) /* U+2800-U+28FF */
-  /* Bit 83   Yi Syllables */
-  /*          Yi Radicals  */
-#define TT_UCR_YI                              (1L << 19) /* U+A000-U+A48F */
-                                                          /* U+A490-U+A4CF */
-  /* Bit 84   Tagalog  */
-  /*          Hanunoo  */
-  /*          Buhid    */
-  /*          Tagbanwa */
-#define TT_UCR_PHILIPPINE                      (1L << 20) /* U+1700-U+171F */
-                                                          /* U+1720-U+173F */
-                                                          /* U+1740-U+175F */
-                                                          /* U+1760-U+177F */
-  /* Bit 85   Old Italic */
-#define TT_UCR_OLD_ITALIC                      (1L << 21) /*U+10300-U+1032F*/
-  /* Bit 86   Gothic */
-#define TT_UCR_GOTHIC                          (1L << 22) /*U+10330-U+1034F*/
-  /* Bit 87   Deseret */
-#define TT_UCR_DESERET                         (1L << 23) /*U+10400-U+1044F*/
-  /* Bit 88   Byzantine Musical Symbols      */
-  /*          Musical Symbols                */
-  /*          Ancient Greek Musical Notation */
-#define TT_UCR_MUSICAL_SYMBOLS                 (1L << 24) /*U+1D000-U+1D0FF*/
-                                                          /*U+1D100-U+1D1FF*/
-                                                          /*U+1D200-U+1D24F*/
-  /* Bit 89   Mathematical Alphanumeric Symbols */
-#define TT_UCR_MATH_ALPHANUMERIC_SYMBOLS       (1L << 25) /*U+1D400-U+1D7FF*/
-  /* Bit 90   Private Use (plane 15) */
-  /*          Private Use (plane 16) */
-#define TT_UCR_PRIVATE_USE_SUPPLEMENTARY       (1L << 26) /*U+F0000-U+FFFFD*/
-                                                        /*U+100000-U+10FFFD*/
-  /* Bit 91   Variation Selectors            */
-  /*          Variation Selectors Supplement */
-#define TT_UCR_VARIATION_SELECTORS             (1L << 27) /* U+FE00-U+FE0F */
-                                                          /*U+E0100-U+E01EF*/
-  /* Bit 92   Tags */
-#define TT_UCR_TAGS                            (1L << 28) /*U+E0000-U+E007F*/
-  /* Bit 93   Limbu */
-#define TT_UCR_LIMBU                           (1L << 29) /* U+1900-U+194F */
-  /* Bit 94   Tai Le */
-#define TT_UCR_TAI_LE                          (1L << 30) /* U+1950-U+197F */
-  /* Bit 95   New Tai Lue */
-#define TT_UCR_NEW_TAI_LUE                     (1L << 31) /* U+1980-U+19DF */
-
-  /* ulUnicodeRange4 */
-  /* --------------- */
-
-  /* Bit 96   Buginese */
-#define TT_UCR_BUGINESE                        (1L <<  0) /* U+1A00-U+1A1F */
-  /* Bit 97   Glagolitic */
-#define TT_UCR_GLAGOLITIC                      (1L <<  1) /* U+2C00-U+2C5F */
-  /* Bit 98   Tifinagh */
-#define TT_UCR_TIFINAGH                        (1L <<  2) /* U+2D30-U+2D7F */
-  /* Bit 99   Yijing Hexagram Symbols */
-#define TT_UCR_YIJING                          (1L <<  3) /* U+4DC0-U+4DFF */
-  /* Bit 100  Syloti Nagri */
-#define TT_UCR_SYLOTI_NAGRI                    (1L <<  4) /* U+A800-U+A82F */
-  /* Bit 101  Linear B Syllabary */
-  /*          Linear B Ideograms */
-  /*          Aegean Numbers     */
-#define TT_UCR_LINEAR_B                        (1L <<  5) /*U+10000-U+1007F*/
-                                                          /*U+10080-U+100FF*/
-                                                          /*U+10100-U+1013F*/
-  /* Bit 102  Ancient Greek Numbers */
-#define TT_UCR_ANCIENT_GREEK_NUMBERS           (1L <<  6) /*U+10140-U+1018F*/
-  /* Bit 103  Ugaritic */
-#define TT_UCR_UGARITIC                        (1L <<  7) /*U+10380-U+1039F*/
-  /* Bit 104  Old Persian */
-#define TT_UCR_OLD_PERSIAN                     (1L <<  8) /*U+103A0-U+103DF*/
-  /* Bit 105  Shavian */
-#define TT_UCR_SHAVIAN                         (1L <<  9) /*U+10450-U+1047F*/
-  /* Bit 106  Osmanya */
-#define TT_UCR_OSMANYA                         (1L << 10) /*U+10480-U+104AF*/
-  /* Bit 107  Cypriot Syllabary */
-#define TT_UCR_CYPRIOT_SYLLABARY               (1L << 11) /*U+10800-U+1083F*/
-  /* Bit 108  Kharoshthi */
-#define TT_UCR_KHAROSHTHI                      (1L << 12) /*U+10A00-U+10A5F*/
-  /* Bit 109  Tai Xuan Jing Symbols */
-#define TT_UCR_TAI_XUAN_JING                   (1L << 13) /*U+1D300-U+1D35F*/
-  /* Bit 110  Cuneiform                         */
-  /*          Cuneiform Numbers and Punctuation */
-#define TT_UCR_CUNEIFORM                       (1L << 14) /*U+12000-U+123FF*/
-                                                          /*U+12400-U+1247F*/
-  /* Bit 111  Counting Rod Numerals */
-#define TT_UCR_COUNTING_ROD_NUMERALS           (1L << 15) /*U+1D360-U+1D37F*/
-  /* Bit 112  Sundanese */
-#define TT_UCR_SUNDANESE                       (1L << 16) /* U+1B80-U+1BBF */
-  /* Bit 113  Lepcha */
-#define TT_UCR_LEPCHA                          (1L << 17) /* U+1C00-U+1C4F */
-  /* Bit 114  Ol Chiki */
-#define TT_UCR_OL_CHIKI                        (1L << 18) /* U+1C50-U+1C7F */
-  /* Bit 115  Saurashtra */
-#define TT_UCR_SAURASHTRA                      (1L << 19) /* U+A880-U+A8DF */
-  /* Bit 116  Kayah Li */
-#define TT_UCR_KAYAH_LI                        (1L << 20) /* U+A900-U+A92F */
-  /* Bit 117  Rejang */
-#define TT_UCR_REJANG                          (1L << 21) /* U+A930-U+A95F */
-  /* Bit 118  Cham */
-#define TT_UCR_CHAM                            (1L << 22) /* U+AA00-U+AA5F */
-  /* Bit 119  Ancient Symbols */
-#define TT_UCR_ANCIENT_SYMBOLS                 (1L << 23) /*U+10190-U+101CF*/
-  /* Bit 120  Phaistos Disc */
-#define TT_UCR_PHAISTOS_DISC                   (1L << 24) /*U+101D0-U+101FF*/
-  /* Bit 121  Carian */
-  /*          Lycian */
-  /*          Lydian */
-#define TT_UCR_OLD_ANATOLIAN                   (1L << 25) /*U+102A0-U+102DF*/
-                                                          /*U+10280-U+1029F*/
-                                                          /*U+10920-U+1093F*/
-  /* Bit 122  Domino Tiles  */
-  /*          Mahjong Tiles */
-#define TT_UCR_GAME_TILES                      (1L << 26) /*U+1F030-U+1F09F*/
-                                                          /*U+1F000-U+1F02F*/
-  /* Bit 123-127 Reserved for process-internal usage */
-
- -

Possible bit mask values for the ‘ulUnicodeRangeX’ fields in an SFNT ‘OS/2’ table.

- -
-
- - - diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/docs/reference/ft2-tt_driver.html b/extensions/gdx-freetype/jni/freetype-2.9.1/docs/reference/ft2-tt_driver.html deleted file mode 100644 index cc8008ddf..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/docs/reference/ft2-tt_driver.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - -FreeType-2.9.1 API Reference - - - - - -

FreeType-2.9.1 API Reference

- -

The TrueType driver

- -

While FreeType's TrueType driver doesn't expose API functions by itself, it is possible to control its behaviour with FT_Property_Set and FT_Property_Get. The following lists the available properties together with the necessary macros and structures.

-

The TrueType driver's module name is ‘truetype’.

-

A single property interpreter-version is available, as documented in the ‘Driver properties’ section.

-

We start with a list of definitions, kindly provided by Greg Hitchcock.

-

Bi-Level Rendering

-

Monochromatic rendering, exclusively used in the early days of TrueType by both Apple and Microsoft. Microsoft's GDI interface supported hinting of the right-side bearing point, such that the advance width could be non-linear. Most often this was done to achieve some level of glyph symmetry. To enable reasonable performance (e.g., not having to run hinting on all glyphs just to get the widths) there was a bit in the head table indicating if the side bearing was hinted, and additional tables, ‘hdmx’ and ‘LTSH’, to cache hinting widths across multiple sizes and device aspect ratios.

-

Font Smoothing

-

Microsoft's GDI implementation of anti-aliasing. Not traditional anti-aliasing as the outlines were hinted before the sampling. The widths matched the bi-level rendering.

-

ClearType Rendering

-

Technique that uses physical subpixels to improve rendering on LCD (and other) displays. Because of the higher resolution, many methods of improving symmetry in glyphs through hinting the right-side bearing were no longer necessary. This lead to what GDI calls ‘natural widths’ ClearType, see http://www.beatstamm.com/typography/RTRCh4.htm#Sec21. Since hinting has extra resolution, most non-linearity went away, but it is still possible for hints to change the advance widths in this mode.

-

ClearType Compatible Widths

-

One of the earliest challenges with ClearType was allowing the implementation in GDI to be selected without requiring all UI and documents to reflow. To address this, a compatible method of rendering ClearType was added where the font hints are executed once to determine the width in bi-level rendering, and then re-run in ClearType, with the difference in widths being absorbed in the font hints for ClearType (mostly in the white space of hints); see http://www.beatstamm.com/typography/RTRCh4.htm#Sec20. Somewhat by definition, compatible width ClearType allows for non-linear widths, but only when the bi-level version has non-linear widths.

-

ClearType Subpixel Positioning

-

One of the nice benefits of ClearType is the ability to more crisply display fractional widths; unfortunately, the GDI model of integer bitmaps did not support this. However, the WPF and Direct Write frameworks do support fractional widths. DWrite calls this ‘natural mode’, not to be confused with GDI's ‘natural widths’. Subpixel positioning, in the current implementation of Direct Write, unfortunately does not support hinted advance widths, see http://www.beatstamm.com/typography/RTRCh4.htm#Sec22. Note that the TrueType interpreter fully allows the advance width to be adjusted in this mode, just the DWrite client will ignore those changes.

-

ClearType Backward Compatibility

-

This is a set of exceptions made in the TrueType interpreter to minimize hinting techniques that were problematic with the extra resolution of ClearType; see http://www.beatstamm.com/typography/RTRCh4.htm#Sec1 and https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx. This technique is not to be confused with ClearType compatible widths. ClearType backward compatibility has no direct impact on changing advance widths, but there might be an indirect impact on disabling some deltas. This could be worked around in backward compatibility mode.

-

Native ClearType Mode

-

(Not to be confused with ‘natural widths’.) This mode removes all the exceptions in the TrueType interpreter when running with ClearType. Any issues on widths would still apply, though.

- - - diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/include/freetype/ftdriver.h b/extensions/gdx-freetype/jni/freetype-2.9.1/include/freetype/ftdriver.h deleted file mode 100644 index e90475b2a..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/include/freetype/ftdriver.h +++ /dev/null @@ -1,1225 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftdriver.h */ -/* */ -/* FreeType API for controlling driver modules (specification only). */ -/* */ -/* Copyright 2017-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTDRIVER_H_ -#define FTDRIVER_H_ - -#include -#include FT_FREETYPE_H -#include FT_PARAMETER_TAGS_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - - /************************************************************************** - * - * @section: - * auto_hinter - * - * @title: - * The auto-hinter - * - * @abstract: - * Controlling the auto-hinting module. - * - * @description: - * While FreeType's auto-hinter doesn't expose API functions by itself, - * it is possible to control its behaviour with @FT_Property_Set and - * @FT_Property_Get. The following lists the available properties - * together with the necessary macros and structures. - * - * Note that the auto-hinter's module name is `autofitter' for - * historical reasons. - * - * Available properties are @increase-x-height, @no-stem-darkening - * (experimental), @darkening-parameters (experimental), @warping - * (experimental), @glyph-to-script-map (experimental), @fallback-script - * (experimental), and @default-script (experimental), as documented in - * the @properties section. - * - */ - - - /************************************************************************** - * - * @section: - * cff_driver - * - * @title: - * The CFF driver - * - * @abstract: - * Controlling the CFF driver module. - * - * @description: - * While FreeType's CFF driver doesn't expose API functions by itself, - * it is possible to control its behaviour with @FT_Property_Set and - * @FT_Property_Get. - * - * The CFF driver's module name is `cff'. - * - * Available properties are @hinting-engine, @no-stem-darkening, - * @darkening-parameters, and @random-seed, as documented in the - * @properties section. - * - * - * *Hinting* *and* *antialiasing* *principles* *of* *the* *new* *engine* - * - * The rasterizer is positioning horizontal features (e.g., ascender - * height & x-height, or crossbars) on the pixel grid and minimizing the - * amount of antialiasing applied to them, while placing vertical - * features (vertical stems) on the pixel grid without hinting, thus - * representing the stem position and weight accurately. Sometimes the - * vertical stems may be only partially black. In this context, - * `antialiasing' means that stems are not positioned exactly on pixel - * borders, causing a fuzzy appearance. - * - * There are two principles behind this approach. - * - * 1) No hinting in the horizontal direction: Unlike `superhinted' - * TrueType, which changes glyph widths to accommodate regular - * inter-glyph spacing, Adobe's approach is `faithful to the design' in - * representing both the glyph width and the inter-glyph spacing - * designed for the font. This makes the screen display as close as it - * can be to the result one would get with infinite resolution, while - * preserving what is considered the key characteristics of each glyph. - * Note that the distances between unhinted and grid-fitted positions at - * small sizes are comparable to kerning values and thus would be - * noticeable (and distracting) while reading if hinting were applied. - * - * One of the reasons to not hint horizontally is antialiasing for LCD - * screens: The pixel geometry of modern displays supplies three - * vertical subpixels as the eye moves horizontally across each visible - * pixel. On devices where we can be certain this characteristic is - * present a rasterizer can take advantage of the subpixels to add - * increments of weight. In Western writing systems this turns out to - * be the more critical direction anyway; the weights and spacing of - * vertical stems (see above) are central to Armenian, Cyrillic, Greek, - * and Latin type designs. Even when the rasterizer uses greyscale - * antialiasing instead of color (a necessary compromise when one - * doesn't know the screen characteristics), the unhinted vertical - * features preserve the design's weight and spacing much better than - * aliased type would. - * - * 2) Alignment in the vertical direction: Weights and spacing along the - * y~axis are less critical; what is much more important is the visual - * alignment of related features (like cap-height and x-height). The - * sense of alignment for these is enhanced by the sharpness of grid-fit - * edges, while the cruder vertical resolution (full pixels instead of - * 1/3 pixels) is less of a problem. - * - * On the technical side, horizontal alignment zones for ascender, - * x-height, and other important height values (traditionally called - * `blue zones') as defined in the font are positioned independently, - * each being rounded to the nearest pixel edge, taking care of - * overshoot suppression at small sizes, stem darkening, and scaling. - * - * Hstems (this is, hint values defined in the font to help align - * horizontal features) that fall within a blue zone are said to be - * `captured' and are aligned to that zone. Uncaptured stems are moved - * in one of four ways, top edge up or down, bottom edge up or down. - * Unless there are conflicting hstems, the smallest movement is taken - * to minimize distortion. - * - */ - - - /************************************************************************** - * - * @section: - * pcf_driver - * - * @title: - * The PCF driver - * - * @abstract: - * Controlling the PCF driver module. - * - * @description: - * While FreeType's PCF driver doesn't expose API functions by itself, - * it is possible to control its behaviour with @FT_Property_Set and - * @FT_Property_Get. Right now, there is a single property - * @no-long-family-names available if FreeType is compiled with - * PCF_CONFIG_OPTION_LONG_FAMILY_NAMES. - * - * The PCF driver's module name is `pcf'. - * - */ - - - /************************************************************************** - * - * @section: - * t1_cid_driver - * - * @title: - * The Type 1 and CID drivers - * - * @abstract: - * Controlling the Type~1 and CID driver modules. - * - * @description: - * It is possible to control the behaviour of FreeType's Type~1 and - * Type~1 CID drivers with @FT_Property_Set and @FT_Property_Get. - * - * Behind the scenes, both drivers use the Adobe CFF engine for hinting; - * however, the used properties must be specified separately. - * - * The Type~1 driver's module name is `type1'; the CID driver's module - * name is `t1cid'. - * - * Available properties are @hinting-engine, @no-stem-darkening, - * @darkening-parameters, and @random-seed, as documented in the - * @properties section. - * - * Please see the @cff_driver section for more details on the new - * hinting engine. - * - */ - - - /************************************************************************** - * - * @section: - * tt_driver - * - * @title: - * The TrueType driver - * - * @abstract: - * Controlling the TrueType driver module. - * - * @description: - * While FreeType's TrueType driver doesn't expose API functions by - * itself, it is possible to control its behaviour with @FT_Property_Set - * and @FT_Property_Get. The following lists the available properties - * together with the necessary macros and structures. - * - * The TrueType driver's module name is `truetype'. - * - * A single property @interpreter-version is available, as documented in - * the @properties section. - * - * We start with a list of definitions, kindly provided by Greg - * Hitchcock. - * - * _Bi-Level_ _Rendering_ - * - * Monochromatic rendering, exclusively used in the early days of - * TrueType by both Apple and Microsoft. Microsoft's GDI interface - * supported hinting of the right-side bearing point, such that the - * advance width could be non-linear. Most often this was done to - * achieve some level of glyph symmetry. To enable reasonable - * performance (e.g., not having to run hinting on all glyphs just to - * get the widths) there was a bit in the head table indicating if the - * side bearing was hinted, and additional tables, `hdmx' and `LTSH', to - * cache hinting widths across multiple sizes and device aspect ratios. - * - * _Font_ _Smoothing_ - * - * Microsoft's GDI implementation of anti-aliasing. Not traditional - * anti-aliasing as the outlines were hinted before the sampling. The - * widths matched the bi-level rendering. - * - * _ClearType_ _Rendering_ - * - * Technique that uses physical subpixels to improve rendering on LCD - * (and other) displays. Because of the higher resolution, many methods - * of improving symmetry in glyphs through hinting the right-side - * bearing were no longer necessary. This lead to what GDI calls - * `natural widths' ClearType, see - * http://www.beatstamm.com/typography/RTRCh4.htm#Sec21. Since hinting - * has extra resolution, most non-linearity went away, but it is still - * possible for hints to change the advance widths in this mode. - * - * _ClearType_ _Compatible_ _Widths_ - * - * One of the earliest challenges with ClearType was allowing the - * implementation in GDI to be selected without requiring all UI and - * documents to reflow. To address this, a compatible method of - * rendering ClearType was added where the font hints are executed once - * to determine the width in bi-level rendering, and then re-run in - * ClearType, with the difference in widths being absorbed in the font - * hints for ClearType (mostly in the white space of hints); see - * http://www.beatstamm.com/typography/RTRCh4.htm#Sec20. Somewhat by - * definition, compatible width ClearType allows for non-linear widths, - * but only when the bi-level version has non-linear widths. - * - * _ClearType_ _Subpixel_ _Positioning_ - * - * One of the nice benefits of ClearType is the ability to more crisply - * display fractional widths; unfortunately, the GDI model of integer - * bitmaps did not support this. However, the WPF and Direct Write - * frameworks do support fractional widths. DWrite calls this `natural - * mode', not to be confused with GDI's `natural widths'. Subpixel - * positioning, in the current implementation of Direct Write, - * unfortunately does not support hinted advance widths, see - * http://www.beatstamm.com/typography/RTRCh4.htm#Sec22. Note that the - * TrueType interpreter fully allows the advance width to be adjusted in - * this mode, just the DWrite client will ignore those changes. - * - * _ClearType_ _Backward_ _Compatibility_ - * - * This is a set of exceptions made in the TrueType interpreter to - * minimize hinting techniques that were problematic with the extra - * resolution of ClearType; see - * http://www.beatstamm.com/typography/RTRCh4.htm#Sec1 and - * https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx. - * This technique is not to be confused with ClearType compatible - * widths. ClearType backward compatibility has no direct impact on - * changing advance widths, but there might be an indirect impact on - * disabling some deltas. This could be worked around in backward - * compatibility mode. - * - * _Native_ _ClearType_ _Mode_ - * - * (Not to be confused with `natural widths'.) This mode removes all - * the exceptions in the TrueType interpreter when running with - * ClearType. Any issues on widths would still apply, though. - * - */ - - - /************************************************************************** - * - * @section: - * properties - * - * @title: - * Driver properties - * - * @abstract: - * Controlling driver modules. - * - * @description: - * Driver modules can be controlled by setting and unsetting properties, - * using the functions @FT_Property_Set and @FT_Property_Get. This - * section documents the available properties, together with auxiliary - * macros and structures. - * - */ - - - /************************************************************************** - * - * @enum: - * FT_HINTING_XXX - * - * @description: - * A list of constants used for the @hinting-engine property to - * select the hinting engine for CFF, Type~1, and CID fonts. - * - * @values: - * FT_HINTING_FREETYPE :: - * Use the old FreeType hinting engine. - * - * FT_HINTING_ADOBE :: - * Use the hinting engine contributed by Adobe. - * - * @since: - * 2.9 - * - */ -#define FT_HINTING_FREETYPE 0 -#define FT_HINTING_ADOBE 1 - - /* these constants (introduced in 2.4.12) are deprecated */ -#define FT_CFF_HINTING_FREETYPE FT_HINTING_FREETYPE -#define FT_CFF_HINTING_ADOBE FT_HINTING_ADOBE - - - /************************************************************************** - * - * @property: - * hinting-engine - * - * @description: - * Thanks to Adobe, which contributed a new hinting (and parsing) - * engine, an application can select between `freetype' and `adobe' if - * compiled with CFF_CONFIG_OPTION_OLD_ENGINE. If this configuration - * macro isn't defined, `hinting-engine' does nothing. - * - * The same holds for the Type~1 and CID modules if compiled with - * T1_CONFIG_OPTION_OLD_ENGINE. - * - * For the `cff' module, the default engine is `freetype' if - * CFF_CONFIG_OPTION_OLD_ENGINE is defined, and `adobe' otherwise. - * - * For both the `type1' and `t1cid' modules, the default engine is - * `freetype' if T1_CONFIG_OPTION_OLD_ENGINE is defined, and `adobe' - * otherwise. - * - * The following example code demonstrates how to select Adobe's hinting - * engine for the `cff' module (omitting the error handling). - * - * { - * FT_Library library; - * FT_UInt hinting_engine = FT_CFF_HINTING_ADOBE; - * - * - * FT_Init_FreeType( &library ); - * - * FT_Property_Set( library, "cff", - * "hinting-engine", &hinting_engine ); - * } - * - * @note: - * This property can be used with @FT_Property_Get also. - * - * This property can be set via the `FREETYPE_PROPERTIES' environment - * variable (using values `adobe' or `freetype'). - * - * @since: - * 2.4.12 (for `cff' module) - * - * 2.9 (for `type1' and `t1cid' modules) - * - */ - - - /************************************************************************** - * - * @property: - * no-stem-darkening - * - * @description: - * All glyphs that pass through the auto-hinter will be emboldened - * unless this property is set to TRUE. The same is true for the CFF, - * Type~1, and CID font modules if the `Adobe' engine is selected (which - * is the default). - * - * Stem darkening emboldens glyphs at smaller sizes to make them more - * readable on common low-DPI screens when using linear alpha blending - * and gamma correction, see @FT_Render_Glyph. When not using linear - * alpha blending and gamma correction, glyphs will appear heavy and - * fuzzy! - * - * Gamma correction essentially lightens fonts since shades of grey are - * shifted to higher pixel values (=~higher brightness) to match the - * original intention to the reality of our screens. The side-effect is - * that glyphs `thin out'. Mac OS~X and Adobe's proprietary font - * rendering library implement a counter-measure: stem darkening at - * smaller sizes where shades of gray dominate. By emboldening a glyph - * slightly in relation to its pixel size, individual pixels get higher - * coverage of filled-in outlines and are therefore `blacker'. This - * counteracts the `thinning out' of glyphs, making text remain readable - * at smaller sizes. - * - * By default, the Adobe engines for CFF, Type~1, and CID fonts darken - * stems at smaller sizes, regardless of hinting, to enhance contrast. - * Setting this property, stem darkening gets switched off. - * - * For the auto-hinter, stem-darkening is experimental currently and - * thus switched off by default (this is, `no-stem-darkening' is set to - * TRUE by default). Total consistency with the CFF driver is not - * achieved right now because the emboldening method differs and glyphs - * must be scaled down on the Y-axis to keep outline points inside their - * precomputed blue zones. The smaller the size (especially 9ppem and - * down), the higher the loss of emboldening versus the CFF driver. - * - * Note that stem darkening is never applied if @FT_LOAD_NO_SCALE is - * set. - * - * { - * FT_Library library; - * FT_Bool no_stem_darkening = TRUE; - * - * - * FT_Init_FreeType( &library ); - * - * FT_Property_Set( library, "cff", - * "no-stem-darkening", &no_stem_darkening ); - * } - * - * @note: - * This property can be used with @FT_Property_Get also. - * - * This property can be set via the `FREETYPE_PROPERTIES' environment - * variable (using values 1 and 0 for `on' and `off', respectively). - * It can also be set per face using @FT_Face_Properties with - * @FT_PARAM_TAG_STEM_DARKENING. - * - * @since: - * 2.4.12 (for `cff' module) - * - * 2.6.2 (for `autofitter' module) - * - * 2.9 (for `type1' and `t1cid' modules) - * - */ - - - /************************************************************************** - * - * @property: - * darkening-parameters - * - * @description: - * By default, the Adobe hinting engine, as used by the CFF, Type~1, and - * CID font drivers, darkens stems as follows (if the - * `no-stem-darkening' property isn't set): - * - * { - * stem width <= 0.5px: darkening amount = 0.4px - * stem width = 1px: darkening amount = 0.275px - * stem width = 1.667px: darkening amount = 0.275px - * stem width >= 2.333px: darkening amount = 0px - * } - * - * and piecewise linear in-between. At configuration time, these four - * control points can be set with the macro - * `CFF_CONFIG_OPTION_DARKENING_PARAMETERS'; the CFF, Type~1, and CID - * drivers share these values. At runtime, the control points can be - * changed using the `darkening-parameters' property, as the following - * example demonstrates for the Type~1 driver. - * - * { - * FT_Library library; - * FT_Int darken_params[8] = { 500, 300, // x1, y1 - * 1000, 200, // x2, y2 - * 1500, 100, // x3, y3 - * 2000, 0 }; // x4, y4 - * - * - * FT_Init_FreeType( &library ); - * - * FT_Property_Set( library, "type1", - * "darkening-parameters", darken_params ); - * } - * - * The x~values give the stem width, and the y~values the darkening - * amount. The unit is 1000th of pixels. All coordinate values must be - * positive; the x~values must be monotonically increasing; the - * y~values must be monotonically decreasing and smaller than or - * equal to 500 (corresponding to half a pixel); the slope of each - * linear piece must be shallower than -1 (e.g., -.4). - * - * The auto-hinter provides this property, too, as an experimental - * feature. See @no-stem-darkening for more. - * - * @note: - * This property can be used with @FT_Property_Get also. - * - * This property can be set via the `FREETYPE_PROPERTIES' environment - * variable, using eight comma-separated integers without spaces. Here - * the above example, using `\' to break the line for readability. - * - * { - * FREETYPE_PROPERTIES=\ - * type1:darkening-parameters=500,300,1000,200,1500,100,2000,0 - * } - * - * @since: - * 2.5.1 (for `cff' module) - * - * 2.6.2 (for `autofitter' module) - * - * 2.9 (for `type1' and `t1cid' modules) - * - */ - - - /************************************************************************** - * - * @property: - * random-seed - * - * @description: - * By default, the seed value for the CFF `random' operator and the - * similar `0 28 callothersubr pop' command for the Type~1 and CID - * drivers is set to a random value. However, mainly for debugging - * purposes, it is often necessary to use a known value as a seed so - * that the pseudo-random number sequences generated by `random' are - * repeatable. - * - * The `random-seed' property does that. Its argument is a signed 32bit - * integer; if the value is zero or negative, the seed given by the - * `intitialRandomSeed' private DICT operator in a CFF file gets used - * (or a default value if there is no such operator). If the value is - * positive, use it instead of `initialRandomSeed', which is - * consequently ignored. - * - * @note: - * This property can be set via the `FREETYPE_PROPERTIES' environment - * variable. It can also be set per face using @FT_Face_Properties with - * @FT_PARAM_TAG_RANDOM_SEED. - * - * @since: - * 2.8 (for `cff' module) - * - * 2.9 (for `type1' and `t1cid' modules) - * - */ - - - /************************************************************************** - * - * @property: - * no-long-family-names - * - * @description: - * If PCF_CONFIG_OPTION_LONG_FAMILY_NAMES is active while compiling - * FreeType, the PCF driver constructs long family names. - * - * There are many PCF fonts just called `Fixed' which look completely - * different, and which have nothing to do with each other. When - * selecting `Fixed' in KDE or Gnome one gets results that appear rather - * random, the style changes often if one changes the size and one - * cannot select some fonts at all. The improve this situation, the PCF - * module prepends the foundry name (plus a space) to the family name. - * It also checks whether there are `wide' characters; all put together, - * family names like `Sony Fixed' or `Misc Fixed Wide' are constructed. - * - * If `no-long-family-names' is set, this feature gets switched off. - * - * { - * FT_Library library; - * FT_Bool no_long_family_names = TRUE; - * - * - * FT_Init_FreeType( &library ); - * - * FT_Property_Set( library, "pcf", - * "no-long-family-names", - * &no_long_family_names ); - * } - * - * @note: - * This property can be used with @FT_Property_Get also. - * - * This property can be set via the `FREETYPE_PROPERTIES' environment - * variable (using values 1 and 0 for `on' and `off', respectively). - * - * @since: - * 2.8 - */ - - - /************************************************************************** - * - * @enum: - * TT_INTERPRETER_VERSION_XXX - * - * @description: - * A list of constants used for the @interpreter-version property to - * select the hinting engine for Truetype fonts. - * - * The numeric value in the constant names represents the version - * number as returned by the `GETINFO' bytecode instruction. - * - * @values: - * TT_INTERPRETER_VERSION_35 :: - * Version~35 corresponds to MS rasterizer v.1.7 as used e.g. in - * Windows~98; only grayscale and B/W rasterizing is supported. - * - * TT_INTERPRETER_VERSION_38 :: - * Version~38 corresponds to MS rasterizer v.1.9; it is roughly - * equivalent to the hinting provided by DirectWrite ClearType (as can - * be found, for example, in the Internet Explorer~9 running on - * Windows~7). It is used in FreeType to select the `Infinality' - * subpixel hinting code. The code may be removed in a future - * version. - * - * TT_INTERPRETER_VERSION_40 :: - * Version~40 corresponds to MS rasterizer v.2.1; it is roughly - * equivalent to the hinting provided by DirectWrite ClearType (as can - * be found, for example, in Microsoft's Edge Browser on Windows~10). - * It is used in FreeType to select the `minimal' subpixel hinting - * code, a stripped-down and higher performance version of the - * `Infinality' code. - * - * @note: - * This property controls the behaviour of the bytecode interpreter - * and thus how outlines get hinted. It does *not* control how glyph - * get rasterized! In particular, it does not control subpixel color - * filtering. - * - * If FreeType has not been compiled with the configuration option - * TT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version~38 or~40 causes - * an `FT_Err_Unimplemented_Feature' error. - * - * Depending on the graphics framework, Microsoft uses different - * bytecode and rendering engines. As a consequence, the version - * numbers returned by a call to the `GETINFO' bytecode instruction are - * more convoluted than desired. - * - * Here are two tables that try to shed some light on the possible - * values for the MS rasterizer engine, together with the additional - * features introduced by it. - * - * { - * GETINFO framework version feature - * ------------------------------------------------------------------- - * 3 GDI (Win 3.1), v1.0 16-bit, first version - * TrueImage - * 33 GDI (Win NT 3.1), v1.5 32-bit - * HP Laserjet - * 34 GDI (Win 95) v1.6 font smoothing, - * new SCANTYPE opcode - * 35 GDI (Win 98/2000) v1.7 (UN)SCALED_COMPONENT_OFFSET - * bits in composite glyphs - * 36 MGDI (Win CE 2) v1.6+ classic ClearType - * 37 GDI (XP and later), v1.8 ClearType - * GDI+ old (before Vista) - * 38 GDI+ old (Vista, Win 7), v1.9 subpixel ClearType, - * WPF Y-direction ClearType, - * additional error checking - * 39 DWrite (before Win 8) v2.0 subpixel ClearType flags - * in GETINFO opcode, - * bug fixes - * 40 GDI+ (after Win 7), v2.1 Y-direction ClearType flag - * DWrite (Win 8) in GETINFO opcode, - * Gray ClearType - * } - * - * The `version' field gives a rough orientation only, since some - * applications provided certain features much earlier (as an example, - * Microsoft Reader used subpixel and Y-direction ClearType already in - * Windows 2000). Similarly, updates to a given framework might include - * improved hinting support. - * - * { - * version sampling rendering comment - * x y x y - * -------------------------------------------------------------- - * v1.0 normal normal B/W B/W bi-level - * v1.6 high high gray gray grayscale - * v1.8 high normal color-filter B/W (GDI) ClearType - * v1.9 high high color-filter gray Color ClearType - * v2.1 high normal gray B/W Gray ClearType - * v2.1 high high gray gray Gray ClearType - * } - * - * Color and Gray ClearType are the two available variants of - * `Y-direction ClearType', meaning grayscale rasterization along the - * Y-direction; the name used in the TrueType specification for this - * feature is `symmetric smoothing'. `Classic ClearType' is the - * original algorithm used before introducing a modified version in - * Win~XP. Another name for v1.6's grayscale rendering is `font - * smoothing', and `Color ClearType' is sometimes also called `DWrite - * ClearType'. To differentiate between today's Color ClearType and the - * earlier ClearType variant with B/W rendering along the vertical axis, - * the latter is sometimes called `GDI ClearType'. - * - * `Normal' and `high' sampling describe the (virtual) resolution to - * access the rasterized outline after the hinting process. `Normal' - * means 1 sample per grid line (i.e., B/W). In the current Microsoft - * implementation, `high' means an extra virtual resolution of 16x16 (or - * 16x1) grid lines per pixel for bytecode instructions like `MIRP'. - * After hinting, these 16 grid lines are mapped to 6x5 (or 6x1) grid - * lines for color filtering if Color ClearType is activated. - * - * Note that `Gray ClearType' is essentially the same as v1.6's - * grayscale rendering. However, the GETINFO instruction handles it - * differently: v1.6 returns bit~12 (hinting for grayscale), while v2.1 - * returns bits~13 (hinting for ClearType), 18 (symmetrical smoothing), - * and~19 (Gray ClearType). Also, this mode respects bits 2 and~3 for - * the version~1 gasp table exclusively (like Color ClearType), while - * v1.6 only respects the values of version~0 (bits 0 and~1). - * - * Keep in mind that the features of the above interpreter versions - * might not map exactly to FreeType features or behavior because it is - * a fundamentally different library with different internals. - * - */ -#define TT_INTERPRETER_VERSION_35 35 -#define TT_INTERPRETER_VERSION_38 38 -#define TT_INTERPRETER_VERSION_40 40 - - - /************************************************************************** - * - * @property: - * interpreter-version - * - * @description: - * Currently, three versions are available, two representing the - * bytecode interpreter with subpixel hinting support (old `Infinality' - * code and new stripped-down and higher performance `minimal' code) and - * one without, respectively. The default is subpixel support if - * TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined, and no subpixel support - * otherwise (since it isn't available then). - * - * If subpixel hinting is on, many TrueType bytecode instructions behave - * differently compared to B/W or grayscale rendering (except if `native - * ClearType' is selected by the font). Microsoft's main idea is to - * render at a much increased horizontal resolution, then sampling down - * the created output to subpixel precision. However, many older fonts - * are not suited to this and must be specially taken care of by - * applying (hardcoded) tweaks in Microsoft's interpreter. - * - * Details on subpixel hinting and some of the necessary tweaks can be - * found in Greg Hitchcock's whitepaper at - * `https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx'. - * Note that FreeType currently doesn't really `subpixel hint' (6x1, 6x2, - * or 6x5 supersampling) like discussed in the paper. Depending on the - * chosen interpreter, it simply ignores instructions on vertical stems - * to arrive at very similar results. - * - * The following example code demonstrates how to deactivate subpixel - * hinting (omitting the error handling). - * - * { - * FT_Library library; - * FT_Face face; - * FT_UInt interpreter_version = TT_INTERPRETER_VERSION_35; - * - * - * FT_Init_FreeType( &library ); - * - * FT_Property_Set( library, "truetype", - * "interpreter-version", - * &interpreter_version ); - * } - * - * @note: - * This property can be used with @FT_Property_Get also. - * - * This property can be set via the `FREETYPE_PROPERTIES' environment - * variable (using values `35', `38', or `40'). - * - * @since: - * 2.5 - */ - - - /************************************************************************** - * - * @property: - * glyph-to-script-map - * - * @description: - * *Experimental* *only* - * - * The auto-hinter provides various script modules to hint glyphs. - * Examples of supported scripts are Latin or CJK. Before a glyph is - * auto-hinted, the Unicode character map of the font gets examined, and - * the script is then determined based on Unicode character ranges, see - * below. - * - * OpenType fonts, however, often provide much more glyphs than - * character codes (small caps, superscripts, ligatures, swashes, etc.), - * to be controlled by so-called `features'. Handling OpenType features - * can be quite complicated and thus needs a separate library on top of - * FreeType. - * - * The mapping between glyph indices and scripts (in the auto-hinter - * sense, see the @FT_AUTOHINTER_SCRIPT_XXX values) is stored as an - * array with `num_glyphs' elements, as found in the font's @FT_Face - * structure. The `glyph-to-script-map' property returns a pointer to - * this array, which can be modified as needed. Note that the - * modification should happen before the first glyph gets processed by - * the auto-hinter so that the global analysis of the font shapes - * actually uses the modified mapping. - * - * The following example code demonstrates how to access it (omitting - * the error handling). - * - * { - * FT_Library library; - * FT_Face face; - * FT_Prop_GlyphToScriptMap prop; - * - * - * FT_Init_FreeType( &library ); - * FT_New_Face( library, "foo.ttf", 0, &face ); - * - * prop.face = face; - * - * FT_Property_Get( library, "autofitter", - * "glyph-to-script-map", &prop ); - * - * // adjust `prop.map' as needed right here - * - * FT_Load_Glyph( face, ..., FT_LOAD_FORCE_AUTOHINT ); - * } - * - * @since: - * 2.4.11 - * - */ - - - /************************************************************************** - * - * @enum: - * FT_AUTOHINTER_SCRIPT_XXX - * - * @description: - * *Experimental* *only* - * - * A list of constants used for the @glyph-to-script-map property to - * specify the script submodule the auto-hinter should use for hinting a - * particular glyph. - * - * @values: - * FT_AUTOHINTER_SCRIPT_NONE :: - * Don't auto-hint this glyph. - * - * FT_AUTOHINTER_SCRIPT_LATIN :: - * Apply the latin auto-hinter. For the auto-hinter, `latin' is a - * very broad term, including Cyrillic and Greek also since characters - * from those scripts share the same design constraints. - * - * By default, characters from the following Unicode ranges are - * assigned to this submodule. - * - * { - * U+0020 - U+007F // Basic Latin (no control characters) - * U+00A0 - U+00FF // Latin-1 Supplement (no control characters) - * U+0100 - U+017F // Latin Extended-A - * U+0180 - U+024F // Latin Extended-B - * U+0250 - U+02AF // IPA Extensions - * U+02B0 - U+02FF // Spacing Modifier Letters - * U+0300 - U+036F // Combining Diacritical Marks - * U+0370 - U+03FF // Greek and Coptic - * U+0400 - U+04FF // Cyrillic - * U+0500 - U+052F // Cyrillic Supplement - * U+1D00 - U+1D7F // Phonetic Extensions - * U+1D80 - U+1DBF // Phonetic Extensions Supplement - * U+1DC0 - U+1DFF // Combining Diacritical Marks Supplement - * U+1E00 - U+1EFF // Latin Extended Additional - * U+1F00 - U+1FFF // Greek Extended - * U+2000 - U+206F // General Punctuation - * U+2070 - U+209F // Superscripts and Subscripts - * U+20A0 - U+20CF // Currency Symbols - * U+2150 - U+218F // Number Forms - * U+2460 - U+24FF // Enclosed Alphanumerics - * U+2C60 - U+2C7F // Latin Extended-C - * U+2DE0 - U+2DFF // Cyrillic Extended-A - * U+2E00 - U+2E7F // Supplemental Punctuation - * U+A640 - U+A69F // Cyrillic Extended-B - * U+A720 - U+A7FF // Latin Extended-D - * U+FB00 - U+FB06 // Alphab. Present. Forms (Latin Ligatures) - * U+1D400 - U+1D7FF // Mathematical Alphanumeric Symbols - * U+1F100 - U+1F1FF // Enclosed Alphanumeric Supplement - * } - * - * FT_AUTOHINTER_SCRIPT_CJK :: - * Apply the CJK auto-hinter, covering Chinese, Japanese, Korean, old - * Vietnamese, and some other scripts. - * - * By default, characters from the following Unicode ranges are - * assigned to this submodule. - * - * { - * U+1100 - U+11FF // Hangul Jamo - * U+2E80 - U+2EFF // CJK Radicals Supplement - * U+2F00 - U+2FDF // Kangxi Radicals - * U+2FF0 - U+2FFF // Ideographic Description Characters - * U+3000 - U+303F // CJK Symbols and Punctuation - * U+3040 - U+309F // Hiragana - * U+30A0 - U+30FF // Katakana - * U+3100 - U+312F // Bopomofo - * U+3130 - U+318F // Hangul Compatibility Jamo - * U+3190 - U+319F // Kanbun - * U+31A0 - U+31BF // Bopomofo Extended - * U+31C0 - U+31EF // CJK Strokes - * U+31F0 - U+31FF // Katakana Phonetic Extensions - * U+3200 - U+32FF // Enclosed CJK Letters and Months - * U+3300 - U+33FF // CJK Compatibility - * U+3400 - U+4DBF // CJK Unified Ideographs Extension A - * U+4DC0 - U+4DFF // Yijing Hexagram Symbols - * U+4E00 - U+9FFF // CJK Unified Ideographs - * U+A960 - U+A97F // Hangul Jamo Extended-A - * U+AC00 - U+D7AF // Hangul Syllables - * U+D7B0 - U+D7FF // Hangul Jamo Extended-B - * U+F900 - U+FAFF // CJK Compatibility Ideographs - * U+FE10 - U+FE1F // Vertical forms - * U+FE30 - U+FE4F // CJK Compatibility Forms - * U+FF00 - U+FFEF // Halfwidth and Fullwidth Forms - * U+1B000 - U+1B0FF // Kana Supplement - * U+1D300 - U+1D35F // Tai Xuan Hing Symbols - * U+1F200 - U+1F2FF // Enclosed Ideographic Supplement - * U+20000 - U+2A6DF // CJK Unified Ideographs Extension B - * U+2A700 - U+2B73F // CJK Unified Ideographs Extension C - * U+2B740 - U+2B81F // CJK Unified Ideographs Extension D - * U+2F800 - U+2FA1F // CJK Compatibility Ideographs Supplement - * } - * - * FT_AUTOHINTER_SCRIPT_INDIC :: - * Apply the indic auto-hinter, covering all major scripts from the - * Indian sub-continent and some other related scripts like Thai, Lao, - * or Tibetan. - * - * By default, characters from the following Unicode ranges are - * assigned to this submodule. - * - * { - * U+0900 - U+0DFF // Indic Range - * U+0F00 - U+0FFF // Tibetan - * U+1900 - U+194F // Limbu - * U+1B80 - U+1BBF // Sundanese - * U+A800 - U+A82F // Syloti Nagri - * U+ABC0 - U+ABFF // Meetei Mayek - * U+11800 - U+118DF // Sharada - * } - * - * Note that currently Indic support is rudimentary only, missing blue - * zone support. - * - * @since: - * 2.4.11 - * - */ -#define FT_AUTOHINTER_SCRIPT_NONE 0 -#define FT_AUTOHINTER_SCRIPT_LATIN 1 -#define FT_AUTOHINTER_SCRIPT_CJK 2 -#define FT_AUTOHINTER_SCRIPT_INDIC 3 - - - /************************************************************************** - * - * @struct: - * FT_Prop_GlyphToScriptMap - * - * @description: - * *Experimental* *only* - * - * The data exchange structure for the @glyph-to-script-map property. - * - * @since: - * 2.4.11 - * - */ - typedef struct FT_Prop_GlyphToScriptMap_ - { - FT_Face face; - FT_UShort* map; - - } FT_Prop_GlyphToScriptMap; - - - /************************************************************************** - * - * @property: - * fallback-script - * - * @description: - * *Experimental* *only* - * - * If no auto-hinter script module can be assigned to a glyph, a - * fallback script gets assigned to it (see also the - * @glyph-to-script-map property). By default, this is - * @FT_AUTOHINTER_SCRIPT_CJK. Using the `fallback-script' property, - * this fallback value can be changed. - * - * { - * FT_Library library; - * FT_UInt fallback_script = FT_AUTOHINTER_SCRIPT_NONE; - * - * - * FT_Init_FreeType( &library ); - * - * FT_Property_Set( library, "autofitter", - * "fallback-script", &fallback_script ); - * } - * - * @note: - * This property can be used with @FT_Property_Get also. - * - * It's important to use the right timing for changing this value: The - * creation of the glyph-to-script map that eventually uses the - * fallback script value gets triggered either by setting or reading a - * face-specific property like @glyph-to-script-map, or by auto-hinting - * any glyph from that face. In particular, if you have already created - * an @FT_Face structure but not loaded any glyph (using the - * auto-hinter), a change of the fallback script will affect this face. - * - * @since: - * 2.4.11 - * - */ - - - /************************************************************************** - * - * @property: - * default-script - * - * @description: - * *Experimental* *only* - * - * If FreeType gets compiled with FT_CONFIG_OPTION_USE_HARFBUZZ to make - * the HarfBuzz library access OpenType features for getting better - * glyph coverages, this property sets the (auto-fitter) script to be - * used for the default (OpenType) script data of a font's GSUB table. - * Features for the default script are intended for all scripts not - * explicitly handled in GSUB; an example is a `dlig' feature, - * containing the combination of the characters `T', `E', and `L' to - * form a `TEL' ligature. - * - * By default, this is @FT_AUTOHINTER_SCRIPT_LATIN. Using the - * `default-script' property, this default value can be changed. - * - * { - * FT_Library library; - * FT_UInt default_script = FT_AUTOHINTER_SCRIPT_NONE; - * - * - * FT_Init_FreeType( &library ); - * - * FT_Property_Set( library, "autofitter", - * "default-script", &default_script ); - * } - * - * @note: - * This property can be used with @FT_Property_Get also. - * - * It's important to use the right timing for changing this value: The - * creation of the glyph-to-script map that eventually uses the - * default script value gets triggered either by setting or reading a - * face-specific property like @glyph-to-script-map, or by auto-hinting - * any glyph from that face. In particular, if you have already created - * an @FT_Face structure but not loaded any glyph (using the - * auto-hinter), a change of the default script will affect this face. - * - * @since: - * 2.5.3 - * - */ - - - /************************************************************************** - * - * @property: - * increase-x-height - * - * @description: - * For ppem values in the range 6~<= ppem <= `increase-x-height', round - * up the font's x~height much more often than normally. If the value - * is set to~0, which is the default, this feature is switched off. Use - * this property to improve the legibility of small font sizes if - * necessary. - * - * { - * FT_Library library; - * FT_Face face; - * FT_Prop_IncreaseXHeight prop; - * - * - * FT_Init_FreeType( &library ); - * FT_New_Face( library, "foo.ttf", 0, &face ); - * FT_Set_Char_Size( face, 10 * 64, 0, 72, 0 ); - * - * prop.face = face; - * prop.limit = 14; - * - * FT_Property_Set( library, "autofitter", - * "increase-x-height", &prop ); - * } - * - * @note: - * This property can be used with @FT_Property_Get also. - * - * Set this value right after calling @FT_Set_Char_Size, but before - * loading any glyph (using the auto-hinter). - * - * @since: - * 2.4.11 - * - */ - - - /************************************************************************** - * - * @struct: - * FT_Prop_IncreaseXHeight - * - * @description: - * The data exchange structure for the @increase-x-height property. - * - */ - typedef struct FT_Prop_IncreaseXHeight_ - { - FT_Face face; - FT_UInt limit; - - } FT_Prop_IncreaseXHeight; - - - /************************************************************************** - * - * @property: - * warping - * - * @description: - * *Experimental* *only* - * - * If FreeType gets compiled with option AF_CONFIG_OPTION_USE_WARPER to - * activate the warp hinting code in the auto-hinter, this property - * switches warping on and off. - * - * Warping only works in `normal' auto-hinting mode replacing it. - * The idea of the code is to slightly scale and shift a glyph along - * the non-hinted dimension (which is usually the horizontal axis) so - * that as much of its segments are aligned (more or less) to the grid. - * To find out a glyph's optimal scaling and shifting value, various - * parameter combinations are tried and scored. - * - * By default, warping is off. The example below shows how to switch on - * warping (omitting the error handling). - * - * { - * FT_Library library; - * FT_Bool warping = 1; - * - * - * FT_Init_FreeType( &library ); - * - * FT_Property_Set( library, "autofitter", - * "warping", &warping ); - * } - * - * @note: - * This property can be used with @FT_Property_Get also. - * - * This property can be set via the `FREETYPE_PROPERTIES' environment - * variable (using values 1 and 0 for `on' and `off', respectively). - * - * The warping code can also change advance widths. Have a look at the - * `lsb_delta' and `rsb_delta' fields in the @FT_GlyphSlotRec structure - * for details on improving inter-glyph distances while rendering. - * - * Since warping is a global property of the auto-hinter it is best to - * change its value before rendering any face. Otherwise, you should - * reload all faces that get auto-hinted in `normal' hinting mode. - * - * @since: - * 2.6 - * - */ - - - /* */ - - -FT_END_HEADER - - -#endif /* FTDRIVER_H_ */ - - -/* END */ diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/include/freetype/ftmm.h b/extensions/gdx-freetype/jni/freetype-2.9.1/include/freetype/ftmm.h deleted file mode 100644 index 9948102c1..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/include/freetype/ftmm.h +++ /dev/null @@ -1,638 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftmm.h */ -/* */ -/* FreeType Multiple Master font interface (specification). */ -/* */ -/* Copyright 1996-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTMM_H_ -#define FTMM_H_ - - -#include -#include FT_TYPE1_TABLES_H - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /*
*/ - /* multiple_masters */ - /* */ - /* */ - /* Multiple Masters */ - /* */ - /* <Abstract> */ - /* How to manage Multiple Masters fonts. */ - /* */ - /* <Description> */ - /* The following types and functions are used to manage Multiple */ - /* Master fonts, i.e., the selection of specific design instances by */ - /* setting design axis coordinates. */ - /* */ - /* Besides Adobe MM fonts, the interface supports Apple's TrueType GX */ - /* and OpenType variation fonts. Some of the routines only work with */ - /* Adobe MM fonts, others will work with all three types. They are */ - /* similar enough that a consistent interface makes sense. */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_MM_Axis */ - /* */ - /* <Description> */ - /* A structure to model a given axis in design space for Multiple */ - /* Masters fonts. */ - /* */ - /* This structure can't be used for TrueType GX or OpenType variation */ - /* fonts. */ - /* */ - /* <Fields> */ - /* name :: The axis's name. */ - /* */ - /* minimum :: The axis's minimum design coordinate. */ - /* */ - /* maximum :: The axis's maximum design coordinate. */ - /* */ - typedef struct FT_MM_Axis_ - { - FT_String* name; - FT_Long minimum; - FT_Long maximum; - - } FT_MM_Axis; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Multi_Master */ - /* */ - /* <Description> */ - /* A structure to model the axes and space of a Multiple Masters */ - /* font. */ - /* */ - /* This structure can't be used for TrueType GX or OpenType variation */ - /* fonts. */ - /* */ - /* <Fields> */ - /* num_axis :: Number of axes. Cannot exceed~4. */ - /* */ - /* num_designs :: Number of designs; should be normally 2^num_axis */ - /* even though the Type~1 specification strangely */ - /* allows for intermediate designs to be present. */ - /* This number cannot exceed~16. */ - /* */ - /* axis :: A table of axis descriptors. */ - /* */ - typedef struct FT_Multi_Master_ - { - FT_UInt num_axis; - FT_UInt num_designs; - FT_MM_Axis axis[T1_MAX_MM_AXIS]; - - } FT_Multi_Master; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Var_Axis */ - /* */ - /* <Description> */ - /* A structure to model a given axis in design space for Multiple */ - /* Masters, TrueType GX, and OpenType variation fonts. */ - /* */ - /* <Fields> */ - /* name :: The axis's name. */ - /* Not always meaningful for TrueType GX or OpenType */ - /* variation fonts. */ - /* */ - /* minimum :: The axis's minimum design coordinate. */ - /* */ - /* def :: The axis's default design coordinate. */ - /* FreeType computes meaningful default values for Adobe */ - /* MM fonts. */ - /* */ - /* maximum :: The axis's maximum design coordinate. */ - /* */ - /* tag :: The axis's tag (the equivalent to `name' for TrueType */ - /* GX and OpenType variation fonts). FreeType provides */ - /* default values for Adobe MM fonts if possible. */ - /* */ - /* strid :: The axis name entry in the font's `name' table. This */ - /* is another (and often better) version of the `name' */ - /* field for TrueType GX or OpenType variation fonts. Not */ - /* meaningful for Adobe MM fonts. */ - /* */ - /* <Note> */ - /* The fields `minimum', `def', and `maximum' are 16.16 fractional */ - /* values for TrueType GX and OpenType variation fonts. For Adobe MM */ - /* fonts, the values are integers. */ - /* */ - typedef struct FT_Var_Axis_ - { - FT_String* name; - - FT_Fixed minimum; - FT_Fixed def; - FT_Fixed maximum; - - FT_ULong tag; - FT_UInt strid; - - } FT_Var_Axis; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Var_Named_Style */ - /* */ - /* <Description> */ - /* A structure to model a named instance in a TrueType GX or OpenType */ - /* variation font. */ - /* */ - /* This structure can't be used for Adobe MM fonts. */ - /* */ - /* <Fields> */ - /* coords :: The design coordinates for this instance. */ - /* This is an array with one entry for each axis. */ - /* */ - /* strid :: The entry in `name' table identifying this instance. */ - /* */ - /* psid :: The entry in `name' table identifying a PostScript name */ - /* for this instance. Value 0xFFFF indicates a missing */ - /* entry. */ - /* */ - typedef struct FT_Var_Named_Style_ - { - FT_Fixed* coords; - FT_UInt strid; - FT_UInt psid; /* since 2.7.1 */ - - } FT_Var_Named_Style; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_MM_Var */ - /* */ - /* <Description> */ - /* A structure to model the axes and space of an Adobe MM, TrueType */ - /* GX, or OpenType variation font. */ - /* */ - /* Some fields are specific to one format and not to the others. */ - /* */ - /* <Fields> */ - /* num_axis :: The number of axes. The maximum value is~4 for */ - /* Adobe MM fonts; no limit in TrueType GX or */ - /* OpenType variation fonts. */ - /* */ - /* num_designs :: The number of designs; should be normally */ - /* 2^num_axis for Adobe MM fonts. Not meaningful */ - /* for TrueType GX or OpenType variation fonts */ - /* (where every glyph could have a different */ - /* number of designs). */ - /* */ - /* num_namedstyles :: The number of named styles; a `named style' is */ - /* a tuple of design coordinates that has a string */ - /* ID (in the `name' table) associated with it. */ - /* The font can tell the user that, for example, */ - /* [Weight=1.5,Width=1.1] is `Bold'. Another name */ - /* for `named style' is `named instance'. */ - /* */ - /* For Adobe Multiple Masters fonts, this value is */ - /* always zero because the format does not support */ - /* named styles. */ - /* */ - /* axis :: An axis descriptor table. */ - /* TrueType GX and OpenType variation fonts */ - /* contain slightly more data than Adobe MM fonts. */ - /* Memory management of this pointer is done */ - /* internally by FreeType. */ - /* */ - /* namedstyle :: A named style (instance) table. */ - /* Only meaningful for TrueType GX and OpenType */ - /* variation fonts. Memory management of this */ - /* pointer is done internally by FreeType. */ - /* */ - typedef struct FT_MM_Var_ - { - FT_UInt num_axis; - FT_UInt num_designs; - FT_UInt num_namedstyles; - FT_Var_Axis* axis; - FT_Var_Named_Style* namedstyle; - - } FT_MM_Var; - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_Multi_Master */ - /* */ - /* <Description> */ - /* Retrieve a variation descriptor of a given Adobe MM font. */ - /* */ - /* This function can't be used with TrueType GX or OpenType variation */ - /* fonts. */ - /* */ - /* <Input> */ - /* face :: A handle to the source face. */ - /* */ - /* <Output> */ - /* amaster :: The Multiple Masters descriptor. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Get_Multi_Master( FT_Face face, - FT_Multi_Master *amaster ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_MM_Var */ - /* */ - /* <Description> */ - /* Retrieve a variation descriptor for a given font. */ - /* */ - /* This function works with all supported variation formats. */ - /* */ - /* <Input> */ - /* face :: A handle to the source face. */ - /* */ - /* <Output> */ - /* amaster :: The variation descriptor. */ - /* Allocates a data structure, which the user must */ - /* deallocate with a call to @FT_Done_MM_Var after use. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Get_MM_Var( FT_Face face, - FT_MM_Var* *amaster ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Done_MM_Var */ - /* */ - /* <Description> */ - /* Free the memory allocated by @FT_Get_MM_Var. */ - /* */ - /* <Input> */ - /* library :: A handle of the face's parent library object that was */ - /* used in the call to @FT_Get_MM_Var to create `amaster'. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Done_MM_Var( FT_Library library, - FT_MM_Var *amaster ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Set_MM_Design_Coordinates */ - /* */ - /* <Description> */ - /* For Adobe MM fonts, choose an interpolated font design through */ - /* design coordinates. */ - /* */ - /* This function can't be used with TrueType GX or OpenType variation */ - /* fonts. */ - /* */ - /* <InOut> */ - /* face :: A handle to the source face. */ - /* */ - /* <Input> */ - /* num_coords :: The number of available design coordinates. If it */ - /* is larger than the number of axes, ignore the excess */ - /* values. If it is smaller than the number of axes, */ - /* use default values for the remaining axes. */ - /* */ - /* coords :: An array of design coordinates. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* [Since 2.8.1] To reset all axes to the default values, call the */ - /* function with `num_coords' set to zero and `coords' set to NULL. */ - /* */ - /* [Since 2.9] If `num_coords' is larger than zero, this function */ - /* sets the @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags' */ - /* field (i.e., @FT_IS_VARIATION will return true). If `num_coords' */ - /* is zero, this bit flag gets unset. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Set_MM_Design_Coordinates( FT_Face face, - FT_UInt num_coords, - FT_Long* coords ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Set_Var_Design_Coordinates */ - /* */ - /* <Description> */ - /* Choose an interpolated font design through design coordinates. */ - /* */ - /* This function works with all supported variation formats. */ - /* */ - /* <InOut> */ - /* face :: A handle to the source face. */ - /* */ - /* <Input> */ - /* num_coords :: The number of available design coordinates. If it */ - /* is larger than the number of axes, ignore the excess */ - /* values. If it is smaller than the number of axes, */ - /* use default values for the remaining axes. */ - /* */ - /* coords :: An array of design coordinates. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* [Since 2.8.1] To reset all axes to the default values, call the */ - /* function with `num_coords' set to zero and `coords' set to NULL. */ - /* [Since 2.9] `Default values' means the currently selected named */ - /* instance (or the base font if no named instance is selected). */ - /* */ - /* [Since 2.9] If `num_coords' is larger than zero, this function */ - /* sets the @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags' */ - /* field (i.e., @FT_IS_VARIATION will return true). If `num_coords' */ - /* is zero, this bit flag gets unset. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Set_Var_Design_Coordinates( FT_Face face, - FT_UInt num_coords, - FT_Fixed* coords ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_Var_Design_Coordinates */ - /* */ - /* <Description> */ - /* Get the design coordinates of the currently selected interpolated */ - /* font. */ - /* */ - /* This function works with all supported variation formats. */ - /* */ - /* <Input> */ - /* face :: A handle to the source face. */ - /* */ - /* num_coords :: The number of design coordinates to retrieve. If it */ - /* is larger than the number of axes, set the excess */ - /* values to~0. */ - /* */ - /* <Output> */ - /* coords :: The design coordinates array. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Since> */ - /* 2.7.1 */ - /* */ - FT_EXPORT( FT_Error ) - FT_Get_Var_Design_Coordinates( FT_Face face, - FT_UInt num_coords, - FT_Fixed* coords ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Set_MM_Blend_Coordinates */ - /* */ - /* <Description> */ - /* Choose an interpolated font design through normalized blend */ - /* coordinates. */ - /* */ - /* This function works with all supported variation formats. */ - /* */ - /* <InOut> */ - /* face :: A handle to the source face. */ - /* */ - /* <Input> */ - /* num_coords :: The number of available design coordinates. If it */ - /* is larger than the number of axes, ignore the excess */ - /* values. If it is smaller than the number of axes, */ - /* use default values for the remaining axes. */ - /* */ - /* coords :: The design coordinates array (each element must be */ - /* between 0 and 1.0 for Adobe MM fonts, and between */ - /* -1.0 and 1.0 for TrueType GX and OpenType variation */ - /* fonts). */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* [Since 2.8.1] To reset all axes to the default values, call the */ - /* function with `num_coords' set to zero and `coords' set to NULL. */ - /* [Since 2.9] `Default values' means the currently selected named */ - /* instance (or the base font if no named instance is selected). */ - /* */ - /* [Since 2.9] If `num_coords' is larger than zero, this function */ - /* sets the @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags' */ - /* field (i.e., @FT_IS_VARIATION will return true). If `num_coords' */ - /* is zero, this bit flag gets unset. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Set_MM_Blend_Coordinates( FT_Face face, - FT_UInt num_coords, - FT_Fixed* coords ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_MM_Blend_Coordinates */ - /* */ - /* <Description> */ - /* Get the normalized blend coordinates of the currently selected */ - /* interpolated font. */ - /* */ - /* This function works with all supported variation formats. */ - /* */ - /* <Input> */ - /* face :: A handle to the source face. */ - /* */ - /* num_coords :: The number of normalized blend coordinates to */ - /* retrieve. If it is larger than the number of axes, */ - /* set the excess values to~0.5 for Adobe MM fonts, and */ - /* to~0 for TrueType GX and OpenType variation fonts. */ - /* */ - /* <Output> */ - /* coords :: The normalized blend coordinates array. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Since> */ - /* 2.7.1 */ - /* */ - FT_EXPORT( FT_Error ) - FT_Get_MM_Blend_Coordinates( FT_Face face, - FT_UInt num_coords, - FT_Fixed* coords ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Set_Var_Blend_Coordinates */ - /* */ - /* <Description> */ - /* This is another name of @FT_Set_MM_Blend_Coordinates. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Set_Var_Blend_Coordinates( FT_Face face, - FT_UInt num_coords, - FT_Fixed* coords ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_Var_Blend_Coordinates */ - /* */ - /* <Description> */ - /* This is another name of @FT_Get_MM_Blend_Coordinates. */ - /* */ - /* <Since> */ - /* 2.7.1 */ - /* */ - FT_EXPORT( FT_Error ) - FT_Get_Var_Blend_Coordinates( FT_Face face, - FT_UInt num_coords, - FT_Fixed* coords ); - - - /*************************************************************************/ - /* */ - /* <Enum> */ - /* FT_VAR_AXIS_FLAG_XXX */ - /* */ - /* <Description> */ - /* A list of bit flags used in the return value of */ - /* @FT_Get_Var_Axis_Flags. */ - /* */ - /* <Values> */ - /* FT_VAR_AXIS_FLAG_HIDDEN :: */ - /* The variation axis should not be exposed to user interfaces. */ - /* */ - /* <Since> */ - /* 2.8.1 */ - /* */ -#define FT_VAR_AXIS_FLAG_HIDDEN 1 - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_Var_Axis_Flags */ - /* */ - /* <Description> */ - /* Get the `flags' field of an OpenType Variation Axis Record. */ - /* */ - /* Not meaningful for Adobe MM fonts (`*flags' is always zero). */ - /* */ - /* <Input> */ - /* master :: The variation descriptor. */ - /* */ - /* axis_index :: The index of the requested variation axis. */ - /* */ - /* <Output> */ - /* flags :: The `flags' field. See @FT_VAR_AXIS_FLAG_XXX for */ - /* possible values. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Since> */ - /* 2.8.1 */ - /* */ - FT_EXPORT( FT_Error ) - FT_Get_Var_Axis_Flags( FT_MM_Var* master, - FT_UInt axis_index, - FT_UInt* flags ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Set_Named_Instance */ - /* */ - /* <Description> */ - /* Set or change the current named instance. */ - /* */ - /* <Input> */ - /* face :: A handle to the source face. */ - /* */ - /* instance_index :: The index of the requested instance, starting */ - /* with value 1. If set to value 0, FreeType */ - /* switches to font access without a named */ - /* instance. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* The function uses the value of `instance_index' to set bits 16-30 */ - /* of the face's `face_index' field. It also resets any variation */ - /* applied to the font, and the @FT_FACE_FLAG_VARIATION bit of the */ - /* face's `face_flags' field gets reset to zero (i.e., */ - /* @FT_IS_VARIATION will return false). */ - /* */ - /* For Adobe MM fonts (which don't have named instances) this */ - /* function simply resets the current face to the default instance. */ - /* */ - /* <Since> */ - /* 2.9 */ - /* */ - FT_EXPORT( FT_Error ) - FT_Set_Named_Instance( FT_Face face, - FT_UInt instance_index ); - - /* */ - - -FT_END_HEADER - -#endif /* FTMM_H_ */ - - -/* END */ diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/include/freetype/ftparams.h b/extensions/gdx-freetype/jni/freetype-2.9.1/include/freetype/ftparams.h deleted file mode 100644 index 5a9006c50..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/include/freetype/ftparams.h +++ /dev/null @@ -1,205 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftparams.h */ -/* */ -/* FreeType API for possible FT_Parameter tags (specification only). */ -/* */ -/* Copyright 2017-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTPARAMS_H_ -#define FTPARAMS_H_ - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - - /************************************************************************** - * - * @section: - * parameter_tags - * - * @title: - * Parameter Tags - * - * @abstract: - * Macros for driver property and font loading parameter tags. - * - * @description: - * This section contains macros for the @FT_Parameter structure that are - * used with various functions to activate some special functionality or - * different behaviour of various components of FreeType. - * - */ - - - /*************************************************************************** - * - * @constant: - * FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY - * - * @description: - * A tag for @FT_Parameter to make @FT_Open_Face ignore typographic - * family names in the `name' table (introduced in OpenType version - * 1.4). Use this for backward compatibility with legacy systems that - * have a four-faces-per-family restriction. - * - * @since: - * 2.8 - * - */ -#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY \ - FT_MAKE_TAG( 'i', 'g', 'p', 'f' ) - - - /* this constant is deprecated */ -#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY \ - FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY - - - /*************************************************************************** - * - * @constant: - * FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY - * - * @description: - * A tag for @FT_Parameter to make @FT_Open_Face ignore typographic - * subfamily names in the `name' table (introduced in OpenType version - * 1.4). Use this for backward compatibility with legacy systems that - * have a four-faces-per-family restriction. - * - * @since: - * 2.8 - * - */ -#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY \ - FT_MAKE_TAG( 'i', 'g', 'p', 's' ) - - - /* this constant is deprecated */ -#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY \ - FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY - - - /*************************************************************************** - * - * @constant: - * FT_PARAM_TAG_INCREMENTAL - * - * @description: - * An @FT_Parameter tag to be used with @FT_Open_Face to indicate - * incremental glyph loading. - * - */ -#define FT_PARAM_TAG_INCREMENTAL \ - FT_MAKE_TAG( 'i', 'n', 'c', 'r' ) - - - /************************************************************************** - * - * @constant: - * FT_PARAM_TAG_LCD_FILTER_WEIGHTS - * - * @description: - * An @FT_Parameter tag to be used with @FT_Face_Properties. The - * corresponding argument specifies the five LCD filter weights for a - * given face (if using @FT_LOAD_TARGET_LCD, for example), overriding - * the global default values or the values set up with - * @FT_Library_SetLcdFilterWeights. - * - * @since: - * 2.8 - * - */ -#define FT_PARAM_TAG_LCD_FILTER_WEIGHTS \ - FT_MAKE_TAG( 'l', 'c', 'd', 'f' ) - - - /************************************************************************** - * - * @constant: - * FT_PARAM_TAG_RANDOM_SEED - * - * @description: - * An @FT_Parameter tag to be used with @FT_Face_Properties. The - * corresponding 32bit signed integer argument overrides the font - * driver's random seed value with a face-specific one; see - * @random-seed. - * - * @since: - * 2.8 - * - */ -#define FT_PARAM_TAG_RANDOM_SEED \ - FT_MAKE_TAG( 's', 'e', 'e', 'd' ) - - - /************************************************************************** - * - * @constant: - * FT_PARAM_TAG_STEM_DARKENING - * - * @description: - * An @FT_Parameter tag to be used with @FT_Face_Properties. The - * corresponding Boolean argument specifies whether to apply stem - * darkening, overriding the global default values or the values set up - * with @FT_Property_Set (see @no-stem-darkening). - * - * This is a passive setting that only takes effect if the font driver - * or autohinter honors it, which the CFF, Type~1, and CID drivers - * always do, but the autohinter only in `light' hinting mode (as of - * version 2.9). - * - * @since: - * 2.8 - * - */ -#define FT_PARAM_TAG_STEM_DARKENING \ - FT_MAKE_TAG( 'd', 'a', 'r', 'k' ) - - - /*************************************************************************** - * - * @constant: - * FT_PARAM_TAG_UNPATENTED_HINTING - * - * @description: - * Deprecated, no effect. - * - * Previously: A constant used as the tag of an @FT_Parameter structure to - * indicate that unpatented methods only should be used by the TrueType - * bytecode interpreter for a typeface opened by @FT_Open_Face. - * - */ -#define FT_PARAM_TAG_UNPATENTED_HINTING \ - FT_MAKE_TAG( 'u', 'n', 'p', 'a' ) - - - /* */ - - -FT_END_HEADER - - -#endif /* FTPARAMS_H_ */ - - -/* END */ diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/include/freetype/internal/fthash.h b/extensions/gdx-freetype/jni/freetype-2.9.1/include/freetype/internal/fthash.h deleted file mode 100644 index f22f9d5d3..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/include/freetype/internal/fthash.h +++ /dev/null @@ -1,136 +0,0 @@ -/***************************************************************************/ -/* */ -/* fthash.h */ -/* */ -/* Hashing functions (specification). */ -/* */ -/***************************************************************************/ - -/* - * Copyright 2000 Computing Research Labs, New Mexico State University - * Copyright 2001-2015 - * Francesco Zappa Nardelli - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT - * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - /*************************************************************************/ - /* */ - /* This file is based on code from bdf.c,v 1.22 2000/03/16 20:08:50 */ - /* */ - /* taken from Mark Leisher's xmbdfed package */ - /* */ - /*************************************************************************/ - - -#ifndef FTHASH_H_ -#define FTHASH_H_ - - -#include <ft2build.h> -#include FT_FREETYPE_H - - -FT_BEGIN_HEADER - - - typedef union FT_Hashkey_ - { - FT_Int num; - const char* str; - - } FT_Hashkey; - - - typedef struct FT_HashnodeRec_ - { - FT_Hashkey key; - size_t data; - - } FT_HashnodeRec; - - typedef struct FT_HashnodeRec_ *FT_Hashnode; - - - typedef FT_ULong - (*FT_Hash_LookupFunc)( FT_Hashkey* key ); - - typedef FT_Bool - (*FT_Hash_CompareFunc)( FT_Hashkey* a, - FT_Hashkey* b ); - - - typedef struct FT_HashRec_ - { - FT_UInt limit; - FT_UInt size; - FT_UInt used; - - FT_Hash_LookupFunc lookup; - FT_Hash_CompareFunc compare; - - FT_Hashnode* table; - - } FT_HashRec; - - typedef struct FT_HashRec_ *FT_Hash; - - - FT_Error - ft_hash_str_init( FT_Hash hash, - FT_Memory memory ); - - FT_Error - ft_hash_num_init( FT_Hash hash, - FT_Memory memory ); - - void - ft_hash_str_free( FT_Hash hash, - FT_Memory memory ); - -#define ft_hash_num_free ft_hash_str_free - - FT_Error - ft_hash_str_insert( const char* key, - size_t data, - FT_Hash hash, - FT_Memory memory ); - - FT_Error - ft_hash_num_insert( FT_Int num, - size_t data, - FT_Hash hash, - FT_Memory memory ); - - size_t* - ft_hash_str_lookup( const char* key, - FT_Hash hash ); - - size_t* - ft_hash_num_lookup( FT_Int num, - FT_Hash hash ); - - -FT_END_HEADER - - -#endif /* FTHASH_H_ */ - - -/* END */ diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/include/freetype/internal/ftpsprop.h b/extensions/gdx-freetype/jni/freetype-2.9.1/include/freetype/internal/ftpsprop.h deleted file mode 100644 index abbb62862..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/include/freetype/internal/ftpsprop.h +++ /dev/null @@ -1,48 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftpsprop.h */ -/* */ -/* Get and set properties of PostScript drivers (specification). */ -/* */ -/* Copyright 2017-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTPSPROP_H_ -#define FTPSPROP_H_ - - -#include <ft2build.h> -#include FT_FREETYPE_H - - -FT_BEGIN_HEADER - - - FT_BASE_CALLBACK( FT_Error ) - ps_property_set( FT_Module module, /* PS_Driver */ - const char* property_name, - const void* value, - FT_Bool value_is_string ); - - FT_BASE_CALLBACK( FT_Error ) - ps_property_get( FT_Module module, /* PS_Driver */ - const char* property_name, - void* value ); - - -FT_END_HEADER - - -#endif /* FTPSPROP_H_ */ - - -/* END */ diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/include/freetype/internal/services/svcfftl.h b/extensions/gdx-freetype/jni/freetype-2.9.1/include/freetype/internal/services/svcfftl.h deleted file mode 100644 index db623e684..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/include/freetype/internal/services/svcfftl.h +++ /dev/null @@ -1,112 +0,0 @@ -/***************************************************************************/ -/* */ -/* svcfftl.h */ -/* */ -/* The FreeType CFF tables loader service (specification). */ -/* */ -/* Copyright 2017-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef SVCFFTL_H_ -#define SVCFFTL_H_ - -#include FT_INTERNAL_SERVICE_H -#include FT_INTERNAL_CFF_TYPES_H - - -FT_BEGIN_HEADER - - -#define FT_SERVICE_ID_CFF_LOAD "cff-load" - - - typedef FT_UShort - (*FT_Get_Standard_Encoding_Func)( FT_UInt charcode ); - - typedef FT_Error - (*FT_Load_Private_Dict_Func)( CFF_Font font, - CFF_SubFont subfont, - FT_UInt lenNDV, - FT_Fixed* NDV ); - - typedef FT_Byte - (*FT_FD_Select_Get_Func)( CFF_FDSelect fdselect, - FT_UInt glyph_index ); - - typedef FT_Bool - (*FT_Blend_Check_Vector_Func)( CFF_Blend blend, - FT_UInt vsindex, - FT_UInt lenNDV, - FT_Fixed* NDV ); - - typedef FT_Error - (*FT_Blend_Build_Vector_Func)( CFF_Blend blend, - FT_UInt vsindex, - FT_UInt lenNDV, - FT_Fixed* NDV ); - - - FT_DEFINE_SERVICE( CFFLoad ) - { - FT_Get_Standard_Encoding_Func get_standard_encoding; - FT_Load_Private_Dict_Func load_private_dict; - FT_FD_Select_Get_Func fd_select_get; - FT_Blend_Check_Vector_Func blend_check_vector; - FT_Blend_Build_Vector_Func blend_build_vector; - }; - - -#ifndef FT_CONFIG_OPTION_PIC - -#define FT_DEFINE_SERVICE_CFFLOADREC( class_, \ - get_standard_encoding_, \ - load_private_dict_, \ - fd_select_get_, \ - blend_check_vector_, \ - blend_build_vector_ ) \ - static const FT_Service_CFFLoadRec class_ = \ - { \ - get_standard_encoding_, \ - load_private_dict_, \ - fd_select_get_, \ - blend_check_vector_, \ - blend_build_vector_ \ - }; - -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_DEFINE_SERVICE_CFFLOADREC( class_, \ - get_standard_encoding_, \ - load_private_dict_, \ - fd_select_get_, \ - blend_check_vector_, \ - blend_build_vector_ ) \ - void \ - FT_Init_Class_ ## class_( FT_Service_CFFLoadRec* clazz ) \ - { \ - clazz->get_standard_encoding = get_standard_encoding_; \ - clazz->load_private_dict = load_private_dict_; \ - clazz->fd_select_get = fd_select_get_; \ - clazz->blend_check_vector = blend_check_vector_; \ - clazz->blend_build_vector = blend_build_vector_; \ - } - -#endif /* FT_CONFIG_OPTION_PIC */ - - -FT_END_HEADER - - -#endif - - -/* END */ diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/include/freetype/internal/services/svmetric.h b/extensions/gdx-freetype/jni/freetype-2.9.1/include/freetype/internal/services/svmetric.h deleted file mode 100644 index abaacddbb..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/include/freetype/internal/services/svmetric.h +++ /dev/null @@ -1,153 +0,0 @@ -/***************************************************************************/ -/* */ -/* svmetric.h */ -/* */ -/* The FreeType services for metrics variations (specification). */ -/* */ -/* Copyright 2016-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef SVMETRIC_H_ -#define SVMETRIC_H_ - -#include FT_INTERNAL_SERVICE_H - - -FT_BEGIN_HEADER - - - /* - * A service to manage the `HVAR, `MVAR', and `VVAR' OpenType tables. - * - */ - -#define FT_SERVICE_ID_METRICS_VARIATIONS "metrics-variations" - - - /* HVAR */ - - typedef FT_Error - (*FT_HAdvance_Adjust_Func)( FT_Face face, - FT_UInt gindex, - FT_Int *avalue ); - - typedef FT_Error - (*FT_LSB_Adjust_Func)( FT_Face face, - FT_UInt gindex, - FT_Int *avalue ); - - typedef FT_Error - (*FT_RSB_Adjust_Func)( FT_Face face, - FT_UInt gindex, - FT_Int *avalue ); - - /* VVAR */ - - typedef FT_Error - (*FT_VAdvance_Adjust_Func)( FT_Face face, - FT_UInt gindex, - FT_Int *avalue ); - - typedef FT_Error - (*FT_TSB_Adjust_Func)( FT_Face face, - FT_UInt gindex, - FT_Int *avalue ); - - typedef FT_Error - (*FT_BSB_Adjust_Func)( FT_Face face, - FT_UInt gindex, - FT_Int *avalue ); - - typedef FT_Error - (*FT_VOrg_Adjust_Func)( FT_Face face, - FT_UInt gindex, - FT_Int *avalue ); - - /* MVAR */ - - typedef void - (*FT_Metrics_Adjust_Func)( FT_Face face ); - - - FT_DEFINE_SERVICE( MetricsVariations ) - { - FT_HAdvance_Adjust_Func hadvance_adjust; - FT_LSB_Adjust_Func lsb_adjust; - FT_RSB_Adjust_Func rsb_adjust; - - FT_VAdvance_Adjust_Func vadvance_adjust; - FT_TSB_Adjust_Func tsb_adjust; - FT_BSB_Adjust_Func bsb_adjust; - FT_VOrg_Adjust_Func vorg_adjust; - - FT_Metrics_Adjust_Func metrics_adjust; - }; - - -#ifndef FT_CONFIG_OPTION_PIC - -#define FT_DEFINE_SERVICE_METRICSVARIATIONSREC( class_, \ - hadvance_adjust_, \ - lsb_adjust_, \ - rsb_adjust_, \ - vadvance_adjust_, \ - tsb_adjust_, \ - bsb_adjust_, \ - vorg_adjust_, \ - metrics_adjust_ ) \ - static const FT_Service_MetricsVariationsRec class_ = \ - { \ - hadvance_adjust_, \ - lsb_adjust_, \ - rsb_adjust_, \ - vadvance_adjust_, \ - tsb_adjust_, \ - bsb_adjust_, \ - vorg_adjust_, \ - metrics_adjust_ \ - }; - -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_DEFINE_SERVICE_METRICSVARIATIONSREC( class_, \ - hadvance_adjust_, \ - lsb_adjust_, \ - rsb_adjust_, \ - vadvance_adjust_, \ - tsb_adjust_, \ - bsb_adjust_, \ - vorg_adjust_, \ - metrics_adjust_ ) \ - void \ - FT_Init_Class_ ## class_( FT_Service_MetricsVariationsRec* clazz ) \ - { \ - clazz->hadvance_adjust = hadvance_adjust_; \ - clazz->lsb_adjust = lsb_adjust_; \ - clazz->rsb_adjust = rsb_adjust_; \ - clazz->vadvance_adjust = vadvance_adjust_; \ - clazz->tsb_adjust = tsb_adjust_; \ - clazz->bsb_adjust = bsb_adjust_; \ - clazz->vorg_adjust = vorg_adjust_; \ - clazz->metrics_adjust = metrics_adjust_; \ - } - -#endif /* FT_CONFIG_OPTION_PIC */ - - /* */ - - -FT_END_HEADER - -#endif /* SVMETRIC_H_ */ - - -/* END */ diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/include/freetype/internal/services/svmm.h b/extensions/gdx-freetype/jni/freetype-2.9.1/include/freetype/internal/services/svmm.h deleted file mode 100644 index bcbb38e2c..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/include/freetype/internal/services/svmm.h +++ /dev/null @@ -1,172 +0,0 @@ -/***************************************************************************/ -/* */ -/* svmm.h */ -/* */ -/* The FreeType Multiple Masters and GX var services (specification). */ -/* */ -/* Copyright 2003-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef SVMM_H_ -#define SVMM_H_ - -#include FT_INTERNAL_SERVICE_H - - -FT_BEGIN_HEADER - - - /* - * A service used to manage multiple-masters data in a given face. - * - * See the related APIs in `ftmm.h' (FT_MULTIPLE_MASTERS_H). - * - */ - -#define FT_SERVICE_ID_MULTI_MASTERS "multi-masters" - - - typedef FT_Error - (*FT_Get_MM_Func)( FT_Face face, - FT_Multi_Master* master ); - - typedef FT_Error - (*FT_Get_MM_Var_Func)( FT_Face face, - FT_MM_Var* *master ); - - typedef FT_Error - (*FT_Set_MM_Design_Func)( FT_Face face, - FT_UInt num_coords, - FT_Long* coords ); - - /* use return value -1 to indicate that the new coordinates */ - /* are equal to the current ones; no changes are thus needed */ - typedef FT_Error - (*FT_Set_Var_Design_Func)( FT_Face face, - FT_UInt num_coords, - FT_Fixed* coords ); - - /* use return value -1 to indicate that the new coordinates */ - /* are equal to the current ones; no changes are thus needed */ - typedef FT_Error - (*FT_Set_MM_Blend_Func)( FT_Face face, - FT_UInt num_coords, - FT_Long* coords ); - - typedef FT_Error - (*FT_Get_Var_Design_Func)( FT_Face face, - FT_UInt num_coords, - FT_Fixed* coords ); - - typedef FT_Error - (*FT_Set_Instance_Func)( FT_Face face, - FT_UInt instance_index ); - - typedef FT_Error - (*FT_Get_MM_Blend_Func)( FT_Face face, - FT_UInt num_coords, - FT_Long* coords ); - - typedef FT_Error - (*FT_Get_Var_Blend_Func)( FT_Face face, - FT_UInt *num_coords, - FT_Fixed* *coords, - FT_Fixed* *normalizedcoords, - FT_MM_Var* *mm_var ); - - typedef void - (*FT_Done_Blend_Func)( FT_Face ); - - - FT_DEFINE_SERVICE( MultiMasters ) - { - FT_Get_MM_Func get_mm; - FT_Set_MM_Design_Func set_mm_design; - FT_Set_MM_Blend_Func set_mm_blend; - FT_Get_MM_Blend_Func get_mm_blend; - FT_Get_MM_Var_Func get_mm_var; - FT_Set_Var_Design_Func set_var_design; - FT_Get_Var_Design_Func get_var_design; - FT_Set_Instance_Func set_instance; - - /* for internal use; only needed for code sharing between modules */ - FT_Get_Var_Blend_Func get_var_blend; - FT_Done_Blend_Func done_blend; - }; - - -#ifndef FT_CONFIG_OPTION_PIC - -#define FT_DEFINE_SERVICE_MULTIMASTERSREC( class_, \ - get_mm_, \ - set_mm_design_, \ - set_mm_blend_, \ - get_mm_blend_, \ - get_mm_var_, \ - set_var_design_, \ - get_var_design_, \ - set_instance_, \ - get_var_blend_, \ - done_blend_ ) \ - static const FT_Service_MultiMastersRec class_ = \ - { \ - get_mm_, \ - set_mm_design_, \ - set_mm_blend_, \ - get_mm_blend_, \ - get_mm_var_, \ - set_var_design_, \ - get_var_design_, \ - set_instance_, \ - get_var_blend_, \ - done_blend_ \ - }; - -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_DEFINE_SERVICE_MULTIMASTERSREC( class_, \ - get_mm_, \ - set_mm_design_, \ - set_mm_blend_, \ - get_mm_blend_, \ - get_mm_var_, \ - set_var_design_, \ - get_var_design_, \ - set_instance_, \ - get_var_blend_, \ - done_blend_ ) \ - void \ - FT_Init_Class_ ## class_( FT_Service_MultiMastersRec* clazz ) \ - { \ - clazz->get_mm = get_mm_; \ - clazz->set_mm_design = set_mm_design_; \ - clazz->set_mm_blend = set_mm_blend_; \ - clazz->get_mm_blend = get_mm_blend_; \ - clazz->get_mm_var = get_mm_var_; \ - clazz->set_var_design = set_var_design_; \ - clazz->get_var_design = get_var_design_; \ - clazz->set_instance = set_instance_; \ - clazz->get_var_blend = get_var_blend_; \ - clazz->done_blend = done_blend_; \ - } - -#endif /* FT_CONFIG_OPTION_PIC */ - - /* */ - - -FT_END_HEADER - -#endif /* SVMM_H_ */ - - -/* END */ diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/src/autofit/afblue.c b/extensions/gdx-freetype/jni/freetype-2.9.1/src/autofit/afblue.c deleted file mode 100644 index e4078fd04..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/src/autofit/afblue.c +++ /dev/null @@ -1,739 +0,0 @@ -/* This file has been generated by the Perl script `afblue.pl', */ -/* using data from file `afblue.dat'. */ - -/***************************************************************************/ -/* */ -/* afblue.c */ -/* */ -/* Auto-fitter data for blue strings (body). */ -/* */ -/* Copyright 2013-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#include "aftypes.h" - - - FT_LOCAL_ARRAY_DEF( char ) - af_blue_strings[] = - { - /* */ - '\xF0', '\x9E', '\xA4', '\x8C', ' ', '\xF0', '\x9E', '\xA4', '\x85', ' ', '\xF0', '\x9E', '\xA4', '\x88', ' ', '\xF0', '\x9E', '\xA4', '\x8F', ' ', '\xF0', '\x9E', '\xA4', '\x94', ' ', '\xF0', '\x9E', '\xA4', '\x9A', /* 𞤌 𞤅 𞤈 𞤏 𞤔 𞤚 */ - '\0', - '\xF0', '\x9E', '\xA4', '\x82', ' ', '\xF0', '\x9E', '\xA4', '\x96', /* 𞤂 𞤖 */ - '\0', - '\xF0', '\x9E', '\xA4', '\xAC', ' ', '\xF0', '\x9E', '\xA4', '\xAE', ' ', '\xF0', '\x9E', '\xA4', '\xBB', ' ', '\xF0', '\x9E', '\xA4', '\xBC', ' ', '\xF0', '\x9E', '\xA4', '\xBE', /* 𞤬 𞤮 𞤻 𞤼 𞤾 */ - '\0', - '\xF0', '\x9E', '\xA4', '\xA4', ' ', '\xF0', '\x9E', '\xA4', '\xA8', ' ', '\xF0', '\x9E', '\xA4', '\xA9', ' ', '\xF0', '\x9E', '\xA4', '\xAD', ' ', '\xF0', '\x9E', '\xA4', '\xB4', ' ', '\xF0', '\x9E', '\xA4', '\xB8', ' ', '\xF0', '\x9E', '\xA4', '\xBA', ' ', '\xF0', '\x9E', '\xA5', '\x80', /* 𞤤 𞤨 𞤩 𞤭 𞤴 𞤸 𞤺 𞥀 */ - '\0', - '\xD8', '\xA7', ' ', '\xD8', '\xA5', ' ', '\xD9', '\x84', ' ', '\xD9', '\x83', ' ', '\xD8', '\xB7', ' ', '\xD8', '\xB8', /* ا إ ل ك ط ظ */ - '\0', - '\xD8', '\xAA', ' ', '\xD8', '\xAB', ' ', '\xD8', '\xB7', ' ', '\xD8', '\xB8', ' ', '\xD9', '\x83', /* ت ث ط ظ ك */ - '\0', - '\xD9', '\x80', /* ـ */ - '\0', - '\xD4', '\xB1', ' ', '\xD5', '\x84', ' ', '\xD5', '\x92', ' ', '\xD5', '\x8D', ' ', '\xD4', '\xB2', ' ', '\xD4', '\xB3', ' ', '\xD4', '\xB4', ' ', '\xD5', '\x95', /* Ա Մ Ւ Ս Բ Գ Դ Օ */ - '\0', - '\xD5', '\x92', ' ', '\xD5', '\x88', ' ', '\xD4', '\xB4', ' ', '\xD5', '\x83', ' ', '\xD5', '\x87', ' ', '\xD5', '\x8D', ' ', '\xD5', '\x8F', ' ', '\xD5', '\x95', /* Ւ Ո Դ Ճ Շ Ս Տ Օ */ - '\0', - '\xD5', '\xA5', ' ', '\xD5', '\xA7', ' ', '\xD5', '\xAB', ' ', '\xD5', '\xB4', ' ', '\xD5', '\xBE', ' ', '\xD6', '\x86', ' ', '\xD5', '\xB3', /* ե է ի մ վ ֆ ճ */ - '\0', - '\xD5', '\xA1', ' ', '\xD5', '\xB5', ' ', '\xD6', '\x82', ' ', '\xD5', '\xBD', ' ', '\xD5', '\xA3', ' ', '\xD5', '\xB7', ' ', '\xD6', '\x80', ' ', '\xD6', '\x85', /* ա յ ւ ս գ շ ր օ */ - '\0', - '\xD5', '\xB0', ' ', '\xD5', '\xB8', ' ', '\xD5', '\xB3', ' ', '\xD5', '\xA1', ' ', '\xD5', '\xA5', ' ', '\xD5', '\xAE', ' ', '\xD5', '\xBD', ' ', '\xD6', '\x85', /* հ ո ճ ա ե ծ ս օ */ - '\0', - '\xD5', '\xA2', ' ', '\xD5', '\xA8', ' ', '\xD5', '\xAB', ' ', '\xD5', '\xAC', ' ', '\xD5', '\xB2', ' ', '\xD5', '\xBA', ' ', '\xD6', '\x83', ' ', '\xD6', '\x81', /* բ ը ի լ ղ պ փ ց */ - '\0', - '\xF0', '\x90', '\xAC', '\x80', ' ', '\xF0', '\x90', '\xAC', '\x81', ' ', '\xF0', '\x90', '\xAC', '\x90', ' ', '\xF0', '\x90', '\xAC', '\x9B', /* 𐬀 𐬁 𐬐 𐬛 */ - '\0', - '\xF0', '\x90', '\xAC', '\x80', ' ', '\xF0', '\x90', '\xAC', '\x81', /* 𐬀 𐬁 */ - '\0', - '\xEA', '\x9A', '\xA7', ' ', '\xEA', '\x9A', '\xA8', ' ', '\xEA', '\x9B', '\x9B', ' ', '\xEA', '\x9B', '\x89', ' ', '\xEA', '\x9B', '\x81', ' ', '\xEA', '\x9B', '\x88', ' ', '\xEA', '\x9B', '\xAB', ' ', '\xEA', '\x9B', '\xAF', /* ꚧ ꚨ ꛛ ꛉ ꛁ ꛈ ꛫ ꛯ */ - '\0', - '\xEA', '\x9A', '\xAD', ' ', '\xEA', '\x9A', '\xB3', ' ', '\xEA', '\x9A', '\xB6', ' ', '\xEA', '\x9B', '\xAC', ' ', '\xEA', '\x9A', '\xA2', ' ', '\xEA', '\x9A', '\xBD', ' ', '\xEA', '\x9B', '\xAF', ' ', '\xEA', '\x9B', '\xB2', /* ꚭ ꚳ ꚶ ꛬ ꚢ ꚽ ꛯ ꛲ */ - '\0', - '\xE0', '\xA6', '\x85', ' ', '\xE0', '\xA6', '\xA1', ' ', '\xE0', '\xA6', '\xA4', ' ', '\xE0', '\xA6', '\xA8', ' ', '\xE0', '\xA6', '\xAC', ' ', '\xE0', '\xA6', '\xAD', ' ', '\xE0', '\xA6', '\xB2', ' ', '\xE0', '\xA6', '\x95', /* অ ড ত ন ব ভ ল ক */ - '\0', - '\xE0', '\xA6', '\x87', ' ', '\xE0', '\xA6', '\x9F', ' ', '\xE0', '\xA6', '\xA0', ' ', '\xE0', '\xA6', '\xBF', ' ', '\xE0', '\xA7', '\x80', ' ', '\xE0', '\xA7', '\x88', ' ', '\xE0', '\xA7', '\x97', /* ই ট ঠ ি ী ৈ ৗ */ - '\0', - '\xE0', '\xA6', '\x93', ' ', '\xE0', '\xA6', '\x8F', ' ', '\xE0', '\xA6', '\xA1', ' ', '\xE0', '\xA6', '\xA4', ' ', '\xE0', '\xA6', '\xA8', ' ', '\xE0', '\xA6', '\xAC', ' ', '\xE0', '\xA6', '\xB2', ' ', '\xE0', '\xA6', '\x95', /* ও এ ড ত ন ব ল ক */ - '\0', - '\xE1', '\x9D', '\x90', ' ', '\xE1', '\x9D', '\x88', /* ᝐ ᝈ */ - '\0', - '\xE1', '\x9D', '\x85', ' ', '\xE1', '\x9D', '\x8A', ' ', '\xE1', '\x9D', '\x8E', /* ᝅ ᝊ ᝎ */ - '\0', - '\xE1', '\x9D', '\x82', ' ', '\xE1', '\x9D', '\x83', ' ', '\xE1', '\x9D', '\x89', ' ', '\xE1', '\x9D', '\x8C', /* ᝂ ᝃ ᝉ ᝌ */ - '\0', - '\xE1', '\x9D', '\x80', ' ', '\xE1', '\x9D', '\x83', ' ', '\xE1', '\x9D', '\x86', ' ', '\xE1', '\x9D', '\x89', ' ', '\xE1', '\x9D', '\x8B', ' ', '\xE1', '\x9D', '\x8F', ' ', '\xE1', '\x9D', '\x91', /* ᝀ ᝃ ᝆ ᝉ ᝋ ᝏ ᝑ */ - '\0', - '\xE1', '\x97', '\x9C', ' ', '\xE1', '\x96', '\xB4', ' ', '\xE1', '\x90', '\x81', ' ', '\xE1', '\x92', '\xA3', ' ', '\xE1', '\x91', '\xAB', ' ', '\xE1', '\x91', '\x8E', ' ', '\xE1', '\x94', '\x91', ' ', '\xE1', '\x97', '\xB0', /* ᗜ ᖴ ᐁ ᒣ ᑫ ᑎ ᔑ ᗰ */ - '\0', - '\xE1', '\x97', '\xB6', ' ', '\xE1', '\x96', '\xB5', ' ', '\xE1', '\x92', '\xA7', ' ', '\xE1', '\x90', '\x83', ' ', '\xE1', '\x91', '\x8C', ' ', '\xE1', '\x92', '\x8D', ' ', '\xE1', '\x94', '\x91', ' ', '\xE1', '\x97', '\xA2', /* ᗶ ᖵ ᒧ ᐃ ᑌ ᒍ ᔑ ᗢ */ - '\0', - '\xE1', '\x93', '\x93', ' ', '\xE1', '\x93', '\x95', ' ', '\xE1', '\x93', '\x80', ' ', '\xE1', '\x93', '\x82', ' ', '\xE1', '\x93', '\x84', ' ', '\xE1', '\x95', '\x84', ' ', '\xE1', '\x95', '\x86', ' ', '\xE1', '\x98', '\xA3', /* ᓓ ᓕ ᓀ ᓂ ᓄ ᕄ ᕆ ᘣ */ - '\0', - '\xE1', '\x95', '\x83', ' ', '\xE1', '\x93', '\x82', ' ', '\xE1', '\x93', '\x80', ' ', '\xE1', '\x95', '\x82', ' ', '\xE1', '\x93', '\x97', ' ', '\xE1', '\x93', '\x9A', ' ', '\xE1', '\x95', '\x86', ' ', '\xE1', '\x98', '\xA3', /* ᕃ ᓂ ᓀ ᕂ ᓗ ᓚ ᕆ ᘣ */ - '\0', - '\xE1', '\x90', '\xAA', ' ', '\xE1', '\x99', '\x86', ' ', '\xE1', '\xA3', '\x98', ' ', '\xE1', '\x90', '\xA2', ' ', '\xE1', '\x92', '\xBE', ' ', '\xE1', '\xA3', '\x97', ' ', '\xE1', '\x94', '\x86', /* ᐪ ᙆ ᣘ ᐢ ᒾ ᣗ ᔆ */ - '\0', - '\xE1', '\x99', '\x86', ' ', '\xE1', '\x97', '\xAE', ' ', '\xE1', '\x92', '\xBB', ' ', '\xE1', '\x90', '\x9E', ' ', '\xE1', '\x94', '\x86', ' ', '\xE1', '\x92', '\xA1', ' ', '\xE1', '\x92', '\xA2', ' ', '\xE1', '\x93', '\x91', /* ᙆ ᗮ ᒻ ᐞ ᔆ ᒡ ᒢ ᓑ */ - '\0', - '\xF0', '\x90', '\x8A', '\xA7', ' ', '\xF0', '\x90', '\x8A', '\xAB', ' ', '\xF0', '\x90', '\x8A', '\xAC', ' ', '\xF0', '\x90', '\x8A', '\xAD', ' ', '\xF0', '\x90', '\x8A', '\xB1', ' ', '\xF0', '\x90', '\x8A', '\xBA', ' ', '\xF0', '\x90', '\x8A', '\xBC', ' ', '\xF0', '\x90', '\x8A', '\xBF', /* 𐊧 𐊫 𐊬 𐊭 𐊱 𐊺 𐊼 𐊿 */ - '\0', - '\xF0', '\x90', '\x8A', '\xA3', ' ', '\xF0', '\x90', '\x8A', '\xA7', ' ', '\xF0', '\x90', '\x8A', '\xB7', ' ', '\xF0', '\x90', '\x8B', '\x80', ' ', '\xF0', '\x90', '\x8A', '\xAB', ' ', '\xF0', '\x90', '\x8A', '\xB8', ' ', '\xF0', '\x90', '\x8B', '\x89', /* 𐊣 𐊧 𐊷 𐋀 𐊫 𐊸 𐋉 */ - '\0', - '\xF0', '\x91', '\x84', '\x83', ' ', '\xF0', '\x91', '\x84', '\x85', ' ', '\xF0', '\x91', '\x84', '\x89', ' ', '\xF0', '\x91', '\x84', '\x99', ' ', '\xF0', '\x91', '\x84', '\x97', /* 𑄃 𑄅 𑄉 𑄙 𑄗 */ - '\0', - '\xF0', '\x91', '\x84', '\x85', ' ', '\xF0', '\x91', '\x84', '\x9B', ' ', '\xF0', '\x91', '\x84', '\x9D', ' ', '\xF0', '\x91', '\x84', '\x97', ' ', '\xF0', '\x91', '\x84', '\x93', /* 𑄅 𑄛 𑄝 𑄗 𑄓 */ - '\0', - '\xF0', '\x91', '\x84', '\x96', '\xF0', '\x91', '\x84', '\xB3', '\xF0', '\x91', '\x84', '\xA2', ' ', '\xF0', '\x91', '\x84', '\x98', '\xF0', '\x91', '\x84', '\xB3', '\xF0', '\x91', '\x84', '\xA2', ' ', '\xF0', '\x91', '\x84', '\x99', '\xF0', '\x91', '\x84', '\xB3', '\xF0', '\x91', '\x84', '\xA2', ' ', '\xF0', '\x91', '\x84', '\xA4', '\xF0', '\x91', '\x84', '\xB3', '\xF0', '\x91', '\x84', '\xA2', ' ', '\xF0', '\x91', '\x84', '\xA5', '\xF0', '\x91', '\x84', '\xB3', '\xF0', '\x91', '\x84', '\xA2', /* 𑄖𑄳𑄢 𑄘𑄳𑄢 𑄙𑄳𑄢 𑄤𑄳𑄢 𑄥𑄳𑄢 */ - '\0', - '\xE1', '\x8F', '\x86', ' ', '\xE1', '\x8E', '\xBB', ' ', '\xE1', '\x8E', '\xAC', ' ', '\xE1', '\x8F', '\x83', ' ', '\xE1', '\x8E', '\xA4', ' ', '\xE1', '\x8F', '\xA3', ' ', '\xE1', '\x8E', '\xA6', ' ', '\xE1', '\x8F', '\x95', /* Ꮖ Ꮋ Ꭼ Ꮓ Ꭴ Ꮳ Ꭶ Ꮥ */ - '\0', - '\xEA', '\xAE', '\x92', ' ', '\xEA', '\xAE', '\xA4', ' ', '\xEA', '\xAE', '\xB6', ' ', '\xEA', '\xAD', '\xB4', ' ', '\xEA', '\xAD', '\xBE', ' ', '\xEA', '\xAE', '\x97', ' ', '\xEA', '\xAE', '\x9D', ' ', '\xEA', '\xAE', '\xBF', /* ꮒ ꮤ ꮶ ꭴ ꭾ ꮗ ꮝ ꮿ */ - '\0', - '\xEA', '\xAE', '\x96', ' ', '\xEA', '\xAD', '\xBC', ' ', '\xEA', '\xAE', '\x93', ' ', '\xEA', '\xAE', '\xA0', ' ', '\xEA', '\xAE', '\xB3', ' ', '\xEA', '\xAD', '\xB6', ' ', '\xEA', '\xAE', '\xA5', ' ', '\xEA', '\xAE', '\xBB', /* ꮖ ꭼ ꮓ ꮠ ꮳ ꭶ ꮥ ꮻ */ - '\0', - '\xE1', '\x8F', '\xB8', ' ', '\xEA', '\xAE', '\x90', ' ', '\xEA', '\xAD', '\xB9', ' ', '\xEA', '\xAD', '\xBB', /* ᏸ ꮐ ꭹ ꭻ */ - '\0', - '\xE2', '\xB2', '\x8C', ' ', '\xE2', '\xB2', '\x8E', ' ', '\xE2', '\xB2', '\xA0', ' ', '\xE2', '\xB3', '\x9E', ' ', '\xE2', '\xB2', '\x9E', ' ', '\xE2', '\xB2', '\x90', ' ', '\xE2', '\xB2', '\xA4', ' ', '\xE2', '\xB3', '\x8A', /* Ⲍ Ⲏ Ⲡ Ⳟ Ⲟ Ⲑ Ⲥ Ⳋ */ - '\0', - '\xE2', '\xB3', '\x90', ' ', '\xE2', '\xB3', '\x98', ' ', '\xE2', '\xB3', '\x9E', ' ', '\xE2', '\xB2', '\x8E', ' ', '\xE2', '\xB2', '\x9E', ' ', '\xE2', '\xB2', '\x90', ' ', '\xE2', '\xB3', '\x9C', ' ', '\xE2', '\xB2', '\xB0', /* Ⳑ Ⳙ Ⳟ Ⲏ Ⲟ Ⲑ Ⳝ Ⲱ */ - '\0', - '\xE2', '\xB2', '\x8D', ' ', '\xE2', '\xB2', '\x8F', ' ', '\xE2', '\xB2', '\xA1', ' ', '\xE2', '\xB3', '\x9F', ' ', '\xE2', '\xB2', '\x9F', ' ', '\xE2', '\xB2', '\x91', ' ', '\xE2', '\xB2', '\xA5', ' ', '\xE2', '\xB3', '\x8B', /* ⲍ ⲏ ⲡ ⳟ ⲟ ⲑ ⲥ ⳋ */ - '\0', - '\xE2', '\xB3', '\x91', ' ', '\xE2', '\xB3', '\x99', ' ', '\xE2', '\xB3', '\x9F', ' ', '\xE2', '\xB2', '\x8F', ' ', '\xE2', '\xB2', '\x9F', ' ', '\xE2', '\xB2', '\x91', ' ', '\xE2', '\xB3', '\x9D', ' ', '\xE2', '\xB3', '\x92', /* ⳑ ⳙ ⳟ ⲏ ⲟ ⲑ ⳝ Ⳓ */ - '\0', - '\xF0', '\x90', '\xA0', '\x8D', ' ', '\xF0', '\x90', '\xA0', '\x99', ' ', '\xF0', '\x90', '\xA0', '\xB3', ' ', '\xF0', '\x90', '\xA0', '\xB1', ' ', '\xF0', '\x90', '\xA0', '\x85', ' ', '\xF0', '\x90', '\xA0', '\x93', ' ', '\xF0', '\x90', '\xA0', '\xA3', ' ', '\xF0', '\x90', '\xA0', '\xA6', /* 𐠍 𐠙 𐠳 𐠱 𐠅 𐠓 𐠣 𐠦 */ - '\0', - '\xF0', '\x90', '\xA0', '\x83', ' ', '\xF0', '\x90', '\xA0', '\x8A', ' ', '\xF0', '\x90', '\xA0', '\x9B', ' ', '\xF0', '\x90', '\xA0', '\xA3', ' ', '\xF0', '\x90', '\xA0', '\xB3', ' ', '\xF0', '\x90', '\xA0', '\xB5', ' ', '\xF0', '\x90', '\xA0', '\x90', /* 𐠃 𐠊 𐠛 𐠣 𐠳 𐠵 𐠐 */ - '\0', - '\xF0', '\x90', '\xA0', '\x88', ' ', '\xF0', '\x90', '\xA0', '\x8F', ' ', '\xF0', '\x90', '\xA0', '\x96', /* 𐠈 𐠏 𐠖 */ - '\0', - '\xD0', '\x91', ' ', '\xD0', '\x92', ' ', '\xD0', '\x95', ' ', '\xD0', '\x9F', ' ', '\xD0', '\x97', ' ', '\xD0', '\x9E', ' ', '\xD0', '\xA1', ' ', '\xD0', '\xAD', /* Б В Е П З О С Э */ - '\0', - '\xD0', '\x91', ' ', '\xD0', '\x92', ' ', '\xD0', '\x95', ' ', '\xD0', '\xA8', ' ', '\xD0', '\x97', ' ', '\xD0', '\x9E', ' ', '\xD0', '\xA1', ' ', '\xD0', '\xAD', /* Б В Е Ш З О С Э */ - '\0', - '\xD1', '\x85', ' ', '\xD0', '\xBF', ' ', '\xD0', '\xBD', ' ', '\xD1', '\x88', ' ', '\xD0', '\xB5', ' ', '\xD0', '\xB7', ' ', '\xD0', '\xBE', ' ', '\xD1', '\x81', /* х п н ш е з о с */ - '\0', - '\xD1', '\x80', ' ', '\xD1', '\x83', ' ', '\xD1', '\x84', /* р у ф */ - '\0', - '\xF0', '\x90', '\x90', '\x82', ' ', '\xF0', '\x90', '\x90', '\x84', ' ', '\xF0', '\x90', '\x90', '\x8B', ' ', '\xF0', '\x90', '\x90', '\x97', ' ', '\xF0', '\x90', '\x90', '\x91', /* 𐐂 𐐄 𐐋 𐐗 𐐑 */ - '\0', - '\xF0', '\x90', '\x90', '\x80', ' ', '\xF0', '\x90', '\x90', '\x82', ' ', '\xF0', '\x90', '\x90', '\x84', ' ', '\xF0', '\x90', '\x90', '\x97', ' ', '\xF0', '\x90', '\x90', '\x9B', /* 𐐀 𐐂 𐐄 𐐗 𐐛 */ - '\0', - '\xF0', '\x90', '\x90', '\xAA', ' ', '\xF0', '\x90', '\x90', '\xAC', ' ', '\xF0', '\x90', '\x90', '\xB3', ' ', '\xF0', '\x90', '\x90', '\xBF', ' ', '\xF0', '\x90', '\x90', '\xB9', /* 𐐪 𐐬 𐐳 𐐿 𐐹 */ - '\0', - '\xF0', '\x90', '\x90', '\xA8', ' ', '\xF0', '\x90', '\x90', '\xAA', ' ', '\xF0', '\x90', '\x90', '\xAC', ' ', '\xF0', '\x90', '\x90', '\xBF', ' ', '\xF0', '\x90', '\x91', '\x83', /* 𐐨 𐐪 𐐬 𐐿 𐑃 */ - '\0', - '\xE0', '\xA4', '\x95', ' ', '\xE0', '\xA4', '\xAE', ' ', '\xE0', '\xA4', '\x85', ' ', '\xE0', '\xA4', '\x86', ' ', '\xE0', '\xA4', '\xA5', ' ', '\xE0', '\xA4', '\xA7', ' ', '\xE0', '\xA4', '\xAD', ' ', '\xE0', '\xA4', '\xB6', /* क म अ आ थ ध भ श */ - '\0', - '\xE0', '\xA4', '\x88', ' ', '\xE0', '\xA4', '\x90', ' ', '\xE0', '\xA4', '\x93', ' ', '\xE0', '\xA4', '\x94', ' ', '\xE0', '\xA4', '\xBF', ' ', '\xE0', '\xA5', '\x80', ' ', '\xE0', '\xA5', '\x8B', ' ', '\xE0', '\xA5', '\x8C', /* ई ऐ ओ औ ि ी ो ौ */ - '\0', - '\xE0', '\xA4', '\x95', ' ', '\xE0', '\xA4', '\xAE', ' ', '\xE0', '\xA4', '\x85', ' ', '\xE0', '\xA4', '\x86', ' ', '\xE0', '\xA4', '\xA5', ' ', '\xE0', '\xA4', '\xA7', ' ', '\xE0', '\xA4', '\xAD', ' ', '\xE0', '\xA4', '\xB6', /* क म अ आ थ ध भ श */ - '\0', - '\xE0', '\xA5', '\x81', ' ', '\xE0', '\xA5', '\x83', /* ु ृ */ - '\0', - '\xE1', '\x88', '\x80', ' ', '\xE1', '\x88', '\x83', ' ', '\xE1', '\x8B', '\x98', ' ', '\xE1', '\x8D', '\x90', ' ', '\xE1', '\x88', '\x9B', ' ', '\xE1', '\x89', '\xA0', ' ', '\xE1', '\x8B', '\x8B', ' ', '\xE1', '\x8B', '\x90', /* ሀ ሃ ዘ ፐ ማ በ ዋ ዐ */ - '\0', - '\xE1', '\x88', '\x88', ' ', '\xE1', '\x88', '\x90', ' ', '\xE1', '\x89', '\xA0', ' ', '\xE1', '\x8B', '\x98', ' ', '\xE1', '\x88', '\x80', ' ', '\xE1', '\x88', '\xAA', ' ', '\xE1', '\x8B', '\x90', ' ', '\xE1', '\x8C', '\xA8', /* ለ ሐ በ ዘ ሀ ሪ ዐ ጨ */ - '\0', - '\xE1', '\x83', '\x92', ' ', '\xE1', '\x83', '\x93', ' ', '\xE1', '\x83', '\x94', ' ', '\xE1', '\x83', '\x95', ' ', '\xE1', '\x83', '\x97', ' ', '\xE1', '\x83', '\x98', ' ', '\xE1', '\x83', '\x9D', ' ', '\xE1', '\x83', '\xA6', /* გ დ ე ვ თ ი ო ღ */ - '\0', - '\xE1', '\x83', '\x90', ' ', '\xE1', '\x83', '\x96', ' ', '\xE1', '\x83', '\x9B', ' ', '\xE1', '\x83', '\xA1', ' ', '\xE1', '\x83', '\xA8', ' ', '\xE1', '\x83', '\xAB', ' ', '\xE1', '\x83', '\xAE', ' ', '\xE1', '\x83', '\x9E', /* ა ზ მ ს შ ძ ხ პ */ - '\0', - '\xE1', '\x83', '\xA1', ' ', '\xE1', '\x83', '\xAE', ' ', '\xE1', '\x83', '\xA5', ' ', '\xE1', '\x83', '\x96', ' ', '\xE1', '\x83', '\x9B', ' ', '\xE1', '\x83', '\xA8', ' ', '\xE1', '\x83', '\xA9', ' ', '\xE1', '\x83', '\xAC', /* ს ხ ქ ზ მ შ ჩ წ */ - '\0', - '\xE1', '\x83', '\x94', ' ', '\xE1', '\x83', '\x95', ' ', '\xE1', '\x83', '\x9F', ' ', '\xE1', '\x83', '\xA2', ' ', '\xE1', '\x83', '\xA3', ' ', '\xE1', '\x83', '\xA4', ' ', '\xE1', '\x83', '\xA5', ' ', '\xE1', '\x83', '\xA7', /* ე ვ ჟ ტ უ ფ ქ ყ */ - '\0', - '\xE1', '\x82', '\xB1', ' ', '\xE1', '\x82', '\xA7', ' ', '\xE1', '\x82', '\xB9', ' ', '\xE1', '\x82', '\xBC', ' ', '\xE1', '\x82', '\xA4', ' ', '\xE1', '\x82', '\xA5', ' ', '\xE1', '\x82', '\xB3', ' ', '\xE1', '\x82', '\xBA', /* Ⴑ Ⴇ Ⴙ Ⴜ Ⴄ Ⴅ Ⴓ Ⴚ */ - '\0', - '\xE1', '\x82', '\xA4', ' ', '\xE1', '\x82', '\xA5', ' ', '\xE1', '\x82', '\xA7', ' ', '\xE1', '\x82', '\xA8', ' ', '\xE1', '\x82', '\xA6', ' ', '\xE1', '\x82', '\xB1', ' ', '\xE1', '\x82', '\xAA', ' ', '\xE1', '\x82', '\xAB', /* Ⴄ Ⴅ Ⴇ Ⴈ Ⴆ Ⴑ Ⴊ Ⴋ */ - '\0', - '\xE2', '\xB4', '\x81', ' ', '\xE2', '\xB4', '\x97', ' ', '\xE2', '\xB4', '\x82', ' ', '\xE2', '\xB4', '\x84', ' ', '\xE2', '\xB4', '\x85', ' ', '\xE2', '\xB4', '\x87', ' ', '\xE2', '\xB4', '\x94', ' ', '\xE2', '\xB4', '\x96', /* ⴁ ⴗ ⴂ ⴄ ⴅ ⴇ ⴔ ⴖ */ - '\0', - '\xE2', '\xB4', '\x88', ' ', '\xE2', '\xB4', '\x8C', ' ', '\xE2', '\xB4', '\x96', ' ', '\xE2', '\xB4', '\x8E', ' ', '\xE2', '\xB4', '\x83', ' ', '\xE2', '\xB4', '\x86', ' ', '\xE2', '\xB4', '\x8B', ' ', '\xE2', '\xB4', '\xA2', /* ⴈ ⴌ ⴖ ⴎ ⴃ ⴆ ⴋ ⴢ */ - '\0', - '\xE2', '\xB4', '\x90', ' ', '\xE2', '\xB4', '\x91', ' ', '\xE2', '\xB4', '\x93', ' ', '\xE2', '\xB4', '\x95', ' ', '\xE2', '\xB4', '\x99', ' ', '\xE2', '\xB4', '\x9B', ' ', '\xE2', '\xB4', '\xA1', ' ', '\xE2', '\xB4', '\xA3', /* ⴐ ⴑ ⴓ ⴕ ⴙ ⴛ ⴡ ⴣ */ - '\0', - '\xE2', '\xB4', '\x84', ' ', '\xE2', '\xB4', '\x85', ' ', '\xE2', '\xB4', '\x94', ' ', '\xE2', '\xB4', '\x95', ' ', '\xE2', '\xB4', '\x81', ' ', '\xE2', '\xB4', '\x82', ' ', '\xE2', '\xB4', '\x98', ' ', '\xE2', '\xB4', '\x9D', /* ⴄ ⴅ ⴔ ⴕ ⴁ ⴂ ⴘ ⴝ */ - '\0', - '\xE1', '\xB2', '\x9C', ' ', '\xE1', '\xB2', '\x9F', ' ', '\xE1', '\xB2', '\xB3', ' ', '\xE1', '\xB2', '\xB8', ' ', '\xE1', '\xB2', '\x92', ' ', '\xE1', '\xB2', '\x94', ' ', '\xE1', '\xB2', '\x9D', ' ', '\xE1', '\xB2', '\xB4', /* Ნ Ჟ Ჳ Ჸ Გ Ე Ო Ჴ */ - '\0', - '\xE1', '\xB2', '\x98', ' ', '\xE1', '\xB2', '\xB2', ' ', '\xE1', '\xB2', '\x9D', ' ', '\xE1', '\xB2', '\xA9', ' ', '\xE1', '\xB2', '\x9B', ' ', '\xE1', '\xB2', '\xA8', ' ', '\xE1', '\xB2', '\xAF', ' ', '\xE1', '\xB2', '\xBD', /* Ი Ჲ Ო Ჩ Მ Შ Ჯ Ჽ */ - '\0', - '\xE2', '\xB0', '\x85', ' ', '\xE2', '\xB0', '\x94', ' ', '\xE2', '\xB0', '\xAA', ' ', '\xE2', '\xB0', '\x84', ' ', '\xE2', '\xB0', '\x82', ' ', '\xE2', '\xB0', '\x8A', ' ', '\xE2', '\xB0', '\xAB', ' ', '\xE2', '\xB0', '\x8B', /* Ⰵ Ⱄ Ⱚ Ⰴ Ⰲ Ⰺ Ⱛ Ⰻ */ - '\0', - '\xE2', '\xB0', '\x85', ' ', '\xE2', '\xB0', '\x84', ' ', '\xE2', '\xB0', '\x82', ' ', '\xE2', '\xB0', '\xAA', ' ', '\xE2', '\xB0', '\x9E', ' ', '\xE2', '\xB0', '\xA1', ' ', '\xE2', '\xB0', '\x8A', ' ', '\xE2', '\xB0', '\x94', /* Ⰵ Ⰴ Ⰲ Ⱚ Ⱎ Ⱑ Ⰺ Ⱄ */ - '\0', - '\xE2', '\xB0', '\xB5', ' ', '\xE2', '\xB1', '\x84', ' ', '\xE2', '\xB1', '\x9A', ' ', '\xE2', '\xB0', '\xB4', ' ', '\xE2', '\xB0', '\xB2', ' ', '\xE2', '\xB0', '\xBA', ' ', '\xE2', '\xB1', '\x9B', ' ', '\xE2', '\xB0', '\xBB', /* ⰵ ⱄ ⱚ ⰴ ⰲ ⰺ ⱛ ⰻ */ - '\0', - '\xE2', '\xB0', '\xB5', ' ', '\xE2', '\xB0', '\xB4', ' ', '\xE2', '\xB0', '\xB2', ' ', '\xE2', '\xB1', '\x9A', ' ', '\xE2', '\xB1', '\x8E', ' ', '\xE2', '\xB1', '\x91', ' ', '\xE2', '\xB0', '\xBA', ' ', '\xE2', '\xB1', '\x84', /* ⰵ ⰴ ⰲ ⱚ ⱎ ⱑ ⰺ ⱄ */ - '\0', - '\xF0', '\x90', '\x8C', '\xB2', ' ', '\xF0', '\x90', '\x8C', '\xB6', ' ', '\xF0', '\x90', '\x8D', '\x80', ' ', '\xF0', '\x90', '\x8D', '\x84', ' ', '\xF0', '\x90', '\x8C', '\xB4', ' ', '\xF0', '\x90', '\x8D', '\x83', ' ', '\xF0', '\x90', '\x8D', '\x88', ' ', '\xF0', '\x90', '\x8C', '\xBE', /* 𐌲 𐌶 𐍀 𐍄 𐌴 𐍃 𐍈 𐌾 */ - '\0', - '\xF0', '\x90', '\x8C', '\xB6', ' ', '\xF0', '\x90', '\x8C', '\xB4', ' ', '\xF0', '\x90', '\x8D', '\x83', ' ', '\xF0', '\x90', '\x8D', '\x88', /* 𐌶 𐌴 𐍃 𐍈 */ - '\0', - '\xCE', '\x93', ' ', '\xCE', '\x92', ' ', '\xCE', '\x95', ' ', '\xCE', '\x96', ' ', '\xCE', '\x98', ' ', '\xCE', '\x9F', ' ', '\xCE', '\xA9', /* Γ Β Ε Ζ Θ Ο Ω */ - '\0', - '\xCE', '\x92', ' ', '\xCE', '\x94', ' ', '\xCE', '\x96', ' ', '\xCE', '\x9E', ' ', '\xCE', '\x98', ' ', '\xCE', '\x9F', /* Β Δ Ζ Ξ Θ Ο */ - '\0', - '\xCE', '\xB2', ' ', '\xCE', '\xB8', ' ', '\xCE', '\xB4', ' ', '\xCE', '\xB6', ' ', '\xCE', '\xBB', ' ', '\xCE', '\xBE', /* β θ δ ζ λ ξ */ - '\0', - '\xCE', '\xB1', ' ', '\xCE', '\xB5', ' ', '\xCE', '\xB9', ' ', '\xCE', '\xBF', ' ', '\xCF', '\x80', ' ', '\xCF', '\x83', ' ', '\xCF', '\x84', ' ', '\xCF', '\x89', /* α ε ι ο π σ τ ω */ - '\0', - '\xCE', '\xB2', ' ', '\xCE', '\xB3', ' ', '\xCE', '\xB7', ' ', '\xCE', '\xBC', ' ', '\xCF', '\x81', ' ', '\xCF', '\x86', ' ', '\xCF', '\x87', ' ', '\xCF', '\x88', /* β γ η μ ρ φ χ ψ */ - '\0', - '\xE0', '\xAA', '\xA4', ' ', '\xE0', '\xAA', '\xA8', ' ', '\xE0', '\xAA', '\x8B', ' ', '\xE0', '\xAA', '\x8C', ' ', '\xE0', '\xAA', '\x9B', ' ', '\xE0', '\xAA', '\x9F', ' ', '\xE0', '\xAA', '\xB0', ' ', '\xE0', '\xAB', '\xA6', /* ત ન ઋ ઌ છ ટ ર ૦ */ - '\0', - '\xE0', '\xAA', '\x96', ' ', '\xE0', '\xAA', '\x97', ' ', '\xE0', '\xAA', '\x98', ' ', '\xE0', '\xAA', '\x9E', ' ', '\xE0', '\xAA', '\x87', ' ', '\xE0', '\xAA', '\x88', ' ', '\xE0', '\xAA', '\xA0', ' ', '\xE0', '\xAA', '\x9C', /* ખ ગ ઘ ઞ ઇ ઈ ઠ જ */ - '\0', - '\xE0', '\xAA', '\x88', ' ', '\xE0', '\xAA', '\x8A', ' ', '\xE0', '\xAA', '\xBF', ' ', '\xE0', '\xAB', '\x80', ' ', '\xE0', '\xAA', '\xB2', '\xE0', '\xAB', '\x80', ' ', '\xE0', '\xAA', '\xB6', '\xE0', '\xAB', '\x8D', '\xE0', '\xAA', '\x9A', '\xE0', '\xAA', '\xBF', ' ', '\xE0', '\xAA', '\x9C', '\xE0', '\xAA', '\xBF', ' ', '\xE0', '\xAA', '\xB8', '\xE0', '\xAB', '\x80', /* ઈ ઊ િ ી લી શ્ચિ જિ સી */ - '\0', - '\xE0', '\xAB', '\x81', ' ', '\xE0', '\xAB', '\x83', ' ', '\xE0', '\xAB', '\x84', ' ', '\xE0', '\xAA', '\x96', '\xE0', '\xAB', '\x81', ' ', '\xE0', '\xAA', '\x9B', '\xE0', '\xAB', '\x83', ' ', '\xE0', '\xAA', '\x9B', '\xE0', '\xAB', '\x84', /* ુ ૃ ૄ ખુ છૃ છૄ */ - '\0', - '\xE0', '\xAB', '\xA6', ' ', '\xE0', '\xAB', '\xA7', ' ', '\xE0', '\xAB', '\xA8', ' ', '\xE0', '\xAB', '\xA9', ' ', '\xE0', '\xAB', '\xAD', /* ૦ ૧ ૨ ૩ ૭ */ - '\0', - '\xE0', '\xA8', '\x95', ' ', '\xE0', '\xA8', '\x97', ' ', '\xE0', '\xA8', '\x99', ' ', '\xE0', '\xA8', '\x9A', ' ', '\xE0', '\xA8', '\x9C', ' ', '\xE0', '\xA8', '\xA4', ' ', '\xE0', '\xA8', '\xA7', ' ', '\xE0', '\xA8', '\xB8', /* ਕ ਗ ਙ ਚ ਜ ਤ ਧ ਸ */ - '\0', - '\xE0', '\xA8', '\x95', ' ', '\xE0', '\xA8', '\x97', ' ', '\xE0', '\xA8', '\x99', ' ', '\xE0', '\xA8', '\x9A', ' ', '\xE0', '\xA8', '\x9C', ' ', '\xE0', '\xA8', '\xA4', ' ', '\xE0', '\xA8', '\xA7', ' ', '\xE0', '\xA8', '\xB8', /* ਕ ਗ ਙ ਚ ਜ ਤ ਧ ਸ */ - '\0', - '\xE0', '\xA8', '\x87', ' ', '\xE0', '\xA8', '\x88', ' ', '\xE0', '\xA8', '\x89', ' ', '\xE0', '\xA8', '\x8F', ' ', '\xE0', '\xA8', '\x93', ' ', '\xE0', '\xA9', '\xB3', ' ', '\xE0', '\xA8', '\xBF', ' ', '\xE0', '\xA9', '\x80', /* ਇ ਈ ਉ ਏ ਓ ੳ ਿ ੀ */ - '\0', - '\xE0', '\xA8', '\x85', ' ', '\xE0', '\xA8', '\x8F', ' ', '\xE0', '\xA8', '\x93', ' ', '\xE0', '\xA8', '\x97', ' ', '\xE0', '\xA8', '\x9C', ' ', '\xE0', '\xA8', '\xA0', ' ', '\xE0', '\xA8', '\xB0', ' ', '\xE0', '\xA8', '\xB8', /* ਅ ਏ ਓ ਗ ਜ ਠ ਰ ਸ */ - '\0', - '\xE0', '\xA9', '\xA6', ' ', '\xE0', '\xA9', '\xA7', ' ', '\xE0', '\xA9', '\xA8', ' ', '\xE0', '\xA9', '\xA9', ' ', '\xE0', '\xA9', '\xAD', /* ੦ ੧ ੨ ੩ ੭ */ - '\0', - '\xD7', '\x91', ' ', '\xD7', '\x93', ' ', '\xD7', '\x94', ' ', '\xD7', '\x97', ' ', '\xD7', '\x9A', ' ', '\xD7', '\x9B', ' ', '\xD7', '\x9D', ' ', '\xD7', '\xA1', /* ב ד ה ח ך כ ם ס */ - '\0', - '\xD7', '\x91', ' ', '\xD7', '\x98', ' ', '\xD7', '\x9B', ' ', '\xD7', '\x9D', ' ', '\xD7', '\xA1', ' ', '\xD7', '\xA6', /* ב ט כ ם ס צ */ - '\0', - '\xD7', '\xA7', ' ', '\xD7', '\x9A', ' ', '\xD7', '\x9F', ' ', '\xD7', '\xA3', ' ', '\xD7', '\xA5', /* ק ך ן ף ץ */ - '\0', - '\xE0', '\xB2', '\x87', ' ', '\xE0', '\xB2', '\x8A', ' ', '\xE0', '\xB2', '\x90', ' ', '\xE0', '\xB2', '\xA3', ' ', '\xE0', '\xB2', '\xB8', '\xE0', '\xB2', '\xBE', ' ', '\xE0', '\xB2', '\xA8', '\xE0', '\xB2', '\xBE', ' ', '\xE0', '\xB2', '\xA6', '\xE0', '\xB2', '\xBE', ' ', '\xE0', '\xB2', '\xB0', '\xE0', '\xB2', '\xBE', /* ಇ ಊ ಐ ಣ ಸಾ ನಾ ದಾ ರಾ */ - '\0', - '\xE0', '\xB2', '\x85', ' ', '\xE0', '\xB2', '\x89', ' ', '\xE0', '\xB2', '\x8E', ' ', '\xE0', '\xB2', '\xB2', ' ', '\xE0', '\xB3', '\xA6', ' ', '\xE0', '\xB3', '\xA8', ' ', '\xE0', '\xB3', '\xAC', ' ', '\xE0', '\xB3', '\xAD', /* ಅ ಉ ಎ ಲ ೦ ೨ ೬ ೭ */ - '\0', - '\xEA', '\xA4', '\x85', ' ', '\xEA', '\xA4', '\x8F', ' ', '\xEA', '\xA4', '\x81', ' ', '\xEA', '\xA4', '\x8B', ' ', '\xEA', '\xA4', '\x80', ' ', '\xEA', '\xA4', '\x8D', /* ꤅ ꤏ ꤁ ꤋ ꤀ ꤍ */ - '\0', - '\xEA', '\xA4', '\x88', ' ', '\xEA', '\xA4', '\x98', ' ', '\xEA', '\xA4', '\x80', ' ', '\xEA', '\xA4', '\x8D', ' ', '\xEA', '\xA4', '\xA2', /* ꤈ ꤘ ꤀ ꤍ ꤢ */ - '\0', - '\xEA', '\xA4', '\x96', ' ', '\xEA', '\xA4', '\xA1', /* ꤖ ꤡ */ - '\0', - '\xEA', '\xA4', '\x91', ' ', '\xEA', '\xA4', '\x9C', ' ', '\xEA', '\xA4', '\x9E', /* ꤑ ꤜ ꤞ */ - '\0', - '\xEA', '\xA4', '\x91', '\xEA', '\xA4', '\xAC', ' ', '\xEA', '\xA4', '\x9C', '\xEA', '\xA4', '\xAD', ' ', '\xEA', '\xA4', '\x94', '\xEA', '\xA4', '\xAC', /* ꤑ꤬ ꤜ꤭ ꤔ꤬ */ - '\0', - '\xE1', '\x9E', '\x81', ' ', '\xE1', '\x9E', '\x91', ' ', '\xE1', '\x9E', '\x93', ' ', '\xE1', '\x9E', '\xA7', ' ', '\xE1', '\x9E', '\xA9', ' ', '\xE1', '\x9E', '\xB6', /* ខ ទ ន ឧ ឩ ា */ - '\0', - '\xE1', '\x9E', '\x80', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x80', ' ', '\xE1', '\x9E', '\x80', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x81', ' ', '\xE1', '\x9E', '\x80', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x82', ' ', '\xE1', '\x9E', '\x80', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x90', /* ក្ក ក្ខ ក្គ ក្ថ */ - '\0', - '\xE1', '\x9E', '\x81', ' ', '\xE1', '\x9E', '\x83', ' ', '\xE1', '\x9E', '\x85', ' ', '\xE1', '\x9E', '\x8B', ' ', '\xE1', '\x9E', '\x94', ' ', '\xE1', '\x9E', '\x98', ' ', '\xE1', '\x9E', '\x99', ' ', '\xE1', '\x9E', '\xB2', /* ខ ឃ ច ឋ ប ម យ ឲ */ - '\0', - '\xE1', '\x9E', '\x8F', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x9A', ' ', '\xE1', '\x9E', '\x9A', '\xE1', '\x9F', '\x80', ' ', '\xE1', '\x9E', '\xB2', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x99', ' ', '\xE1', '\x9E', '\xA2', '\xE1', '\x9E', '\xBF', /* ត្រ រៀ ឲ្យ អឿ */ - '\0', - '\xE1', '\x9E', '\x93', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x8F', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x9A', '\xE1', '\x9F', '\x83', ' ', '\xE1', '\x9E', '\x84', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x81', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x99', ' ', '\xE1', '\x9E', '\x80', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x94', '\xE1', '\x9F', '\x80', ' ', '\xE1', '\x9E', '\x85', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x9A', '\xE1', '\x9F', '\x80', ' ', '\xE1', '\x9E', '\x93', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x8F', '\xE1', '\x9E', '\xBF', ' ', '\xE1', '\x9E', '\x9B', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x94', '\xE1', '\x9E', '\xBF', /* ន្ត្រៃ ង្ខ្យ ក្បៀ ច្រៀ ន្តឿ ល្បឿ */ - '\0', - '\xE1', '\xA7', '\xA0', ' ', '\xE1', '\xA7', '\xA1', /* ᧠ ᧡ */ - '\0', - '\xE1', '\xA7', '\xB6', ' ', '\xE1', '\xA7', '\xB9', /* ᧶ ᧹ */ - '\0', - '\xE0', '\xBA', '\xB2', ' ', '\xE0', '\xBA', '\x94', ' ', '\xE0', '\xBA', '\xAD', ' ', '\xE0', '\xBA', '\xA1', ' ', '\xE0', '\xBA', '\xA5', ' ', '\xE0', '\xBA', '\xA7', ' ', '\xE0', '\xBA', '\xA3', ' ', '\xE0', '\xBA', '\x87', /* າ ດ ອ ມ ລ ວ ຣ ງ */ - '\0', - '\xE0', '\xBA', '\xB2', ' ', '\xE0', '\xBA', '\xAD', ' ', '\xE0', '\xBA', '\x9A', ' ', '\xE0', '\xBA', '\x8D', ' ', '\xE0', '\xBA', '\xA3', ' ', '\xE0', '\xBA', '\xAE', ' ', '\xE0', '\xBA', '\xA7', ' ', '\xE0', '\xBA', '\xA2', /* າ ອ ບ ຍ ຣ ຮ ວ ຢ */ - '\0', - '\xE0', '\xBA', '\x9B', ' ', '\xE0', '\xBA', '\xA2', ' ', '\xE0', '\xBA', '\x9F', ' ', '\xE0', '\xBA', '\x9D', /* ປ ຢ ຟ ຝ */ - '\0', - '\xE0', '\xBB', '\x82', ' ', '\xE0', '\xBB', '\x84', ' ', '\xE0', '\xBB', '\x83', /* ໂ ໄ ໃ */ - '\0', - '\xE0', '\xBA', '\x87', ' ', '\xE0', '\xBA', '\x8A', ' ', '\xE0', '\xBA', '\x96', ' ', '\xE0', '\xBA', '\xBD', ' ', '\xE0', '\xBB', '\x86', ' ', '\xE0', '\xBA', '\xAF', /* ງ ຊ ຖ ຽ ໆ ຯ */ - '\0', - 'T', ' ', 'H', ' ', 'E', ' ', 'Z', ' ', 'O', ' ', 'C', ' ', 'Q', ' ', 'S', /* T H E Z O C Q S */ - '\0', - 'H', ' ', 'E', ' ', 'Z', ' ', 'L', ' ', 'O', ' ', 'C', ' ', 'U', ' ', 'S', /* H E Z L O C U S */ - '\0', - 'f', ' ', 'i', ' ', 'j', ' ', 'k', ' ', 'd', ' ', 'b', ' ', 'h', /* f i j k d b h */ - '\0', - 'u', ' ', 'v', ' ', 'x', ' ', 'z', ' ', 'o', ' ', 'e', ' ', 's', ' ', 'c', /* u v x z o e s c */ - '\0', - 'n', ' ', 'r', ' ', 'x', ' ', 'z', ' ', 'o', ' ', 'e', ' ', 's', ' ', 'c', /* n r x z o e s c */ - '\0', - 'p', ' ', 'q', ' ', 'g', ' ', 'j', ' ', 'y', /* p q g j y */ - '\0', - '\xE2', '\x82', '\x80', ' ', '\xE2', '\x82', '\x83', ' ', '\xE2', '\x82', '\x85', ' ', '\xE2', '\x82', '\x87', ' ', '\xE2', '\x82', '\x88', /* ₀ ₃ ₅ ₇ ₈ */ - '\0', - '\xE2', '\x82', '\x80', ' ', '\xE2', '\x82', '\x81', ' ', '\xE2', '\x82', '\x82', ' ', '\xE2', '\x82', '\x83', ' ', '\xE2', '\x82', '\x88', /* ₀ ₁ ₂ ₃ ₈ */ - '\0', - '\xE1', '\xB5', '\xA2', ' ', '\xE2', '\xB1', '\xBC', ' ', '\xE2', '\x82', '\x95', ' ', '\xE2', '\x82', '\x96', ' ', '\xE2', '\x82', '\x97', /* ᵢ ⱼ ₕ ₖ ₗ */ - '\0', - '\xE2', '\x82', '\x90', ' ', '\xE2', '\x82', '\x91', ' ', '\xE2', '\x82', '\x92', ' ', '\xE2', '\x82', '\x93', ' ', '\xE2', '\x82', '\x99', ' ', '\xE2', '\x82', '\x9B', ' ', '\xE1', '\xB5', '\xA5', ' ', '\xE1', '\xB5', '\xA4', ' ', '\xE1', '\xB5', '\xA3', /* ₐ ₑ ₒ ₓ ₙ ₛ ᵥ ᵤ ᵣ */ - '\0', - '\xE1', '\xB5', '\xA6', ' ', '\xE1', '\xB5', '\xA7', ' ', '\xE1', '\xB5', '\xA8', ' ', '\xE1', '\xB5', '\xA9', ' ', '\xE2', '\x82', '\x9A', /* ᵦ ᵧ ᵨ ᵩ ₚ */ - '\0', - '\xE2', '\x81', '\xB0', ' ', '\xC2', '\xB3', ' ', '\xE2', '\x81', '\xB5', ' ', '\xE2', '\x81', '\xB7', ' ', '\xE1', '\xB5', '\x80', ' ', '\xE1', '\xB4', '\xB4', ' ', '\xE1', '\xB4', '\xB1', ' ', '\xE1', '\xB4', '\xBC', /* ⁰ ³ ⁵ ⁷ ᵀ ᴴ ᴱ ᴼ */ - '\0', - '\xE2', '\x81', '\xB0', ' ', '\xC2', '\xB9', ' ', '\xC2', '\xB2', ' ', '\xC2', '\xB3', ' ', '\xE1', '\xB4', '\xB1', ' ', '\xE1', '\xB4', '\xB8', ' ', '\xE1', '\xB4', '\xBC', ' ', '\xE1', '\xB5', '\x81', /* ⁰ ¹ ² ³ ᴱ ᴸ ᴼ ᵁ */ - '\0', - '\xE1', '\xB5', '\x87', ' ', '\xE1', '\xB5', '\x88', ' ', '\xE1', '\xB5', '\x8F', ' ', '\xCA', '\xB0', ' ', '\xCA', '\xB2', ' ', '\xE1', '\xB6', '\xA0', ' ', '\xE2', '\x81', '\xB1', /* ᵇ ᵈ ᵏ ʰ ʲ ᶠ ⁱ */ - '\0', - '\xE1', '\xB5', '\x89', ' ', '\xE1', '\xB5', '\x92', ' ', '\xCA', '\xB3', ' ', '\xCB', '\xA2', ' ', '\xCB', '\xA3', ' ', '\xE1', '\xB6', '\x9C', ' ', '\xE1', '\xB6', '\xBB', /* ᵉ ᵒ ʳ ˢ ˣ ᶜ ᶻ */ - '\0', - '\xE1', '\xB5', '\x96', ' ', '\xCA', '\xB8', ' ', '\xE1', '\xB5', '\x8D', /* ᵖ ʸ ᵍ */ - '\0', - '\xEA', '\x93', '\xA1', ' ', '\xEA', '\x93', '\xA7', ' ', '\xEA', '\x93', '\xB1', ' ', '\xEA', '\x93', '\xB6', ' ', '\xEA', '\x93', '\xA9', ' ', '\xEA', '\x93', '\x9A', ' ', '\xEA', '\x93', '\xB5', ' ', '\xEA', '\x93', '\xB3', /* ꓡ ꓧ ꓱ ꓶ ꓩ ꓚ ꓵ ꓳ */ - '\0', - '\xEA', '\x93', '\x95', ' ', '\xEA', '\x93', '\x9C', ' ', '\xEA', '\x93', '\x9E', ' ', '\xEA', '\x93', '\xA1', ' ', '\xEA', '\x93', '\x9B', ' ', '\xEA', '\x93', '\xA2', ' ', '\xEA', '\x93', '\xB3', ' ', '\xEA', '\x93', '\xB4', /* ꓕ ꓜ ꓞ ꓡ ꓛ ꓢ ꓳ ꓴ */ - '\0', - '\xE0', '\xB4', '\x92', ' ', '\xE0', '\xB4', '\x9F', ' ', '\xE0', '\xB4', '\xA0', ' ', '\xE0', '\xB4', '\xB1', ' ', '\xE0', '\xB4', '\x9A', ' ', '\xE0', '\xB4', '\xAA', ' ', '\xE0', '\xB4', '\x9A', '\xE0', '\xB5', '\x8D', '\xE0', '\xB4', '\x9A', ' ', '\xE0', '\xB4', '\xAA', '\xE0', '\xB5', '\x8D', '\xE0', '\xB4', '\xAA', /* ഒ ട ഠ റ ച പ ച്ച പ്പ */ - '\0', - '\xE0', '\xB4', '\x9F', ' ', '\xE0', '\xB4', '\xA0', ' ', '\xE0', '\xB4', '\xA7', ' ', '\xE0', '\xB4', '\xB6', ' ', '\xE0', '\xB4', '\x98', ' ', '\xE0', '\xB4', '\x9A', ' ', '\xE0', '\xB4', '\xA5', ' ', '\xE0', '\xB4', '\xB2', /* ട ഠ ധ ശ ഘ ച ഥ ല */ - '\0', - '\xE1', '\x80', '\x81', ' ', '\xE1', '\x80', '\x82', ' ', '\xE1', '\x80', '\x84', ' ', '\xE1', '\x80', '\x92', ' ', '\xE1', '\x80', '\x9D', ' ', '\xE1', '\x81', '\xA5', ' ', '\xE1', '\x81', '\x8A', ' ', '\xE1', '\x81', '\x8B', /* ခ ဂ င ဒ ဝ ၥ ၊ ။ */ - '\0', - '\xE1', '\x80', '\x84', ' ', '\xE1', '\x80', '\x8E', ' ', '\xE1', '\x80', '\x92', ' ', '\xE1', '\x80', '\x95', ' ', '\xE1', '\x80', '\x97', ' ', '\xE1', '\x80', '\x9D', ' ', '\xE1', '\x81', '\x8A', ' ', '\xE1', '\x81', '\x8B', /* င ဎ ဒ ပ ဗ ဝ ၊ ။ */ - '\0', - '\xE1', '\x80', '\xA9', ' ', '\xE1', '\x80', '\xBC', ' ', '\xE1', '\x81', '\x8D', ' ', '\xE1', '\x81', '\x8F', ' ', '\xE1', '\x81', '\x86', ' ', '\xE1', '\x80', '\xAB', ' ', '\xE1', '\x80', '\xAD', /* ဩ ြ ၍ ၏ ၆ ါ ိ */ - '\0', - '\xE1', '\x80', '\x89', ' ', '\xE1', '\x80', '\x8A', ' ', '\xE1', '\x80', '\xA5', ' ', '\xE1', '\x80', '\xA9', ' ', '\xE1', '\x80', '\xA8', ' ', '\xE1', '\x81', '\x82', ' ', '\xE1', '\x81', '\x85', ' ', '\xE1', '\x81', '\x89', /* ဉ ည ဥ ဩ ဨ ၂ ၅ ၉ */ - '\0', - '\xDF', '\x90', ' ', '\xDF', '\x89', ' ', '\xDF', '\x92', ' ', '\xDF', '\x9F', ' ', '\xDF', '\x96', ' ', '\xDF', '\x9C', ' ', '\xDF', '\xA0', ' ', '\xDF', '\xA5', /* ߐ ߉ ߒ ߟ ߖ ߜ ߠ ߥ */ - '\0', - '\xDF', '\x80', ' ', '\xDF', '\x98', ' ', '\xDF', '\xA1', ' ', '\xDF', '\xA0', ' ', '\xDF', '\xA5', /* ߀ ߘ ߡ ߠ ߥ */ - '\0', - '\xDF', '\x8F', ' ', '\xDF', '\x9B', ' ', '\xDF', '\x8B', /* ߏ ߛ ߋ */ - '\0', - '\xDF', '\x8E', ' ', '\xDF', '\x8F', ' ', '\xDF', '\x9B', ' ', '\xDF', '\x8B', /* ߎ ߏ ߛ ߋ */ - '\0', - '\xE1', '\xB1', '\x9B', ' ', '\xE1', '\xB1', '\x9C', ' ', '\xE1', '\xB1', '\x9D', ' ', '\xE1', '\xB1', '\xA1', ' ', '\xE1', '\xB1', '\xA2', ' ', '\xE1', '\xB1', '\xA5', /* ᱛ ᱜ ᱝ ᱡ ᱢ ᱥ */ - '\0', - '\xF0', '\x90', '\xB0', '\x97', ' ', '\xF0', '\x90', '\xB0', '\x98', ' ', '\xF0', '\x90', '\xB0', '\xA7', /* 𐰗 𐰘 𐰧 */ - '\0', - '\xF0', '\x90', '\xB0', '\x89', ' ', '\xF0', '\x90', '\xB0', '\x97', ' ', '\xF0', '\x90', '\xB0', '\xA6', ' ', '\xF0', '\x90', '\xB0', '\xA7', /* 𐰉 𐰗 𐰦 𐰧 */ - '\0', - '\xF0', '\x90', '\x92', '\xBE', ' ', '\xF0', '\x90', '\x93', '\x8D', ' ', '\xF0', '\x90', '\x93', '\x92', ' ', '\xF0', '\x90', '\x93', '\x93', ' ', '\xF0', '\x90', '\x92', '\xBB', ' ', '\xF0', '\x90', '\x93', '\x82', ' ', '\xF0', '\x90', '\x92', '\xB5', ' ', '\xF0', '\x90', '\x93', '\x86', /* 𐒾 𐓍 𐓒 𐓓 𐒻 𐓂 𐒵 𐓆 */ - '\0', - '\xF0', '\x90', '\x92', '\xB0', ' ', '\xF0', '\x90', '\x93', '\x8D', ' ', '\xF0', '\x90', '\x93', '\x82', ' ', '\xF0', '\x90', '\x92', '\xBF', ' ', '\xF0', '\x90', '\x93', '\x8E', ' ', '\xF0', '\x90', '\x92', '\xB9', /* 𐒰 𐓍 𐓂 𐒿 𐓎 𐒹 */ - '\0', - '\xF0', '\x90', '\x92', '\xBC', ' ', '\xF0', '\x90', '\x92', '\xBD', ' ', '\xF0', '\x90', '\x92', '\xBE', /* 𐒼 𐒽 𐒾 */ - '\0', - '\xF0', '\x90', '\x93', '\xB5', ' ', '\xF0', '\x90', '\x93', '\xB6', ' ', '\xF0', '\x90', '\x93', '\xBA', ' ', '\xF0', '\x90', '\x93', '\xBB', ' ', '\xF0', '\x90', '\x93', '\x9D', ' ', '\xF0', '\x90', '\x93', '\xA3', ' ', '\xF0', '\x90', '\x93', '\xAA', ' ', '\xF0', '\x90', '\x93', '\xAE', /* 𐓵 𐓶 𐓺 𐓻 𐓝 𐓣 𐓪 𐓮 */ - '\0', - '\xF0', '\x90', '\x93', '\x98', ' ', '\xF0', '\x90', '\x93', '\x9A', ' ', '\xF0', '\x90', '\x93', '\xA3', ' ', '\xF0', '\x90', '\x93', '\xB5', ' ', '\xF0', '\x90', '\x93', '\xA1', ' ', '\xF0', '\x90', '\x93', '\xA7', ' ', '\xF0', '\x90', '\x93', '\xAA', ' ', '\xF0', '\x90', '\x93', '\xB6', /* 𐓘 𐓚 𐓣 𐓵 𐓡 𐓧 𐓪 𐓶 */ - '\0', - '\xF0', '\x90', '\x93', '\xA4', ' ', '\xF0', '\x90', '\x93', '\xA6', ' ', '\xF0', '\x90', '\x93', '\xB8', ' ', '\xF0', '\x90', '\x93', '\xB9', ' ', '\xF0', '\x90', '\x93', '\x9B', /* 𐓤 𐓦 𐓸 𐓹 𐓛 */ - '\0', - '\xF0', '\x90', '\x93', '\xA4', ' ', '\xF0', '\x90', '\x93', '\xA5', ' ', '\xF0', '\x90', '\x93', '\xA6', /* 𐓤 𐓥 𐓦 */ - '\0', - '\xF0', '\x90', '\x92', '\x86', ' ', '\xF0', '\x90', '\x92', '\x89', ' ', '\xF0', '\x90', '\x92', '\x90', ' ', '\xF0', '\x90', '\x92', '\x92', ' ', '\xF0', '\x90', '\x92', '\x98', ' ', '\xF0', '\x90', '\x92', '\x9B', ' ', '\xF0', '\x90', '\x92', '\xA0', ' ', '\xF0', '\x90', '\x92', '\xA3', /* 𐒆 𐒉 𐒐 𐒒 𐒘 𐒛 𐒠 𐒣 */ - '\0', - '\xF0', '\x90', '\x92', '\x80', ' ', '\xF0', '\x90', '\x92', '\x82', ' ', '\xF0', '\x90', '\x92', '\x86', ' ', '\xF0', '\x90', '\x92', '\x88', ' ', '\xF0', '\x90', '\x92', '\x8A', ' ', '\xF0', '\x90', '\x92', '\x92', ' ', '\xF0', '\x90', '\x92', '\xA0', ' ', '\xF0', '\x90', '\x92', '\xA9', /* 𐒀 𐒂 𐒆 𐒈 𐒊 𐒒 𐒠 𐒩 */ - '\0', - '\xEA', '\xA2', '\x9C', ' ', '\xEA', '\xA2', '\x9E', ' ', '\xEA', '\xA2', '\xB3', ' ', '\xEA', '\xA2', '\x82', ' ', '\xEA', '\xA2', '\x96', ' ', '\xEA', '\xA2', '\x92', ' ', '\xEA', '\xA2', '\x9D', ' ', '\xEA', '\xA2', '\x9B', /* ꢜ ꢞ ꢳ ꢂ ꢖ ꢒ ꢝ ꢛ */ - '\0', - '\xEA', '\xA2', '\x82', ' ', '\xEA', '\xA2', '\xA8', ' ', '\xEA', '\xA2', '\xBA', ' ', '\xEA', '\xA2', '\xA4', ' ', '\xEA', '\xA2', '\x8E', /* ꢂ ꢨ ꢺ ꢤ ꢎ */ - '\0', - '\xF0', '\x90', '\x91', '\x95', ' ', '\xF0', '\x90', '\x91', '\x99', /* 𐑕 𐑙 */ - '\0', - '\xF0', '\x90', '\x91', '\x94', ' ', '\xF0', '\x90', '\x91', '\x96', ' ', '\xF0', '\x90', '\x91', '\x97', ' ', '\xF0', '\x90', '\x91', '\xB9', ' ', '\xF0', '\x90', '\x91', '\xBB', /* 𐑔 𐑖 𐑗 𐑹 𐑻 */ - '\0', - '\xF0', '\x90', '\x91', '\x9F', ' ', '\xF0', '\x90', '\x91', '\xA3', /* 𐑟 𐑣 */ - '\0', - '\xF0', '\x90', '\x91', '\xB1', ' ', '\xF0', '\x90', '\x91', '\xB2', ' ', '\xF0', '\x90', '\x91', '\xB3', ' ', '\xF0', '\x90', '\x91', '\xB4', ' ', '\xF0', '\x90', '\x91', '\xB8', ' ', '\xF0', '\x90', '\x91', '\xBA', ' ', '\xF0', '\x90', '\x91', '\xBC', /* 𐑱 𐑲 𐑳 𐑴 𐑸 𐑺 𐑼 */ - '\0', - '\xF0', '\x90', '\x91', '\xB4', ' ', '\xF0', '\x90', '\x91', '\xBB', ' ', '\xF0', '\x90', '\x91', '\xB9', /* 𐑴 𐑻 𐑹 */ - '\0', - '\xE0', '\xB6', '\x89', ' ', '\xE0', '\xB6', '\x9A', ' ', '\xE0', '\xB6', '\x9D', ' ', '\xE0', '\xB6', '\xB3', ' ', '\xE0', '\xB6', '\xB4', ' ', '\xE0', '\xB6', '\xBA', ' ', '\xE0', '\xB6', '\xBD', ' ', '\xE0', '\xB7', '\x86', /* ඉ ක ඝ ඳ ප ය ල ෆ */ - '\0', - '\xE0', '\xB6', '\x91', ' ', '\xE0', '\xB6', '\x94', ' ', '\xE0', '\xB6', '\x9D', ' ', '\xE0', '\xB6', '\xA2', ' ', '\xE0', '\xB6', '\xA7', ' ', '\xE0', '\xB6', '\xAE', ' ', '\xE0', '\xB6', '\xB0', ' ', '\xE0', '\xB6', '\xBB', /* එ ඔ ඝ ජ ට ථ ධ ර */ - '\0', - '\xE0', '\xB6', '\xAF', ' ', '\xE0', '\xB6', '\xB3', ' ', '\xE0', '\xB6', '\x8B', ' ', '\xE0', '\xB6', '\xBD', ' ', '\xE0', '\xB6', '\xAD', '\xE0', '\xB7', '\x96', ' ', '\xE0', '\xB6', '\xAD', '\xE0', '\xB7', '\x94', ' ', '\xE0', '\xB6', '\xB6', '\xE0', '\xB7', '\x94', ' ', '\xE0', '\xB6', '\xAF', '\xE0', '\xB7', '\x94', /* ද ඳ උ ල තූ තු බු දු */ - '\0', - '\xE1', '\xAE', '\x8B', ' ', '\xE1', '\xAE', '\x9E', ' ', '\xE1', '\xAE', '\xAE', ' ', '\xE1', '\xAE', '\xBD', ' ', '\xE1', '\xAE', '\xB0', ' ', '\xE1', '\xAE', '\x88', /* ᮋ ᮞ ᮮ ᮽ ᮰ ᮈ */ - '\0', - '\xE1', '\xAE', '\x84', ' ', '\xE1', '\xAE', '\x94', ' ', '\xE1', '\xAE', '\x95', ' ', '\xE1', '\xAE', '\x97', ' ', '\xE1', '\xAE', '\xB0', ' ', '\xE1', '\xAE', '\x86', ' ', '\xE1', '\xAE', '\x88', ' ', '\xE1', '\xAE', '\x89', /* ᮄ ᮔ ᮕ ᮗ ᮰ ᮆ ᮈ ᮉ */ - '\0', - '\xE1', '\xAE', '\xBC', ' ', '\xE1', '\xB3', '\x84', /* ᮼ ᳄ */ - '\0', - '\xEA', '\xAA', '\x86', ' ', '\xEA', '\xAA', '\x94', ' ', '\xEA', '\xAA', '\x92', ' ', '\xEA', '\xAA', '\x96', ' ', '\xEA', '\xAA', '\xAB', /* ꪆ ꪔ ꪒ ꪖ ꪫ */ - '\0', - '\xEA', '\xAA', '\x89', ' ', '\xEA', '\xAA', '\xAB', ' ', '\xEA', '\xAA', '\xAE', /* ꪉ ꪫ ꪮ */ - '\0', - '\xE0', '\xAE', '\x89', ' ', '\xE0', '\xAE', '\x92', ' ', '\xE0', '\xAE', '\x93', ' ', '\xE0', '\xAE', '\xB1', ' ', '\xE0', '\xAE', '\x88', ' ', '\xE0', '\xAE', '\x95', ' ', '\xE0', '\xAE', '\x99', ' ', '\xE0', '\xAE', '\x9A', /* உ ஒ ஓ ற ஈ க ங ச */ - '\0', - '\xE0', '\xAE', '\x95', ' ', '\xE0', '\xAE', '\x9A', ' ', '\xE0', '\xAE', '\xB2', ' ', '\xE0', '\xAE', '\xB6', ' ', '\xE0', '\xAE', '\x89', ' ', '\xE0', '\xAE', '\x99', ' ', '\xE0', '\xAE', '\x9F', ' ', '\xE0', '\xAE', '\xAA', /* க ச ல ஶ உ ங ட ப */ - '\0', - '\xE0', '\xB0', '\x87', ' ', '\xE0', '\xB0', '\x8C', ' ', '\xE0', '\xB0', '\x99', ' ', '\xE0', '\xB0', '\x9E', ' ', '\xE0', '\xB0', '\xA3', ' ', '\xE0', '\xB0', '\xB1', ' ', '\xE0', '\xB1', '\xAF', /* ఇ ఌ ఙ ఞ ణ ఱ ౯ */ - '\0', - '\xE0', '\xB0', '\x85', ' ', '\xE0', '\xB0', '\x95', ' ', '\xE0', '\xB0', '\x9A', ' ', '\xE0', '\xB0', '\xB0', ' ', '\xE0', '\xB0', '\xBD', ' ', '\xE0', '\xB1', '\xA8', ' ', '\xE0', '\xB1', '\xAC', /* అ క చ ర ఽ ౨ ౬ */ - '\0', - '\xE0', '\xB8', '\x9A', ' ', '\xE0', '\xB9', '\x80', ' ', '\xE0', '\xB9', '\x81', ' ', '\xE0', '\xB8', '\xAD', ' ', '\xE0', '\xB8', '\x81', ' ', '\xE0', '\xB8', '\xB2', /* บ เ แ อ ก า */ - '\0', - '\xE0', '\xB8', '\x9A', ' ', '\xE0', '\xB8', '\x9B', ' ', '\xE0', '\xB8', '\xA9', ' ', '\xE0', '\xB8', '\xAF', ' ', '\xE0', '\xB8', '\xAD', ' ', '\xE0', '\xB8', '\xA2', ' ', '\xE0', '\xB8', '\xAE', /* บ ป ษ ฯ อ ย ฮ */ - '\0', - '\xE0', '\xB8', '\x9B', ' ', '\xE0', '\xB8', '\x9D', ' ', '\xE0', '\xB8', '\x9F', /* ป ฝ ฟ */ - '\0', - '\xE0', '\xB9', '\x82', ' ', '\xE0', '\xB9', '\x83', ' ', '\xE0', '\xB9', '\x84', /* โ ใ ไ */ - '\0', - '\xE0', '\xB8', '\x8E', ' ', '\xE0', '\xB8', '\x8F', ' ', '\xE0', '\xB8', '\xA4', ' ', '\xE0', '\xB8', '\xA6', /* ฎ ฏ ฤ ฦ */ - '\0', - '\xE0', '\xB8', '\x8D', ' ', '\xE0', '\xB8', '\x90', /* ญ ฐ */ - '\0', - '\xE0', '\xB9', '\x90', ' ', '\xE0', '\xB9', '\x91', ' ', '\xE0', '\xB9', '\x93', /* ๐ ๑ ๓ */ - '\0', - '\xE2', '\xB5', '\x94', ' ', '\xE2', '\xB5', '\x99', ' ', '\xE2', '\xB5', '\x9B', ' ', '\xE2', '\xB5', '\x9E', ' ', '\xE2', '\xB4', '\xB5', ' ', '\xE2', '\xB4', '\xBC', ' ', '\xE2', '\xB4', '\xB9', ' ', '\xE2', '\xB5', '\x8E', /* ⵔ ⵙ ⵛ ⵞ ⴵ ⴼ ⴹ ⵎ */ - '\0', - '\xEA', '\x97', '\x8D', ' ', '\xEA', '\x98', '\x96', ' ', '\xEA', '\x98', '\x99', ' ', '\xEA', '\x98', '\x9C', ' ', '\xEA', '\x96', '\x9C', ' ', '\xEA', '\x96', '\x9D', ' ', '\xEA', '\x94', '\x85', ' ', '\xEA', '\x95', '\xA2', /* ꗍ ꘖ ꘙ ꘜ ꖜ ꖝ ꔅ ꕢ */ - '\0', - '\xEA', '\x97', '\x8D', ' ', '\xEA', '\x98', '\x96', ' ', '\xEA', '\x98', '\x99', ' ', '\xEA', '\x97', '\x9E', ' ', '\xEA', '\x94', '\x85', ' ', '\xEA', '\x95', '\xA2', ' ', '\xEA', '\x96', '\x9C', ' ', '\xEA', '\x94', '\x86', /* ꗍ ꘖ ꘙ ꗞ ꔅ ꕢ ꖜ ꔆ */ -#ifdef AF_CONFIG_OPTION_CJK - '\0', - '\xE4', '\xBB', '\x96', ' ', '\xE4', '\xBB', '\xAC', ' ', '\xE4', '\xBD', '\xA0', ' ', '\xE4', '\xBE', '\x86', ' ', '\xE5', '\x80', '\x91', ' ', '\xE5', '\x88', '\xB0', ' ', '\xE5', '\x92', '\x8C', ' ', '\xE5', '\x9C', '\xB0', /* 他 们 你 來 們 到 和 地 */ - ' ', '\xE5', '\xAF', '\xB9', ' ', '\xE5', '\xB0', '\x8D', ' ', '\xE5', '\xB0', '\xB1', ' ', '\xE5', '\xB8', '\xAD', ' ', '\xE6', '\x88', '\x91', ' ', '\xE6', '\x97', '\xB6', ' ', '\xE6', '\x99', '\x82', ' ', '\xE6', '\x9C', '\x83', /* 对 對 就 席 我 时 時 會 */ - ' ', '\xE6', '\x9D', '\xA5', ' ', '\xE7', '\x82', '\xBA', ' ', '\xE8', '\x83', '\xBD', ' ', '\xE8', '\x88', '\xB0', ' ', '\xE8', '\xAA', '\xAA', ' ', '\xE8', '\xAF', '\xB4', ' ', '\xE8', '\xBF', '\x99', ' ', '\xE9', '\x80', '\x99', /* 来 為 能 舰 說 说 这 這 */ - ' ', '\xE9', '\xBD', '\x8A', ' ', '|', /* 齊 | */ - ' ', '\xE5', '\x86', '\x9B', ' ', '\xE5', '\x90', '\x8C', ' ', '\xE5', '\xB7', '\xB2', ' ', '\xE6', '\x84', '\xBF', ' ', '\xE6', '\x97', '\xA2', ' ', '\xE6', '\x98', '\x9F', ' ', '\xE6', '\x98', '\xAF', ' ', '\xE6', '\x99', '\xAF', /* 军 同 已 愿 既 星 是 景 */ - ' ', '\xE6', '\xB0', '\x91', ' ', '\xE7', '\x85', '\xA7', ' ', '\xE7', '\x8E', '\xB0', ' ', '\xE7', '\x8F', '\xBE', ' ', '\xE7', '\x90', '\x86', ' ', '\xE7', '\x94', '\xA8', ' ', '\xE7', '\xBD', '\xAE', ' ', '\xE8', '\xA6', '\x81', /* 民 照 现 現 理 用 置 要 */ - ' ', '\xE8', '\xBB', '\x8D', ' ', '\xE9', '\x82', '\xA3', ' ', '\xE9', '\x85', '\x8D', ' ', '\xE9', '\x87', '\x8C', ' ', '\xE9', '\x96', '\x8B', ' ', '\xE9', '\x9B', '\xB7', ' ', '\xE9', '\x9C', '\xB2', ' ', '\xE9', '\x9D', '\xA2', /* 軍 那 配 里 開 雷 露 面 */ - ' ', '\xE9', '\xA1', '\xBE', /* 顾 */ - '\0', - '\xE4', '\xB8', '\xAA', ' ', '\xE4', '\xB8', '\xBA', ' ', '\xE4', '\xBA', '\xBA', ' ', '\xE4', '\xBB', '\x96', ' ', '\xE4', '\xBB', '\xA5', ' ', '\xE4', '\xBB', '\xAC', ' ', '\xE4', '\xBD', '\xA0', ' ', '\xE4', '\xBE', '\x86', /* 个 为 人 他 以 们 你 來 */ - ' ', '\xE5', '\x80', '\x8B', ' ', '\xE5', '\x80', '\x91', ' ', '\xE5', '\x88', '\xB0', ' ', '\xE5', '\x92', '\x8C', ' ', '\xE5', '\xA4', '\xA7', ' ', '\xE5', '\xAF', '\xB9', ' ', '\xE5', '\xB0', '\x8D', ' ', '\xE5', '\xB0', '\xB1', /* 個 們 到 和 大 对 對 就 */ - ' ', '\xE6', '\x88', '\x91', ' ', '\xE6', '\x97', '\xB6', ' ', '\xE6', '\x99', '\x82', ' ', '\xE6', '\x9C', '\x89', ' ', '\xE6', '\x9D', '\xA5', ' ', '\xE7', '\x82', '\xBA', ' ', '\xE8', '\xA6', '\x81', ' ', '\xE8', '\xAA', '\xAA', /* 我 时 時 有 来 為 要 說 */ - ' ', '\xE8', '\xAF', '\xB4', ' ', '|', /* 说 | */ - ' ', '\xE4', '\xB8', '\xBB', ' ', '\xE4', '\xBA', '\x9B', ' ', '\xE5', '\x9B', '\xA0', ' ', '\xE5', '\xAE', '\x83', ' ', '\xE6', '\x83', '\xB3', ' ', '\xE6', '\x84', '\x8F', ' ', '\xE7', '\x90', '\x86', ' ', '\xE7', '\x94', '\x9F', /* 主 些 因 它 想 意 理 生 */ - ' ', '\xE7', '\x95', '\xB6', ' ', '\xE7', '\x9C', '\x8B', ' ', '\xE7', '\x9D', '\x80', ' ', '\xE7', '\xBD', '\xAE', ' ', '\xE8', '\x80', '\x85', ' ', '\xE8', '\x87', '\xAA', ' ', '\xE8', '\x91', '\x97', ' ', '\xE8', '\xA3', '\xA1', /* 當 看 着 置 者 自 著 裡 */ - ' ', '\xE8', '\xBF', '\x87', ' ', '\xE8', '\xBF', '\x98', ' ', '\xE8', '\xBF', '\x9B', ' ', '\xE9', '\x80', '\xB2', ' ', '\xE9', '\x81', '\x8E', ' ', '\xE9', '\x81', '\x93', ' ', '\xE9', '\x82', '\x84', ' ', '\xE9', '\x87', '\x8C', /* 过 还 进 進 過 道 還 里 */ - ' ', '\xE9', '\x9D', '\xA2', /* 面 */ -#ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT - '\0', - ' ', '\xE4', '\xBA', '\x9B', ' ', '\xE4', '\xBB', '\xAC', ' ', '\xE4', '\xBD', '\xA0', ' ', '\xE4', '\xBE', '\x86', ' ', '\xE5', '\x80', '\x91', ' ', '\xE5', '\x88', '\xB0', ' ', '\xE5', '\x92', '\x8C', ' ', '\xE5', '\x9C', '\xB0', /* 些 们 你 來 們 到 和 地 */ - ' ', '\xE5', '\xA5', '\xB9', ' ', '\xE5', '\xB0', '\x86', ' ', '\xE5', '\xB0', '\x87', ' ', '\xE5', '\xB0', '\xB1', ' ', '\xE5', '\xB9', '\xB4', ' ', '\xE5', '\xBE', '\x97', ' ', '\xE6', '\x83', '\x85', ' ', '\xE6', '\x9C', '\x80', /* 她 将 將 就 年 得 情 最 */ - ' ', '\xE6', '\xA0', '\xB7', ' ', '\xE6', '\xA8', '\xA3', ' ', '\xE7', '\x90', '\x86', ' ', '\xE8', '\x83', '\xBD', ' ', '\xE8', '\xAA', '\xAA', ' ', '\xE8', '\xAF', '\xB4', ' ', '\xE8', '\xBF', '\x99', ' ', '\xE9', '\x80', '\x99', /* 样 樣 理 能 說 说 这 這 */ - ' ', '\xE9', '\x80', '\x9A', ' ', '|', /* 通 | */ - ' ', '\xE5', '\x8D', '\xB3', ' ', '\xE5', '\x90', '\x97', ' ', '\xE5', '\x90', '\xA7', ' ', '\xE5', '\x90', '\xAC', ' ', '\xE5', '\x91', '\xA2', ' ', '\xE5', '\x93', '\x81', ' ', '\xE5', '\x93', '\x8D', ' ', '\xE5', '\x97', '\x8E', /* 即 吗 吧 听 呢 品 响 嗎 */ - ' ', '\xE5', '\xB8', '\x88', ' ', '\xE5', '\xB8', '\xAB', ' ', '\xE6', '\x94', '\xB6', ' ', '\xE6', '\x96', '\xAD', ' ', '\xE6', '\x96', '\xB7', ' ', '\xE6', '\x98', '\x8E', ' ', '\xE7', '\x9C', '\xBC', ' ', '\xE9', '\x96', '\x93', /* 师 師 收 断 斷 明 眼 間 */ - ' ', '\xE9', '\x97', '\xB4', ' ', '\xE9', '\x99', '\x85', ' ', '\xE9', '\x99', '\x88', ' ', '\xE9', '\x99', '\x90', ' ', '\xE9', '\x99', '\xA4', ' ', '\xE9', '\x99', '\xB3', ' ', '\xE9', '\x9A', '\x8F', ' ', '\xE9', '\x9A', '\x9B', /* 间 际 陈 限 除 陳 随 際 */ - ' ', '\xE9', '\x9A', '\xA8', /* 隨 */ - '\0', - '\xE4', '\xBA', '\x8B', ' ', '\xE5', '\x89', '\x8D', ' ', '\xE5', '\xAD', '\xB8', ' ', '\xE5', '\xB0', '\x86', ' ', '\xE5', '\xB0', '\x87', ' ', '\xE6', '\x83', '\x85', ' ', '\xE6', '\x83', '\xB3', ' ', '\xE6', '\x88', '\x96', /* 事 前 學 将 將 情 想 或 */ - ' ', '\xE6', '\x94', '\xBF', ' ', '\xE6', '\x96', '\xAF', ' ', '\xE6', '\x96', '\xB0', ' ', '\xE6', '\xA0', '\xB7', ' ', '\xE6', '\xA8', '\xA3', ' ', '\xE6', '\xB0', '\x91', ' ', '\xE6', '\xB2', '\x92', ' ', '\xE6', '\xB2', '\xA1', /* 政 斯 新 样 樣 民 沒 没 */ - ' ', '\xE7', '\x84', '\xB6', ' ', '\xE7', '\x89', '\xB9', ' ', '\xE7', '\x8E', '\xB0', ' ', '\xE7', '\x8F', '\xBE', ' ', '\xE7', '\x90', '\x83', ' ', '\xE7', '\xAC', '\xAC', ' ', '\xE7', '\xB6', '\x93', ' ', '\xE8', '\xB0', '\x81', /* 然 特 现 現 球 第 經 谁 */ - ' ', '\xE8', '\xB5', '\xB7', ' ', '|', /* 起 | */ - ' ', '\xE4', '\xBE', '\x8B', ' ', '\xE5', '\x88', '\xA5', ' ', '\xE5', '\x88', '\xAB', ' ', '\xE5', '\x88', '\xB6', ' ', '\xE5', '\x8A', '\xA8', ' ', '\xE5', '\x8B', '\x95', ' ', '\xE5', '\x90', '\x97', ' ', '\xE5', '\x97', '\x8E', /* 例 別 别 制 动 動 吗 嗎 */ - ' ', '\xE5', '\xA2', '\x9E', ' ', '\xE6', '\x8C', '\x87', ' ', '\xE6', '\x98', '\x8E', ' ', '\xE6', '\x9C', '\x9D', ' ', '\xE6', '\x9C', '\x9F', ' ', '\xE6', '\x9E', '\x84', ' ', '\xE7', '\x89', '\xA9', ' ', '\xE7', '\xA1', '\xAE', /* 增 指 明 朝 期 构 物 确 */ - ' ', '\xE7', '\xA7', '\x8D', ' ', '\xE8', '\xAA', '\xBF', ' ', '\xE8', '\xB0', '\x83', ' ', '\xE8', '\xB2', '\xBB', ' ', '\xE8', '\xB4', '\xB9', ' ', '\xE9', '\x82', '\xA3', ' ', '\xE9', '\x83', '\xBD', ' ', '\xE9', '\x96', '\x93', /* 种 調 调 費 费 那 都 間 */ - ' ', '\xE9', '\x97', '\xB4', /* 间 */ -#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */ -#endif /* AF_CONFIG_OPTION_CJK */ - '\0', - - }; - - - /* stringsets are specific to styles */ - FT_LOCAL_ARRAY_DEF( AF_Blue_StringRec ) - af_blue_stringsets[] = - { - /* */ - { AF_BLUE_STRING_ADLAM_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_ADLAM_CAPITAL_BOTTOM, 0 }, - { AF_BLUE_STRING_ADLAM_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_ADLAM_SMALL_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_ARABIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_ARABIC_BOTTOM, 0 }, - { AF_BLUE_STRING_ARABIC_JOIN, AF_BLUE_PROPERTY_LATIN_NEUTRAL }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_ARMENIAN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_ARMENIAN_CAPITAL_BOTTOM, 0 }, - { AF_BLUE_STRING_ARMENIAN_SMALL_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_ARMENIAN_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_ARMENIAN_SMALL_BOTTOM, 0 }, - { AF_BLUE_STRING_ARMENIAN_SMALL_DESCENDER, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_AVESTAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_AVESTAN_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_BAMUM_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_BAMUM_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_BENGALI_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_BENGALI_HEAD, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_BENGALI_BASE, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_NEUTRAL | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_BENGALI_BASE, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_BUHID_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_BUHID_LARGE, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_BUHID_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_BUHID_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_CHAKMA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_CHAKMA_BOTTOM, 0 }, - { AF_BLUE_STRING_CHAKMA_DESCENDER, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_CANADIAN_SYLLABICS_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_CANADIAN_SYLLABICS_BOTTOM, 0 }, - { AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_BOTTOM, 0 }, - { AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_CARIAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_CARIAN_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_CHEROKEE_CAPITAL, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_CHEROKEE_CAPITAL, 0 }, - { AF_BLUE_STRING_CHEROKEE_SMALL_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_CHEROKEE_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_CHEROKEE_SMALL, 0 }, - { AF_BLUE_STRING_CHEROKEE_SMALL_DESCENDER, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_COPTIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_COPTIC_CAPITAL_BOTTOM, 0 }, - { AF_BLUE_STRING_COPTIC_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_COPTIC_SMALL_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_CYPRIOT_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_CYPRIOT_BOTTOM, 0 }, - { AF_BLUE_STRING_CYPRIOT_SMALL, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_CYPRIOT_SMALL, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM, 0 }, - { AF_BLUE_STRING_CYRILLIC_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_CYRILLIC_SMALL, 0 }, - { AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_DEVANAGARI_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_DEVANAGARI_HEAD, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_DEVANAGARI_BASE, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_NEUTRAL | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_DEVANAGARI_BASE, 0 }, - { AF_BLUE_STRING_DEVANAGARI_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_DESERET_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_DESERET_CAPITAL_BOTTOM, 0 }, - { AF_BLUE_STRING_DESERET_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_DESERET_SMALL_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_ETHIOPIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_ETHIOPIC_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM, 0 }, - { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_DESCENDER, 0 }, - { AF_BLUE_STRING_GEORGIAN_MTAVRULI_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_GEORGIAN_MTAVRULI_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_BOTTOM, 0 }, - { AF_BLUE_STRING_GEORGIAN_NUSKHURI_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_GEORGIAN_NUSKHURI_BOTTOM, 0 }, - { AF_BLUE_STRING_GEORGIAN_NUSKHURI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM, 0 }, - { AF_BLUE_STRING_GLAGOLITIC_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_GLAGOLITIC_SMALL_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_GOTHIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_GOTHIC_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_GREEK_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM, 0 }, - { AF_BLUE_STRING_GREEK_SMALL_BETA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_GREEK_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_GREEK_SMALL, 0 }, - { AF_BLUE_STRING_GREEK_SMALL_DESCENDER, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_GUJARATI_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_GUJARATI_BOTTOM, 0 }, - { AF_BLUE_STRING_GUJARATI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_GUJARATI_DESCENDER, 0 }, - { AF_BLUE_STRING_GUJARATI_DIGIT_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_GURMUKHI_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_GURMUKHI_HEAD, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_GURMUKHI_BASE, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_NEUTRAL | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_GURMUKHI_BOTTOM, 0 }, - { AF_BLUE_STRING_GURMUKHI_DIGIT_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_HEBREW_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_LONG }, - { AF_BLUE_STRING_HEBREW_BOTTOM, 0 }, - { AF_BLUE_STRING_HEBREW_DESCENDER, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_KAYAH_LI_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_KAYAH_LI_BOTTOM, 0 }, - { AF_BLUE_STRING_KAYAH_LI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_KAYAH_LI_DESCENDER, 0 }, - { AF_BLUE_STRING_KAYAH_LI_LARGE_DESCENDER, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_KHMER_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP, AF_BLUE_PROPERTY_LATIN_SUB_TOP }, - { AF_BLUE_STRING_KHMER_BOTTOM, 0 }, - { AF_BLUE_STRING_KHMER_DESCENDER, 0 }, - { AF_BLUE_STRING_KHMER_LARGE_DESCENDER, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_KHMER_SYMBOLS_WAXING_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_KHMER_SYMBOLS_WANING_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_KANNADA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_KANNADA_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_LAO_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_LAO_BOTTOM, 0 }, - { AF_BLUE_STRING_LAO_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_LAO_LARGE_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_LAO_DESCENDER, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_LATIN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM, 0 }, - { AF_BLUE_STRING_LATIN_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_LATIN_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_LATIN_SMALL_BOTTOM, 0 }, - { AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM, 0 }, - { AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_LATIN_SUBS_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_LATIN_SUBS_SMALL, 0 }, - { AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM, 0 }, - { AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_LATIN_SUPS_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_LATIN_SUPS_SMALL, 0 }, - { AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_LISU_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_LISU_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_MALAYALAM_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_MALAYALAM_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_MYANMAR_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_MYANMAR_BOTTOM, 0 }, - { AF_BLUE_STRING_MYANMAR_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_MYANMAR_DESCENDER, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_NKO_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_NKO_BOTTOM, 0 }, - { AF_BLUE_STRING_NKO_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_NKO_SMALL_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_OL_CHIKI, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_OL_CHIKI, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_OLD_TURKIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_OLD_TURKIC_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_OSAGE_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_OSAGE_CAPITAL_BOTTOM, 0 }, - { AF_BLUE_STRING_OSAGE_CAPITAL_DESCENDER, 0 }, - { AF_BLUE_STRING_OSAGE_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_OSAGE_SMALL_BOTTOM, 0 }, - { AF_BLUE_STRING_OSAGE_SMALL_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_OSAGE_SMALL_DESCENDER, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_OSMANYA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_OSMANYA_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_SAURASHTRA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_SAURASHTRA_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_SHAVIAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_SHAVIAN_BOTTOM, 0 }, - { AF_BLUE_STRING_SHAVIAN_DESCENDER, 0 }, - { AF_BLUE_STRING_SHAVIAN_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_SINHALA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_SINHALA_BOTTOM, 0 }, - { AF_BLUE_STRING_SINHALA_DESCENDER, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_SUNDANESE_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_SUNDANESE_BOTTOM, 0 }, - { AF_BLUE_STRING_SUNDANESE_DESCENDER, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_TAMIL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_TAMIL_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_TAI_VIET_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_TAI_VIET_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_TELUGU_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_TELUGU_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_TIFINAGH, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_TIFINAGH, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_THAI_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_THAI_BOTTOM, 0 }, - { AF_BLUE_STRING_THAI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_THAI_LARGE_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_THAI_DESCENDER, 0 }, - { AF_BLUE_STRING_THAI_LARGE_DESCENDER, 0 }, - { AF_BLUE_STRING_THAI_DIGIT_TOP, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_VAI_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_VAI_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, -#ifdef AF_CONFIG_OPTION_CJK - { AF_BLUE_STRING_CJK_TOP, AF_BLUE_PROPERTY_CJK_TOP }, - { AF_BLUE_STRING_CJK_BOTTOM, 0 }, -#ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT - { AF_BLUE_STRING_CJK_LEFT, AF_BLUE_PROPERTY_CJK_HORIZ }, - { AF_BLUE_STRING_CJK_RIGHT, AF_BLUE_PROPERTY_CJK_HORIZ | - AF_BLUE_PROPERTY_CJK_RIGHT }, -#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */ - { AF_BLUE_STRING_MAX, 0 }, -#endif /* AF_CONFIG_OPTION_CJK */ - - }; - - -/* END */ diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/src/autofit/afblue.dat b/extensions/gdx-freetype/jni/freetype-2.9.1/src/autofit/afblue.dat deleted file mode 100644 index bc2f0d275..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/src/autofit/afblue.dat +++ /dev/null @@ -1,1072 +0,0 @@ -// afblue.dat -// -// Auto-fitter data for blue strings. -// -// Copyright 2013-2018 by -// David Turner, Robert Wilhelm, and Werner Lemberg. -// -// This file is part of the FreeType project, and may only be used, -// modified, and distributed under the terms of the FreeType project -// license, LICENSE.TXT. By continuing to use, modify, or distribute -// this file you indicate that you have read the license and -// understand and accept it fully. - - -// This file contains data specific to blue zones. It gets processed by -// a script to simulate `jagged arrays', with enumeration values holding -// offsets into the arrays. -// -// The format of the file is rather simple: A section starts with three -// labels separated by whitespace and followed by a colon (everything in a -// single line); the first label gives the name of the enumeration template, -// the second the name of the array template, and the third the name of the -// `maximum' template. The script then fills the corresponding templates -// (indicated by `@' characters around the name). -// -// A section contains one or more data records. Each data record consists -// of two or more lines. The first line holds the enumeration name, and the -// remaining lines the corresponding array data. -// -// There are two possible representations for array data. -// -// - A string of characters or character clusters (for example, representing -// Aksharas, Devanagari syllables) in UTF-8 encoding enclosed in double -// quotes, using C syntax, where the elements are separated by spaces. -// There can be only one string per line, thus the starting and ending -// double quote must be the first and last character in the line, -// respectively, ignoring whitespace before and after the string. If -// there are multiple strings (in multiple lines), they are concatenated -// to a single string. In the output, a string gets represented as a -// series of singles bytes, followed by a zero byte. The enumeration -// values simply hold byte offsets to the start of the corresponding -// strings. -// -// For strings, the `maximum' template holds the maximum number of -// non-space characters in all strings. -// -// - Data blocks enclosed in balanced braces, which get copied verbatim and -// which can span multiple lines. The opening brace of a block must be -// the first character of a line (ignoring whitespace), and the closing -// brace the last (ignoring whitespace also). The script appends a comma -// character after each block and counts the number of blocks to set the -// enumeration values. -// -// For data blocks, the `maximum' template holds the maximum number of -// array elements. -// -// A section can contain either strings only or data blocks only. -// -// A comment line starts with `//'; it gets removed. A preprocessor -// directive line (using the standard syntax of `cpp') starts with `#' and -// gets copied verbatim to both the enumeration and the array. Whitespace -// outside of a string is insignificant. -// -// Preprocessor directives are ignored while the script computes maximum -// values; this essentially means that the maximum values can easily be too -// large. Given that the purpose of those values is to create local -// fixed-size arrays at compile time for further processing of the blue zone -// data, this isn't a problem. Note the final zero byte of a string is not -// counted. Note also that the count holds the number of UTF-8 encoded -// characters, not bytes. - - -// The blue zone string data, to be used in the blue stringsets below. - -AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN: - - AF_BLUE_STRING_ADLAM_CAPITAL_TOP - "𞤌 𞤅 𞤈 𞤏 𞤔 𞤚" - AF_BLUE_STRING_ADLAM_CAPITAL_BOTTOM - "𞤂 𞤖" - AF_BLUE_STRING_ADLAM_SMALL_TOP - "𞤬 𞤮 𞤻 𞤼 𞤾" - AF_BLUE_STRING_ADLAM_SMALL_BOTTOM - "𞤤 𞤨 𞤩 𞤭 𞤴 𞤸 𞤺 𞥀" - - AF_BLUE_STRING_ARABIC_TOP - "ا إ ل ك ط ظ" - AF_BLUE_STRING_ARABIC_BOTTOM - "ت ث ط ظ ك" - // We don't necessarily have access to medial forms via Unicode in case - // Arabic presentational forms are missing. The only character that is - // guaranteed to have the same vertical position with joining (this is, - // non-isolated) forms is U+0640, ARABIC TATWEEL, which must join both - // round and flat curves. - AF_BLUE_STRING_ARABIC_JOIN - "ـ" - - AF_BLUE_STRING_ARMENIAN_CAPITAL_TOP - "Ա Մ Ւ Ս Բ Գ Դ Օ" - AF_BLUE_STRING_ARMENIAN_CAPITAL_BOTTOM - "Ւ Ո Դ Ճ Շ Ս Տ Օ" - AF_BLUE_STRING_ARMENIAN_SMALL_ASCENDER - "ե է ի մ վ ֆ ճ" - AF_BLUE_STRING_ARMENIAN_SMALL_TOP - "ա յ ւ ս գ շ ր օ" - AF_BLUE_STRING_ARMENIAN_SMALL_BOTTOM - "հ ո ճ ա ե ծ ս օ" - AF_BLUE_STRING_ARMENIAN_SMALL_DESCENDER - "բ ը ի լ ղ պ փ ց" - - AF_BLUE_STRING_AVESTAN_TOP - "𐬀 𐬁 𐬐 𐬛" - AF_BLUE_STRING_AVESTAN_BOTTOM - "𐬀 𐬁" - - AF_BLUE_STRING_BAMUM_TOP - "ꚧ ꚨ ꛛ ꛉ ꛁ ꛈ ꛫ ꛯ" - AF_BLUE_STRING_BAMUM_BOTTOM - "ꚭ ꚳ ꚶ ꛬ ꚢ ꚽ ꛯ ꛲" - - AF_BLUE_STRING_BENGALI_BASE - "অ ড ত ন ব ভ ল ক" - AF_BLUE_STRING_BENGALI_TOP - "ই ট ঠ ি ী ৈ ৗ" - AF_BLUE_STRING_BENGALI_HEAD - "ও এ ড ত ন ব ল ক" - - AF_BLUE_STRING_BUHID_TOP - "ᝐ ᝈ" - AF_BLUE_STRING_BUHID_LARGE - "ᝅ ᝊ ᝎ" - AF_BLUE_STRING_BUHID_SMALL - "ᝂ ᝃ ᝉ ᝌ" - AF_BLUE_STRING_BUHID_BOTTOM - "ᝀ ᝃ ᝆ ᝉ ᝋ ᝏ ᝑ" - - AF_BLUE_STRING_CANADIAN_SYLLABICS_TOP - "ᗜ ᖴ ᐁ ᒣ ᑫ ᑎ ᔑ ᗰ" - AF_BLUE_STRING_CANADIAN_SYLLABICS_BOTTOM - "ᗶ ᖵ ᒧ ᐃ ᑌ ᒍ ᔑ ᗢ" - AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_TOP - "ᓓ ᓕ ᓀ ᓂ ᓄ ᕄ ᕆ ᘣ" - AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_BOTTOM - "ᕃ ᓂ ᓀ ᕂ ᓗ ᓚ ᕆ ᘣ" - AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_TOP - "ᐪ ᙆ ᣘ ᐢ ᒾ ᣗ ᔆ" - AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_BOTTOM - "ᙆ ᗮ ᒻ ᐞ ᔆ ᒡ ᒢ ᓑ" - - AF_BLUE_STRING_CARIAN_TOP - "𐊧 𐊫 𐊬 𐊭 𐊱 𐊺 𐊼 𐊿" - AF_BLUE_STRING_CARIAN_BOTTOM - "𐊣 𐊧 𐊷 𐋀 𐊫 𐊸 𐋉" - - AF_BLUE_STRING_CHAKMA_TOP - "𑄃 𑄅 𑄉 𑄙 𑄗" - AF_BLUE_STRING_CHAKMA_BOTTOM - "𑄅 𑄛 𑄝 𑄗 𑄓" - AF_BLUE_STRING_CHAKMA_DESCENDER - "𑄖𑄳𑄢 𑄘𑄳𑄢 𑄙𑄳𑄢 𑄤𑄳𑄢 𑄥𑄳𑄢" - - AF_BLUE_STRING_CHEROKEE_CAPITAL - "Ꮖ Ꮋ Ꭼ Ꮓ Ꭴ Ꮳ Ꭶ Ꮥ" - AF_BLUE_STRING_CHEROKEE_SMALL_ASCENDER - "ꮒ ꮤ ꮶ ꭴ ꭾ ꮗ ꮝ ꮿ" - AF_BLUE_STRING_CHEROKEE_SMALL - "ꮖ ꭼ ꮓ ꮠ ꮳ ꭶ ꮥ ꮻ" - AF_BLUE_STRING_CHEROKEE_SMALL_DESCENDER - "ᏸ ꮐ ꭹ ꭻ" - - AF_BLUE_STRING_COPTIC_CAPITAL_TOP - "Ⲍ Ⲏ Ⲡ Ⳟ Ⲟ Ⲑ Ⲥ Ⳋ" - AF_BLUE_STRING_COPTIC_CAPITAL_BOTTOM - "Ⳑ Ⳙ Ⳟ Ⲏ Ⲟ Ⲑ Ⳝ Ⲱ" - AF_BLUE_STRING_COPTIC_SMALL_TOP - "ⲍ ⲏ ⲡ ⳟ ⲟ ⲑ ⲥ ⳋ" - AF_BLUE_STRING_COPTIC_SMALL_BOTTOM - "ⳑ ⳙ ⳟ ⲏ ⲟ ⲑ ⳝ Ⳓ" - - AF_BLUE_STRING_CYPRIOT_TOP - "𐠍 𐠙 𐠳 𐠱 𐠅 𐠓 𐠣 𐠦" - AF_BLUE_STRING_CYPRIOT_BOTTOM - "𐠃 𐠊 𐠛 𐠣 𐠳 𐠵 𐠐" - AF_BLUE_STRING_CYPRIOT_SMALL - "𐠈 𐠏 𐠖" - - AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP - "Б В Е П З О С Э" - AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM - "Б В Е Ш З О С Э" - AF_BLUE_STRING_CYRILLIC_SMALL - "х п н ш е з о с" - AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER - "р у ф" - - AF_BLUE_STRING_DESERET_CAPITAL_TOP - "𐐂 𐐄 𐐋 𐐗 𐐑" - AF_BLUE_STRING_DESERET_CAPITAL_BOTTOM - "𐐀 𐐂 𐐄 𐐗 𐐛" - AF_BLUE_STRING_DESERET_SMALL_TOP - "𐐪 𐐬 𐐳 𐐿 𐐹" - AF_BLUE_STRING_DESERET_SMALL_BOTTOM - "𐐨 𐐪 𐐬 𐐿 𐑃" - - AF_BLUE_STRING_DEVANAGARI_BASE - "क म अ आ थ ध भ श" - AF_BLUE_STRING_DEVANAGARI_TOP - "ई ऐ ओ औ ि ी ो ौ" - // note that some fonts have extreme variation in the height of the - // round head elements; for this reason we also define the `base' - // blue zone, which must be always present - AF_BLUE_STRING_DEVANAGARI_HEAD - "क म अ आ थ ध भ श" - AF_BLUE_STRING_DEVANAGARI_BOTTOM - "ु ृ" - - AF_BLUE_STRING_ETHIOPIC_TOP - "ሀ ሃ ዘ ፐ ማ በ ዋ ዐ" - AF_BLUE_STRING_ETHIOPIC_BOTTOM - "ለ ሐ በ ዘ ሀ ሪ ዐ ጨ" - - AF_BLUE_STRING_GEORGIAN_MKHEDRULI_TOP - "გ დ ე ვ თ ი ო ღ" - AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM - "ა ზ მ ს შ ძ ხ პ" - AF_BLUE_STRING_GEORGIAN_MKHEDRULI_ASCENDER - "ს ხ ქ ზ მ შ ჩ წ" - AF_BLUE_STRING_GEORGIAN_MKHEDRULI_DESCENDER - "ე ვ ჟ ტ უ ფ ქ ყ" - - AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_TOP - "Ⴑ Ⴇ Ⴙ Ⴜ Ⴄ Ⴅ Ⴓ Ⴚ" - AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_BOTTOM - "Ⴄ Ⴅ Ⴇ Ⴈ Ⴆ Ⴑ Ⴊ Ⴋ" - - AF_BLUE_STRING_GEORGIAN_NUSKHURI_TOP - "ⴁ ⴗ ⴂ ⴄ ⴅ ⴇ ⴔ ⴖ" - AF_BLUE_STRING_GEORGIAN_NUSKHURI_BOTTOM - "ⴈ ⴌ ⴖ ⴎ ⴃ ⴆ ⴋ ⴢ" - AF_BLUE_STRING_GEORGIAN_NUSKHURI_ASCENDER - "ⴐ ⴑ ⴓ ⴕ ⴙ ⴛ ⴡ ⴣ" - AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER - "ⴄ ⴅ ⴔ ⴕ ⴁ ⴂ ⴘ ⴝ" - - AF_BLUE_STRING_GEORGIAN_MTAVRULI_TOP - "Ნ Ჟ Ჳ Ჸ Გ Ე Ო Ჴ" - AF_BLUE_STRING_GEORGIAN_MTAVRULI_BOTTOM - "Ი Ჲ Ო Ჩ Მ Შ Ჯ Ჽ" - - AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP - "Ⰵ Ⱄ Ⱚ Ⰴ Ⰲ Ⰺ Ⱛ Ⰻ" - AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM - "Ⰵ Ⰴ Ⰲ Ⱚ Ⱎ Ⱑ Ⰺ Ⱄ" - AF_BLUE_STRING_GLAGOLITIC_SMALL_TOP - "ⰵ ⱄ ⱚ ⰴ ⰲ ⰺ ⱛ ⰻ" - AF_BLUE_STRING_GLAGOLITIC_SMALL_BOTTOM - "ⰵ ⰴ ⰲ ⱚ ⱎ ⱑ ⰺ ⱄ" - - AF_BLUE_STRING_GOTHIC_TOP - "𐌲 𐌶 𐍀 𐍄 𐌴 𐍃 𐍈 𐌾" - AF_BLUE_STRING_GOTHIC_BOTTOM - "𐌶 𐌴 𐍃 𐍈" - - AF_BLUE_STRING_GREEK_CAPITAL_TOP - "Γ Β Ε Ζ Θ Ο Ω" - AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM - "Β Δ Ζ Ξ Θ Ο" - AF_BLUE_STRING_GREEK_SMALL_BETA_TOP - "β θ δ ζ λ ξ" - AF_BLUE_STRING_GREEK_SMALL - "α ε ι ο π σ τ ω" - AF_BLUE_STRING_GREEK_SMALL_DESCENDER - "β γ η μ ρ φ χ ψ" - - AF_BLUE_STRING_GUJARATI_TOP - "ત ન ઋ ઌ છ ટ ર ૦" - AF_BLUE_STRING_GUJARATI_BOTTOM - "ખ ગ ઘ ઞ ઇ ઈ ઠ જ" - AF_BLUE_STRING_GUJARATI_ASCENDER - "ઈ ઊ િ ી લી શ્ચિ જિ સી" - AF_BLUE_STRING_GUJARATI_DESCENDER - "ુ ૃ ૄ ખુ છૃ છૄ" - AF_BLUE_STRING_GUJARATI_DIGIT_TOP - "૦ ૧ ૨ ૩ ૭" - - AF_BLUE_STRING_GURMUKHI_BASE - "ਕ ਗ ਙ ਚ ਜ ਤ ਧ ਸ" - AF_BLUE_STRING_GURMUKHI_HEAD - "ਕ ਗ ਙ ਚ ਜ ਤ ਧ ਸ" - AF_BLUE_STRING_GURMUKHI_TOP - "ਇ ਈ ਉ ਏ ਓ ੳ ਿ ੀ" - AF_BLUE_STRING_GURMUKHI_BOTTOM - "ਅ ਏ ਓ ਗ ਜ ਠ ਰ ਸ" - AF_BLUE_STRING_GURMUKHI_DIGIT_TOP - "੦ ੧ ੨ ੩ ੭" - - AF_BLUE_STRING_HEBREW_TOP - "ב ד ה ח ך כ ם ס" - AF_BLUE_STRING_HEBREW_BOTTOM - "ב ט כ ם ס צ" - AF_BLUE_STRING_HEBREW_DESCENDER - "ק ך ן ף ץ" - - AF_BLUE_STRING_KANNADA_TOP - "ಇ ಊ ಐ ಣ ಸಾ ನಾ ದಾ ರಾ" - AF_BLUE_STRING_KANNADA_BOTTOM - "ಅ ಉ ಎ ಲ ೦ ೨ ೬ ೭" - - AF_BLUE_STRING_KAYAH_LI_TOP - "꤅ ꤏ ꤁ ꤋ ꤀ ꤍ" - AF_BLUE_STRING_KAYAH_LI_BOTTOM - "꤈ ꤘ ꤀ ꤍ ꤢ" - AF_BLUE_STRING_KAYAH_LI_ASCENDER - "ꤖ ꤡ" - AF_BLUE_STRING_KAYAH_LI_DESCENDER - "ꤑ ꤜ ꤞ" - AF_BLUE_STRING_KAYAH_LI_LARGE_DESCENDER - "ꤑ꤬ ꤜ꤭ ꤔ꤬" - - AF_BLUE_STRING_KHMER_TOP - "ខ ទ ន ឧ ឩ ា" - AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP - "ក្ក ក្ខ ក្គ ក្ថ" - AF_BLUE_STRING_KHMER_BOTTOM - "ខ ឃ ច ឋ ប ម យ ឲ" - AF_BLUE_STRING_KHMER_DESCENDER - "ត្រ រៀ ឲ្យ អឿ" - AF_BLUE_STRING_KHMER_LARGE_DESCENDER - "ន្ត្រៃ ង្ខ្យ ក្បៀ ច្រៀ ន្តឿ ល្បឿ" - - AF_BLUE_STRING_KHMER_SYMBOLS_WAXING_TOP - "᧠ ᧡" - AF_BLUE_STRING_KHMER_SYMBOLS_WANING_BOTTOM - "᧶ ᧹" - - AF_BLUE_STRING_LAO_TOP - "າ ດ ອ ມ ລ ວ ຣ ງ" - AF_BLUE_STRING_LAO_BOTTOM - "າ ອ ບ ຍ ຣ ຮ ວ ຢ" - AF_BLUE_STRING_LAO_ASCENDER - "ປ ຢ ຟ ຝ" - AF_BLUE_STRING_LAO_LARGE_ASCENDER - "ໂ ໄ ໃ" - AF_BLUE_STRING_LAO_DESCENDER - "ງ ຊ ຖ ຽ ໆ ຯ" - - AF_BLUE_STRING_LATIN_CAPITAL_TOP - "T H E Z O C Q S" - AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM - "H E Z L O C U S" - AF_BLUE_STRING_LATIN_SMALL_F_TOP - "f i j k d b h" - AF_BLUE_STRING_LATIN_SMALL_TOP - "u v x z o e s c" - AF_BLUE_STRING_LATIN_SMALL_BOTTOM - "n r x z o e s c" - AF_BLUE_STRING_LATIN_SMALL_DESCENDER - "p q g j y" - - // we assume that both the subscript and superscript ranges - // don't contain oldstyle digits (actually, most fonts probably - // have digits only in those ranges) - AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP - "₀ ₃ ₅ ₇ ₈" - AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM - "₀ ₁ ₂ ₃ ₈" - AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP - "ᵢ ⱼ ₕ ₖ ₗ" - AF_BLUE_STRING_LATIN_SUBS_SMALL - "ₐ ₑ ₒ ₓ ₙ ₛ ᵥ ᵤ ᵣ" - AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER - "ᵦ ᵧ ᵨ ᵩ ₚ" - - AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP - "⁰ ³ ⁵ ⁷ ᵀ ᴴ ᴱ ᴼ" - AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM - "⁰ ¹ ² ³ ᴱ ᴸ ᴼ ᵁ" - AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP - "ᵇ ᵈ ᵏ ʰ ʲ ᶠ ⁱ" - AF_BLUE_STRING_LATIN_SUPS_SMALL - "ᵉ ᵒ ʳ ˢ ˣ ᶜ ᶻ" - AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER - "ᵖ ʸ ᵍ" - - AF_BLUE_STRING_LISU_TOP - "ꓡ ꓧ ꓱ ꓶ ꓩ ꓚ ꓵ ꓳ" - AF_BLUE_STRING_LISU_BOTTOM - "ꓕ ꓜ ꓞ ꓡ ꓛ ꓢ ꓳ ꓴ" - - AF_BLUE_STRING_MALAYALAM_TOP - "ഒ ട ഠ റ ച പ ച്ച പ്പ" - AF_BLUE_STRING_MALAYALAM_BOTTOM - "ട ഠ ധ ശ ഘ ച ഥ ല" - - AF_BLUE_STRING_MYANMAR_TOP - "ခ ဂ င ဒ ဝ ၥ ၊ ။" - AF_BLUE_STRING_MYANMAR_BOTTOM - "င ဎ ဒ ပ ဗ ဝ ၊ ။" - AF_BLUE_STRING_MYANMAR_ASCENDER - "ဩ ြ ၍ ၏ ၆ ါ ိ" - AF_BLUE_STRING_MYANMAR_DESCENDER - "ဉ ည ဥ ဩ ဨ ၂ ၅ ၉" - - AF_BLUE_STRING_NKO_TOP - "ߐ ߉ ߒ ߟ ߖ ߜ ߠ ߥ" - AF_BLUE_STRING_NKO_BOTTOM - "߀ ߘ ߡ ߠ ߥ" - AF_BLUE_STRING_NKO_SMALL_TOP - "ߏ ߛ ߋ" - AF_BLUE_STRING_NKO_SMALL_BOTTOM - "ߎ ߏ ߛ ߋ" - - AF_BLUE_STRING_OL_CHIKI - "ᱛ ᱜ ᱝ ᱡ ᱢ ᱥ" - - AF_BLUE_STRING_OLD_TURKIC_TOP - "𐰗 𐰘 𐰧" - AF_BLUE_STRING_OLD_TURKIC_BOTTOM - "𐰉 𐰗 𐰦 𐰧" - - AF_BLUE_STRING_OSAGE_CAPITAL_TOP - "𐒾 𐓍 𐓒 𐓓 𐒻 𐓂 𐒵 𐓆" - AF_BLUE_STRING_OSAGE_CAPITAL_BOTTOM - "𐒰 𐓍 𐓂 𐒿 𐓎 𐒹" - AF_BLUE_STRING_OSAGE_CAPITAL_DESCENDER - "𐒼 𐒽 𐒾" - AF_BLUE_STRING_OSAGE_SMALL_TOP - "𐓵 𐓶 𐓺 𐓻 𐓝 𐓣 𐓪 𐓮" - AF_BLUE_STRING_OSAGE_SMALL_BOTTOM - "𐓘 𐓚 𐓣 𐓵 𐓡 𐓧 𐓪 𐓶" - AF_BLUE_STRING_OSAGE_SMALL_ASCENDER - "𐓤 𐓦 𐓸 𐓹 𐓛" - AF_BLUE_STRING_OSAGE_SMALL_DESCENDER - "𐓤 𐓥 𐓦" - - AF_BLUE_STRING_OSMANYA_TOP - "𐒆 𐒉 𐒐 𐒒 𐒘 𐒛 𐒠 𐒣" - AF_BLUE_STRING_OSMANYA_BOTTOM - "𐒀 𐒂 𐒆 𐒈 𐒊 𐒒 𐒠 𐒩" - - AF_BLUE_STRING_SAURASHTRA_TOP - "ꢜ ꢞ ꢳ ꢂ ꢖ ꢒ ꢝ ꢛ" - AF_BLUE_STRING_SAURASHTRA_BOTTOM - "ꢂ ꢨ ꢺ ꢤ ꢎ" - - AF_BLUE_STRING_SHAVIAN_TOP - "𐑕 𐑙" - AF_BLUE_STRING_SHAVIAN_BOTTOM - "𐑔 𐑖 𐑗 𐑹 𐑻" - AF_BLUE_STRING_SHAVIAN_DESCENDER - "𐑟 𐑣" - AF_BLUE_STRING_SHAVIAN_SMALL_TOP - "𐑱 𐑲 𐑳 𐑴 𐑸 𐑺 𐑼" - AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM - "𐑴 𐑻 𐑹" - - AF_BLUE_STRING_SINHALA_TOP - "ඉ ක ඝ ඳ ප ය ල ෆ" - AF_BLUE_STRING_SINHALA_BOTTOM - "එ ඔ ඝ ජ ට ථ ධ ර" - AF_BLUE_STRING_SINHALA_DESCENDER - "ද ඳ උ ල තූ තු බු දු" - - AF_BLUE_STRING_SUNDANESE_TOP - "ᮋ ᮞ ᮮ ᮽ ᮰ ᮈ" - AF_BLUE_STRING_SUNDANESE_BOTTOM - "ᮄ ᮔ ᮕ ᮗ ᮰ ᮆ ᮈ ᮉ" - AF_BLUE_STRING_SUNDANESE_DESCENDER - "ᮼ ᳄" - - AF_BLUE_STRING_TAI_VIET_TOP - "ꪆ ꪔ ꪒ ꪖ ꪫ" - AF_BLUE_STRING_TAI_VIET_BOTTOM - "ꪉ ꪫ ꪮ" - - AF_BLUE_STRING_TAMIL_TOP - "உ ஒ ஓ ற ஈ க ங ச" - AF_BLUE_STRING_TAMIL_BOTTOM - "க ச ல ஶ உ ங ட ப" - - AF_BLUE_STRING_TELUGU_TOP - "ఇ ఌ ఙ ఞ ణ ఱ ౯" - AF_BLUE_STRING_TELUGU_BOTTOM - "అ క చ ర ఽ ౨ ౬" - - AF_BLUE_STRING_THAI_TOP - "บ เ แ อ ก า" - AF_BLUE_STRING_THAI_BOTTOM - "บ ป ษ ฯ อ ย ฮ" - AF_BLUE_STRING_THAI_ASCENDER - "ป ฝ ฟ" - AF_BLUE_STRING_THAI_LARGE_ASCENDER - "โ ใ ไ" - AF_BLUE_STRING_THAI_DESCENDER - "ฎ ฏ ฤ ฦ" - AF_BLUE_STRING_THAI_LARGE_DESCENDER - "ญ ฐ" - AF_BLUE_STRING_THAI_DIGIT_TOP - "๐ ๑ ๓" - - AF_BLUE_STRING_TIFINAGH - "ⵔ ⵙ ⵛ ⵞ ⴵ ⴼ ⴹ ⵎ" - - AF_BLUE_STRING_VAI_TOP - "ꗍ ꘖ ꘙ ꘜ ꖜ ꖝ ꔅ ꕢ" - AF_BLUE_STRING_VAI_BOTTOM - "ꗍ ꘖ ꘙ ꗞ ꔅ ꕢ ꖜ ꔆ" - - -#ifdef AF_CONFIG_OPTION_CJK - - AF_BLUE_STRING_CJK_TOP - "他 们 你 來 們 到 和 地" - " 对 對 就 席 我 时 時 會" - " 来 為 能 舰 說 说 这 這" - " 齊 |" - " 军 同 已 愿 既 星 是 景" - " 民 照 现 現 理 用 置 要" - " 軍 那 配 里 開 雷 露 面" - " 顾" - AF_BLUE_STRING_CJK_BOTTOM - "个 为 人 他 以 们 你 來" - " 個 們 到 和 大 对 對 就" - " 我 时 時 有 来 為 要 說" - " 说 |" - " 主 些 因 它 想 意 理 生" - " 當 看 着 置 者 自 著 裡" - " 过 还 进 進 過 道 還 里" - " 面" - -#ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT - - AF_BLUE_STRING_CJK_LEFT - " 些 们 你 來 們 到 和 地" - " 她 将 將 就 年 得 情 最" - " 样 樣 理 能 說 说 这 這" - " 通 |" - " 即 吗 吧 听 呢 品 响 嗎" - " 师 師 收 断 斷 明 眼 間" - " 间 际 陈 限 除 陳 随 際" - " 隨" - AF_BLUE_STRING_CJK_RIGHT - "事 前 學 将 將 情 想 或" - " 政 斯 新 样 樣 民 沒 没" - " 然 特 现 現 球 第 經 谁" - " 起 |" - " 例 別 别 制 动 動 吗 嗎" - " 增 指 明 朝 期 构 物 确" - " 种 調 调 費 费 那 都 間" - " 间" - -#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */ - -#endif /* AF_CONFIG_OPTION_CJK */ - - -// The blue zone stringsets, as used in the script styles, cf. `afstyles.h'. -// -// The AF_BLUE_PROPERTY_XXX flags are defined in `afblue.h'; here some -// explanations. -// -// A blue zone in general is defined by a reference and an overshoot line. -// During the hinting process, all coordinate values between those two lines -// are set equal to the reference value, provided that the blue zone is not -// wider than 0.75 pixels (otherwise the blue zone gets ignored). All -// entries must have `AF_BLUE_STRING_MAX' as the final line. -// -// During the glyph analysis, edges are sorted from bottom to top, and then -// sequentially checked, edge by edge, against the blue zones in the order -// given below. -// -// -// latin auto-hinter -// ----------------- -// -// Characters in a blue string are automatically classified as having a flat -// (reference) or a round (overshoot) extremum. The blue zone is then set -// up by the mean values of all flat extrema and all round extrema, -// respectively. Only horizontal blue zones (i.e., adjusting vertical -// coordinate values) are supported. -// -// Some scripts like Khmer need character composition to get all necessary -// blue zones, since Unicode only provides an abstract data model that -// doesn't represent all possible glyph shapes. For such character -// clusters, the HarfBuzz library is used to convert them into the -// corresponding glyphs. The largest glyph element (where `largest' can be -// either `largest ascender' or `largest descender') then defines the -// corresponding flat or round extremum. -// -// For the latin auto-hinter, the overshoot should be larger than the -// reference for top zones, and vice versa for bottom zones. -// -// LATIN_TOP -// Take the maximum flat and round coordinate values of the blue string -// characters for computing the blue zone's reference and overshoot -// values. -// -// If not set, take the minimum values. -// -// Mutually exclusive with `LATIN_SUB_TOP'. -// -// LATIN_SUB_TOP -// For all glyphs of a character cluster, compute the maximum flat -// and round coordinate values of each component, then take the -// smallest of the maximum values. The idea is to get the top of -// subscript glyphs, as used in Khmer, for example. Note that -// this mechanism doesn't work for ordinary ligatures. -// -// This flags indicates a secondary blue zone: It gets removed if -// there is a non-LATIN_SUB_TOP blue zone at the same coordinate -// value (after scaling). -// -// Mutually exclusive with `LATIN_TOP'. -// -// LATIN_NEUTRAL -// Ignore round extrema and define the blue zone with flat values only. -// Both top and bottom of contours can match. This is useful for -// scripts like Devanagari where vowel signs attach to the base -// character and are implemented as components of composite glyphs. -// -// If not set, both round and flat extrema are taken into account. -// Additionally, only the top or the bottom of a contour can match, -// depending on the LATIN_TOP flag. -// -// Neutral blue zones should always follow non-neutral blue zones. -// -// LATIN_X_HEIGHT -// Scale all glyphs vertically from the corresponding script to make the -// reference line of this blue zone align on the grid. The scaling -// takes place before all other blue zones get aligned to the grid. -// Only one blue character string of a script style can have this flag. -// -// LATIN_LONG -// Apply an additional constraint for blue zone values: Don't -// necessarily use the extremum as-is but a segment of the topmost (or -// bottommost) contour that is longer than a heuristic threshold, and -// which is not too far away vertically from the real extremum. This -// ensures that small bumps in the outline are ignored (for example, the -// `vertical serifs' found in many Hebrew glyph designs). -// -// The segment must be at least EM/25 font units long, and the distance -// to the extremum must be smaller than EM/4. -// -// -// cjk auto-hinter -// --------------- -// -// Characters in a blue string are *not* automatically classified. Instead, -// first come the characters used for the overshoot value, then the -// character `|', then the characters used for the reference value -// (everything separated by space characters). The blue zone is then set up -// by the mean values of all reference values and all overshoot values, -// respectively. Both horizontal and vertical blue zones (i.e., adjusting -// vertical and horizontal coordinate values, respectively) are supported. -// -// For the cjk auto-hinter, the overshoot should be smaller than the -// reference for top zones, and vice versa for bottom zones. -// -// CJK_TOP -// Take the maximum flat and round coordinate values of the blue string -// characters. If not set, take the minimum values. -// -// CJK_RIGHT -// A synonym for CJK_TOP. If CJK_HORIZ is set, this flag indicates the -// right blue zone, taking horizontal maximum values. -// -// CJK_HORIZ -// Define a blue zone for horizontal hinting (i.e., vertical blue -// zones). If not set, this is a blue zone for vertical hinting. - - -AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN: - - AF_BLUE_STRINGSET_ADLM - { AF_BLUE_STRING_ADLAM_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_ADLAM_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_ADLAM_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_ADLAM_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_ARAB - { AF_BLUE_STRING_ARABIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_ARABIC_BOTTOM, 0 } - { AF_BLUE_STRING_ARABIC_JOIN, AF_BLUE_PROPERTY_LATIN_NEUTRAL } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_ARMN - { AF_BLUE_STRING_ARMENIAN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_ARMENIAN_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_ARMENIAN_SMALL_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_ARMENIAN_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_ARMENIAN_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_ARMENIAN_SMALL_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_AVST - { AF_BLUE_STRING_AVESTAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_AVESTAN_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_BAMU - { AF_BLUE_STRING_BAMUM_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_BAMUM_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_BENG - { AF_BLUE_STRING_BENGALI_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_BENGALI_HEAD, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_BENGALI_BASE, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_NEUTRAL | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_BENGALI_BASE, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_BUHD - { AF_BLUE_STRING_BUHID_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_BUHID_LARGE, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_BUHID_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_BUHID_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_CAKM - { AF_BLUE_STRING_CHAKMA_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_CHAKMA_BOTTOM, 0 } - { AF_BLUE_STRING_CHAKMA_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_CANS - { AF_BLUE_STRING_CANADIAN_SYLLABICS_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_CANADIAN_SYLLABICS_BOTTOM, 0 } - { AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_CARI - { AF_BLUE_STRING_CARIAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_CARIAN_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_CHER - { AF_BLUE_STRING_CHEROKEE_CAPITAL, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_CHEROKEE_CAPITAL, 0 } - { AF_BLUE_STRING_CHEROKEE_SMALL_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_CHEROKEE_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_CHEROKEE_SMALL, 0 } - { AF_BLUE_STRING_CHEROKEE_SMALL_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_COPT - { AF_BLUE_STRING_COPTIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_COPTIC_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_COPTIC_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_COPTIC_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_CPRT - { AF_BLUE_STRING_CYPRIOT_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_CYPRIOT_BOTTOM, 0 } - { AF_BLUE_STRING_CYPRIOT_SMALL, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_CYPRIOT_SMALL, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_CYRL - { AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_CYRILLIC_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_CYRILLIC_SMALL, 0 } - { AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_DEVA - { AF_BLUE_STRING_DEVANAGARI_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_DEVANAGARI_HEAD, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_DEVANAGARI_BASE, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_NEUTRAL | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_DEVANAGARI_BASE, 0 } - { AF_BLUE_STRING_DEVANAGARI_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_DSRT - { AF_BLUE_STRING_DESERET_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_DESERET_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_DESERET_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_DESERET_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_ETHI - { AF_BLUE_STRING_ETHIOPIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_ETHIOPIC_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_GEOR - { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM, 0 } - { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_DESCENDER, 0 } - { AF_BLUE_STRING_GEORGIAN_MTAVRULI_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_GEORGIAN_MTAVRULI_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_GEOK - { AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_BOTTOM, 0 } - { AF_BLUE_STRING_GEORGIAN_NUSKHURI_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_GEORGIAN_NUSKHURI_BOTTOM, 0 } - { AF_BLUE_STRING_GEORGIAN_NUSKHURI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_GLAG - { AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_GLAGOLITIC_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_GLAGOLITIC_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_GOTH - { AF_BLUE_STRING_GOTHIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_GOTHIC_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_GREK - { AF_BLUE_STRING_GREEK_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_GREEK_SMALL_BETA_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_GREEK_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_GREEK_SMALL, 0 } - { AF_BLUE_STRING_GREEK_SMALL_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_GUJR - { AF_BLUE_STRING_GUJARATI_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_GUJARATI_BOTTOM, 0 } - { AF_BLUE_STRING_GUJARATI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_GUJARATI_DESCENDER, 0 } - { AF_BLUE_STRING_GUJARATI_DIGIT_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_GURU - { AF_BLUE_STRING_GURMUKHI_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_GURMUKHI_HEAD, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_GURMUKHI_BASE, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_NEUTRAL | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_GURMUKHI_BOTTOM, 0 } - { AF_BLUE_STRING_GURMUKHI_DIGIT_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_HEBR - { AF_BLUE_STRING_HEBREW_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_LONG } - { AF_BLUE_STRING_HEBREW_BOTTOM, 0 } - { AF_BLUE_STRING_HEBREW_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_KALI - { AF_BLUE_STRING_KAYAH_LI_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_KAYAH_LI_BOTTOM, 0 } - { AF_BLUE_STRING_KAYAH_LI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_KAYAH_LI_DESCENDER, 0 } - { AF_BLUE_STRING_KAYAH_LI_LARGE_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_KHMR - { AF_BLUE_STRING_KHMER_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP, AF_BLUE_PROPERTY_LATIN_SUB_TOP } - { AF_BLUE_STRING_KHMER_BOTTOM, 0 } - { AF_BLUE_STRING_KHMER_DESCENDER, 0 } - { AF_BLUE_STRING_KHMER_LARGE_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_KHMS - { AF_BLUE_STRING_KHMER_SYMBOLS_WAXING_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_KHMER_SYMBOLS_WANING_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_KNDA - { AF_BLUE_STRING_KANNADA_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_KANNADA_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_LAO - { AF_BLUE_STRING_LAO_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_LAO_BOTTOM, 0 } - { AF_BLUE_STRING_LAO_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_LAO_LARGE_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_LAO_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_LATN - { AF_BLUE_STRING_LATIN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_LATIN_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_LATIN_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_LATIN_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_LATB - { AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_LATIN_SUBS_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_LATIN_SUBS_SMALL, 0 } - { AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_LATP - { AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_LATIN_SUPS_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_LATIN_SUPS_SMALL, 0 } - { AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_LISU - { AF_BLUE_STRING_LISU_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_LISU_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_MLYM - { AF_BLUE_STRING_MALAYALAM_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_MALAYALAM_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_MYMR - { AF_BLUE_STRING_MYANMAR_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_MYANMAR_BOTTOM, 0 } - { AF_BLUE_STRING_MYANMAR_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_MYANMAR_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_NKOO - { AF_BLUE_STRING_NKO_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_NKO_BOTTOM, 0 } - { AF_BLUE_STRING_NKO_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_NKO_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_NONE - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_OLCK - { AF_BLUE_STRING_OL_CHIKI, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_OL_CHIKI, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_ORKH - { AF_BLUE_STRING_OLD_TURKIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_OLD_TURKIC_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_OSGE - { AF_BLUE_STRING_OSAGE_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_OSAGE_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_OSAGE_CAPITAL_DESCENDER, 0 } - { AF_BLUE_STRING_OSAGE_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_OSAGE_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_OSAGE_SMALL_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_OSAGE_SMALL_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_OSMA - { AF_BLUE_STRING_OSMANYA_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_OSMANYA_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_SAUR - { AF_BLUE_STRING_SAURASHTRA_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_SAURASHTRA_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_SHAW - { AF_BLUE_STRING_SHAVIAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_SHAVIAN_BOTTOM, 0 } - { AF_BLUE_STRING_SHAVIAN_DESCENDER, 0 } - { AF_BLUE_STRING_SHAVIAN_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_SINH - { AF_BLUE_STRING_SINHALA_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_SINHALA_BOTTOM, 0 } - { AF_BLUE_STRING_SINHALA_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_SUND - { AF_BLUE_STRING_SUNDANESE_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_SUNDANESE_BOTTOM, 0 } - { AF_BLUE_STRING_SUNDANESE_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_TAML - { AF_BLUE_STRING_TAMIL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_TAMIL_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_TAVT - { AF_BLUE_STRING_TAI_VIET_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_TAI_VIET_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_TELU - { AF_BLUE_STRING_TELUGU_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_TELUGU_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_TFNG - { AF_BLUE_STRING_TIFINAGH, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_TIFINAGH, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_THAI - { AF_BLUE_STRING_THAI_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_THAI_BOTTOM, 0 } - { AF_BLUE_STRING_THAI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_THAI_LARGE_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_THAI_DESCENDER, 0 } - { AF_BLUE_STRING_THAI_LARGE_DESCENDER, 0 } - { AF_BLUE_STRING_THAI_DIGIT_TOP, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_VAII - { AF_BLUE_STRING_VAI_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_VAI_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - -#ifdef AF_CONFIG_OPTION_CJK - - AF_BLUE_STRINGSET_HANI - { AF_BLUE_STRING_CJK_TOP, AF_BLUE_PROPERTY_CJK_TOP } - { AF_BLUE_STRING_CJK_BOTTOM, 0 } -#ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT - { AF_BLUE_STRING_CJK_LEFT, AF_BLUE_PROPERTY_CJK_HORIZ } - { AF_BLUE_STRING_CJK_RIGHT, AF_BLUE_PROPERTY_CJK_HORIZ | - AF_BLUE_PROPERTY_CJK_RIGHT } -#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */ - { AF_BLUE_STRING_MAX, 0 } - -#endif /* AF_CONFIG_OPTION_CJK */ - - -// END diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/src/autofit/afblue.h b/extensions/gdx-freetype/jni/freetype-2.9.1/src/autofit/afblue.h deleted file mode 100644 index de31e259c..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/src/autofit/afblue.h +++ /dev/null @@ -1,414 +0,0 @@ -/* This file has been generated by the Perl script `afblue.pl', */ -/* using data from file `afblue.dat'. */ - -/***************************************************************************/ -/* */ -/* afblue.h */ -/* */ -/* Auto-fitter data for blue strings (specification). */ -/* */ -/* Copyright 2013-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef AFBLUE_H_ -#define AFBLUE_H_ - - -FT_BEGIN_HEADER - - - /* an auxiliary macro to decode a UTF-8 character -- since we only use */ - /* hard-coded, self-converted data, no error checking is performed */ -#define GET_UTF8_CHAR( ch, p ) \ - do \ - { \ - ch = (unsigned char)*p++; \ - if ( ch >= 0x80 ) \ - { \ - FT_UInt len_; \ - \ - \ - if ( ch < 0xE0 ) \ - { \ - len_ = 1; \ - ch &= 0x1F; \ - } \ - else if ( ch < 0xF0 ) \ - { \ - len_ = 2; \ - ch &= 0x0F; \ - } \ - else \ - { \ - len_ = 3; \ - ch &= 0x07; \ - } \ - \ - for ( ; len_ > 0; len_-- ) \ - ch = ( ch << 6 ) | ( *p++ & 0x3F ); \ - } \ - } while ( 0 ) - - - /*************************************************************************/ - /*************************************************************************/ - /***** *****/ - /***** B L U E S T R I N G S *****/ - /***** *****/ - /*************************************************************************/ - /*************************************************************************/ - - /* At the bottommost level, we define strings for finding blue zones. */ - - -#define AF_BLUE_STRING_MAX_LEN 51 - - /* The AF_Blue_String enumeration values are offsets into the */ - /* `af_blue_strings' array. */ - - typedef enum AF_Blue_String_ - { - AF_BLUE_STRING_ADLAM_CAPITAL_TOP = 0, - AF_BLUE_STRING_ADLAM_CAPITAL_BOTTOM = 30, - AF_BLUE_STRING_ADLAM_SMALL_TOP = 40, - AF_BLUE_STRING_ADLAM_SMALL_BOTTOM = 65, - AF_BLUE_STRING_ARABIC_TOP = 105, - AF_BLUE_STRING_ARABIC_BOTTOM = 123, - AF_BLUE_STRING_ARABIC_JOIN = 138, - AF_BLUE_STRING_ARMENIAN_CAPITAL_TOP = 141, - AF_BLUE_STRING_ARMENIAN_CAPITAL_BOTTOM = 165, - AF_BLUE_STRING_ARMENIAN_SMALL_ASCENDER = 189, - AF_BLUE_STRING_ARMENIAN_SMALL_TOP = 210, - AF_BLUE_STRING_ARMENIAN_SMALL_BOTTOM = 234, - AF_BLUE_STRING_ARMENIAN_SMALL_DESCENDER = 258, - AF_BLUE_STRING_AVESTAN_TOP = 282, - AF_BLUE_STRING_AVESTAN_BOTTOM = 302, - AF_BLUE_STRING_BAMUM_TOP = 312, - AF_BLUE_STRING_BAMUM_BOTTOM = 344, - AF_BLUE_STRING_BENGALI_BASE = 376, - AF_BLUE_STRING_BENGALI_TOP = 408, - AF_BLUE_STRING_BENGALI_HEAD = 436, - AF_BLUE_STRING_BUHID_TOP = 468, - AF_BLUE_STRING_BUHID_LARGE = 476, - AF_BLUE_STRING_BUHID_SMALL = 488, - AF_BLUE_STRING_BUHID_BOTTOM = 504, - AF_BLUE_STRING_CANADIAN_SYLLABICS_TOP = 532, - AF_BLUE_STRING_CANADIAN_SYLLABICS_BOTTOM = 564, - AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_TOP = 596, - AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_BOTTOM = 628, - AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_TOP = 660, - AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_BOTTOM = 688, - AF_BLUE_STRING_CARIAN_TOP = 720, - AF_BLUE_STRING_CARIAN_BOTTOM = 760, - AF_BLUE_STRING_CHAKMA_TOP = 795, - AF_BLUE_STRING_CHAKMA_BOTTOM = 820, - AF_BLUE_STRING_CHAKMA_DESCENDER = 845, - AF_BLUE_STRING_CHEROKEE_CAPITAL = 910, - AF_BLUE_STRING_CHEROKEE_SMALL_ASCENDER = 942, - AF_BLUE_STRING_CHEROKEE_SMALL = 974, - AF_BLUE_STRING_CHEROKEE_SMALL_DESCENDER = 1006, - AF_BLUE_STRING_COPTIC_CAPITAL_TOP = 1022, - AF_BLUE_STRING_COPTIC_CAPITAL_BOTTOM = 1054, - AF_BLUE_STRING_COPTIC_SMALL_TOP = 1086, - AF_BLUE_STRING_COPTIC_SMALL_BOTTOM = 1118, - AF_BLUE_STRING_CYPRIOT_TOP = 1150, - AF_BLUE_STRING_CYPRIOT_BOTTOM = 1190, - AF_BLUE_STRING_CYPRIOT_SMALL = 1225, - AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP = 1240, - AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM = 1264, - AF_BLUE_STRING_CYRILLIC_SMALL = 1288, - AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER = 1312, - AF_BLUE_STRING_DESERET_CAPITAL_TOP = 1321, - AF_BLUE_STRING_DESERET_CAPITAL_BOTTOM = 1346, - AF_BLUE_STRING_DESERET_SMALL_TOP = 1371, - AF_BLUE_STRING_DESERET_SMALL_BOTTOM = 1396, - AF_BLUE_STRING_DEVANAGARI_BASE = 1421, - AF_BLUE_STRING_DEVANAGARI_TOP = 1453, - AF_BLUE_STRING_DEVANAGARI_HEAD = 1485, - AF_BLUE_STRING_DEVANAGARI_BOTTOM = 1517, - AF_BLUE_STRING_ETHIOPIC_TOP = 1525, - AF_BLUE_STRING_ETHIOPIC_BOTTOM = 1557, - AF_BLUE_STRING_GEORGIAN_MKHEDRULI_TOP = 1589, - AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM = 1621, - AF_BLUE_STRING_GEORGIAN_MKHEDRULI_ASCENDER = 1653, - AF_BLUE_STRING_GEORGIAN_MKHEDRULI_DESCENDER = 1685, - AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_TOP = 1717, - AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_BOTTOM = 1749, - AF_BLUE_STRING_GEORGIAN_NUSKHURI_TOP = 1781, - AF_BLUE_STRING_GEORGIAN_NUSKHURI_BOTTOM = 1813, - AF_BLUE_STRING_GEORGIAN_NUSKHURI_ASCENDER = 1845, - AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER = 1877, - AF_BLUE_STRING_GEORGIAN_MTAVRULI_TOP = 1909, - AF_BLUE_STRING_GEORGIAN_MTAVRULI_BOTTOM = 1941, - AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP = 1973, - AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM = 2005, - AF_BLUE_STRING_GLAGOLITIC_SMALL_TOP = 2037, - AF_BLUE_STRING_GLAGOLITIC_SMALL_BOTTOM = 2069, - AF_BLUE_STRING_GOTHIC_TOP = 2101, - AF_BLUE_STRING_GOTHIC_BOTTOM = 2141, - AF_BLUE_STRING_GREEK_CAPITAL_TOP = 2161, - AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM = 2182, - AF_BLUE_STRING_GREEK_SMALL_BETA_TOP = 2200, - AF_BLUE_STRING_GREEK_SMALL = 2218, - AF_BLUE_STRING_GREEK_SMALL_DESCENDER = 2242, - AF_BLUE_STRING_GUJARATI_TOP = 2266, - AF_BLUE_STRING_GUJARATI_BOTTOM = 2298, - AF_BLUE_STRING_GUJARATI_ASCENDER = 2330, - AF_BLUE_STRING_GUJARATI_DESCENDER = 2380, - AF_BLUE_STRING_GUJARATI_DIGIT_TOP = 2413, - AF_BLUE_STRING_GURMUKHI_BASE = 2433, - AF_BLUE_STRING_GURMUKHI_HEAD = 2465, - AF_BLUE_STRING_GURMUKHI_TOP = 2497, - AF_BLUE_STRING_GURMUKHI_BOTTOM = 2529, - AF_BLUE_STRING_GURMUKHI_DIGIT_TOP = 2561, - AF_BLUE_STRING_HEBREW_TOP = 2581, - AF_BLUE_STRING_HEBREW_BOTTOM = 2605, - AF_BLUE_STRING_HEBREW_DESCENDER = 2623, - AF_BLUE_STRING_KANNADA_TOP = 2638, - AF_BLUE_STRING_KANNADA_BOTTOM = 2682, - AF_BLUE_STRING_KAYAH_LI_TOP = 2714, - AF_BLUE_STRING_KAYAH_LI_BOTTOM = 2738, - AF_BLUE_STRING_KAYAH_LI_ASCENDER = 2758, - AF_BLUE_STRING_KAYAH_LI_DESCENDER = 2766, - AF_BLUE_STRING_KAYAH_LI_LARGE_DESCENDER = 2778, - AF_BLUE_STRING_KHMER_TOP = 2799, - AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP = 2823, - AF_BLUE_STRING_KHMER_BOTTOM = 2863, - AF_BLUE_STRING_KHMER_DESCENDER = 2895, - AF_BLUE_STRING_KHMER_LARGE_DESCENDER = 2929, - AF_BLUE_STRING_KHMER_SYMBOLS_WAXING_TOP = 3016, - AF_BLUE_STRING_KHMER_SYMBOLS_WANING_BOTTOM = 3024, - AF_BLUE_STRING_LAO_TOP = 3032, - AF_BLUE_STRING_LAO_BOTTOM = 3064, - AF_BLUE_STRING_LAO_ASCENDER = 3096, - AF_BLUE_STRING_LAO_LARGE_ASCENDER = 3112, - AF_BLUE_STRING_LAO_DESCENDER = 3124, - AF_BLUE_STRING_LATIN_CAPITAL_TOP = 3148, - AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 3164, - AF_BLUE_STRING_LATIN_SMALL_F_TOP = 3180, - AF_BLUE_STRING_LATIN_SMALL_TOP = 3194, - AF_BLUE_STRING_LATIN_SMALL_BOTTOM = 3210, - AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 3226, - AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP = 3236, - AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM = 3256, - AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP = 3276, - AF_BLUE_STRING_LATIN_SUBS_SMALL = 3296, - AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER = 3332, - AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP = 3352, - AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM = 3383, - AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP = 3412, - AF_BLUE_STRING_LATIN_SUPS_SMALL = 3438, - AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER = 3463, - AF_BLUE_STRING_LISU_TOP = 3474, - AF_BLUE_STRING_LISU_BOTTOM = 3506, - AF_BLUE_STRING_MALAYALAM_TOP = 3538, - AF_BLUE_STRING_MALAYALAM_BOTTOM = 3582, - AF_BLUE_STRING_MYANMAR_TOP = 3614, - AF_BLUE_STRING_MYANMAR_BOTTOM = 3646, - AF_BLUE_STRING_MYANMAR_ASCENDER = 3678, - AF_BLUE_STRING_MYANMAR_DESCENDER = 3706, - AF_BLUE_STRING_NKO_TOP = 3738, - AF_BLUE_STRING_NKO_BOTTOM = 3762, - AF_BLUE_STRING_NKO_SMALL_TOP = 3777, - AF_BLUE_STRING_NKO_SMALL_BOTTOM = 3786, - AF_BLUE_STRING_OL_CHIKI = 3798, - AF_BLUE_STRING_OLD_TURKIC_TOP = 3822, - AF_BLUE_STRING_OLD_TURKIC_BOTTOM = 3837, - AF_BLUE_STRING_OSAGE_CAPITAL_TOP = 3857, - AF_BLUE_STRING_OSAGE_CAPITAL_BOTTOM = 3897, - AF_BLUE_STRING_OSAGE_CAPITAL_DESCENDER = 3927, - AF_BLUE_STRING_OSAGE_SMALL_TOP = 3942, - AF_BLUE_STRING_OSAGE_SMALL_BOTTOM = 3982, - AF_BLUE_STRING_OSAGE_SMALL_ASCENDER = 4022, - AF_BLUE_STRING_OSAGE_SMALL_DESCENDER = 4047, - AF_BLUE_STRING_OSMANYA_TOP = 4062, - AF_BLUE_STRING_OSMANYA_BOTTOM = 4102, - AF_BLUE_STRING_SAURASHTRA_TOP = 4142, - AF_BLUE_STRING_SAURASHTRA_BOTTOM = 4174, - AF_BLUE_STRING_SHAVIAN_TOP = 4194, - AF_BLUE_STRING_SHAVIAN_BOTTOM = 4204, - AF_BLUE_STRING_SHAVIAN_DESCENDER = 4229, - AF_BLUE_STRING_SHAVIAN_SMALL_TOP = 4239, - AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM = 4274, - AF_BLUE_STRING_SINHALA_TOP = 4289, - AF_BLUE_STRING_SINHALA_BOTTOM = 4321, - AF_BLUE_STRING_SINHALA_DESCENDER = 4353, - AF_BLUE_STRING_SUNDANESE_TOP = 4397, - AF_BLUE_STRING_SUNDANESE_BOTTOM = 4421, - AF_BLUE_STRING_SUNDANESE_DESCENDER = 4453, - AF_BLUE_STRING_TAI_VIET_TOP = 4461, - AF_BLUE_STRING_TAI_VIET_BOTTOM = 4481, - AF_BLUE_STRING_TAMIL_TOP = 4493, - AF_BLUE_STRING_TAMIL_BOTTOM = 4525, - AF_BLUE_STRING_TELUGU_TOP = 4557, - AF_BLUE_STRING_TELUGU_BOTTOM = 4585, - AF_BLUE_STRING_THAI_TOP = 4613, - AF_BLUE_STRING_THAI_BOTTOM = 4637, - AF_BLUE_STRING_THAI_ASCENDER = 4665, - AF_BLUE_STRING_THAI_LARGE_ASCENDER = 4677, - AF_BLUE_STRING_THAI_DESCENDER = 4689, - AF_BLUE_STRING_THAI_LARGE_DESCENDER = 4705, - AF_BLUE_STRING_THAI_DIGIT_TOP = 4713, - AF_BLUE_STRING_TIFINAGH = 4725, - AF_BLUE_STRING_VAI_TOP = 4757, - AF_BLUE_STRING_VAI_BOTTOM = 4789, - af_blue_1_1 = 4820, -#ifdef AF_CONFIG_OPTION_CJK - AF_BLUE_STRING_CJK_TOP = af_blue_1_1 + 1, - AF_BLUE_STRING_CJK_BOTTOM = af_blue_1_1 + 203, - af_blue_1_1_1 = af_blue_1_1 + 404, -#ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT - AF_BLUE_STRING_CJK_LEFT = af_blue_1_1_1 + 1, - AF_BLUE_STRING_CJK_RIGHT = af_blue_1_1_1 + 204, - af_blue_1_1_2 = af_blue_1_1_1 + 405, -#else - af_blue_1_1_2 = af_blue_1_1_1 + 0, -#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */ - af_blue_1_2 = af_blue_1_1_2 + 0, -#else - af_blue_1_2 = af_blue_1_1 + 0, -#endif /* AF_CONFIG_OPTION_CJK */ - - - AF_BLUE_STRING_MAX /* do not remove */ - - } AF_Blue_String; - - - FT_LOCAL_ARRAY( char ) - af_blue_strings[]; - - - /*************************************************************************/ - /*************************************************************************/ - /***** *****/ - /***** B L U E S T R I N G S E T S *****/ - /***** *****/ - /*************************************************************************/ - /*************************************************************************/ - - /* The next level is to group blue strings into style-specific sets. */ - - - /* Properties are specific to a writing system. We assume that a given */ - /* blue string can't be used in more than a single writing system, which */ - /* is a safe bet. */ -#define AF_BLUE_PROPERTY_LATIN_TOP ( 1U << 0 ) /* must have value 1 */ -#define AF_BLUE_PROPERTY_LATIN_SUB_TOP ( 1U << 1 ) -#define AF_BLUE_PROPERTY_LATIN_NEUTRAL ( 1U << 2 ) -#define AF_BLUE_PROPERTY_LATIN_X_HEIGHT ( 1U << 3 ) -#define AF_BLUE_PROPERTY_LATIN_LONG ( 1U << 4 ) - -#define AF_BLUE_PROPERTY_CJK_TOP ( 1U << 0 ) /* must have value 1 */ -#define AF_BLUE_PROPERTY_CJK_HORIZ ( 1U << 1 ) /* must have value 2 */ -#define AF_BLUE_PROPERTY_CJK_RIGHT AF_BLUE_PROPERTY_CJK_TOP - - -#define AF_BLUE_STRINGSET_MAX_LEN 8 - - /* The AF_Blue_Stringset enumeration values are offsets into the */ - /* `af_blue_stringsets' array. */ - - typedef enum AF_Blue_Stringset_ - { - AF_BLUE_STRINGSET_ADLM = 0, - AF_BLUE_STRINGSET_ARAB = 5, - AF_BLUE_STRINGSET_ARMN = 9, - AF_BLUE_STRINGSET_AVST = 16, - AF_BLUE_STRINGSET_BAMU = 19, - AF_BLUE_STRINGSET_BENG = 22, - AF_BLUE_STRINGSET_BUHD = 27, - AF_BLUE_STRINGSET_CAKM = 32, - AF_BLUE_STRINGSET_CANS = 36, - AF_BLUE_STRINGSET_CARI = 43, - AF_BLUE_STRINGSET_CHER = 46, - AF_BLUE_STRINGSET_COPT = 53, - AF_BLUE_STRINGSET_CPRT = 58, - AF_BLUE_STRINGSET_CYRL = 63, - AF_BLUE_STRINGSET_DEVA = 69, - AF_BLUE_STRINGSET_DSRT = 75, - AF_BLUE_STRINGSET_ETHI = 80, - AF_BLUE_STRINGSET_GEOR = 83, - AF_BLUE_STRINGSET_GEOK = 90, - AF_BLUE_STRINGSET_GLAG = 97, - AF_BLUE_STRINGSET_GOTH = 102, - AF_BLUE_STRINGSET_GREK = 105, - AF_BLUE_STRINGSET_GUJR = 112, - AF_BLUE_STRINGSET_GURU = 118, - AF_BLUE_STRINGSET_HEBR = 124, - AF_BLUE_STRINGSET_KALI = 128, - AF_BLUE_STRINGSET_KHMR = 134, - AF_BLUE_STRINGSET_KHMS = 140, - AF_BLUE_STRINGSET_KNDA = 143, - AF_BLUE_STRINGSET_LAO = 146, - AF_BLUE_STRINGSET_LATN = 152, - AF_BLUE_STRINGSET_LATB = 159, - AF_BLUE_STRINGSET_LATP = 166, - AF_BLUE_STRINGSET_LISU = 173, - AF_BLUE_STRINGSET_MLYM = 176, - AF_BLUE_STRINGSET_MYMR = 179, - AF_BLUE_STRINGSET_NKOO = 184, - AF_BLUE_STRINGSET_NONE = 189, - AF_BLUE_STRINGSET_OLCK = 190, - AF_BLUE_STRINGSET_ORKH = 193, - AF_BLUE_STRINGSET_OSGE = 196, - AF_BLUE_STRINGSET_OSMA = 204, - AF_BLUE_STRINGSET_SAUR = 207, - AF_BLUE_STRINGSET_SHAW = 210, - AF_BLUE_STRINGSET_SINH = 216, - AF_BLUE_STRINGSET_SUND = 220, - AF_BLUE_STRINGSET_TAML = 224, - AF_BLUE_STRINGSET_TAVT = 227, - AF_BLUE_STRINGSET_TELU = 230, - AF_BLUE_STRINGSET_TFNG = 233, - AF_BLUE_STRINGSET_THAI = 236, - AF_BLUE_STRINGSET_VAII = 244, - af_blue_2_1 = 247, -#ifdef AF_CONFIG_OPTION_CJK - AF_BLUE_STRINGSET_HANI = af_blue_2_1 + 0, - af_blue_2_1_1 = af_blue_2_1 + 2, -#ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT - af_blue_2_1_2 = af_blue_2_1_1 + 2, -#else - af_blue_2_1_2 = af_blue_2_1_1 + 0, -#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */ - af_blue_2_2 = af_blue_2_1_2 + 1, -#else - af_blue_2_2 = af_blue_2_1 + 0, -#endif /* AF_CONFIG_OPTION_CJK */ - - - AF_BLUE_STRINGSET_MAX /* do not remove */ - - } AF_Blue_Stringset; - - - typedef struct AF_Blue_StringRec_ - { - AF_Blue_String string; - FT_UShort properties; - - } AF_Blue_StringRec; - - - FT_LOCAL_ARRAY( AF_Blue_StringRec ) - af_blue_stringsets[]; - -/* */ - -FT_END_HEADER - - -#endif /* AFBLUE_H_ */ - - -/* END */ diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/src/autofit/afloader.c b/extensions/gdx-freetype/jni/freetype-2.9.1/src/autofit/afloader.c deleted file mode 100644 index a55550b33..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/src/autofit/afloader.c +++ /dev/null @@ -1,721 +0,0 @@ -/***************************************************************************/ -/* */ -/* afloader.c */ -/* */ -/* Auto-fitter glyph loading routines (body). */ -/* */ -/* Copyright 2003-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#include "afglobal.h" -#include "afloader.h" -#include "afhints.h" -#include "aferrors.h" -#include "afmodule.h" -#include "afpic.h" - -#include FT_INTERNAL_CALC_H - - - /* Initialize glyph loader. */ - - FT_LOCAL_DEF( void ) - af_loader_init( AF_Loader loader, - AF_GlyphHints hints ) - { - FT_ZERO( loader ); - - loader->hints = hints; - } - - - /* Reset glyph loader and compute globals if necessary. */ - - FT_LOCAL_DEF( FT_Error ) - af_loader_reset( AF_Loader loader, - AF_Module module, - FT_Face face ) - { - FT_Error error = FT_Err_Ok; - - - loader->face = face; - loader->globals = (AF_FaceGlobals)face->autohint.data; - - if ( !loader->globals ) - { - error = af_face_globals_new( face, &loader->globals, module ); - if ( !error ) - { - face->autohint.data = - (FT_Pointer)loader->globals; - face->autohint.finalizer = - (FT_Generic_Finalizer)af_face_globals_free; - } - } - - return error; - } - - - /* Finalize glyph loader. */ - - FT_LOCAL_DEF( void ) - af_loader_done( AF_Loader loader ) - { - loader->face = NULL; - loader->globals = NULL; - loader->hints = NULL; - } - - -#define af_intToFixed( i ) \ - ( (FT_Fixed)( (FT_UInt32)(i) << 16 ) ) -#define af_fixedToInt( x ) \ - ( (FT_Short)( ( (FT_UInt32)(x) + 0x8000U ) >> 16 ) ) -#define af_floatToFixed( f ) \ - ( (FT_Fixed)( (f) * 65536.0 + 0.5 ) ) - - - static FT_Error - af_loader_embolden_glyph_in_slot( AF_Loader loader, - FT_Face face, - AF_StyleMetrics style_metrics ) - { - FT_Error error = FT_Err_Ok; - - FT_GlyphSlot slot = face->glyph; - AF_FaceGlobals globals = loader->globals; - AF_WritingSystemClass writing_system_class; - - FT_Size_Metrics* size_metrics = &face->size->internal->autohint_metrics; - - FT_Pos stdVW = 0; - FT_Pos stdHW = 0; - - FT_Bool size_changed = size_metrics->x_ppem != - globals->stem_darkening_for_ppem; - - FT_Fixed em_size = af_intToFixed( face->units_per_EM ); - FT_Fixed em_ratio = FT_DivFix( af_intToFixed( 1000 ), em_size ); - - FT_Matrix scale_down_matrix = { 0x10000L, 0, 0, 0x10000L }; - - - /* Skip stem darkening for broken fonts. */ - if ( !face->units_per_EM ) - { - error = FT_ERR( Corrupted_Font_Header ); - goto Exit; - } - - /* - * We depend on the writing system (script analyzers) to supply - * standard widths for the script of the glyph we are looking at. If - * it can't deliver, stem darkening is disabled. - */ - writing_system_class = - AF_WRITING_SYSTEM_CLASSES_GET[style_metrics->style_class->writing_system]; - - if ( writing_system_class->style_metrics_getstdw ) - writing_system_class->style_metrics_getstdw( style_metrics, - &stdHW, - &stdVW ); - else - { - error = FT_ERR( Unimplemented_Feature ); - goto Exit; - } - - if ( size_changed || - ( stdVW > 0 && stdVW != globals->standard_vertical_width ) ) - { - FT_Fixed darken_by_font_units_x, darken_x; - - - darken_by_font_units_x = - af_intToFixed( af_loader_compute_darkening( loader, - face, - stdVW ) ); - darken_x = FT_DivFix( FT_MulFix( darken_by_font_units_x, - size_metrics->x_scale ), - em_ratio ); - - globals->standard_vertical_width = stdVW; - globals->stem_darkening_for_ppem = size_metrics->x_ppem; - globals->darken_x = af_fixedToInt( darken_x ); - } - - if ( size_changed || - ( stdHW > 0 && stdHW != globals->standard_horizontal_width ) ) - { - FT_Fixed darken_by_font_units_y, darken_y; - - - darken_by_font_units_y = - af_intToFixed( af_loader_compute_darkening( loader, - face, - stdHW ) ); - darken_y = FT_DivFix( FT_MulFix( darken_by_font_units_y, - size_metrics->y_scale ), - em_ratio ); - - globals->standard_horizontal_width = stdHW; - globals->stem_darkening_for_ppem = size_metrics->x_ppem; - globals->darken_y = af_fixedToInt( darken_y ); - - /* - * Scale outlines down on the Y-axis to keep them inside their blue - * zones. The stronger the emboldening, the stronger the downscaling - * (plus heuristical padding to prevent outlines still falling out - * their zones due to rounding). - * - * Reason: `FT_Outline_Embolden' works by shifting the rightmost - * points of stems farther to the right, and topmost points farther - * up. This positions points on the Y-axis outside their - * pre-computed blue zones and leads to distortion when applying the - * hints in the code further below. Code outside this emboldening - * block doesn't know we are presenting it with modified outlines the - * analyzer didn't see! - * - * An unfortunate side effect of downscaling is that the emboldening - * effect is slightly decreased. The loss becomes more pronounced - * versus the CFF driver at smaller sizes, e.g., at 9ppem and below. - */ - globals->scale_down_factor = - FT_DivFix( em_size - ( darken_by_font_units_y + af_intToFixed( 8 ) ), - em_size ); - } - - FT_Outline_EmboldenXY( &slot->outline, - globals->darken_x, - globals->darken_y ); - - scale_down_matrix.yy = globals->scale_down_factor; - FT_Outline_Transform( &slot->outline, &scale_down_matrix ); - - Exit: - return error; - } - - - /* Load the glyph at index into the current slot of a face and hint it. */ - - FT_LOCAL_DEF( FT_Error ) - af_loader_load_glyph( AF_Loader loader, - AF_Module module, - FT_Face face, - FT_UInt glyph_index, - FT_Int32 load_flags ) - { - FT_Error error; - - FT_Size size = face->size; - FT_Size_Internal size_internal = size->internal; - FT_GlyphSlot slot = face->glyph; - FT_Slot_Internal slot_internal = slot->internal; - FT_GlyphLoader gloader = slot_internal->loader; - - AF_GlyphHints hints = loader->hints; - AF_ScalerRec scaler; - AF_StyleMetrics style_metrics; - FT_UInt style_options = AF_STYLE_NONE_DFLT; - AF_StyleClass style_class; - AF_WritingSystemClass writing_system_class; - -#ifdef FT_CONFIG_OPTION_PIC - AF_FaceGlobals globals = loader->globals; -#endif - - - if ( !size ) - return FT_THROW( Invalid_Size_Handle ); - - FT_ZERO( &scaler ); - - if ( !size_internal->autohint_metrics.x_scale || - size_internal->autohint_mode != FT_LOAD_TARGET_MODE( load_flags ) ) - { - /* switching between hinting modes usually means different scaling */ - /* values; this later on enforces recomputation of everything */ - /* related to the current size */ - - size_internal->autohint_mode = FT_LOAD_TARGET_MODE( load_flags ); - size_internal->autohint_metrics = size->metrics; - -#ifdef AF_CONFIG_OPTION_TT_SIZE_METRICS - { - FT_Size_Metrics* size_metrics = &size_internal->autohint_metrics; - - - /* set metrics to integer values and adjust scaling accordingly; */ - /* this is the same setup as with TrueType fonts, cf. function */ - /* `tt_size_reset' in file `ttobjs.c' */ - size_metrics->ascender = FT_PIX_ROUND( - FT_MulFix( face->ascender, - size_metrics->y_scale ) ); - size_metrics->descender = FT_PIX_ROUND( - FT_MulFix( face->descender, - size_metrics->y_scale ) ); - size_metrics->height = FT_PIX_ROUND( - FT_MulFix( face->height, - size_metrics->y_scale ) ); - - size_metrics->x_scale = FT_DivFix( size_metrics->x_ppem << 6, - face->units_per_EM ); - size_metrics->y_scale = FT_DivFix( size_metrics->y_ppem << 6, - face->units_per_EM ); - size_metrics->max_advance = FT_PIX_ROUND( - FT_MulFix( face->max_advance_width, - size_metrics->x_scale ) ); - } -#endif /* AF_CONFIG_OPTION_TT_SIZE_METRICS */ - } - - /* - * TODO: This code currently doesn't support fractional advance widths, - * i.e., placing hinted glyphs at anything other than integer - * x-positions. This is only relevant for the warper code, which - * scales and shifts glyphs to optimize blackness of stems (hinting on - * the x-axis by nature places things on pixel integers, hinting on the - * y-axis only, i.e., LIGHT mode, doesn't touch the x-axis). The delta - * values of the scaler would need to be adjusted. - */ - scaler.face = face; - scaler.x_scale = size_internal->autohint_metrics.x_scale; - scaler.x_delta = 0; - scaler.y_scale = size_internal->autohint_metrics.y_scale; - scaler.y_delta = 0; - - scaler.render_mode = FT_LOAD_TARGET_MODE( load_flags ); - scaler.flags = 0; - - /* note that the fallback style can't be changed anymore */ - /* after the first call of `af_loader_load_glyph' */ - error = af_loader_reset( loader, module, face ); - if ( error ) - goto Exit; - -#ifdef FT_OPTION_AUTOFIT2 - /* XXX: undocumented hook to activate the latin2 writing system. */ - if ( load_flags & ( 1UL << 20 ) ) - style_options = AF_STYLE_LTN2_DFLT; -#endif - - /* - * Glyphs (really code points) are assigned to scripts. Script - * analysis is done lazily: For each glyph that passes through here, - * the corresponding script analyzer is called, but returns immediately - * if it has been run already. - */ - error = af_face_globals_get_metrics( loader->globals, glyph_index, - style_options, &style_metrics ); - if ( error ) - goto Exit; - - style_class = style_metrics->style_class; - writing_system_class = - AF_WRITING_SYSTEM_CLASSES_GET[style_class->writing_system]; - - loader->metrics = style_metrics; - - if ( writing_system_class->style_metrics_scale ) - writing_system_class->style_metrics_scale( style_metrics, &scaler ); - else - style_metrics->scaler = scaler; - - if ( writing_system_class->style_hints_init ) - { - error = writing_system_class->style_hints_init( hints, - style_metrics ); - if ( error ) - goto Exit; - } - - /* - * Do the main work of `af_loader_load_glyph'. Note that we never have - * to deal with composite glyphs as those get loaded into - * FT_GLYPH_FORMAT_OUTLINE by the recursed `FT_Load_Glyph' function. - * In the rare cases where FT_LOAD_NO_RECURSE is set, it implies - * FT_LOAD_NO_SCALE and as such the auto-hinter is never called. - */ - load_flags |= FT_LOAD_NO_SCALE | - FT_LOAD_IGNORE_TRANSFORM | - FT_LOAD_LINEAR_DESIGN; - load_flags &= ~FT_LOAD_RENDER; - - error = FT_Load_Glyph( face, glyph_index, load_flags ); - if ( error ) - goto Exit; - - /* - * Apply stem darkening (emboldening) here before hints are applied to - * the outline. Glyphs are scaled down proportionally to the - * emboldening so that curve points don't fall outside their - * precomputed blue zones. - * - * Any emboldening done by the font driver (e.g., the CFF driver) - * doesn't reach here because the autohinter loads the unprocessed - * glyphs in font units for analysis (functions `af_*_metrics_init_*') - * and then above to prepare it for the rasterizers by itself, - * independently of the font driver. So emboldening must be done here, - * within the autohinter. - * - * All glyphs to be autohinted pass through here one by one. The - * standard widths can therefore change from one glyph to the next, - * depending on what script a glyph is assigned to (each script has its - * own set of standard widths and other metrics). The darkening amount - * must therefore be recomputed for each size and - * `standard_{vertical,horizontal}_width' change. - * - * Ignore errors and carry on without emboldening. - * - */ - - /* stem darkening only works well in `light' mode */ - if ( scaler.render_mode == FT_RENDER_MODE_LIGHT && - ( !face->internal->no_stem_darkening || - ( face->internal->no_stem_darkening < 0 && - !module->no_stem_darkening ) ) ) - af_loader_embolden_glyph_in_slot( loader, face, style_metrics ); - - loader->transformed = slot_internal->glyph_transformed; - if ( loader->transformed ) - { - FT_Matrix inverse; - - - loader->trans_matrix = slot_internal->glyph_matrix; - loader->trans_delta = slot_internal->glyph_delta; - - inverse = loader->trans_matrix; - if ( !FT_Matrix_Invert( &inverse ) ) - FT_Vector_Transform( &loader->trans_delta, &inverse ); - } - - switch ( slot->format ) - { - case FT_GLYPH_FORMAT_OUTLINE: - /* translate the loaded glyph when an internal transform is needed */ - if ( loader->transformed ) - FT_Outline_Translate( &slot->outline, - loader->trans_delta.x, - loader->trans_delta.y ); - - /* compute original horizontal phantom points */ - /* (and ignore vertical ones) */ - loader->pp1.x = hints->x_delta; - loader->pp1.y = hints->y_delta; - loader->pp2.x = FT_MulFix( slot->metrics.horiAdvance, - hints->x_scale ) + hints->x_delta; - loader->pp2.y = hints->y_delta; - - /* be sure to check for spacing glyphs */ - if ( slot->outline.n_points == 0 ) - goto Hint_Metrics; - - /* now load the slot image into the auto-outline */ - /* and run the automatic hinting process */ - if ( writing_system_class->style_hints_apply ) - writing_system_class->style_hints_apply( glyph_index, - hints, - &gloader->base.outline, - style_metrics ); - - /* we now need to adjust the metrics according to the change in */ - /* width/positioning that occurred during the hinting process */ - if ( scaler.render_mode != FT_RENDER_MODE_LIGHT ) - { - FT_Pos old_rsb, old_lsb, new_lsb; - FT_Pos pp1x_uh, pp2x_uh; - - AF_AxisHints axis = &hints->axis[AF_DIMENSION_HORZ]; - AF_Edge edge1 = axis->edges; /* leftmost edge */ - AF_Edge edge2 = edge1 + - axis->num_edges - 1; /* rightmost edge */ - - - if ( axis->num_edges > 1 && AF_HINTS_DO_ADVANCE( hints ) ) - { - old_rsb = loader->pp2.x - edge2->opos; - /* loader->pp1.x is always zero at this point of time */ - old_lsb = edge1->opos /* - loader->pp1.x */; - new_lsb = edge1->pos; - - /* remember unhinted values to later account */ - /* for rounding errors */ - pp1x_uh = new_lsb - old_lsb; - pp2x_uh = edge2->pos + old_rsb; - - /* prefer too much space over too little space */ - /* for very small sizes */ - - if ( old_lsb < 24 ) - pp1x_uh -= 8; - - if ( old_rsb < 24 ) - pp2x_uh += 8; - - loader->pp1.x = FT_PIX_ROUND( pp1x_uh ); - loader->pp2.x = FT_PIX_ROUND( pp2x_uh ); - - if ( loader->pp1.x >= new_lsb && old_lsb > 0 ) - loader->pp1.x -= 64; - - if ( loader->pp2.x <= edge2->pos && old_rsb > 0 ) - loader->pp2.x += 64; - - slot->lsb_delta = loader->pp1.x - pp1x_uh; - slot->rsb_delta = loader->pp2.x - pp2x_uh; - } - else - { - FT_Pos pp1x = loader->pp1.x; - FT_Pos pp2x = loader->pp2.x; - - - loader->pp1.x = FT_PIX_ROUND( pp1x + hints->xmin_delta ); - loader->pp2.x = FT_PIX_ROUND( pp2x + hints->xmax_delta ); - - slot->lsb_delta = loader->pp1.x - pp1x; - slot->rsb_delta = loader->pp2.x - pp2x; - } - } - /* `light' mode uses integer advance widths */ - /* but sets `lsb_delta' and `rsb_delta' */ - else - { - FT_Pos pp1x = loader->pp1.x; - FT_Pos pp2x = loader->pp2.x; - - - loader->pp1.x = FT_PIX_ROUND( pp1x ); - loader->pp2.x = FT_PIX_ROUND( pp2x ); - - slot->lsb_delta = loader->pp1.x - pp1x; - slot->rsb_delta = loader->pp2.x - pp2x; - } - - break; - - default: - /* we don't support other formats (yet?) */ - error = FT_THROW( Unimplemented_Feature ); - } - - Hint_Metrics: - { - FT_BBox bbox; - FT_Vector vvector; - - - vvector.x = slot->metrics.vertBearingX - slot->metrics.horiBearingX; - vvector.y = slot->metrics.vertBearingY - slot->metrics.horiBearingY; - vvector.x = FT_MulFix( vvector.x, style_metrics->scaler.x_scale ); - vvector.y = FT_MulFix( vvector.y, style_metrics->scaler.y_scale ); - - /* transform the hinted outline if needed */ - if ( loader->transformed ) - { - FT_Outline_Transform( &gloader->base.outline, &loader->trans_matrix ); - FT_Vector_Transform( &vvector, &loader->trans_matrix ); - } - - /* we must translate our final outline by -pp1.x and compute */ - /* the new metrics */ - if ( loader->pp1.x ) - FT_Outline_Translate( &gloader->base.outline, -loader->pp1.x, 0 ); - - FT_Outline_Get_CBox( &gloader->base.outline, &bbox ); - - bbox.xMin = FT_PIX_FLOOR( bbox.xMin ); - bbox.yMin = FT_PIX_FLOOR( bbox.yMin ); - bbox.xMax = FT_PIX_CEIL( bbox.xMax ); - bbox.yMax = FT_PIX_CEIL( bbox.yMax ); - - slot->metrics.width = bbox.xMax - bbox.xMin; - slot->metrics.height = bbox.yMax - bbox.yMin; - slot->metrics.horiBearingX = bbox.xMin; - slot->metrics.horiBearingY = bbox.yMax; - - slot->metrics.vertBearingX = FT_PIX_FLOOR( bbox.xMin + vvector.x ); - slot->metrics.vertBearingY = FT_PIX_FLOOR( bbox.yMax + vvector.y ); - - /* for mono-width fonts (like Andale, Courier, etc.) we need */ - /* to keep the original rounded advance width; ditto for */ - /* digits if all have the same advance width */ - if ( scaler.render_mode != FT_RENDER_MODE_LIGHT && - ( FT_IS_FIXED_WIDTH( slot->face ) || - ( af_face_globals_is_digit( loader->globals, glyph_index ) && - style_metrics->digits_have_same_width ) ) ) - { - slot->metrics.horiAdvance = - FT_MulFix( slot->metrics.horiAdvance, - style_metrics->scaler.x_scale ); - - /* Set delta values to 0. Otherwise code that uses them is */ - /* going to ruin the fixed advance width. */ - slot->lsb_delta = 0; - slot->rsb_delta = 0; - } - else - { - /* non-spacing glyphs must stay as-is */ - if ( slot->metrics.horiAdvance ) - slot->metrics.horiAdvance = loader->pp2.x - loader->pp1.x; - } - - slot->metrics.vertAdvance = FT_MulFix( slot->metrics.vertAdvance, - style_metrics->scaler.y_scale ); - - slot->metrics.horiAdvance = FT_PIX_ROUND( slot->metrics.horiAdvance ); - slot->metrics.vertAdvance = FT_PIX_ROUND( slot->metrics.vertAdvance ); - - slot->format = FT_GLYPH_FORMAT_OUTLINE; - } - - Exit: - return error; - } - - - /* - * Compute amount of font units the face should be emboldened by, in - * analogy to the CFF driver's `cf2_computeDarkening' function. See there - * for details of the algorithm. - * - * XXX: Currently a crude adaption of the original algorithm. Do better? - */ - FT_LOCAL_DEF( FT_Int32 ) - af_loader_compute_darkening( AF_Loader loader, - FT_Face face, - FT_Pos standard_width ) - { - AF_Module module = loader->globals->module; - - FT_UShort units_per_EM; - FT_Fixed ppem, em_ratio; - FT_Fixed stem_width, stem_width_per_1000, scaled_stem, darken_amount; - FT_Int log_base_2; - FT_Int x1, y1, x2, y2, x3, y3, x4, y4; - - - ppem = FT_MAX( af_intToFixed( 4 ), - af_intToFixed( face->size->metrics.x_ppem ) ); - units_per_EM = face->units_per_EM; - - em_ratio = FT_DivFix( af_intToFixed( 1000 ), - af_intToFixed ( units_per_EM ) ); - if ( em_ratio < af_floatToFixed( .01 ) ) - { - /* If something goes wrong, don't embolden. */ - return 0; - } - - x1 = module->darken_params[0]; - y1 = module->darken_params[1]; - x2 = module->darken_params[2]; - y2 = module->darken_params[3]; - x3 = module->darken_params[4]; - y3 = module->darken_params[5]; - x4 = module->darken_params[6]; - y4 = module->darken_params[7]; - - if ( standard_width <= 0 ) - { - stem_width = af_intToFixed( 75 ); /* taken from cf2font.c */ - stem_width_per_1000 = stem_width; - } - else - { - stem_width = af_intToFixed( standard_width ); - stem_width_per_1000 = FT_MulFix( stem_width, em_ratio ); - } - - log_base_2 = FT_MSB( (FT_UInt32)stem_width_per_1000 ) + - FT_MSB( (FT_UInt32)ppem ); - - if ( log_base_2 >= 46 ) - { - /* possible overflow */ - scaled_stem = af_intToFixed( x4 ); - } - else - scaled_stem = FT_MulFix( stem_width_per_1000, ppem ); - - /* now apply the darkening parameters */ - if ( scaled_stem < af_intToFixed( x1 ) ) - darken_amount = FT_DivFix( af_intToFixed( y1 ), ppem ); - - else if ( scaled_stem < af_intToFixed( x2 ) ) - { - FT_Int xdelta = x2 - x1; - FT_Int ydelta = y2 - y1; - FT_Int x = stem_width_per_1000 - - FT_DivFix( af_intToFixed( x1 ), ppem ); - - - if ( !xdelta ) - goto Try_x3; - - darken_amount = FT_MulDiv( x, ydelta, xdelta ) + - FT_DivFix( af_intToFixed( y1 ), ppem ); - } - - else if ( scaled_stem < af_intToFixed( x3 ) ) - { - Try_x3: - { - FT_Int xdelta = x3 - x2; - FT_Int ydelta = y3 - y2; - FT_Int x = stem_width_per_1000 - - FT_DivFix( af_intToFixed( x2 ), ppem ); - - - if ( !xdelta ) - goto Try_x4; - - darken_amount = FT_MulDiv( x, ydelta, xdelta ) + - FT_DivFix( af_intToFixed( y2 ), ppem ); - } - } - - else if ( scaled_stem < af_intToFixed( x4 ) ) - { - Try_x4: - { - FT_Int xdelta = x4 - x3; - FT_Int ydelta = y4 - y3; - FT_Int x = stem_width_per_1000 - - FT_DivFix( af_intToFixed( x3 ), ppem ); - - - if ( !xdelta ) - goto Use_y4; - - darken_amount = FT_MulDiv( x, ydelta, xdelta ) + - FT_DivFix( af_intToFixed( y3 ), ppem ); - } - } - - else - { - Use_y4: - darken_amount = FT_DivFix( af_intToFixed( y4 ), ppem ); - } - - /* Convert darken_amount from per 1000 em to true character space. */ - return af_fixedToInt( FT_DivFix( darken_amount, em_ratio ) ); - } - - -/* END */ diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/src/autofit/afranges.c b/extensions/gdx-freetype/jni/freetype-2.9.1/src/autofit/afranges.c deleted file mode 100644 index cf67fafb1..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/src/autofit/afranges.c +++ /dev/null @@ -1,1033 +0,0 @@ -/***************************************************************************/ -/* */ -/* afranges.c */ -/* */ -/* Auto-fitter Unicode script ranges (body). */ -/* */ -/* Copyright 2013-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#include "afranges.h" - - /* - * The algorithm for assigning properties and styles to the `glyph_styles' - * array is as follows (cf. the implementation in - * `af_face_globals_compute_style_coverage'). - * - * Walk over all scripts (as listed in `afscript.h'). - * - * For a given script, walk over all styles (as listed in `afstyles.h'). - * The order of styles is important and should be as follows. - * - * - First come styles based on OpenType features (small caps, for - * example). Since features rely on glyph indices, thus completely - * bypassing character codes, no properties are assigned. - * - * - Next comes the default style, using the character ranges as defined - * below. This also assigns properties. - * - * Note that there also exist fallback scripts, mainly covering - * superscript and subscript glyphs of a script that are not present as - * OpenType features. Fallback scripts are defined below, also - * assigning properties; they are applied after the corresponding - * script. - * - */ - - - /* XXX Check base character ranges again: */ - /* Right now, they are quickly derived by visual inspection. */ - /* I can imagine that fine-tuning is necessary. */ - - /* for the auto-hinter, a `non-base character' is something that should */ - /* not be affected by blue zones, regardless of whether this is a */ - /* spacing or no-spacing glyph */ - - /* the `af_xxxx_nonbase_uniranges' ranges must be strict subsets */ - /* of the corresponding `af_xxxx_uniranges' ranges */ - - - const AF_Script_UniRangeRec af_adlm_uniranges[] = - { - AF_UNIRANGE_REC( 0x1E900, 0x1E95F ), /* Adlam */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_adlm_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x1D944, 0x1E94A ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_arab_uniranges[] = - { - AF_UNIRANGE_REC( 0x0600, 0x06FF ), /* Arabic */ - AF_UNIRANGE_REC( 0x0750, 0x07FF ), /* Arabic Supplement */ - AF_UNIRANGE_REC( 0x08A0, 0x08FF ), /* Arabic Extended-A */ - AF_UNIRANGE_REC( 0xFB50, 0xFDFF ), /* Arabic Presentation Forms-A */ - AF_UNIRANGE_REC( 0xFE70, 0xFEFF ), /* Arabic Presentation Forms-B */ - AF_UNIRANGE_REC( 0x1EE00, 0x1EEFF ), /* Arabic Mathematical Alphabetic Symbols */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_arab_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x0600, 0x0605 ), - AF_UNIRANGE_REC( 0x0610, 0x061A ), - AF_UNIRANGE_REC( 0x064B, 0x065F ), - AF_UNIRANGE_REC( 0x0670, 0x0670 ), - AF_UNIRANGE_REC( 0x06D6, 0x06DC ), - AF_UNIRANGE_REC( 0x06DF, 0x06E4 ), - AF_UNIRANGE_REC( 0x06E7, 0x06E8 ), - AF_UNIRANGE_REC( 0x06EA, 0x06ED ), - AF_UNIRANGE_REC( 0x08D4, 0x08E1 ), - AF_UNIRANGE_REC( 0x08D3, 0x08FF ), - AF_UNIRANGE_REC( 0xFBB2, 0xFBC1 ), - AF_UNIRANGE_REC( 0xFE70, 0xFE70 ), - AF_UNIRANGE_REC( 0xFE72, 0xFE72 ), - AF_UNIRANGE_REC( 0xFE74, 0xFE74 ), - AF_UNIRANGE_REC( 0xFE76, 0xFE76 ), - AF_UNIRANGE_REC( 0xFE78, 0xFE78 ), - AF_UNIRANGE_REC( 0xFE7A, 0xFE7A ), - AF_UNIRANGE_REC( 0xFE7C, 0xFE7C ), - AF_UNIRANGE_REC( 0xFE7E, 0xFE7E ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_armn_uniranges[] = - { - AF_UNIRANGE_REC( 0x0530, 0x058F ), /* Armenian */ - AF_UNIRANGE_REC( 0xFB13, 0xFB17 ), /* Alphab. Present. Forms (Armenian) */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_armn_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x0559, 0x055F ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_avst_uniranges[] = - { - AF_UNIRANGE_REC( 0x10B00, 0x10B3F ), /* Avestan */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_avst_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x10B39, 0x10B3F ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_bamu_uniranges[] = - { - AF_UNIRANGE_REC( 0xA6A0, 0xA6FF ), /* Bamum */ -#if 0 - /* The characters in the Bamum supplement are pictograms, */ - /* not (directly) related to the syllabic Bamum script */ - AF_UNIRANGE_REC( 0x16800, 0x16A3F ), /* Bamum Supplement */ -#endif - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_bamu_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0xA6F0, 0xA6F1 ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_beng_uniranges[] = - { - AF_UNIRANGE_REC( 0x0980, 0x09FF ), /* Bengali */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_beng_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x0981, 0x0981 ), - AF_UNIRANGE_REC( 0x09BC, 0x09BC ), - AF_UNIRANGE_REC( 0x09C1, 0x09C4 ), - AF_UNIRANGE_REC( 0x09CD, 0x09CD ), - AF_UNIRANGE_REC( 0x09E2, 0x09E3 ), - AF_UNIRANGE_REC( 0x09FE, 0x09FE ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_buhd_uniranges[] = - { - AF_UNIRANGE_REC( 0x1740, 0x175F ), /* Buhid */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_buhd_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x1752, 0x1753 ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_cakm_uniranges[] = - { - AF_UNIRANGE_REC( 0x11100, 0x1114F ), /* Chakma */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_cakm_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x11100, 0x11102 ), - AF_UNIRANGE_REC( 0x11127, 0x11134 ), - AF_UNIRANGE_REC( 0x11146, 0x11146 ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_cans_uniranges[] = - { - AF_UNIRANGE_REC( 0x1400, 0x167F ), /* Unified Canadian Aboriginal Syllabics */ - AF_UNIRANGE_REC( 0x18B0, 0x18FF ), /* Unified Canadian Aboriginal Syllabics Extended */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_cans_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_cari_uniranges[] = - { - AF_UNIRANGE_REC( 0x102A0, 0x102DF ), /* Carian */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_cari_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_cher_uniranges[] = - { - AF_UNIRANGE_REC( 0x13A0, 0x13FF ), /* Cherokee */ - AF_UNIRANGE_REC( 0xAB70, 0xABBF ), /* Cherokee Supplement */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_cher_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_copt_uniranges[] = - { - AF_UNIRANGE_REC( 0x2C80, 0x2CFF ), /* Coptic */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_copt_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x2CEF, 0x2CF1 ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_cprt_uniranges[] = - { - AF_UNIRANGE_REC( 0x10800, 0x1083F ), /* Cypriot */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_cprt_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_cyrl_uniranges[] = - { - AF_UNIRANGE_REC( 0x0400, 0x04FF ), /* Cyrillic */ - AF_UNIRANGE_REC( 0x0500, 0x052F ), /* Cyrillic Supplement */ - AF_UNIRANGE_REC( 0x2DE0, 0x2DFF ), /* Cyrillic Extended-A */ - AF_UNIRANGE_REC( 0xA640, 0xA69F ), /* Cyrillic Extended-B */ - AF_UNIRANGE_REC( 0x1C80, 0x1C8F ), /* Cyrillic Extended-C */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_cyrl_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x0483, 0x0489 ), - AF_UNIRANGE_REC( 0x2DE0, 0x2DFF ), - AF_UNIRANGE_REC( 0xA66F, 0xA67F ), - AF_UNIRANGE_REC( 0xA69E, 0xA69F ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - /* There are some characters in the Devanagari Unicode block that are */ - /* generic to Indic scripts; we omit them so that their presence doesn't */ - /* trigger Devanagari. */ - - const AF_Script_UniRangeRec af_deva_uniranges[] = - { - AF_UNIRANGE_REC( 0x0900, 0x093B ), /* Devanagari */ - /* omitting U+093C nukta */ - AF_UNIRANGE_REC( 0x093D, 0x0950 ), /* ... continued */ - /* omitting U+0951 udatta, U+0952 anudatta */ - AF_UNIRANGE_REC( 0x0953, 0x0963 ), /* ... continued */ - /* omitting U+0964 danda, U+0965 double danda */ - AF_UNIRANGE_REC( 0x0966, 0x097F ), /* ... continued */ - AF_UNIRANGE_REC( 0x20B9, 0x20B9 ), /* (new) Rupee sign */ - AF_UNIRANGE_REC( 0xA8E0, 0xA8FF ), /* Devanagari Extended */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_deva_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x0900, 0x0902 ), - AF_UNIRANGE_REC( 0x093A, 0x093A ), - AF_UNIRANGE_REC( 0x0941, 0x0948 ), - AF_UNIRANGE_REC( 0x094D, 0x094D ), - AF_UNIRANGE_REC( 0x0953, 0x0957 ), - AF_UNIRANGE_REC( 0x0962, 0x0963 ), - AF_UNIRANGE_REC( 0xA8E0, 0xA8F1 ), - AF_UNIRANGE_REC( 0xA8FF, 0xA8FF ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_dsrt_uniranges[] = - { - AF_UNIRANGE_REC( 0x10400, 0x1044F ), /* Deseret */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_dsrt_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_ethi_uniranges[] = - { - AF_UNIRANGE_REC( 0x1200, 0x137F ), /* Ethiopic */ - AF_UNIRANGE_REC( 0x1380, 0x139F ), /* Ethiopic Supplement */ - AF_UNIRANGE_REC( 0x2D80, 0x2DDF ), /* Ethiopic Extended */ - AF_UNIRANGE_REC( 0xAB00, 0xAB2F ), /* Ethiopic Extended-A */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_ethi_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x135D, 0x135F ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_geor_uniranges[] = - { - AF_UNIRANGE_REC( 0x10D0, 0x10FF ), /* Georgian (Mkhedruli) */ - AF_UNIRANGE_REC( 0x1C90, 0x1CBF ), /* Georgian Extended (Mtavruli) */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_geor_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_geok_uniranges[] = - { - /* Khutsuri */ - AF_UNIRANGE_REC( 0x10A0, 0x10CD ), /* Georgian (Asomtavruli) */ - AF_UNIRANGE_REC( 0x2D00, 0x2D2D ), /* Georgian Supplement (Nuskhuri) */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_geok_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_glag_uniranges[] = - { - AF_UNIRANGE_REC( 0x2C00, 0x2C5F ), /* Glagolitic */ - AF_UNIRANGE_REC( 0x1E000, 0x1E02F ), /* Glagolitic Supplement */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_glag_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x1E000, 0x1E02F ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_goth_uniranges[] = - { - AF_UNIRANGE_REC( 0x10330, 0x1034F ), /* Gothic */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_goth_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_grek_uniranges[] = - { - AF_UNIRANGE_REC( 0x0370, 0x03FF ), /* Greek and Coptic */ - AF_UNIRANGE_REC( 0x1F00, 0x1FFF ), /* Greek Extended */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_grek_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x037A, 0x037A ), - AF_UNIRANGE_REC( 0x0384, 0x0385 ), - AF_UNIRANGE_REC( 0x1FBD, 0x1FC1 ), - AF_UNIRANGE_REC( 0x1FCD, 0x1FCF ), - AF_UNIRANGE_REC( 0x1FDD, 0x1FDF ), - AF_UNIRANGE_REC( 0x1FED, 0x1FEF ), - AF_UNIRANGE_REC( 0x1FFD, 0x1FFE ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_gujr_uniranges[] = - { - AF_UNIRANGE_REC( 0x0A80, 0x0AFF ), /* Gujarati */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_gujr_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x0A81, 0x0A82 ), - AF_UNIRANGE_REC( 0x0ABC, 0x0ABC ), - AF_UNIRANGE_REC( 0x0AC1, 0x0AC8 ), - AF_UNIRANGE_REC( 0x0ACD, 0x0ACD ), - AF_UNIRANGE_REC( 0x0AE2, 0x0AE3 ), - AF_UNIRANGE_REC( 0x0AFA, 0x0AFF ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_guru_uniranges[] = - { - AF_UNIRANGE_REC( 0x0A00, 0x0A7F ), /* Gurmukhi */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_guru_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x0A01, 0x0A02 ), - AF_UNIRANGE_REC( 0x0A3C, 0x0A3C ), - AF_UNIRANGE_REC( 0x0A41, 0x0A51 ), - AF_UNIRANGE_REC( 0x0A70, 0x0A71 ), - AF_UNIRANGE_REC( 0x0A75, 0x0A75 ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_hebr_uniranges[] = - { - AF_UNIRANGE_REC( 0x0590, 0x05FF ), /* Hebrew */ - AF_UNIRANGE_REC( 0xFB1D, 0xFB4F ), /* Alphab. Present. Forms (Hebrew) */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_hebr_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x0591, 0x05BF ), - AF_UNIRANGE_REC( 0x05C1, 0x05C2 ), - AF_UNIRANGE_REC( 0x05C4, 0x05C5 ), - AF_UNIRANGE_REC( 0x05C7, 0x05C7 ), - AF_UNIRANGE_REC( 0xFB1E, 0xFB1E ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_kali_uniranges[] = - { - AF_UNIRANGE_REC( 0xA900, 0xA92F ), /* Kayah Li */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_kali_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0xA926, 0xA92D ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_knda_uniranges[] = - { - AF_UNIRANGE_REC( 0x0C80, 0x0CFF ), /* Kannada */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_knda_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x0C81, 0x0C81 ), - AF_UNIRANGE_REC( 0x0CBC, 0x0CBC ), - AF_UNIRANGE_REC( 0x0CBF, 0x0CBF ), - AF_UNIRANGE_REC( 0x0CC6, 0x0CC6 ), - AF_UNIRANGE_REC( 0x0CCC, 0x0CCD ), - AF_UNIRANGE_REC( 0x0CE2, 0x0CE3 ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_khmr_uniranges[] = - { - AF_UNIRANGE_REC( 0x1780, 0x17FF ), /* Khmer */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_khmr_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x17B7, 0x17BD ), - AF_UNIRANGE_REC( 0x17C6, 0x17C6 ), - AF_UNIRANGE_REC( 0x17C9, 0x17D3 ), - AF_UNIRANGE_REC( 0x17DD, 0x17DD ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_khms_uniranges[] = - { - AF_UNIRANGE_REC( 0x19E0, 0x19FF ), /* Khmer Symbols */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_khms_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_lao_uniranges[] = - { - AF_UNIRANGE_REC( 0x0E80, 0x0EFF ), /* Lao */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_lao_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x0EB1, 0x0EB1 ), - AF_UNIRANGE_REC( 0x0EB4, 0x0EBC ), - AF_UNIRANGE_REC( 0x0EC8, 0x0ECD ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_latn_uniranges[] = - { - AF_UNIRANGE_REC( 0x0020, 0x007F ), /* Basic Latin (no control chars) */ - AF_UNIRANGE_REC( 0x00A0, 0x00A9 ), /* Latin-1 Supplement (no control chars) */ - AF_UNIRANGE_REC( 0x00AB, 0x00B1 ), /* ... continued */ - AF_UNIRANGE_REC( 0x00B4, 0x00B8 ), /* ... continued */ - AF_UNIRANGE_REC( 0x00BB, 0x00FF ), /* ... continued */ - AF_UNIRANGE_REC( 0x0100, 0x017F ), /* Latin Extended-A */ - AF_UNIRANGE_REC( 0x0180, 0x024F ), /* Latin Extended-B */ - AF_UNIRANGE_REC( 0x0250, 0x02AF ), /* IPA Extensions */ - AF_UNIRANGE_REC( 0x02B9, 0x02DF ), /* Spacing Modifier Letters */ - AF_UNIRANGE_REC( 0x02E5, 0x02FF ), /* ... continued */ - AF_UNIRANGE_REC( 0x0300, 0x036F ), /* Combining Diacritical Marks */ - AF_UNIRANGE_REC( 0x1AB0, 0x1ABE ), /* Combining Diacritical Marks Extended */ - AF_UNIRANGE_REC( 0x1D00, 0x1D2B ), /* Phonetic Extensions */ - AF_UNIRANGE_REC( 0x1D6B, 0x1D77 ), /* ... continued */ - AF_UNIRANGE_REC( 0x1D79, 0x1D7F ), /* ... continued */ - AF_UNIRANGE_REC( 0x1D80, 0x1D9A ), /* Phonetic Extensions Supplement */ - AF_UNIRANGE_REC( 0x1DC0, 0x1DFF ), /* Combining Diacritical Marks Supplement */ - AF_UNIRANGE_REC( 0x1E00, 0x1EFF ), /* Latin Extended Additional */ - AF_UNIRANGE_REC( 0x2000, 0x206F ), /* General Punctuation */ - AF_UNIRANGE_REC( 0x20A0, 0x20B8 ), /* Currency Symbols ... */ - AF_UNIRANGE_REC( 0x20BA, 0x20CF ), /* ... except new Rupee sign */ - AF_UNIRANGE_REC( 0x2150, 0x218F ), /* Number Forms */ - AF_UNIRANGE_REC( 0x2C60, 0x2C7B ), /* Latin Extended-C */ - AF_UNIRANGE_REC( 0x2C7E, 0x2C7F ), /* ... continued */ - AF_UNIRANGE_REC( 0x2E00, 0x2E7F ), /* Supplemental Punctuation */ - AF_UNIRANGE_REC( 0xA720, 0xA76F ), /* Latin Extended-D */ - AF_UNIRANGE_REC( 0xA771, 0xA7F7 ), /* ... continued */ - AF_UNIRANGE_REC( 0xA7FA, 0xA7FF ), /* ... continued */ - AF_UNIRANGE_REC( 0xAB30, 0xAB5B ), /* Latin Extended-E */ - AF_UNIRANGE_REC( 0xAB60, 0xAB6F ), /* ... continued */ - AF_UNIRANGE_REC( 0xFB00, 0xFB06 ), /* Alphab. Present. Forms (Latin Ligs) */ - AF_UNIRANGE_REC( 0x1D400, 0x1D7FF ), /* Mathematical Alphanumeric Symbols */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_latn_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x005E, 0x0060 ), - AF_UNIRANGE_REC( 0x007E, 0x007E ), - AF_UNIRANGE_REC( 0x00A8, 0x00A9 ), - AF_UNIRANGE_REC( 0x00AE, 0x00B0 ), - AF_UNIRANGE_REC( 0x00B4, 0x00B4 ), - AF_UNIRANGE_REC( 0x00B8, 0x00B8 ), - AF_UNIRANGE_REC( 0x00BC, 0x00BE ), - AF_UNIRANGE_REC( 0x02B9, 0x02DF ), - AF_UNIRANGE_REC( 0x02E5, 0x02FF ), - AF_UNIRANGE_REC( 0x0300, 0x036F ), - AF_UNIRANGE_REC( 0x1AB0, 0x1ABE ), - AF_UNIRANGE_REC( 0x1DC0, 0x1DFF ), - AF_UNIRANGE_REC( 0x2017, 0x2017 ), - AF_UNIRANGE_REC( 0x203E, 0x203E ), - AF_UNIRANGE_REC( 0xA788, 0xA788 ), - AF_UNIRANGE_REC( 0xA7F8, 0xA7FA ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_latb_uniranges[] = - { - AF_UNIRANGE_REC( 0x1D62, 0x1D6A ), /* some small subscript letters */ - AF_UNIRANGE_REC( 0x2080, 0x209C ), /* subscript digits and letters */ - AF_UNIRANGE_REC( 0x2C7C, 0x2C7C ), /* latin subscript small letter j */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_latb_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_latp_uniranges[] = - { - AF_UNIRANGE_REC( 0x00AA, 0x00AA ), /* feminine ordinal indicator */ - AF_UNIRANGE_REC( 0x00B2, 0x00B3 ), /* superscript two and three */ - AF_UNIRANGE_REC( 0x00B9, 0x00BA ), /* superscript one, masc. ord. indic. */ - AF_UNIRANGE_REC( 0x02B0, 0x02B8 ), /* some latin superscript mod. letters */ - AF_UNIRANGE_REC( 0x02E0, 0x02E4 ), /* some IPA modifier letters */ - AF_UNIRANGE_REC( 0x1D2C, 0x1D61 ), /* latin superscript modifier letters */ - AF_UNIRANGE_REC( 0x1D78, 0x1D78 ), /* modifier letter cyrillic en */ - AF_UNIRANGE_REC( 0x1D9B, 0x1DBF ), /* more modifier letters */ - AF_UNIRANGE_REC( 0x2070, 0x207F ), /* superscript digits and letters */ - AF_UNIRANGE_REC( 0x2C7D, 0x2C7D ), /* modifier letter capital v */ - AF_UNIRANGE_REC( 0xA770, 0xA770 ), /* modifier letter us */ - AF_UNIRANGE_REC( 0xA7F8, 0xA7F9 ), /* more modifier letters */ - AF_UNIRANGE_REC( 0xAB5C, 0xAB5F ), /* more modifier letters */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_latp_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_lisu_uniranges[] = - { - AF_UNIRANGE_REC( 0xA4D0, 0xA4FF ), /* Lisu */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_lisu_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_mlym_uniranges[] = - { - AF_UNIRANGE_REC( 0x0D00, 0x0D7F ), /* Malayalam */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_mlym_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x0D00, 0x0D01 ), - AF_UNIRANGE_REC( 0x0D3B, 0x0D3C ), - AF_UNIRANGE_REC( 0x0D4D, 0x0D4E ), - AF_UNIRANGE_REC( 0x0D62, 0x0D63 ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_mymr_uniranges[] = - { - AF_UNIRANGE_REC( 0x1000, 0x109F ), /* Myanmar */ - AF_UNIRANGE_REC( 0xA9E0, 0xA9FF ), /* Myanmar Extended-B */ - AF_UNIRANGE_REC( 0xAA60, 0xAA7F ), /* Myanmar Extended-A */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_mymr_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x102D, 0x1030 ), - AF_UNIRANGE_REC( 0x1032, 0x1037 ), - AF_UNIRANGE_REC( 0x103A, 0x103A ), - AF_UNIRANGE_REC( 0x103D, 0x103E ), - AF_UNIRANGE_REC( 0x1058, 0x1059 ), - AF_UNIRANGE_REC( 0x105E, 0x1060 ), - AF_UNIRANGE_REC( 0x1071, 0x1074 ), - AF_UNIRANGE_REC( 0x1082, 0x1082 ), - AF_UNIRANGE_REC( 0x1085, 0x1086 ), - AF_UNIRANGE_REC( 0x108D, 0x108D ), - AF_UNIRANGE_REC( 0xA9E5, 0xA9E5 ), - AF_UNIRANGE_REC( 0xAA7C, 0xAA7C ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_nkoo_uniranges[] = - { - AF_UNIRANGE_REC( 0x07C0, 0x07FF ), /* N'Ko */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_nkoo_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x07EB, 0x07F5 ), - AF_UNIRANGE_REC( 0x07FD, 0x07FD ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_none_uniranges[] = - { - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_none_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_olck_uniranges[] = - { - AF_UNIRANGE_REC( 0x1C50, 0x1C7F ), /* Ol Chiki */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_olck_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_orkh_uniranges[] = - { - AF_UNIRANGE_REC( 0x10C00, 0x10C4F ), /* Old Turkic */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_orkh_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_osge_uniranges[] = - { - AF_UNIRANGE_REC( 0x104B0, 0x104FF ), /* Osage */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_osge_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_osma_uniranges[] = - { - AF_UNIRANGE_REC( 0x10480, 0x104AF ), /* Osmanya */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_osma_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_saur_uniranges[] = - { - AF_UNIRANGE_REC( 0xA880, 0xA8DF ), /* Saurashtra */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_saur_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0xA880, 0xA881 ), - AF_UNIRANGE_REC( 0xA8B4, 0xA8C5 ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_shaw_uniranges[] = - { - AF_UNIRANGE_REC( 0x10450, 0x1047F ), /* Shavian */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_shaw_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_sinh_uniranges[] = - { - AF_UNIRANGE_REC( 0x0D80, 0x0DFF ), /* Sinhala */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_sinh_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x0DCA, 0x0DCA ), - AF_UNIRANGE_REC( 0x0DD2, 0x0DD6 ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_sund_uniranges[] = - { - AF_UNIRANGE_REC( 0x1B80, 0x1BBF ), /* Sundanese */ - AF_UNIRANGE_REC( 0x1CC0, 0x1CCF ), /* Sundanese Supplement */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_sund_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x1B80, 0x1B82 ), - AF_UNIRANGE_REC( 0x1BA1, 0x1BAD ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_taml_uniranges[] = - { - AF_UNIRANGE_REC( 0x0B80, 0x0BFF ), /* Tamil */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_taml_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x0B82, 0x0B82 ), - AF_UNIRANGE_REC( 0x0BC0, 0x0BC2 ), - AF_UNIRANGE_REC( 0x0BCD, 0x0BCD ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_tavt_uniranges[] = - { - AF_UNIRANGE_REC( 0xAA80, 0xAADF ), /* Tai Viet */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_tavt_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0xAAB0, 0xAAB0 ), - AF_UNIRANGE_REC( 0xAAB2, 0xAAB4 ), - AF_UNIRANGE_REC( 0xAAB7, 0xAAB8 ), - AF_UNIRANGE_REC( 0xAABE, 0xAABF ), - AF_UNIRANGE_REC( 0xAAC1, 0xAAC1 ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_telu_uniranges[] = - { - AF_UNIRANGE_REC( 0x0C00, 0x0C7F ), /* Telugu */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_telu_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x0C00, 0x0C00 ), - AF_UNIRANGE_REC( 0x0C04, 0x0C04 ), - AF_UNIRANGE_REC( 0x0C3E, 0x0C40 ), - AF_UNIRANGE_REC( 0x0C46, 0x0C56 ), - AF_UNIRANGE_REC( 0x0C62, 0x0C63 ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_thai_uniranges[] = - { - AF_UNIRANGE_REC( 0x0E00, 0x0E7F ), /* Thai */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_thai_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x0E31, 0x0E31 ), - AF_UNIRANGE_REC( 0x0E34, 0x0E3A ), - AF_UNIRANGE_REC( 0x0E47, 0x0E4E ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_tfng_uniranges[] = - { - AF_UNIRANGE_REC( 0x2D30, 0x2D7F ), /* Tifinagh */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_tfng_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_vaii_uniranges[] = - { - AF_UNIRANGE_REC( 0xA500, 0xA63F ), /* Vai */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_vaii_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0, 0 ) - }; - - -#ifdef AF_CONFIG_OPTION_INDIC - - const AF_Script_UniRangeRec af_limb_uniranges[] = - { - AF_UNIRANGE_REC( 0x1900, 0x194F ), /* Limbu */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_limb_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x1920, 0x1922 ), - AF_UNIRANGE_REC( 0x1927, 0x1934 ), - AF_UNIRANGE_REC( 0x1937, 0x193B ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_orya_uniranges[] = - { - AF_UNIRANGE_REC( 0x0B00, 0x0B7F ), /* Oriya */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_orya_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x0B01, 0x0B02 ), - AF_UNIRANGE_REC( 0x0B3C, 0x0B3C ), - AF_UNIRANGE_REC( 0x0B3F, 0x0B3F ), - AF_UNIRANGE_REC( 0x0B41, 0x0B44 ), - AF_UNIRANGE_REC( 0x0B4D, 0x0B56 ), - AF_UNIRANGE_REC( 0x0B62, 0x0B63 ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_sylo_uniranges[] = - { - AF_UNIRANGE_REC( 0xA800, 0xA82F ), /* Syloti Nagri */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_sylo_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0xA802, 0xA802 ), - AF_UNIRANGE_REC( 0xA806, 0xA806 ), - AF_UNIRANGE_REC( 0xA80B, 0xA80B ), - AF_UNIRANGE_REC( 0xA825, 0xA826 ), - AF_UNIRANGE_REC( 0, 0 ) - }; - - - const AF_Script_UniRangeRec af_tibt_uniranges[] = - { - AF_UNIRANGE_REC( 0x0F00, 0x0FFF ), /* Tibetan */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_tibt_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x0F18, 0x0F19 ), - AF_UNIRANGE_REC( 0x0F35, 0x0F35 ), - AF_UNIRANGE_REC( 0x0F37, 0x0F37 ), - AF_UNIRANGE_REC( 0x0F39, 0x0F39 ), - AF_UNIRANGE_REC( 0x0F3E, 0x0F3F ), - AF_UNIRANGE_REC( 0x0F71, 0x0F7E ), - AF_UNIRANGE_REC( 0x0F80, 0x0F84 ), - AF_UNIRANGE_REC( 0x0F86, 0x0F87 ), - AF_UNIRANGE_REC( 0x0F8D, 0x0FBC ), - AF_UNIRANGE_REC( 0, 0 ) - }; - -#endif /* !AF_CONFIG_OPTION_INDIC */ - -#ifdef AF_CONFIG_OPTION_CJK - - /* this corresponds to Unicode 6.0 */ - - const AF_Script_UniRangeRec af_hani_uniranges[] = - { - AF_UNIRANGE_REC( 0x1100, 0x11FF ), /* Hangul Jamo */ - AF_UNIRANGE_REC( 0x2E80, 0x2EFF ), /* CJK Radicals Supplement */ - AF_UNIRANGE_REC( 0x2F00, 0x2FDF ), /* Kangxi Radicals */ - AF_UNIRANGE_REC( 0x2FF0, 0x2FFF ), /* Ideographic Description Characters */ - AF_UNIRANGE_REC( 0x3000, 0x303F ), /* CJK Symbols and Punctuation */ - AF_UNIRANGE_REC( 0x3040, 0x309F ), /* Hiragana */ - AF_UNIRANGE_REC( 0x30A0, 0x30FF ), /* Katakana */ - AF_UNIRANGE_REC( 0x3100, 0x312F ), /* Bopomofo */ - AF_UNIRANGE_REC( 0x3130, 0x318F ), /* Hangul Compatibility Jamo */ - AF_UNIRANGE_REC( 0x3190, 0x319F ), /* Kanbun */ - AF_UNIRANGE_REC( 0x31A0, 0x31BF ), /* Bopomofo Extended */ - AF_UNIRANGE_REC( 0x31C0, 0x31EF ), /* CJK Strokes */ - AF_UNIRANGE_REC( 0x31F0, 0x31FF ), /* Katakana Phonetic Extensions */ - AF_UNIRANGE_REC( 0x3300, 0x33FF ), /* CJK Compatibility */ - AF_UNIRANGE_REC( 0x3400, 0x4DBF ), /* CJK Unified Ideographs Extension A */ - AF_UNIRANGE_REC( 0x4DC0, 0x4DFF ), /* Yijing Hexagram Symbols */ - AF_UNIRANGE_REC( 0x4E00, 0x9FFF ), /* CJK Unified Ideographs */ - AF_UNIRANGE_REC( 0xA960, 0xA97F ), /* Hangul Jamo Extended-A */ - AF_UNIRANGE_REC( 0xAC00, 0xD7AF ), /* Hangul Syllables */ - AF_UNIRANGE_REC( 0xD7B0, 0xD7FF ), /* Hangul Jamo Extended-B */ - AF_UNIRANGE_REC( 0xF900, 0xFAFF ), /* CJK Compatibility Ideographs */ - AF_UNIRANGE_REC( 0xFE10, 0xFE1F ), /* Vertical forms */ - AF_UNIRANGE_REC( 0xFE30, 0xFE4F ), /* CJK Compatibility Forms */ - AF_UNIRANGE_REC( 0xFF00, 0xFFEF ), /* Halfwidth and Fullwidth Forms */ - AF_UNIRANGE_REC( 0x1B000, 0x1B0FF ), /* Kana Supplement */ - AF_UNIRANGE_REC( 0x1B100, 0x1B12F ), /* Kana Extended-A */ - AF_UNIRANGE_REC( 0x1D300, 0x1D35F ), /* Tai Xuan Hing Symbols */ - AF_UNIRANGE_REC( 0x20000, 0x2A6DF ), /* CJK Unified Ideographs Extension B */ - AF_UNIRANGE_REC( 0x2A700, 0x2B73F ), /* CJK Unified Ideographs Extension C */ - AF_UNIRANGE_REC( 0x2B740, 0x2B81F ), /* CJK Unified Ideographs Extension D */ - AF_UNIRANGE_REC( 0x2B820, 0x2CEAF ), /* CJK Unified Ideographs Extension E */ - AF_UNIRANGE_REC( 0x2CEB0, 0x2EBEF ), /* CJK Unified Ideographs Extension F */ - AF_UNIRANGE_REC( 0x2F800, 0x2FA1F ), /* CJK Compatibility Ideographs Supplement */ - AF_UNIRANGE_REC( 0, 0 ) - }; - - const AF_Script_UniRangeRec af_hani_nonbase_uniranges[] = - { - AF_UNIRANGE_REC( 0x302A, 0x302F ), - AF_UNIRANGE_REC( 0x3190, 0x319F ), - AF_UNIRANGE_REC( 0, 0 ) - }; - -#endif /* !AF_CONFIG_OPTION_CJK */ - -/* END */ diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/src/autofit/afscript.h b/extensions/gdx-freetype/jni/freetype-2.9.1/src/autofit/afscript.h deleted file mode 100644 index 623a1734a..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/src/autofit/afscript.h +++ /dev/null @@ -1,390 +0,0 @@ -/***************************************************************************/ -/* */ -/* afscript.h */ -/* */ -/* Auto-fitter scripts (specification only). */ -/* */ -/* Copyright 2013-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - - /* The following part can be included multiple times. */ - /* Define `SCRIPT' as needed. */ - - - /* Add new scripts here. The first and second arguments are the */ - /* script name in lowercase and uppercase, respectively, followed */ - /* by a description string. Then comes the corresponding HarfBuzz */ - /* script name tag, followed by a string of standard characters (to */ - /* derive the standard width and height of stems). */ - /* */ - /* Note that fallback scripts only have a default style, thus we */ - /* use `HB_SCRIPT_INVALID' as the HarfBuzz script name tag for */ - /* them. */ - - SCRIPT( adlm, ADLM, - "Adlam", - HB_SCRIPT_ADLAM, - HINTING_BOTTOM_TO_TOP, - "\xF0\x9E\xA4\x8C \xF0\x9E\xA4\xAE" ) /* 𞤌 𞤮 */ - - SCRIPT( arab, ARAB, - "Arabic", - HB_SCRIPT_ARABIC, - HINTING_BOTTOM_TO_TOP, - "\xD9\x84 \xD8\xAD \xD9\x80" ) /* ل ح ـ */ - - SCRIPT( armn, ARMN, - "Armenian", - HB_SCRIPT_ARMENIAN, - HINTING_BOTTOM_TO_TOP, - "\xD5\xBD \xD5\x8D" ) /* ս Ս */ - - SCRIPT( avst, AVST, - "Avestan", - HB_SCRIPT_AVESTAN, - HINTING_BOTTOM_TO_TOP, - "\xF0\x90\xAC\x9A" ) /* 𐬚 */ - - SCRIPT( bamu, BAMU, - "Bamum", - HB_SCRIPT_BAMUM, - HINTING_BOTTOM_TO_TOP, - "\xEA\x9B\x81 \xEA\x9B\xAF" ) /* ꛁ ꛯ */ - - /* there are no simple forms for letters; we thus use two digit shapes */ - SCRIPT( beng, BENG, - "Bengali", - HB_SCRIPT_BENGALI, - HINTING_TOP_TO_BOTTOM, - "\xE0\xA7\xA6 \xE0\xA7\xAA" ) /* ০ ৪ */ - - SCRIPT( buhd, BUHD, - "Buhid", - HB_SCRIPT_BUHID, - HINTING_BOTTOM_TO_TOP, - "\xE1\x9D\x8B \xE1\x9D\x8F" ) /* ᝋ ᝏ */ - - SCRIPT( cakm, CAKM, - "Chakma", - HB_SCRIPT_CHAKMA, - HINTING_BOTTOM_TO_TOP, - "\xF0\x91\x84\xA4 \xF0\x91\x84\x89 \xF0\x91\x84\x9B" ) /* 𑄤 𑄉 𑄛 */ - - SCRIPT( cans, CANS, - "Canadian Syllabics", - HB_SCRIPT_CANADIAN_SYLLABICS, - HINTING_BOTTOM_TO_TOP, - "\xE1\x91\x8C \xE1\x93\x9A" ) /* ᑌ ᓚ */ - - SCRIPT( cari, CARI, - "Carian", - HB_SCRIPT_CARIAN, - HINTING_BOTTOM_TO_TOP, - "\xF0\x90\x8A\xAB \xF0\x90\x8B\x89" ) /* 𐊫 𐋉 */ - - SCRIPT( cher, CHER, - "Cherokee", - HB_SCRIPT_CHEROKEE, - HINTING_BOTTOM_TO_TOP, - "\xE1\x8E\xA4 \xE1\x8F\x85 \xEA\xAE\x95" ) /* Ꭴ Ꮕ ꮕ */ - - SCRIPT( copt, COPT, - "Coptic", - HB_SCRIPT_COPTIC, - HINTING_BOTTOM_TO_TOP, - "\xE2\xB2\x9E \xE2\xB2\x9F" ) /* Ⲟ ⲟ */ - - SCRIPT( cprt, CPRT, - "Cypriot", - HB_SCRIPT_CYPRIOT, - HINTING_BOTTOM_TO_TOP, - "\xF0\x90\xA0\x85 \xF0\x90\xA0\xA3" ) /* 𐠅 𐠣 */ - - SCRIPT( cyrl, CYRL, - "Cyrillic", - HB_SCRIPT_CYRILLIC, - HINTING_BOTTOM_TO_TOP, - "\xD0\xBE \xD0\x9E" ) /* о О */ - - SCRIPT( deva, DEVA, - "Devanagari", - HB_SCRIPT_DEVANAGARI, - HINTING_TOP_TO_BOTTOM, - "\xE0\xA4\xA0 \xE0\xA4\xB5 \xE0\xA4\x9F" ) /* ठ व ट */ - - SCRIPT( dsrt, DSRT, - "Deseret", - HB_SCRIPT_DESERET, - HINTING_BOTTOM_TO_TOP, - "\xF0\x90\x90\x84 \xF0\x90\x90\xAC" ) /* 𐐄 𐐬 */ - - SCRIPT( ethi, ETHI, - "Ethiopic", - HB_SCRIPT_ETHIOPIC, - HINTING_BOTTOM_TO_TOP, - "\xE1\x8B\x90" ) /* ዐ */ - - SCRIPT( geor, GEOR, - "Georgian (Mkhedruli)", - HB_SCRIPT_GEORGIAN, - HINTING_BOTTOM_TO_TOP, - "\xE1\x83\x98 \xE1\x83\x94 \xE1\x83\x90 \xE1\xB2\xBF" ) /* ი ე ა Ი */ - - SCRIPT( geok, GEOK, - "Georgian (Khutsuri)", - HB_SCRIPT_INVALID, - HINTING_BOTTOM_TO_TOP, - "\xE1\x82\xB6 \xE1\x82\xB1 \xE2\xB4\x99" ) /* Ⴖ Ⴑ ⴙ */ - - SCRIPT( glag, GLAG, - "Glagolitic", - HB_SCRIPT_GLAGOLITIC, - HINTING_BOTTOM_TO_TOP, - "\xE2\xB0\x95 \xE2\xB1\x85" ) /* Ⱅ ⱅ */ - - SCRIPT( goth, GOTH, - "Gothic", - HB_SCRIPT_GOTHIC, - HINTING_TOP_TO_BOTTOM, - "\xF0\x90\x8C\xB4 \xF0\x90\x8C\xBE \xF0\x90\x8D\x83" ) /* 𐌴 𐌾 𐍃 */ - - SCRIPT( grek, GREK, - "Greek", - HB_SCRIPT_GREEK, - HINTING_BOTTOM_TO_TOP, - "\xCE\xBF \xCE\x9F" ) /* ο Ο */ - - SCRIPT( gujr, GUJR, - "Gujarati", - HB_SCRIPT_GUJARATI, - HINTING_BOTTOM_TO_TOP, - "\xE0\xAA\x9F \xE0\xAB\xA6" ) /* ટ ૦ */ - - SCRIPT( guru, GURU, - "Gurmukhi", - HB_SCRIPT_GURMUKHI, - HINTING_TOP_TO_BOTTOM, - "\xE0\xA8\xA0 \xE0\xA8\xB0 \xE0\xA9\xA6" ) /* ਠ ਰ ੦ */ - - SCRIPT( hebr, HEBR, - "Hebrew", - HB_SCRIPT_HEBREW, - HINTING_BOTTOM_TO_TOP, - "\xD7\x9D" ) /* ם */ - - SCRIPT( kali, KALI, - "Kayah Li", - HB_SCRIPT_KAYAH_LI, - HINTING_BOTTOM_TO_TOP, - "\xEA\xA4\x8D \xEA\xA4\x80" ) /* ꤍ ꤀ */ - - /* only digit zero has a simple shape in the Khmer script */ - SCRIPT( khmr, KHMR, - "Khmer", - HB_SCRIPT_KHMER, - HINTING_BOTTOM_TO_TOP, - "\xE1\x9F\xA0" ) /* ០ */ - - SCRIPT( khms, KHMS, - "Khmer Symbols", - HB_SCRIPT_INVALID, - HINTING_BOTTOM_TO_TOP, - "\xE1\xA7\xA1 \xE1\xA7\xAA" ) /* ᧡ ᧪ */ - - SCRIPT( knda, KNDA, - "Kannada", - HB_SCRIPT_KANNADA, - HINTING_BOTTOM_TO_TOP, - "\xE0\xB3\xA6 \xE0\xB2\xAC" ) /* ೦ ಬ */ - - /* only digit zero has a simple shape in the Lao script */ - SCRIPT( lao, LAO, - "Lao", - HB_SCRIPT_LAO, - HINTING_BOTTOM_TO_TOP, - "\xE0\xBB\x90" ) /* ໐ */ - - SCRIPT( latn, LATN, - "Latin", - HB_SCRIPT_LATIN, - HINTING_BOTTOM_TO_TOP, - "o O 0" ) - - SCRIPT( latb, LATB, - "Latin Subscript Fallback", - HB_SCRIPT_INVALID, - HINTING_BOTTOM_TO_TOP, - "\xE2\x82\x92 \xE2\x82\x80" ) /* ₒ ₀ */ - - SCRIPT( latp, LATP, - "Latin Superscript Fallback", - HB_SCRIPT_INVALID, - HINTING_BOTTOM_TO_TOP, - "\xE1\xB5\x92 \xE1\xB4\xBC \xE2\x81\xB0" ) /* ᵒ ᴼ ⁰ */ - - SCRIPT( lisu, LISU, - "Lisu", - HB_SCRIPT_LISU, - HINTING_BOTTOM_TO_TOP, - "\xEA\x93\xB3" ) /* ꓳ */ - - SCRIPT( mlym, MLYM, - "Malayalam", - HB_SCRIPT_MALAYALAM, - HINTING_BOTTOM_TO_TOP, - "\xE0\xB4\xA0 \xE0\xB4\xB1" ) /* ഠ റ */ - - SCRIPT( mymr, MYMR, - "Myanmar", - HB_SCRIPT_MYANMAR, - HINTING_BOTTOM_TO_TOP, - "\xE1\x80\x9D \xE1\x80\x84 \xE1\x80\x82" ) /* ဝ င ဂ */ - - SCRIPT( nkoo, NKOO, - "N'Ko", - HB_SCRIPT_NKO, - HINTING_BOTTOM_TO_TOP, - "\xDF\x8B \xDF\x80" ) /* ߋ ߀ */ - - SCRIPT( none, NONE, - "no script", - HB_SCRIPT_INVALID, - HINTING_BOTTOM_TO_TOP, - "" ) - - SCRIPT( olck, OLCK, - "Ol Chiki", - HB_SCRIPT_OL_CHIKI, - HINTING_BOTTOM_TO_TOP, - "\xE1\xB1\x9B" ) /* ᱛ */ - - SCRIPT( orkh, ORKH, - "Old Turkic", - HB_SCRIPT_OLD_TURKIC, - HINTING_BOTTOM_TO_TOP, - "\xF0\x90\xB0\x97" ) /* 𐰗 */ - - SCRIPT( osge, OSGE, - "Osage", - HB_SCRIPT_OSAGE, - HINTING_BOTTOM_TO_TOP, - "\xF0\x90\x93\x82 \xF0\x90\x93\xAA" ) /* 𐓂 𐓪 */ - - SCRIPT( osma, OSMA, - "Osmanya", - HB_SCRIPT_OSMANYA, - HINTING_BOTTOM_TO_TOP, - "\xF0\x90\x92\x86 \xF0\x90\x92\xA0" ) /* 𐒆 𐒠 */ - - SCRIPT( saur, SAUR, - "Saurashtra", - HB_SCRIPT_SAURASHTRA, - HINTING_BOTTOM_TO_TOP, - "\xEA\xA2\x9D \xEA\xA3\x90" ) /* ꢝ ꣐ */ - - SCRIPT( shaw, SHAW, - "Shavian", - HB_SCRIPT_SHAVIAN, - HINTING_BOTTOM_TO_TOP, - "\xF0\x90\x91\xB4" ) /* 𐑴 */ - - SCRIPT( sinh, SINH, - "Sinhala", - HB_SCRIPT_SINHALA, - HINTING_BOTTOM_TO_TOP, - "\xE0\xB6\xA7" ) /* ට */ - - /* only digit zero has a simple (round) shape in the Sundanese script */ - SCRIPT( sund, SUND, - "Sundanese", - HB_SCRIPT_SUNDANESE, - HINTING_BOTTOM_TO_TOP, - "\xE1\xAE\xB0" ) /* ᮰ */ - - /* only digit zero has a simple (round) shape in the Tamil script */ - SCRIPT( taml, TAML, - "Tamil", - HB_SCRIPT_TAMIL, - HINTING_BOTTOM_TO_TOP, - "\xE0\xAF\xA6" ) /* ௦ */ - - SCRIPT( tavt, TAVT, - "Tai Viet", - HB_SCRIPT_TAI_VIET, - HINTING_BOTTOM_TO_TOP, - "\xEA\xAA\x92 \xEA\xAA\xAB" ) /* ꪒ ꪫ */ - - /* there are no simple forms for letters; we thus use two digit shapes */ - SCRIPT( telu, TELU, - "Telugu", - HB_SCRIPT_TELUGU, - HINTING_BOTTOM_TO_TOP, - "\xE0\xB1\xA6 \xE0\xB1\xA7" ) /* ౦ ౧ */ - - SCRIPT( tfng, TFNG, - "Tifinagh", - HB_SCRIPT_TIFINAGH, - HINTING_BOTTOM_TO_TOP, - "\xE2\xB5\x94" ) /* ⵔ */ - - SCRIPT( thai, THAI, - "Thai", - HB_SCRIPT_THAI, - HINTING_BOTTOM_TO_TOP, - "\xE0\xB8\xB2 \xE0\xB9\x85 \xE0\xB9\x90" ) /* า ๅ ๐ */ - - SCRIPT( vaii, VAII, - "Vai", - HB_SCRIPT_VAI, - HINTING_BOTTOM_TO_TOP, - "\xEA\x98\x93 \xEA\x96\x9C \xEA\x96\xB4" ) /* ꘓ ꖜ ꖴ */ - -#ifdef AF_CONFIG_OPTION_INDIC - - SCRIPT( limb, LIMB, - "Limbu", - HB_SCRIPT_LIMBU, - HINTING_BOTTOM_TO_TOP, - "o" ) /* XXX */ - - SCRIPT( orya, ORYA, - "Oriya", - HB_SCRIPT_ORIYA, - HINTING_BOTTOM_TO_TOP, - "o" ) /* XXX */ - - SCRIPT( sylo, SYLO, - "Syloti Nagri", - HB_SCRIPT_SYLOTI_NAGRI, - HINTING_BOTTOM_TO_TOP, - "o" ) /* XXX */ - - SCRIPT( tibt, TIBT, - "Tibetan", - HB_SCRIPT_TIBETAN, - HINTING_BOTTOM_TO_TOP, - "o" ) /* XXX */ - -#endif /* AF_CONFIG_OPTION_INDIC */ - -#ifdef AF_CONFIG_OPTION_CJK - - SCRIPT( hani, HANI, - "CJKV ideographs", - HB_SCRIPT_HAN, - HINTING_BOTTOM_TO_TOP, - "\xE7\x94\xB0 \xE5\x9B\x97" ) /* 田 囗 */ - -#endif /* AF_CONFIG_OPTION_CJK */ - - -/* END */ diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/src/autofit/afstyles.h b/extensions/gdx-freetype/jni/freetype-2.9.1/src/autofit/afstyles.h deleted file mode 100644 index e2688b3fc..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/src/autofit/afstyles.h +++ /dev/null @@ -1,475 +0,0 @@ -/***************************************************************************/ -/* */ -/* afstyles.h */ -/* */ -/* Auto-fitter styles (specification only). */ -/* */ -/* Copyright 2013-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - - /* The following part can be included multiple times. */ - /* Define `STYLE' as needed. */ - - - /* Add new styles here. The first and second arguments are the */ - /* style name in lowercase and uppercase, respectively, followed */ - /* by a description string. The next arguments are the */ - /* corresponding writing system, script, blue stringset, and */ - /* coverage. */ - /* */ - /* Note that styles using `AF_COVERAGE_DEFAULT' should always */ - /* come after styles with other coverages. Also note that */ - /* fallback scripts only use `AF_COVERAGE_DEFAULT' for its */ - /* style. */ - /* */ - /* Example: */ - /* */ - /* STYLE( cyrl_dflt, CYRL_DFLT, */ - /* "Cyrillic default style", */ - /* AF_WRITING_SYSTEM_LATIN, */ - /* AF_SCRIPT_CYRL, */ - /* AF_BLUE_STRINGSET_CYRL, */ - /* AF_COVERAGE_DEFAULT ) */ - -#undef STYLE_LATIN -#define STYLE_LATIN( s, S, f, F, ds, df, C ) \ - STYLE( s ## _ ## f, S ## _ ## F, \ - ds " " df " style", \ - AF_WRITING_SYSTEM_LATIN, \ - AF_SCRIPT_ ## S, \ - AF_BLUE_STRINGSET_ ## S, \ - AF_COVERAGE_ ## C ) - -#undef META_STYLE_LATIN -#define META_STYLE_LATIN( s, S, ds ) \ - STYLE_LATIN( s, S, c2cp, C2CP, ds, \ - "petite capitals from capitals", \ - PETITE_CAPITALS_FROM_CAPITALS ) \ - STYLE_LATIN( s, S, c2sc, C2SC, ds, \ - "small capitals from capitals", \ - SMALL_CAPITALS_FROM_CAPITALS ) \ - STYLE_LATIN( s, S, ordn, ORDN, ds, \ - "ordinals", \ - ORDINALS ) \ - STYLE_LATIN( s, S, pcap, PCAP, ds, \ - "petite capitals", \ - PETITE_CAPITALS ) \ - STYLE_LATIN( s, S, sinf, SINF, ds, \ - "scientific inferiors", \ - SCIENTIFIC_INFERIORS ) \ - STYLE_LATIN( s, S, smcp, SMCP, ds, \ - "small capitals", \ - SMALL_CAPITALS ) \ - STYLE_LATIN( s, S, subs, SUBS, ds, \ - "subscript", \ - SUBSCRIPT ) \ - STYLE_LATIN( s, S, sups, SUPS, ds, \ - "superscript", \ - SUPERSCRIPT ) \ - STYLE_LATIN( s, S, titl, TITL, ds, \ - "titling", \ - TITLING ) \ - STYLE_LATIN( s, S, dflt, DFLT, ds, \ - "default", \ - DEFAULT ) - - - STYLE( adlm_dflt, ADLM_DFLT, - "Adlam default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_ADLM, - AF_BLUE_STRINGSET_ADLM, - AF_COVERAGE_DEFAULT ) - - STYLE( arab_dflt, ARAB_DFLT, - "Arabic default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_ARAB, - AF_BLUE_STRINGSET_ARAB, - AF_COVERAGE_DEFAULT ) - - STYLE( armn_dflt, ARMN_DFLT, - "Armenian default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_ARMN, - AF_BLUE_STRINGSET_ARMN, - AF_COVERAGE_DEFAULT ) - - STYLE( avst_dflt, AVST_DFLT, - "Avestan default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_AVST, - AF_BLUE_STRINGSET_AVST, - AF_COVERAGE_DEFAULT ) - - STYLE( bamu_dflt, BAMU_DFLT, - "Bamum default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_BAMU, - AF_BLUE_STRINGSET_BAMU, - AF_COVERAGE_DEFAULT ) - - STYLE( beng_dflt, BENG_DFLT, - "Bengali default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_BENG, - AF_BLUE_STRINGSET_BENG, - AF_COVERAGE_DEFAULT ) - - STYLE( buhd_dflt, BUHD_DFLT, - "Buhid default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_BUHD, - AF_BLUE_STRINGSET_BUHD, - AF_COVERAGE_DEFAULT ) - - STYLE( cakm_dflt, CAKM_DFLT, - "Chakma default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_CAKM, - AF_BLUE_STRINGSET_CAKM, - AF_COVERAGE_DEFAULT ) - - STYLE( cans_dflt, CANS_DFLT, - "Canadian Syllabics default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_CANS, - AF_BLUE_STRINGSET_CANS, - AF_COVERAGE_DEFAULT ) - - STYLE( cari_dflt, CARI_DFLT, - "Carian default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_CARI, - AF_BLUE_STRINGSET_CARI, - AF_COVERAGE_DEFAULT ) - - STYLE( cher_dflt, CHER_DFLT, - "Cherokee default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_CHER, - AF_BLUE_STRINGSET_CHER, - AF_COVERAGE_DEFAULT ) - - STYLE( copt_dflt, COPT_DFLT, - "Coptic default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_COPT, - AF_BLUE_STRINGSET_COPT, - AF_COVERAGE_DEFAULT ) - - STYLE( cprt_dflt, CPRT_DFLT, - "Cypriot default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_CPRT, - AF_BLUE_STRINGSET_CPRT, - AF_COVERAGE_DEFAULT ) - - META_STYLE_LATIN( cyrl, CYRL, "Cyrillic" ) - - STYLE( deva_dflt, DEVA_DFLT, - "Devanagari default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_DEVA, - AF_BLUE_STRINGSET_DEVA, - AF_COVERAGE_DEFAULT ) - - STYLE( dsrt_dflt, DSRT_DFLT, - "Deseret default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_DSRT, - AF_BLUE_STRINGSET_DSRT, - AF_COVERAGE_DEFAULT ) - - STYLE( ethi_dflt, ETHI_DFLT, - "Ethiopic default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_ETHI, - AF_BLUE_STRINGSET_ETHI, - AF_COVERAGE_DEFAULT ) - - STYLE( geor_dflt, GEOR_DFLT, - "Georgian (Mkhedruli) default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_GEOR, - AF_BLUE_STRINGSET_GEOR, - AF_COVERAGE_DEFAULT ) - - STYLE( geok_dflt, GEOK_DFLT, - "Georgian (Khutsuri) default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_GEOK, - AF_BLUE_STRINGSET_GEOK, - AF_COVERAGE_DEFAULT ) - - STYLE( glag_dflt, GLAG_DFLT, - "Glagolitic default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_GLAG, - AF_BLUE_STRINGSET_GLAG, - AF_COVERAGE_DEFAULT ) - - STYLE( goth_dflt, GOTH_DFLT, - "Gothic default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_GOTH, - AF_BLUE_STRINGSET_GOTH, - AF_COVERAGE_DEFAULT ) - - META_STYLE_LATIN( grek, GREK, "Greek" ) - - STYLE( gujr_dflt, GUJR_DFLT, - "Gujarati default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_GUJR, - AF_BLUE_STRINGSET_GUJR, - AF_COVERAGE_DEFAULT ) - - STYLE( guru_dflt, GURU_DFLT, - "Gurmukhi default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_GURU, - AF_BLUE_STRINGSET_GURU, - AF_COVERAGE_DEFAULT ) - - STYLE( hebr_dflt, HEBR_DFLT, - "Hebrew default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_HEBR, - AF_BLUE_STRINGSET_HEBR, - AF_COVERAGE_DEFAULT ) - - STYLE( kali_dflt, KALI_DFLT, - "Kayah Li default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_KALI, - AF_BLUE_STRINGSET_KALI, - AF_COVERAGE_DEFAULT ) - - STYLE( khmr_dflt, KHMR_DFLT, - "Khmer default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_KHMR, - AF_BLUE_STRINGSET_KHMR, - AF_COVERAGE_DEFAULT ) - - STYLE( khms_dflt, KHMS_DFLT, - "Khmer Symbols default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_KHMS, - AF_BLUE_STRINGSET_KHMS, - AF_COVERAGE_DEFAULT ) - - STYLE( knda_dflt, KNDA_DFLT, - "Kannada default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_KNDA, - AF_BLUE_STRINGSET_KNDA, - AF_COVERAGE_DEFAULT ) - - STYLE( lao_dflt, LAO_DFLT, - "Lao default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_LAO, - AF_BLUE_STRINGSET_LAO, - AF_COVERAGE_DEFAULT ) - - META_STYLE_LATIN( latn, LATN, "Latin" ) - - STYLE( latb_dflt, LATB_DFLT, - "Latin subscript fallback default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_LATB, - AF_BLUE_STRINGSET_LATB, - AF_COVERAGE_DEFAULT ) - - STYLE( latp_dflt, LATP_DFLT, - "Latin superscript fallback default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_LATP, - AF_BLUE_STRINGSET_LATP, - AF_COVERAGE_DEFAULT ) - -#ifdef FT_OPTION_AUTOFIT2 - STYLE( ltn2_dflt, LTN2_DFLT, - "Latin 2 default style", - AF_WRITING_SYSTEM_LATIN2, - AF_SCRIPT_LATN, - AF_BLUE_STRINGSET_LATN, - AF_COVERAGE_DEFAULT ) -#endif - - STYLE( lisu_dflt, LISU_DFLT, - "Lisu default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_LISU, - AF_BLUE_STRINGSET_LISU, - AF_COVERAGE_DEFAULT ) - - STYLE( mlym_dflt, MLYM_DFLT, - "Malayalam default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_MLYM, - AF_BLUE_STRINGSET_MLYM, - AF_COVERAGE_DEFAULT ) - - STYLE( mymr_dflt, MYMR_DFLT, - "Myanmar default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_MYMR, - AF_BLUE_STRINGSET_MYMR, - AF_COVERAGE_DEFAULT ) - - STYLE( nkoo_dflt, NKOO_DFLT, - "N'Ko default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_NKOO, - AF_BLUE_STRINGSET_NKOO, - AF_COVERAGE_DEFAULT ) - - STYLE( none_dflt, NONE_DFLT, - "no style", - AF_WRITING_SYSTEM_DUMMY, - AF_SCRIPT_NONE, - AF_BLUE_STRINGSET_NONE, - AF_COVERAGE_DEFAULT ) - - STYLE( olck_dflt, OLCK_DFLT, - "Ol Chiki default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_OLCK, - AF_BLUE_STRINGSET_OLCK, - AF_COVERAGE_DEFAULT ) - - STYLE( orkh_dflt, ORKH_DFLT, - "Old Turkic default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_ORKH, - AF_BLUE_STRINGSET_ORKH, - AF_COVERAGE_DEFAULT ) - - STYLE( osge_dflt, OSGE_DFLT, - "Osage default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_OSGE, - AF_BLUE_STRINGSET_OSGE, - AF_COVERAGE_DEFAULT ) - - STYLE( osma_dflt, OSMA_DFLT, - "Osmanya default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_OSMA, - AF_BLUE_STRINGSET_OSMA, - AF_COVERAGE_DEFAULT ) - - STYLE( saur_dflt, SAUR_DFLT, - "Saurashtra default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_SAUR, - AF_BLUE_STRINGSET_SAUR, - AF_COVERAGE_DEFAULT ) - - STYLE( shaw_dflt, SHAW_DFLT, - "Shavian default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_SHAW, - AF_BLUE_STRINGSET_SHAW, - AF_COVERAGE_DEFAULT ) - - STYLE( sinh_dflt, SINH_DFLT, - "Sinhala default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_SINH, - AF_BLUE_STRINGSET_SINH, - AF_COVERAGE_DEFAULT ) - - STYLE( sund_dflt, SUND_DFLT, - "Sundanese default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_SUND, - AF_BLUE_STRINGSET_SUND, - AF_COVERAGE_DEFAULT ) - - STYLE( taml_dflt, TAML_DFLT, - "Tamil default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_TAML, - AF_BLUE_STRINGSET_TAML, - AF_COVERAGE_DEFAULT ) - - STYLE( tavt_dflt, TAVT_DFLT, - "Tai Viet default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_TAVT, - AF_BLUE_STRINGSET_TAVT, - AF_COVERAGE_DEFAULT ) - - STYLE( telu_dflt, TELU_DFLT, - "Telugu default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_TELU, - AF_BLUE_STRINGSET_TELU, - AF_COVERAGE_DEFAULT ) - - STYLE( tfng_dflt, TFNG_DFLT, - "Tifinagh default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_TFNG, - AF_BLUE_STRINGSET_TFNG, - AF_COVERAGE_DEFAULT ) - - STYLE( thai_dflt, THAI_DFLT, - "Thai default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_THAI, - AF_BLUE_STRINGSET_THAI, - AF_COVERAGE_DEFAULT ) - - STYLE( vaii_dflt, VAII_DFLT, - "Vai default style", - AF_WRITING_SYSTEM_LATIN, - AF_SCRIPT_VAII, - AF_BLUE_STRINGSET_VAII, - AF_COVERAGE_DEFAULT ) - -#ifdef AF_CONFIG_OPTION_INDIC - - /* no blue stringset support for the Indic writing system yet */ -#undef STYLE_DEFAULT_INDIC -#define STYLE_DEFAULT_INDIC( s, S, d ) \ - STYLE( s ## _dflt, S ## _DFLT, \ - d " default style", \ - AF_WRITING_SYSTEM_INDIC, \ - AF_SCRIPT_ ## S, \ - (AF_Blue_Stringset)0, \ - AF_COVERAGE_DEFAULT ) - - STYLE_DEFAULT_INDIC( limb, LIMB, "Limbu" ) - STYLE_DEFAULT_INDIC( orya, ORYA, "Oriya" ) - STYLE_DEFAULT_INDIC( sylo, SYLO, "Syloti Nagri" ) - STYLE_DEFAULT_INDIC( tibt, TIBT, "Tibetan" ) - -#endif /* AF_CONFIG_OPTION_INDIC */ - -#ifdef AF_CONFIG_OPTION_CJK - - STYLE( hani_dflt, HANI_DFLT, - "CJKV ideographs default style", - AF_WRITING_SYSTEM_CJK, - AF_SCRIPT_HANI, - AF_BLUE_STRINGSET_HANI, - AF_COVERAGE_DEFAULT ) - -#endif /* AF_CONFIG_OPTION_CJK */ - - -/* END */ diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/src/base/fthash.c b/extensions/gdx-freetype/jni/freetype-2.9.1/src/base/fthash.c deleted file mode 100644 index 21bc8dd5b..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/src/base/fthash.c +++ /dev/null @@ -1,339 +0,0 @@ -/***************************************************************************/ -/* */ -/* fthash.c */ -/* */ -/* Hashing functions (body). */ -/* */ -/***************************************************************************/ - -/* - * Copyright 2000 Computing Research Labs, New Mexico State University - * Copyright 2001-2015 - * Francesco Zappa Nardelli - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT - * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - /*************************************************************************/ - /* */ - /* This file is based on code from bdf.c,v 1.22 2000/03/16 20:08:50 */ - /* */ - /* taken from Mark Leisher's xmbdfed package */ - /* */ - /*************************************************************************/ - - -#include <ft2build.h> -#include FT_INTERNAL_HASH_H -#include FT_INTERNAL_MEMORY_H - - -#define INITIAL_HT_SIZE 241 - - - static FT_ULong - hash_str_lookup( FT_Hashkey* key ) - { - const char* kp = key->str; - FT_ULong res = 0; - - - /* Mocklisp hash function. */ - while ( *kp ) - res = ( res << 5 ) - res + (FT_ULong)*kp++; - - return res; - } - - - static FT_ULong - hash_num_lookup( FT_Hashkey* key ) - { - FT_ULong num = (FT_ULong)key->num; - FT_ULong res; - - - /* Mocklisp hash function. */ - res = num & 0xFF; - res = ( res << 5 ) - res + ( ( num >> 8 ) & 0xFF ); - res = ( res << 5 ) - res + ( ( num >> 16 ) & 0xFF ); - res = ( res << 5 ) - res + ( ( num >> 24 ) & 0xFF ); - - return res; - } - - - static FT_Bool - hash_str_compare( FT_Hashkey* a, - FT_Hashkey* b ) - { - if ( a->str[0] == b->str[0] && - ft_strcmp( a->str, b->str ) == 0 ) - return 1; - - return 0; - } - - - static FT_Bool - hash_num_compare( FT_Hashkey* a, - FT_Hashkey* b ) - { - if ( a->num == b->num ) - return 1; - - return 0; - } - - - static FT_Hashnode* - hash_bucket( FT_Hashkey key, - FT_Hash hash ) - { - FT_ULong res = 0; - FT_Hashnode* bp = hash->table; - FT_Hashnode* ndp; - - - res = (hash->lookup)( &key ); - - ndp = bp + ( res % hash->size ); - while ( *ndp ) - { - if ( (hash->compare)( &(*ndp)->key, &key ) ) - break; - - ndp--; - if ( ndp < bp ) - ndp = bp + ( hash->size - 1 ); - } - - return ndp; - } - - - static FT_Error - hash_rehash( FT_Hash hash, - FT_Memory memory ) - { - FT_Hashnode* obp = hash->table; - FT_Hashnode* bp; - FT_Hashnode* nbp; - - FT_UInt i, sz = hash->size; - FT_Error error = FT_Err_Ok; - - - hash->size <<= 1; - hash->limit = hash->size / 3; - - if ( FT_NEW_ARRAY( hash->table, hash->size ) ) - goto Exit; - - for ( i = 0, bp = obp; i < sz; i++, bp++ ) - { - if ( *bp ) - { - nbp = hash_bucket( (*bp)->key, hash ); - *nbp = *bp; - } - } - - FT_FREE( obp ); - - Exit: - return error; - } - - - static FT_Error - hash_init( FT_Hash hash, - FT_Bool is_num, - FT_Memory memory ) - { - FT_UInt sz = INITIAL_HT_SIZE; - FT_Error error; - - - hash->size = sz; - hash->limit = sz / 3; - hash->used = 0; - - if ( is_num ) - { - hash->lookup = hash_num_lookup; - hash->compare = hash_num_compare; - } - else - { - hash->lookup = hash_str_lookup; - hash->compare = hash_str_compare; - } - - FT_MEM_NEW_ARRAY( hash->table, sz ); - - return error; - } - - - FT_Error - ft_hash_str_init( FT_Hash hash, - FT_Memory memory ) - { - return hash_init( hash, 0, memory ); - } - - - FT_Error - ft_hash_num_init( FT_Hash hash, - FT_Memory memory ) - { - return hash_init( hash, 1, memory ); - } - - - void - ft_hash_str_free( FT_Hash hash, - FT_Memory memory ) - { - if ( hash ) - { - FT_UInt sz = hash->size; - FT_Hashnode* bp = hash->table; - FT_UInt i; - - - for ( i = 0; i < sz; i++, bp++ ) - FT_FREE( *bp ); - - FT_FREE( hash->table ); - } - } - - - /* `ft_hash_num_free' is the same as `ft_hash_str_free' */ - - - static FT_Error - hash_insert( FT_Hashkey key, - size_t data, - FT_Hash hash, - FT_Memory memory ) - { - FT_Hashnode nn; - FT_Hashnode* bp = hash_bucket( key, hash ); - FT_Error error = FT_Err_Ok; - - - nn = *bp; - if ( !nn ) - { - if ( FT_NEW( nn ) ) - goto Exit; - *bp = nn; - - nn->key = key; - nn->data = data; - - if ( hash->used >= hash->limit ) - { - error = hash_rehash( hash, memory ); - if ( error ) - goto Exit; - } - - hash->used++; - } - else - nn->data = data; - - Exit: - return error; - } - - - FT_Error - ft_hash_str_insert( const char* key, - size_t data, - FT_Hash hash, - FT_Memory memory ) - { - FT_Hashkey hk; - - - hk.str = key; - - return hash_insert( hk, data, hash, memory ); - } - - - FT_Error - ft_hash_num_insert( FT_Int num, - size_t data, - FT_Hash hash, - FT_Memory memory ) - { - FT_Hashkey hk; - - - hk.num = num; - - return hash_insert( hk, data, hash, memory ); - } - - - static size_t* - hash_lookup( FT_Hashkey key, - FT_Hash hash ) - { - FT_Hashnode* np = hash_bucket( key, hash ); - - - return (*np) ? &(*np)->data - : NULL; - } - - - size_t* - ft_hash_str_lookup( const char* key, - FT_Hash hash ) - { - FT_Hashkey hk; - - - hk.str = key; - - return hash_lookup( hk, hash ); - } - - - size_t* - ft_hash_num_lookup( FT_Int num, - FT_Hash hash ) - { - FT_Hashkey hk; - - - hk.num = num; - - return hash_lookup( hk, hash ); - } - - -/* END */ diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/src/base/ftlcdfil.c b/extensions/gdx-freetype/jni/freetype-2.9.1/src/base/ftlcdfil.c deleted file mode 100644 index 8d314df08..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/src/base/ftlcdfil.c +++ /dev/null @@ -1,383 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftlcdfil.c */ -/* */ -/* FreeType API for color filtering of subpixel bitmap glyphs (body). */ -/* */ -/* Copyright 2006-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#include <ft2build.h> -#include FT_INTERNAL_DEBUG_H - -#include FT_LCD_FILTER_H -#include FT_IMAGE_H -#include FT_INTERNAL_OBJECTS_H - - -#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING - -/* define USE_LEGACY to implement the legacy filter */ -#define USE_LEGACY - -#define FT_SHIFTCLAMP( x ) ( x >>= 8, (FT_Byte)( x > 255 ? 255 : x ) ) - - - /* add padding according to filter weights */ - FT_BASE_DEF (void) - ft_lcd_padding( FT_Pos* Min, - FT_Pos* Max, - FT_GlyphSlot slot ) - { - FT_Byte* lcd_weights; - FT_Bitmap_LcdFilterFunc lcd_filter_func; - - - /* Per-face LCD filtering takes priority if set up. */ - if ( slot->face && slot->face->internal->lcd_filter_func ) - { - lcd_weights = slot->face->internal->lcd_weights; - lcd_filter_func = slot->face->internal->lcd_filter_func; - } - else - { - lcd_weights = slot->library->lcd_weights; - lcd_filter_func = slot->library->lcd_filter_func; - } - - if ( lcd_filter_func == ft_lcd_filter_fir ) - { - *Min -= lcd_weights[0] ? 43 : - lcd_weights[1] ? 22 : 0; - *Max += lcd_weights[4] ? 43 : - lcd_weights[3] ? 22 : 0; - } - } - - - /* FIR filter used by the default and light filters */ - FT_BASE_DEF( void ) - ft_lcd_filter_fir( FT_Bitmap* bitmap, - FT_Render_Mode mode, - FT_LcdFiveTapFilter weights ) - { - FT_UInt width = (FT_UInt)bitmap->width; - FT_UInt height = (FT_UInt)bitmap->rows; - FT_Int pitch = bitmap->pitch; - FT_Byte* origin = bitmap->buffer; - - - /* take care of bitmap flow */ - if ( pitch > 0 && height > 0 ) - origin += pitch * (FT_Int)( height - 1 ); - - /* horizontal in-place FIR filter */ - if ( mode == FT_RENDER_MODE_LCD && width >= 2 ) - { - FT_Byte* line = origin; - - - /* `fir' must be at least 32 bit wide, since the sum of */ - /* the values in `weights' can exceed 0xFF */ - - for ( ; height > 0; height--, line -= pitch ) - { - FT_UInt fir[5]; - FT_UInt val, xx; - - - val = line[0]; - fir[2] = weights[2] * val; - fir[3] = weights[3] * val; - fir[4] = weights[4] * val; - - val = line[1]; - fir[1] = fir[2] + weights[1] * val; - fir[2] = fir[3] + weights[2] * val; - fir[3] = fir[4] + weights[3] * val; - fir[4] = weights[4] * val; - - for ( xx = 2; xx < width; xx++ ) - { - val = line[xx]; - fir[0] = fir[1] + weights[0] * val; - fir[1] = fir[2] + weights[1] * val; - fir[2] = fir[3] + weights[2] * val; - fir[3] = fir[4] + weights[3] * val; - fir[4] = weights[4] * val; - - line[xx - 2] = FT_SHIFTCLAMP( fir[0] ); - } - - line[xx - 2] = FT_SHIFTCLAMP( fir[1] ); - line[xx - 1] = FT_SHIFTCLAMP( fir[2] ); - } - } - - /* vertical in-place FIR filter */ - else if ( mode == FT_RENDER_MODE_LCD_V && height >= 2 ) - { - FT_Byte* column = origin; - - - for ( ; width > 0; width--, column++ ) - { - FT_Byte* col = column; - FT_UInt fir[5]; - FT_UInt val, yy; - - - val = col[0]; - fir[2] = weights[2] * val; - fir[3] = weights[3] * val; - fir[4] = weights[4] * val; - col -= pitch; - - val = col[0]; - fir[1] = fir[2] + weights[1] * val; - fir[2] = fir[3] + weights[2] * val; - fir[3] = fir[4] + weights[3] * val; - fir[4] = weights[4] * val; - col -= pitch; - - for ( yy = 2; yy < height; yy++, col -= pitch ) - { - val = col[0]; - fir[0] = fir[1] + weights[0] * val; - fir[1] = fir[2] + weights[1] * val; - fir[2] = fir[3] + weights[2] * val; - fir[3] = fir[4] + weights[3] * val; - fir[4] = weights[4] * val; - - col[pitch * 2] = FT_SHIFTCLAMP( fir[0] ); - } - - col[pitch * 2] = FT_SHIFTCLAMP( fir[1] ); - col[pitch] = FT_SHIFTCLAMP( fir[2] ); - } - } - } - - -#ifdef USE_LEGACY - - /* intra-pixel filter used by the legacy filter */ - static void - _ft_lcd_filter_legacy( FT_Bitmap* bitmap, - FT_Render_Mode mode, - FT_Byte* weights ) - { - FT_UInt width = (FT_UInt)bitmap->width; - FT_UInt height = (FT_UInt)bitmap->rows; - FT_Int pitch = bitmap->pitch; - FT_Byte* origin = bitmap->buffer; - - static const unsigned int filters[3][3] = - { - { 65538 * 9/13, 65538 * 1/6, 65538 * 1/13 }, - { 65538 * 3/13, 65538 * 4/6, 65538 * 3/13 }, - { 65538 * 1/13, 65538 * 1/6, 65538 * 9/13 } - }; - - FT_UNUSED( weights ); - - - /* take care of bitmap flow */ - if ( pitch > 0 && height > 0 ) - origin += pitch * (FT_Int)( height - 1 ); - - /* horizontal in-place intra-pixel filter */ - if ( mode == FT_RENDER_MODE_LCD && width >= 3 ) - { - FT_Byte* line = origin; - - - for ( ; height > 0; height--, line -= pitch ) - { - FT_UInt xx; - - - for ( xx = 0; xx < width; xx += 3 ) - { - FT_UInt r, g, b; - FT_UInt p; - - - p = line[xx]; - r = filters[0][0] * p; - g = filters[0][1] * p; - b = filters[0][2] * p; - - p = line[xx + 1]; - r += filters[1][0] * p; - g += filters[1][1] * p; - b += filters[1][2] * p; - - p = line[xx + 2]; - r += filters[2][0] * p; - g += filters[2][1] * p; - b += filters[2][2] * p; - - line[xx] = (FT_Byte)( r / 65536 ); - line[xx + 1] = (FT_Byte)( g / 65536 ); - line[xx + 2] = (FT_Byte)( b / 65536 ); - } - } - } - else if ( mode == FT_RENDER_MODE_LCD_V && height >= 3 ) - { - FT_Byte* column = origin; - - - for ( ; width > 0; width--, column++ ) - { - FT_Byte* col = column - 2 * pitch; - - - for ( ; height > 0; height -= 3, col -= 3 * pitch ) - { - FT_UInt r, g, b; - FT_UInt p; - - - p = col[0]; - r = filters[0][0] * p; - g = filters[0][1] * p; - b = filters[0][2] * p; - - p = col[pitch]; - r += filters[1][0] * p; - g += filters[1][1] * p; - b += filters[1][2] * p; - - p = col[pitch * 2]; - r += filters[2][0] * p; - g += filters[2][1] * p; - b += filters[2][2] * p; - - col[0] = (FT_Byte)( r / 65536 ); - col[pitch] = (FT_Byte)( g / 65536 ); - col[pitch * 2] = (FT_Byte)( b / 65536 ); - } - } - } - } - -#endif /* USE_LEGACY */ - - - FT_EXPORT_DEF( FT_Error ) - FT_Library_SetLcdFilterWeights( FT_Library library, - unsigned char *weights ) - { - if ( !library ) - return FT_THROW( Invalid_Library_Handle ); - - if ( !weights ) - return FT_THROW( Invalid_Argument ); - - ft_memcpy( library->lcd_weights, weights, FT_LCD_FILTER_FIVE_TAPS ); - library->lcd_filter_func = ft_lcd_filter_fir; - - return FT_Err_Ok; - } - - - FT_EXPORT_DEF( FT_Error ) - FT_Library_SetLcdFilter( FT_Library library, - FT_LcdFilter filter ) - { - static const FT_LcdFiveTapFilter default_weights = - { 0x08, 0x4d, 0x56, 0x4d, 0x08 }; - static const FT_LcdFiveTapFilter light_weights = - { 0x00, 0x55, 0x56, 0x55, 0x00 }; - - - if ( !library ) - return FT_THROW( Invalid_Library_Handle ); - - switch ( filter ) - { - case FT_LCD_FILTER_NONE: - library->lcd_filter_func = NULL; - break; - - case FT_LCD_FILTER_DEFAULT: - ft_memcpy( library->lcd_weights, - default_weights, - FT_LCD_FILTER_FIVE_TAPS ); - library->lcd_filter_func = ft_lcd_filter_fir; - break; - - case FT_LCD_FILTER_LIGHT: - ft_memcpy( library->lcd_weights, - light_weights, - FT_LCD_FILTER_FIVE_TAPS ); - library->lcd_filter_func = ft_lcd_filter_fir; - break; - -#ifdef USE_LEGACY - - case FT_LCD_FILTER_LEGACY: - case FT_LCD_FILTER_LEGACY1: - library->lcd_filter_func = _ft_lcd_filter_legacy; - break; - -#endif - - default: - return FT_THROW( Invalid_Argument ); - } - - return FT_Err_Ok; - } - -#else /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ - - /* add padding according to accommodate outline shifts */ - FT_BASE_DEF (void) - ft_lcd_padding( FT_Pos* Min, - FT_Pos* Max, - FT_GlyphSlot slot ) - { - FT_UNUSED( slot ); - - *Min -= 21; - *Max += 21; - } - - - FT_EXPORT_DEF( FT_Error ) - FT_Library_SetLcdFilterWeights( FT_Library library, - unsigned char *weights ) - { - FT_UNUSED( library ); - FT_UNUSED( weights ); - - return FT_THROW( Unimplemented_Feature ); - } - - - FT_EXPORT_DEF( FT_Error ) - FT_Library_SetLcdFilter( FT_Library library, - FT_LcdFilter filter ) - { - FT_UNUSED( library ); - FT_UNUSED( filter ); - - return FT_THROW( Unimplemented_Feature ); - } - -#endif /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ - - -/* END */ diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/src/base/ftmm.c b/extensions/gdx-freetype/jni/freetype-2.9.1/src/base/ftmm.c deleted file mode 100644 index 800441bca..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/src/base/ftmm.c +++ /dev/null @@ -1,508 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftmm.c */ -/* */ -/* Multiple Master font support (body). */ -/* */ -/* Copyright 1996-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#include <ft2build.h> -#include FT_INTERNAL_DEBUG_H - -#include FT_MULTIPLE_MASTERS_H -#include FT_INTERNAL_OBJECTS_H -#include FT_SERVICE_MULTIPLE_MASTERS_H -#include FT_SERVICE_METRICS_VARIATIONS_H - - - /*************************************************************************/ - /* */ - /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ - /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */ - /* messages during execution. */ - /* */ -#undef FT_COMPONENT -#define FT_COMPONENT trace_mm - - - static FT_Error - ft_face_get_mm_service( FT_Face face, - FT_Service_MultiMasters *aservice ) - { - FT_Error error; - - - *aservice = NULL; - - if ( !face ) - return FT_THROW( Invalid_Face_Handle ); - - error = FT_ERR( Invalid_Argument ); - - if ( FT_HAS_MULTIPLE_MASTERS( face ) ) - { - FT_FACE_LOOKUP_SERVICE( face, - *aservice, - MULTI_MASTERS ); - - if ( *aservice ) - error = FT_Err_Ok; - } - - return error; - } - - - static FT_Error - ft_face_get_mvar_service( FT_Face face, - FT_Service_MetricsVariations *aservice ) - { - FT_Error error; - - - *aservice = NULL; - - if ( !face ) - return FT_THROW( Invalid_Face_Handle ); - - error = FT_ERR( Invalid_Argument ); - - if ( FT_HAS_MULTIPLE_MASTERS( face ) ) - { - FT_FACE_LOOKUP_SERVICE( face, - *aservice, - METRICS_VARIATIONS ); - - if ( *aservice ) - error = FT_Err_Ok; - } - - return error; - } - - - /* documentation is in ftmm.h */ - - FT_EXPORT_DEF( FT_Error ) - FT_Get_Multi_Master( FT_Face face, - FT_Multi_Master *amaster ) - { - FT_Error error; - FT_Service_MultiMasters service; - - - /* check of `face' delayed to `ft_face_get_mm_service' */ - - if ( !amaster ) - return FT_THROW( Invalid_Argument ); - - error = ft_face_get_mm_service( face, &service ); - if ( !error ) - { - error = FT_ERR( Invalid_Argument ); - if ( service->get_mm ) - error = service->get_mm( face, amaster ); - } - - return error; - } - - - /* documentation is in ftmm.h */ - - FT_EXPORT_DEF( FT_Error ) - FT_Get_MM_Var( FT_Face face, - FT_MM_Var* *amaster ) - { - FT_Error error; - FT_Service_MultiMasters service; - - - /* check of `face' delayed to `ft_face_get_mm_service' */ - - if ( !amaster ) - return FT_THROW( Invalid_Argument ); - - error = ft_face_get_mm_service( face, &service ); - if ( !error ) - { - error = FT_ERR( Invalid_Argument ); - if ( service->get_mm_var ) - error = service->get_mm_var( face, amaster ); - } - - return error; - } - - - /* documentation is in ftmm.h */ - - FT_EXPORT_DEF( FT_Error ) - FT_Done_MM_Var( FT_Library library, - FT_MM_Var* amaster ) - { - FT_Memory memory; - - - if ( !library ) - return FT_THROW( Invalid_Library_Handle ); - - memory = library->memory; - FT_FREE( amaster ); - - return FT_Err_Ok; - } - - - /* documentation is in ftmm.h */ - - FT_EXPORT_DEF( FT_Error ) - FT_Set_MM_Design_Coordinates( FT_Face face, - FT_UInt num_coords, - FT_Long* coords ) - { - FT_Error error; - FT_Service_MultiMasters service; - - - /* check of `face' delayed to `ft_face_get_mm_service' */ - - if ( num_coords && !coords ) - return FT_THROW( Invalid_Argument ); - - error = ft_face_get_mm_service( face, &service ); - if ( !error ) - { - error = FT_ERR( Invalid_Argument ); - if ( service->set_mm_design ) - error = service->set_mm_design( face, num_coords, coords ); - } - - /* enforce recomputation of auto-hinting data */ - if ( !error && face->autohint.finalizer ) - { - face->autohint.finalizer( face->autohint.data ); - face->autohint.data = NULL; - } - - return error; - } - - - /* documentation is in ftmm.h */ - - FT_EXPORT_DEF( FT_Error ) - FT_Set_Var_Design_Coordinates( FT_Face face, - FT_UInt num_coords, - FT_Fixed* coords ) - { - FT_Error error; - FT_Service_MultiMasters service_mm = NULL; - FT_Service_MetricsVariations service_mvar = NULL; - - - /* check of `face' delayed to `ft_face_get_mm_service' */ - - if ( num_coords && !coords ) - return FT_THROW( Invalid_Argument ); - - error = ft_face_get_mm_service( face, &service_mm ); - if ( !error ) - { - error = FT_ERR( Invalid_Argument ); - if ( service_mm->set_var_design ) - error = service_mm->set_var_design( face, num_coords, coords ); - - /* internal error code -1 means `no change'; we can exit immediately */ - if ( error == -1 ) - return FT_Err_Ok; - } - - if ( !error ) - { - (void)ft_face_get_mvar_service( face, &service_mvar ); - - if ( service_mvar && service_mvar->metrics_adjust ) - service_mvar->metrics_adjust( face ); - } - - /* enforce recomputation of auto-hinting data */ - if ( !error && face->autohint.finalizer ) - { - face->autohint.finalizer( face->autohint.data ); - face->autohint.data = NULL; - } - - return error; - } - - - /* documentation is in ftmm.h */ - - FT_EXPORT_DEF( FT_Error ) - FT_Get_Var_Design_Coordinates( FT_Face face, - FT_UInt num_coords, - FT_Fixed* coords ) - { - FT_Error error; - FT_Service_MultiMasters service; - - - /* check of `face' delayed to `ft_face_get_mm_service' */ - - if ( !coords ) - return FT_THROW( Invalid_Argument ); - - error = ft_face_get_mm_service( face, &service ); - if ( !error ) - { - error = FT_ERR( Invalid_Argument ); - if ( service->get_var_design ) - error = service->get_var_design( face, num_coords, coords ); - } - - return error; - } - - - /* documentation is in ftmm.h */ - - FT_EXPORT_DEF( FT_Error ) - FT_Set_MM_Blend_Coordinates( FT_Face face, - FT_UInt num_coords, - FT_Fixed* coords ) - { - FT_Error error; - FT_Service_MultiMasters service_mm = NULL; - FT_Service_MetricsVariations service_mvar = NULL; - - - /* check of `face' delayed to `ft_face_get_mm_service' */ - - if ( num_coords && !coords ) - return FT_THROW( Invalid_Argument ); - - error = ft_face_get_mm_service( face, &service_mm ); - if ( !error ) - { - error = FT_ERR( Invalid_Argument ); - if ( service_mm->set_mm_blend ) - error = service_mm->set_mm_blend( face, num_coords, coords ); - - /* internal error code -1 means `no change'; we can exit immediately */ - if ( error == -1 ) - return FT_Err_Ok; - } - - if ( !error ) - { - (void)ft_face_get_mvar_service( face, &service_mvar ); - - if ( service_mvar && service_mvar->metrics_adjust ) - service_mvar->metrics_adjust( face ); - } - - /* enforce recomputation of auto-hinting data */ - if ( !error && face->autohint.finalizer ) - { - face->autohint.finalizer( face->autohint.data ); - face->autohint.data = NULL; - } - - return error; - } - - - /* documentation is in ftmm.h */ - - /* This is exactly the same as the previous function. It exists for */ - /* orthogonality. */ - - FT_EXPORT_DEF( FT_Error ) - FT_Set_Var_Blend_Coordinates( FT_Face face, - FT_UInt num_coords, - FT_Fixed* coords ) - { - FT_Error error; - FT_Service_MultiMasters service_mm = NULL; - FT_Service_MetricsVariations service_mvar = NULL; - - - /* check of `face' delayed to `ft_face_get_mm_service' */ - - if ( num_coords && !coords ) - return FT_THROW( Invalid_Argument ); - - error = ft_face_get_mm_service( face, &service_mm ); - if ( !error ) - { - error = FT_ERR( Invalid_Argument ); - if ( service_mm->set_mm_blend ) - error = service_mm->set_mm_blend( face, num_coords, coords ); - - /* internal error code -1 means `no change'; we can exit immediately */ - if ( error == -1 ) - return FT_Err_Ok; - } - - if ( !error ) - { - (void)ft_face_get_mvar_service( face, &service_mvar ); - - if ( service_mvar && service_mvar->metrics_adjust ) - service_mvar->metrics_adjust( face ); - } - - /* enforce recomputation of auto-hinting data */ - if ( !error && face->autohint.finalizer ) - { - face->autohint.finalizer( face->autohint.data ); - face->autohint.data = NULL; - } - - return error; - } - - - /* documentation is in ftmm.h */ - - FT_EXPORT_DEF( FT_Error ) - FT_Get_MM_Blend_Coordinates( FT_Face face, - FT_UInt num_coords, - FT_Fixed* coords ) - { - FT_Error error; - FT_Service_MultiMasters service; - - - /* check of `face' delayed to `ft_face_get_mm_service' */ - - if ( !coords ) - return FT_THROW( Invalid_Argument ); - - error = ft_face_get_mm_service( face, &service ); - if ( !error ) - { - error = FT_ERR( Invalid_Argument ); - if ( service->get_mm_blend ) - error = service->get_mm_blend( face, num_coords, coords ); - } - - return error; - } - - - /* documentation is in ftmm.h */ - - /* This is exactly the same as the previous function. It exists for */ - /* orthogonality. */ - - FT_EXPORT_DEF( FT_Error ) - FT_Get_Var_Blend_Coordinates( FT_Face face, - FT_UInt num_coords, - FT_Fixed* coords ) - { - FT_Error error; - FT_Service_MultiMasters service; - - - /* check of `face' delayed to `ft_face_get_mm_service' */ - - if ( !coords ) - return FT_THROW( Invalid_Argument ); - - error = ft_face_get_mm_service( face, &service ); - if ( !error ) - { - error = FT_ERR( Invalid_Argument ); - if ( service->get_mm_blend ) - error = service->get_mm_blend( face, num_coords, coords ); - } - - return error; - } - - - /* documentation is in ftmm.h */ - - FT_EXPORT_DEF( FT_Error ) - FT_Get_Var_Axis_Flags( FT_MM_Var* master, - FT_UInt axis_index, - FT_UInt* flags ) - { - FT_UShort* axis_flags; - - - if ( !master || !flags ) - return FT_THROW( Invalid_Argument ); - - if ( axis_index >= master->num_axis ) - return FT_THROW( Invalid_Argument ); - - /* the axis flags array immediately follows the data of `master' */ - axis_flags = (FT_UShort*)&( master[1] ); - *flags = axis_flags[axis_index]; - - return FT_Err_Ok; - } - - - /* documentation is in ftmm.h */ - - FT_EXPORT_DEF( FT_Error ) - FT_Set_Named_Instance( FT_Face face, - FT_UInt instance_index ) - { - FT_Error error; - - FT_Service_MultiMasters service_mm = NULL; - FT_Service_MetricsVariations service_mvar = NULL; - - - /* check of `face' delayed to `ft_face_get_mm_service' */ - - error = ft_face_get_mm_service( face, &service_mm ); - if ( !error ) - { - error = FT_ERR( Invalid_Argument ); - if ( service_mm->set_instance ) - error = service_mm->set_instance( face, instance_index ); - } - - if ( !error ) - { - (void)ft_face_get_mvar_service( face, &service_mvar ); - - if ( service_mvar && service_mvar->metrics_adjust ) - service_mvar->metrics_adjust( face ); - } - - /* enforce recomputation of auto-hinting data */ - if ( !error && face->autohint.finalizer ) - { - face->autohint.finalizer( face->autohint.data ); - face->autohint.data = NULL; - } - - if ( !error ) - { - face->face_index = ( instance_index << 16 ) | - ( face->face_index & 0xFFFFL ); - face->face_flags &= ~FT_FACE_FLAG_VARIATION; - } - - return error; - } - - -/* END */ diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/src/base/ftpatent.c b/extensions/gdx-freetype/jni/freetype-2.9.1/src/base/ftpatent.c deleted file mode 100644 index e23ee2e3f..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/src/base/ftpatent.c +++ /dev/null @@ -1,51 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftpatent.c */ -/* */ -/* FreeType API for checking patented TrueType bytecode instructions */ -/* (body). Obsolete, retained for backward compatibility. */ -/* */ -/* Copyright 2007-2018 by */ -/* David Turner. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - -#include <ft2build.h> -#include FT_FREETYPE_H -#include FT_TRUETYPE_TAGS_H -#include FT_INTERNAL_OBJECTS_H -#include FT_INTERNAL_STREAM_H -#include FT_SERVICE_SFNT_H -#include FT_SERVICE_TRUETYPE_GLYF_H - - - /* documentation is in freetype.h */ - - FT_EXPORT_DEF( FT_Bool ) - FT_Face_CheckTrueTypePatents( FT_Face face ) - { - FT_UNUSED( face ); - - return FALSE; - } - - - /* documentation is in freetype.h */ - - FT_EXPORT_DEF( FT_Bool ) - FT_Face_SetUnpatentedHinting( FT_Face face, - FT_Bool value ) - { - FT_UNUSED( face ); - FT_UNUSED( value ); - - return FALSE; - } - -/* END */ diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/src/base/ftpsprop.c b/extensions/gdx-freetype/jni/freetype-2.9.1/src/base/ftpsprop.c deleted file mode 100644 index 459b5e605..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/src/base/ftpsprop.c +++ /dev/null @@ -1,285 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftpsprop.c */ -/* */ -/* Get and set properties of PostScript drivers (body). */ -/* See `ftdriver.h' for available properties. */ -/* */ -/* Copyright 2017-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#include <ft2build.h> -#include FT_DRIVER_H -#include FT_INTERNAL_DEBUG_H -#include FT_INTERNAL_POSTSCRIPT_AUX_H -#include FT_INTERNAL_OBJECTS_H -#include FT_INTERNAL_POSTSCRIPT_PROPS_H - - - /*************************************************************************/ - /* */ - /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ - /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */ - /* messages during execution. */ - /* */ -#undef FT_COMPONENT -#define FT_COMPONENT trace_psprops - - - FT_BASE_CALLBACK_DEF( FT_Error ) - ps_property_set( FT_Module module, /* PS_Driver */ - const char* property_name, - const void* value, - FT_Bool value_is_string ) - { - FT_Error error = FT_Err_Ok; - PS_Driver driver = (PS_Driver)module; - -#ifndef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES - FT_UNUSED( value_is_string ); -#endif - - - if ( !ft_strcmp( property_name, "darkening-parameters" ) ) - { - FT_Int* darken_params; - FT_Int x1, y1, x2, y2, x3, y3, x4, y4; - -#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES - FT_Int dp[8]; - - - if ( value_is_string ) - { - const char* s = (const char*)value; - char* ep; - int i; - - - /* eight comma-separated numbers */ - for ( i = 0; i < 7; i++ ) - { - dp[i] = (FT_Int)ft_strtol( s, &ep, 10 ); - if ( *ep != ',' || s == ep ) - return FT_THROW( Invalid_Argument ); - - s = ep + 1; - } - - dp[7] = (FT_Int)ft_strtol( s, &ep, 10 ); - if ( !( *ep == '\0' || *ep == ' ' ) || s == ep ) - return FT_THROW( Invalid_Argument ); - - darken_params = dp; - } - else -#endif - darken_params = (FT_Int*)value; - - x1 = darken_params[0]; - y1 = darken_params[1]; - x2 = darken_params[2]; - y2 = darken_params[3]; - x3 = darken_params[4]; - y3 = darken_params[5]; - x4 = darken_params[6]; - y4 = darken_params[7]; - - if ( x1 < 0 || x2 < 0 || x3 < 0 || x4 < 0 || - y1 < 0 || y2 < 0 || y3 < 0 || y4 < 0 || - x1 > x2 || x2 > x3 || x3 > x4 || - y1 > 500 || y2 > 500 || y3 > 500 || y4 > 500 ) - return FT_THROW( Invalid_Argument ); - - driver->darken_params[0] = x1; - driver->darken_params[1] = y1; - driver->darken_params[2] = x2; - driver->darken_params[3] = y2; - driver->darken_params[4] = x3; - driver->darken_params[5] = y3; - driver->darken_params[6] = x4; - driver->darken_params[7] = y4; - - return error; - } - - else if ( !ft_strcmp( property_name, "hinting-engine" ) ) - { -#if defined( CFF_CONFIG_OPTION_OLD_ENGINE ) || \ - defined( T1_CONFIG_OPTION_OLD_ENGINE ) - const char* module_name = module->clazz->module_name; -#endif - - -#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES - if ( value_is_string ) - { - const char* s = (const char*)value; - - - if ( !ft_strcmp( s, "adobe" ) ) - driver->hinting_engine = FT_HINTING_ADOBE; - -#ifdef CFF_CONFIG_OPTION_OLD_ENGINE - else if ( !ft_strcmp( module_name, "cff" ) && - !ft_strcmp( s, "freetype" ) ) - driver->hinting_engine = FT_HINTING_FREETYPE; -#endif - -#ifdef T1_CONFIG_OPTION_OLD_ENGINE - else if ( ( !ft_strcmp( module_name, "type1" ) || - !ft_strcmp( module_name, "t1cid" ) ) && - !ft_strcmp( s, "freetype" ) ) - driver->hinting_engine = FT_HINTING_FREETYPE; -#endif - - else - return FT_THROW( Invalid_Argument ); - } - else -#endif /* FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES */ - { - FT_UInt* hinting_engine = (FT_UInt*)value; - - - if ( *hinting_engine == FT_HINTING_ADOBE -#ifdef CFF_CONFIG_OPTION_OLD_ENGINE - || ( *hinting_engine == FT_HINTING_FREETYPE && - !ft_strcmp( module_name, "cff" ) ) -#endif -#ifdef T1_CONFIG_OPTION_OLD_ENGINE - || ( *hinting_engine == FT_HINTING_FREETYPE && - ( !ft_strcmp( module_name, "type1" ) || - !ft_strcmp( module_name, "t1cid" ) ) ) -#endif - ) - driver->hinting_engine = *hinting_engine; - else - error = FT_ERR( Unimplemented_Feature ); - - return error; - } - } - - else if ( !ft_strcmp( property_name, "no-stem-darkening" ) ) - { -#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES - if ( value_is_string ) - { - const char* s = (const char*)value; - long nsd = ft_strtol( s, NULL, 10 ); - - - if ( !nsd ) - driver->no_stem_darkening = FALSE; - else - driver->no_stem_darkening = TRUE; - } - else -#endif - { - FT_Bool* no_stem_darkening = (FT_Bool*)value; - - - driver->no_stem_darkening = *no_stem_darkening; - } - - return error; - } - - else if ( !ft_strcmp( property_name, "random-seed" ) ) - { - FT_Int32 random_seed; - - -#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES - if ( value_is_string ) - { - const char* s = (const char*)value; - - - random_seed = (FT_Int32)ft_strtol( s, NULL, 10 ); - } - else -#endif - random_seed = *(FT_Int32*)value; - - if ( random_seed < 0 ) - random_seed = 0; - - driver->random_seed = random_seed; - - return error; - } - - FT_TRACE0(( "ps_property_set: missing property `%s'\n", - property_name )); - return FT_THROW( Missing_Property ); - } - - - FT_BASE_CALLBACK_DEF( FT_Error ) - ps_property_get( FT_Module module, /* PS_Driver */ - const char* property_name, - void* value ) - { - FT_Error error = FT_Err_Ok; - PS_Driver driver = (PS_Driver)module; - - - if ( !ft_strcmp( property_name, "darkening-parameters" ) ) - { - FT_Int* darken_params = driver->darken_params; - FT_Int* val = (FT_Int*)value; - - - val[0] = darken_params[0]; - val[1] = darken_params[1]; - val[2] = darken_params[2]; - val[3] = darken_params[3]; - val[4] = darken_params[4]; - val[5] = darken_params[5]; - val[6] = darken_params[6]; - val[7] = darken_params[7]; - - return error; - } - - else if ( !ft_strcmp( property_name, "hinting-engine" ) ) - { - FT_UInt hinting_engine = driver->hinting_engine; - FT_UInt* val = (FT_UInt*)value; - - - *val = hinting_engine; - - return error; - } - - else if ( !ft_strcmp( property_name, "no-stem-darkening" ) ) - { - FT_Bool no_stem_darkening = driver->no_stem_darkening; - FT_Bool* val = (FT_Bool*)value; - - - *val = no_stem_darkening; - - return error; - } - - FT_TRACE0(( "ps_property_get: missing property `%s'\n", - property_name )); - return FT_THROW( Missing_Property ); - } - - -/* END */ diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/src/base/ftver.rc b/extensions/gdx-freetype/jni/freetype-2.9.1/src/base/ftver.rc deleted file mode 100644 index a2903d588..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/src/base/ftver.rc +++ /dev/null @@ -1,61 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftver.rc */ -/* */ -/* FreeType VERSIONINFO resource for Windows DLLs. */ -/* */ -/* Copyright 2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#include<windows.h> - -#define FT_VERSION 2,9,1,0 -#define FT_VERSION_STR "2.9.1" - -VS_VERSION_INFO VERSIONINFO -FILEVERSION FT_VERSION -PRODUCTVERSION FT_VERSION -FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG -FILEFLAGS VS_FF_DEBUG -#endif -#ifdef _DLL -FILETYPE VFT_DLL -#define FT_FILENAME "freetype.dll" -#else -FILETYPE VFT_STATIC_LIB -#define FT_FILENAME "freetype.lib" -#endif -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" - BEGIN - VALUE "CompanyName", "The FreeType Project" - VALUE "FileDescription", "Font Rendering Library" - VALUE "FileVersion", FT_VERSION_STR - VALUE "ProductName", "FreeType" - VALUE "ProductVersion", FT_VERSION_STR - VALUE "LegalCopyright", "\251 2018 The FreeType Project www.freetype.org. All rights reserved." - VALUE "InternalName", "freetype" - VALUE "OriginalFilename", FT_FILENAME - END - END - - BLOCK "VarFileInfo" - BEGIN - /* The following line should only be modified for localized versions. */ - /* It consists of any number of WORD,WORD pairs, with each pair */ - /* describing a "language,codepage" combination supported by the file. */ - VALUE "Translation", 0x409, 1252 - END -END diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/src/cff/cffgload.c b/extensions/gdx-freetype/jni/freetype-2.9.1/src/cff/cffgload.c deleted file mode 100644 index c58471ce8..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/src/cff/cffgload.c +++ /dev/null @@ -1,683 +0,0 @@ -/***************************************************************************/ -/* */ -/* cffgload.c */ -/* */ -/* OpenType Glyph Loader (body). */ -/* */ -/* Copyright 1996-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#include <ft2build.h> -#include FT_INTERNAL_DEBUG_H -#include FT_INTERNAL_STREAM_H -#include FT_INTERNAL_SFNT_H -#include FT_INTERNAL_CALC_H -#include FT_INTERNAL_POSTSCRIPT_AUX_H -#include FT_OUTLINE_H -#include FT_DRIVER_H - -#include "cffload.h" -#include "cffgload.h" - -#include "cfferrs.h" - - - /*************************************************************************/ - /* */ - /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ - /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */ - /* messages during execution. */ - /* */ -#undef FT_COMPONENT -#define FT_COMPONENT trace_cffgload - - - FT_LOCAL_DEF( FT_Error ) - cff_get_glyph_data( TT_Face face, - FT_UInt glyph_index, - FT_Byte** pointer, - FT_ULong* length ) - { -#ifdef FT_CONFIG_OPTION_INCREMENTAL - /* For incremental fonts get the character data using the */ - /* callback function. */ - if ( face->root.internal->incremental_interface ) - { - FT_Data data; - FT_Error error = - face->root.internal->incremental_interface->funcs->get_glyph_data( - face->root.internal->incremental_interface->object, - glyph_index, &data ); - - - *pointer = (FT_Byte*)data.pointer; - *length = (FT_ULong)data.length; - - return error; - } - else -#endif /* FT_CONFIG_OPTION_INCREMENTAL */ - - { - CFF_Font cff = (CFF_Font)(face->extra.data); - - - return cff_index_access_element( &cff->charstrings_index, glyph_index, - pointer, length ); - } - } - - - FT_LOCAL_DEF( void ) - cff_free_glyph_data( TT_Face face, - FT_Byte** pointer, - FT_ULong length ) - { -#ifndef FT_CONFIG_OPTION_INCREMENTAL - FT_UNUSED( length ); -#endif - -#ifdef FT_CONFIG_OPTION_INCREMENTAL - /* For incremental fonts get the character data using the */ - /* callback function. */ - if ( face->root.internal->incremental_interface ) - { - FT_Data data; - - - data.pointer = *pointer; - data.length = (FT_Int)length; - - face->root.internal->incremental_interface->funcs->free_glyph_data( - face->root.internal->incremental_interface->object, &data ); - } - else -#endif /* FT_CONFIG_OPTION_INCREMENTAL */ - - { - CFF_Font cff = (CFF_Font)(face->extra.data); - - - cff_index_forget_element( &cff->charstrings_index, pointer ); - } - } - - - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /********** *********/ - /********** *********/ - /********** COMPUTE THE MAXIMUM ADVANCE WIDTH *********/ - /********** *********/ - /********** The following code is in charge of computing *********/ - /********** the maximum advance width of the font. It *********/ - /********** quickly processes each glyph charstring to *********/ - /********** extract the value from either a `sbw' or `seac' *********/ - /********** operator. *********/ - /********** *********/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - -#if 0 /* unused until we support pure CFF fonts */ - - - FT_LOCAL_DEF( FT_Error ) - cff_compute_max_advance( TT_Face face, - FT_Int* max_advance ) - { - FT_Error error = FT_Err_Ok; - CFF_Decoder decoder; - FT_Int glyph_index; - CFF_Font cff = (CFF_Font)face->other; - - PSAux_Service psaux = (PSAux_Service)face->psaux; - const CFF_Decoder_Funcs decoder_funcs = psaux->cff_decoder_funcs; - - - *max_advance = 0; - - /* Initialize load decoder */ - decoder_funcs->init( &decoder, face, 0, 0, 0, 0, 0, 0 ); - - decoder.builder.metrics_only = 1; - decoder.builder.load_points = 0; - - /* For each glyph, parse the glyph charstring and extract */ - /* the advance width. */ - for ( glyph_index = 0; glyph_index < face->root.num_glyphs; - glyph_index++ ) - { - FT_Byte* charstring; - FT_ULong charstring_len; - - - /* now get load the unscaled outline */ - error = cff_get_glyph_data( face, glyph_index, - &charstring, &charstring_len ); - if ( !error ) - { - error = decoder_funcs->prepare( &decoder, size, glyph_index ); - if ( !error ) - error = decoder_funcs->parse_charstrings_old( &decoder, - charstring, - charstring_len, - 0 ); - - cff_free_glyph_data( face, &charstring, &charstring_len ); - } - - /* ignore the error if one has occurred -- skip to next glyph */ - error = FT_Err_Ok; - } - - *max_advance = decoder.builder.advance.x; - - return FT_Err_Ok; - } - - -#endif /* 0 */ - - - FT_LOCAL_DEF( FT_Error ) - cff_slot_load( CFF_GlyphSlot glyph, - CFF_Size size, - FT_UInt glyph_index, - FT_Int32 load_flags ) - { - FT_Error error; - CFF_Decoder decoder; - PS_Decoder psdecoder; - TT_Face face = (TT_Face)glyph->root.face; - FT_Bool hinting, scaled, force_scaling; - CFF_Font cff = (CFF_Font)face->extra.data; - - PSAux_Service psaux = (PSAux_Service)face->psaux; - const CFF_Decoder_Funcs decoder_funcs = psaux->cff_decoder_funcs; - - FT_Matrix font_matrix; - FT_Vector font_offset; - - - force_scaling = FALSE; - - /* in a CID-keyed font, consider `glyph_index' as a CID and map */ - /* it immediately to the real glyph_index -- if it isn't a */ - /* subsetted font, glyph_indices and CIDs are identical, though */ - if ( cff->top_font.font_dict.cid_registry != 0xFFFFU && - cff->charset.cids ) - { - /* don't handle CID 0 (.notdef) which is directly mapped to GID 0 */ - if ( glyph_index != 0 ) - { - glyph_index = cff_charset_cid_to_gindex( &cff->charset, - glyph_index ); - if ( glyph_index == 0 ) - return FT_THROW( Invalid_Argument ); - } - } - else if ( glyph_index >= cff->num_glyphs ) - return FT_THROW( Invalid_Argument ); - - if ( load_flags & FT_LOAD_NO_RECURSE ) - load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING; - - glyph->x_scale = 0x10000L; - glyph->y_scale = 0x10000L; - if ( size ) - { - glyph->x_scale = size->root.metrics.x_scale; - glyph->y_scale = size->root.metrics.y_scale; - } - -#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS - - /* try to load embedded bitmap if any */ - /* */ - /* XXX: The convention should be emphasized in */ - /* the documents because it can be confusing. */ - if ( size ) - { - CFF_Face cff_face = (CFF_Face)size->root.face; - SFNT_Service sfnt = (SFNT_Service)cff_face->sfnt; - FT_Stream stream = cff_face->root.stream; - - - if ( size->strike_index != 0xFFFFFFFFUL && - sfnt->load_eblc && - ( load_flags & FT_LOAD_NO_BITMAP ) == 0 ) - { - TT_SBit_MetricsRec metrics; - - - error = sfnt->load_sbit_image( face, - size->strike_index, - glyph_index, - (FT_UInt)load_flags, - stream, - &glyph->root.bitmap, - &metrics ); - - if ( !error ) - { - FT_Bool has_vertical_info; - FT_UShort advance; - FT_Short dummy; - - - glyph->root.outline.n_points = 0; - glyph->root.outline.n_contours = 0; - - glyph->root.metrics.width = (FT_Pos)metrics.width << 6; - glyph->root.metrics.height = (FT_Pos)metrics.height << 6; - - glyph->root.metrics.horiBearingX = (FT_Pos)metrics.horiBearingX << 6; - glyph->root.metrics.horiBearingY = (FT_Pos)metrics.horiBearingY << 6; - glyph->root.metrics.horiAdvance = (FT_Pos)metrics.horiAdvance << 6; - - glyph->root.metrics.vertBearingX = (FT_Pos)metrics.vertBearingX << 6; - glyph->root.metrics.vertBearingY = (FT_Pos)metrics.vertBearingY << 6; - glyph->root.metrics.vertAdvance = (FT_Pos)metrics.vertAdvance << 6; - - glyph->root.format = FT_GLYPH_FORMAT_BITMAP; - - if ( load_flags & FT_LOAD_VERTICAL_LAYOUT ) - { - glyph->root.bitmap_left = metrics.vertBearingX; - glyph->root.bitmap_top = metrics.vertBearingY; - } - else - { - glyph->root.bitmap_left = metrics.horiBearingX; - glyph->root.bitmap_top = metrics.horiBearingY; - } - - /* compute linear advance widths */ - - (void)( (SFNT_Service)face->sfnt )->get_metrics( face, 0, - glyph_index, - &dummy, - &advance ); - glyph->root.linearHoriAdvance = advance; - - has_vertical_info = FT_BOOL( - face->vertical_info && - face->vertical.number_Of_VMetrics > 0 ); - - /* get the vertical metrics from the vmtx table if we have one */ - if ( has_vertical_info ) - { - (void)( (SFNT_Service)face->sfnt )->get_metrics( face, 1, - glyph_index, - &dummy, - &advance ); - glyph->root.linearVertAdvance = advance; - } - else - { - /* make up vertical ones */ - if ( face->os2.version != 0xFFFFU ) - glyph->root.linearVertAdvance = (FT_Pos) - ( face->os2.sTypoAscender - face->os2.sTypoDescender ); - else - glyph->root.linearVertAdvance = (FT_Pos) - ( face->horizontal.Ascender - face->horizontal.Descender ); - } - - return error; - } - } - } - -#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */ - - /* return immediately if we only want the embedded bitmaps */ - if ( load_flags & FT_LOAD_SBITS_ONLY ) - return FT_THROW( Invalid_Argument ); - - /* if we have a CID subfont, use its matrix (which has already */ - /* been multiplied with the root matrix) */ - - /* this scaling is only relevant if the PS hinter isn't active */ - if ( cff->num_subfonts ) - { - FT_Long top_upm, sub_upm; - FT_Byte fd_index = cff_fd_select_get( &cff->fd_select, - glyph_index ); - - - if ( fd_index >= cff->num_subfonts ) - fd_index = (FT_Byte)( cff->num_subfonts - 1 ); - - top_upm = (FT_Long)cff->top_font.font_dict.units_per_em; - sub_upm = (FT_Long)cff->subfonts[fd_index]->font_dict.units_per_em; - - - font_matrix = cff->subfonts[fd_index]->font_dict.font_matrix; - font_offset = cff->subfonts[fd_index]->font_dict.font_offset; - - if ( top_upm != sub_upm ) - { - glyph->x_scale = FT_MulDiv( glyph->x_scale, top_upm, sub_upm ); - glyph->y_scale = FT_MulDiv( glyph->y_scale, top_upm, sub_upm ); - - force_scaling = TRUE; - } - } - else - { - font_matrix = cff->top_font.font_dict.font_matrix; - font_offset = cff->top_font.font_dict.font_offset; - } - - glyph->root.outline.n_points = 0; - glyph->root.outline.n_contours = 0; - - /* top-level code ensures that FT_LOAD_NO_HINTING is set */ - /* if FT_LOAD_NO_SCALE is active */ - hinting = FT_BOOL( ( load_flags & FT_LOAD_NO_HINTING ) == 0 ); - scaled = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE ) == 0 ); - - glyph->hint = hinting; - glyph->scaled = scaled; - glyph->root.format = FT_GLYPH_FORMAT_OUTLINE; /* by default */ - - { -#ifdef CFF_CONFIG_OPTION_OLD_ENGINE - PS_Driver driver = (PS_Driver)FT_FACE_DRIVER( face ); -#endif - - - FT_Byte* charstring; - FT_ULong charstring_len; - - - decoder_funcs->init( &decoder, face, size, glyph, hinting, - FT_LOAD_TARGET_MODE( load_flags ), - cff_get_glyph_data, - cff_free_glyph_data ); - - /* this is for pure CFFs */ - if ( load_flags & FT_LOAD_ADVANCE_ONLY ) - decoder.width_only = TRUE; - - decoder.builder.no_recurse = - (FT_Bool)( load_flags & FT_LOAD_NO_RECURSE ); - - /* now load the unscaled outline */ - error = cff_get_glyph_data( face, glyph_index, - &charstring, &charstring_len ); - if ( error ) - goto Glyph_Build_Finished; - - error = decoder_funcs->prepare( &decoder, size, glyph_index ); - if ( error ) - goto Glyph_Build_Finished; - -#ifdef CFF_CONFIG_OPTION_OLD_ENGINE - /* choose which CFF renderer to use */ - if ( driver->hinting_engine == FT_HINTING_FREETYPE ) - error = decoder_funcs->parse_charstrings_old( &decoder, - charstring, - charstring_len, - 0 ); - else -#endif - { - psaux->ps_decoder_init( &psdecoder, &decoder, FALSE ); - - error = decoder_funcs->parse_charstrings( &psdecoder, - charstring, - charstring_len ); - - /* Adobe's engine uses 16.16 numbers everywhere; */ - /* as a consequence, glyphs larger than 2000ppem get rejected */ - if ( FT_ERR_EQ( error, Glyph_Too_Big ) ) - { - /* this time, we retry unhinted and scale up the glyph later on */ - /* (the engine uses and sets the hardcoded value 0x10000 / 64 = */ - /* 0x400 for both `x_scale' and `y_scale' in this case) */ - hinting = FALSE; - force_scaling = TRUE; - glyph->hint = hinting; - - error = decoder_funcs->parse_charstrings( &psdecoder, - charstring, - charstring_len ); - } - } - - cff_free_glyph_data( face, &charstring, charstring_len ); - - if ( error ) - goto Glyph_Build_Finished; - -#ifdef FT_CONFIG_OPTION_INCREMENTAL - /* Control data and length may not be available for incremental */ - /* fonts. */ - if ( face->root.internal->incremental_interface ) - { - glyph->root.control_data = NULL; - glyph->root.control_len = 0; - } - else -#endif /* FT_CONFIG_OPTION_INCREMENTAL */ - - /* We set control_data and control_len if charstrings is loaded. */ - /* See how charstring loads at cff_index_access_element() in */ - /* cffload.c. */ - { - CFF_Index csindex = &cff->charstrings_index; - - - if ( csindex->offsets ) - { - glyph->root.control_data = csindex->bytes + - csindex->offsets[glyph_index] - 1; - glyph->root.control_len = (FT_Long)charstring_len; - } - } - - Glyph_Build_Finished: - /* save new glyph tables, if no error */ - if ( !error ) - decoder.builder.funcs.done( &decoder.builder ); - /* XXX: anything to do for broken glyph entry? */ - } - -#ifdef FT_CONFIG_OPTION_INCREMENTAL - - /* Incremental fonts can optionally override the metrics. */ - if ( !error && - face->root.internal->incremental_interface && - face->root.internal->incremental_interface->funcs->get_glyph_metrics ) - { - FT_Incremental_MetricsRec metrics; - - - metrics.bearing_x = decoder.builder.left_bearing.x; - metrics.bearing_y = 0; - metrics.advance = decoder.builder.advance.x; - metrics.advance_v = decoder.builder.advance.y; - - error = face->root.internal->incremental_interface->funcs->get_glyph_metrics( - face->root.internal->incremental_interface->object, - glyph_index, FALSE, &metrics ); - - decoder.builder.left_bearing.x = metrics.bearing_x; - decoder.builder.advance.x = metrics.advance; - decoder.builder.advance.y = metrics.advance_v; - } - -#endif /* FT_CONFIG_OPTION_INCREMENTAL */ - - if ( !error ) - { - /* Now, set the metrics -- this is rather simple, as */ - /* the left side bearing is the xMin, and the top side */ - /* bearing the yMax. */ - - /* For composite glyphs, return only left side bearing and */ - /* advance width. */ - if ( load_flags & FT_LOAD_NO_RECURSE ) - { - FT_Slot_Internal internal = glyph->root.internal; - - - glyph->root.metrics.horiBearingX = decoder.builder.left_bearing.x; - glyph->root.metrics.horiAdvance = decoder.glyph_width; - internal->glyph_matrix = font_matrix; - internal->glyph_delta = font_offset; - internal->glyph_transformed = 1; - } - else - { - FT_BBox cbox; - FT_Glyph_Metrics* metrics = &glyph->root.metrics; - FT_Bool has_vertical_info; - - - if ( face->horizontal.number_Of_HMetrics ) - { - FT_Short horiBearingX = 0; - FT_UShort horiAdvance = 0; - - - ( (SFNT_Service)face->sfnt )->get_metrics( face, 0, - glyph_index, - &horiBearingX, - &horiAdvance ); - metrics->horiAdvance = horiAdvance; - metrics->horiBearingX = horiBearingX; - glyph->root.linearHoriAdvance = horiAdvance; - } - else - { - /* copy the _unscaled_ advance width */ - metrics->horiAdvance = decoder.glyph_width; - glyph->root.linearHoriAdvance = decoder.glyph_width; - } - - glyph->root.internal->glyph_transformed = 0; - - has_vertical_info = FT_BOOL( face->vertical_info && - face->vertical.number_Of_VMetrics > 0 ); - - /* get the vertical metrics from the vmtx table if we have one */ - if ( has_vertical_info ) - { - FT_Short vertBearingY = 0; - FT_UShort vertAdvance = 0; - - - ( (SFNT_Service)face->sfnt )->get_metrics( face, 1, - glyph_index, - &vertBearingY, - &vertAdvance ); - metrics->vertBearingY = vertBearingY; - metrics->vertAdvance = vertAdvance; - } - else - { - /* make up vertical ones */ - if ( face->os2.version != 0xFFFFU ) - metrics->vertAdvance = (FT_Pos)( face->os2.sTypoAscender - - face->os2.sTypoDescender ); - else - metrics->vertAdvance = (FT_Pos)( face->horizontal.Ascender - - face->horizontal.Descender ); - } - - glyph->root.linearVertAdvance = metrics->vertAdvance; - - glyph->root.format = FT_GLYPH_FORMAT_OUTLINE; - - glyph->root.outline.flags = 0; - if ( size && size->root.metrics.y_ppem < 24 ) - glyph->root.outline.flags |= FT_OUTLINE_HIGH_PRECISION; - - glyph->root.outline.flags |= FT_OUTLINE_REVERSE_FILL; - - /* apply the font matrix, if any */ - if ( font_matrix.xx != 0x10000L || font_matrix.yy != 0x10000L || - font_matrix.xy != 0 || font_matrix.yx != 0 ) - { - FT_Outline_Transform( &glyph->root.outline, &font_matrix ); - - metrics->horiAdvance = FT_MulFix( metrics->horiAdvance, - font_matrix.xx ); - metrics->vertAdvance = FT_MulFix( metrics->vertAdvance, - font_matrix.yy ); - } - - if ( font_offset.x || font_offset.y ) - { - FT_Outline_Translate( &glyph->root.outline, - font_offset.x, - font_offset.y ); - - metrics->horiAdvance += font_offset.x; - metrics->vertAdvance += font_offset.y; - } - - if ( ( load_flags & FT_LOAD_NO_SCALE ) == 0 || force_scaling ) - { - /* scale the outline and the metrics */ - FT_Int n; - FT_Outline* cur = &glyph->root.outline; - FT_Vector* vec = cur->points; - FT_Fixed x_scale = glyph->x_scale; - FT_Fixed y_scale = glyph->y_scale; - - - /* First of all, scale the points */ - if ( !hinting || !decoder.builder.hints_funcs ) - for ( n = cur->n_points; n > 0; n--, vec++ ) - { - vec->x = FT_MulFix( vec->x, x_scale ); - vec->y = FT_MulFix( vec->y, y_scale ); - } - - /* Then scale the metrics */ - metrics->horiAdvance = FT_MulFix( metrics->horiAdvance, x_scale ); - metrics->vertAdvance = FT_MulFix( metrics->vertAdvance, y_scale ); - } - - /* compute the other metrics */ - FT_Outline_Get_CBox( &glyph->root.outline, &cbox ); - - metrics->width = cbox.xMax - cbox.xMin; - metrics->height = cbox.yMax - cbox.yMin; - - metrics->horiBearingX = cbox.xMin; - metrics->horiBearingY = cbox.yMax; - - if ( has_vertical_info ) - metrics->vertBearingX = metrics->horiBearingX - - metrics->horiAdvance / 2; - else - { - if ( load_flags & FT_LOAD_VERTICAL_LAYOUT ) - ft_synthesize_vertical_metrics( metrics, - metrics->vertAdvance ); - } - } - } - - return error; - } - - -/* END */ diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/src/cff/cffgload.h b/extensions/gdx-freetype/jni/freetype-2.9.1/src/cff/cffgload.h deleted file mode 100644 index 803f3974f..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/src/cff/cffgload.h +++ /dev/null @@ -1,63 +0,0 @@ -/***************************************************************************/ -/* */ -/* cffgload.h */ -/* */ -/* OpenType Glyph Loader (specification). */ -/* */ -/* Copyright 1996-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef CFFGLOAD_H_ -#define CFFGLOAD_H_ - - -#include <ft2build.h> -#include FT_FREETYPE_H -#include FT_INTERNAL_CFF_OBJECTS_TYPES_H - - -FT_BEGIN_HEADER - - FT_LOCAL( FT_Error ) - cff_get_glyph_data( TT_Face face, - FT_UInt glyph_index, - FT_Byte** pointer, - FT_ULong* length ); - FT_LOCAL( void ) - cff_free_glyph_data( TT_Face face, - FT_Byte** pointer, - FT_ULong length ); - - -#if 0 /* unused until we support pure CFF fonts */ - - /* Compute the maximum advance width of a font through quick parsing */ - FT_LOCAL( FT_Error ) - cff_compute_max_advance( TT_Face face, - FT_Int* max_advance ); - -#endif /* 0 */ - - - FT_LOCAL( FT_Error ) - cff_slot_load( CFF_GlyphSlot glyph, - CFF_Size size, - FT_UInt glyph_index, - FT_Int32 load_flags ); - - -FT_END_HEADER - -#endif /* CFFGLOAD_H_ */ - - -/* END */ diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/src/cff/cffobjs.h b/extensions/gdx-freetype/jni/freetype-2.9.1/src/cff/cffobjs.h deleted file mode 100644 index 616a25b3b..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/src/cff/cffobjs.h +++ /dev/null @@ -1,85 +0,0 @@ -/***************************************************************************/ -/* */ -/* cffobjs.h */ -/* */ -/* OpenType objects manager (specification). */ -/* */ -/* Copyright 1996-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef CFFOBJS_H_ -#define CFFOBJS_H_ - - -#include <ft2build.h> - - -FT_BEGIN_HEADER - - - FT_LOCAL( FT_Error ) - cff_size_init( FT_Size size ); /* CFF_Size */ - - FT_LOCAL( void ) - cff_size_done( FT_Size size ); /* CFF_Size */ - - FT_LOCAL( FT_Error ) - cff_size_request( FT_Size size, - FT_Size_Request req ); - -#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS - - FT_LOCAL( FT_Error ) - cff_size_select( FT_Size size, - FT_ULong strike_index ); - -#endif - - FT_LOCAL( void ) - cff_slot_done( FT_GlyphSlot slot ); - - FT_LOCAL( FT_Error ) - cff_slot_init( FT_GlyphSlot slot ); - - - /*************************************************************************/ - /* */ - /* Face functions */ - /* */ - FT_LOCAL( FT_Error ) - cff_face_init( FT_Stream stream, - FT_Face face, /* CFF_Face */ - FT_Int face_index, - FT_Int num_params, - FT_Parameter* params ); - - FT_LOCAL( void ) - cff_face_done( FT_Face face ); /* CFF_Face */ - - - /*************************************************************************/ - /* */ - /* Driver functions */ - /* */ - FT_LOCAL( FT_Error ) - cff_driver_init( FT_Module module ); /* PS_Driver */ - - FT_LOCAL( void ) - cff_driver_done( FT_Module module ); /* PS_Driver */ - - -FT_END_HEADER - -#endif /* CFFOBJS_H_ */ - - -/* END */ diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/src/psaux/cffdecode.h b/extensions/gdx-freetype/jni/freetype-2.9.1/src/psaux/cffdecode.h deleted file mode 100644 index 0d4f5fef6..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/src/psaux/cffdecode.h +++ /dev/null @@ -1,64 +0,0 @@ -/***************************************************************************/ -/* */ -/* cffdecode.h */ -/* */ -/* PostScript CFF (Type 2) decoding routines (specification). */ -/* */ -/* Copyright 2017-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef CFFDECODE_H_ -#define CFFDECODE_H_ - - -#include <ft2build.h> -#include FT_INTERNAL_POSTSCRIPT_AUX_H - - -FT_BEGIN_HEADER - - FT_LOCAL( void ) - cff_decoder_init( CFF_Decoder* decoder, - TT_Face face, - CFF_Size size, - CFF_GlyphSlot slot, - FT_Bool hinting, - FT_Render_Mode hint_mode, - CFF_Decoder_Get_Glyph_Callback get_callback, - CFF_Decoder_Free_Glyph_Callback free_callback ); - - FT_LOCAL( FT_Error ) - cff_decoder_prepare( CFF_Decoder* decoder, - CFF_Size size, - FT_UInt glyph_index ); - - - FT_LOCAL( FT_Int ) - cff_lookup_glyph_by_stdcharcode( CFF_Font cff, - FT_Int charcode ); - - -#ifdef CFF_CONFIG_OPTION_OLD_ENGINE - FT_LOCAL( FT_Error ) - cff_decoder_parse_charstrings( CFF_Decoder* decoder, - FT_Byte* charstring_base, - FT_ULong charstring_len, - FT_Bool in_dict ); -#endif - - -FT_END_HEADER - -#endif - - -/* END */ diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/src/psaux/psauxmod.c b/extensions/gdx-freetype/jni/freetype-2.9.1/src/psaux/psauxmod.c deleted file mode 100644 index ee497085c..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/src/psaux/psauxmod.c +++ /dev/null @@ -1,191 +0,0 @@ -/***************************************************************************/ -/* */ -/* psauxmod.c */ -/* */ -/* FreeType auxiliary PostScript module implementation (body). */ -/* */ -/* Copyright 2000-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#include <ft2build.h> -#include "psauxmod.h" -#include "psobjs.h" -#include "t1decode.h" -#include "t1cmap.h" -#include "psft.h" -#include "cffdecode.h" - -#ifndef T1_CONFIG_OPTION_NO_AFM -#include "afmparse.h" -#endif - - - FT_CALLBACK_TABLE_DEF - const PS_Table_FuncsRec ps_table_funcs = - { - ps_table_new, /* init */ - ps_table_done, /* done */ - ps_table_add, /* add */ - ps_table_release /* release */ - }; - - - FT_CALLBACK_TABLE_DEF - const PS_Parser_FuncsRec ps_parser_funcs = - { - ps_parser_init, /* init */ - ps_parser_done, /* done */ - - ps_parser_skip_spaces, /* skip_spaces */ - ps_parser_skip_PS_token, /* skip_PS_token */ - - ps_parser_to_int, /* to_int */ - ps_parser_to_fixed, /* to_fixed */ - ps_parser_to_bytes, /* to_bytes */ - ps_parser_to_coord_array, /* to_coord_array */ - ps_parser_to_fixed_array, /* to_fixed_array */ - ps_parser_to_token, /* to_token */ - ps_parser_to_token_array, /* to_token_array */ - - ps_parser_load_field, /* load_field */ - ps_parser_load_field_table /* load_field_table */ - }; - - - FT_CALLBACK_TABLE_DEF - const PS_Builder_FuncsRec ps_builder_funcs = - { - ps_builder_init, /* init */ - ps_builder_done /* done */ - }; - - - FT_CALLBACK_TABLE_DEF - const T1_Builder_FuncsRec t1_builder_funcs = - { - t1_builder_init, /* init */ - t1_builder_done, /* done */ - - t1_builder_check_points, /* check_points */ - t1_builder_add_point, /* add_point */ - t1_builder_add_point1, /* add_point1 */ - t1_builder_add_contour, /* add_contour */ - t1_builder_start_point, /* start_point */ - t1_builder_close_contour /* close_contour */ - }; - - - FT_CALLBACK_TABLE_DEF - const T1_Decoder_FuncsRec t1_decoder_funcs = - { - t1_decoder_init, /* init */ - t1_decoder_done, /* done */ -#ifdef T1_CONFIG_OPTION_OLD_ENGINE - t1_decoder_parse_charstrings, /* parse_charstrings_old */ -#else - t1_decoder_parse_metrics, /* parse_metrics */ -#endif - cf2_decoder_parse_charstrings /* parse_charstrings */ - }; - - -#ifndef T1_CONFIG_OPTION_NO_AFM - FT_CALLBACK_TABLE_DEF - const AFM_Parser_FuncsRec afm_parser_funcs = - { - afm_parser_init, /* init */ - afm_parser_done, /* done */ - afm_parser_parse /* parse */ - }; -#endif - - - FT_CALLBACK_TABLE_DEF - const T1_CMap_ClassesRec t1_cmap_classes = - { - &t1_cmap_standard_class_rec, - &t1_cmap_expert_class_rec, - &t1_cmap_custom_class_rec, - &t1_cmap_unicode_class_rec - }; - - - FT_CALLBACK_TABLE_DEF - const CFF_Builder_FuncsRec cff_builder_funcs = - { - cff_builder_init, /* init */ - cff_builder_done, /* done */ - - cff_check_points, /* check_points */ - cff_builder_add_point, /* add_point */ - cff_builder_add_point1, /* add_point1 */ - cff_builder_add_contour, /* add_contour */ - cff_builder_start_point, /* start_point */ - cff_builder_close_contour /* close_contour */ - }; - - - FT_CALLBACK_TABLE_DEF - const CFF_Decoder_FuncsRec cff_decoder_funcs = - { - cff_decoder_init, /* init */ - cff_decoder_prepare, /* prepare */ - -#ifdef CFF_CONFIG_OPTION_OLD_ENGINE - cff_decoder_parse_charstrings, /* parse_charstrings_old */ -#endif - cf2_decoder_parse_charstrings /* parse_charstrings */ - }; - - - static - const PSAux_Interface psaux_interface = - { - &ps_table_funcs, - &ps_parser_funcs, - &t1_builder_funcs, - &t1_decoder_funcs, - t1_decrypt, - cff_random, - ps_decoder_init, - t1_make_subfont, - - (const T1_CMap_ClassesRec*) &t1_cmap_classes, - -#ifndef T1_CONFIG_OPTION_NO_AFM - &afm_parser_funcs, -#else - 0, -#endif - - &cff_decoder_funcs, - }; - - - FT_CALLBACK_TABLE_DEF - const FT_Module_Class psaux_module_class = - { - 0, - sizeof ( FT_ModuleRec ), - "psaux", - 0x20000L, - 0x20000L, - - &psaux_interface, /* module-specific interface */ - - (FT_Module_Constructor)NULL, /* module_init */ - (FT_Module_Destructor) NULL, /* module_done */ - (FT_Module_Requester) NULL /* get_interface */ - }; - - -/* END */ diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/src/psaux/psintrp.c b/extensions/gdx-freetype/jni/freetype-2.9.1/src/psaux/psintrp.c deleted file mode 100644 index da5a8dad1..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/src/psaux/psintrp.c +++ /dev/null @@ -1,3040 +0,0 @@ -/***************************************************************************/ -/* */ -/* psintrp.c */ -/* */ -/* Adobe's CFF Interpreter (body). */ -/* */ -/* Copyright 2007-2014 Adobe Systems Incorporated. */ -/* */ -/* This software, and all works of authorship, whether in source or */ -/* object code form as indicated by the copyright notice(s) included */ -/* herein (collectively, the "Work") is made available, and may only be */ -/* used, modified, and distributed under the FreeType Project License, */ -/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */ -/* FreeType Project License, each contributor to the Work hereby grants */ -/* to any individual or legal entity exercising permissions granted by */ -/* the FreeType Project License and this section (hereafter, "You" or */ -/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */ -/* royalty-free, irrevocable (except as stated in this section) patent */ -/* license to make, have made, use, offer to sell, sell, import, and */ -/* otherwise transfer the Work, where such license applies only to those */ -/* patent claims licensable by such contributor that are necessarily */ -/* infringed by their contribution(s) alone or by combination of their */ -/* contribution(s) with the Work to which such contribution(s) was */ -/* submitted. If You institute patent litigation against any entity */ -/* (including a cross-claim or counterclaim in a lawsuit) alleging that */ -/* the Work or a contribution incorporated within the Work constitutes */ -/* direct or contributory patent infringement, then any patent licenses */ -/* granted to You under this License for that Work shall terminate as of */ -/* the date such litigation is filed. */ -/* */ -/* By using, modifying, or distributing the Work you indicate that you */ -/* have read and understood the terms and conditions of the */ -/* FreeType Project License as well as those provided in this section, */ -/* and you accept them fully. */ -/* */ -/***************************************************************************/ - - -#include "psft.h" -#include FT_INTERNAL_DEBUG_H -#include FT_SERVICE_CFF_TABLE_LOAD_H - -#include "psglue.h" -#include "psfont.h" -#include "psstack.h" -#include "pshints.h" -#include "psintrp.h" - -#include "pserror.h" - -#include "psobjs.h" /* for cff_random */ -#include "t1decode.h" /* for t1 seac */ - - - /*************************************************************************/ - /* */ - /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ - /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */ - /* messages during execution. */ - /* */ -#undef FT_COMPONENT -#define FT_COMPONENT trace_cf2interp - - - FT_LOCAL_DEF( void ) - cf2_hintmask_init( CF2_HintMask hintmask, - FT_Error* error ) - { - FT_ZERO( hintmask ); - - hintmask->error = error; - } - - - FT_LOCAL_DEF( FT_Bool ) - cf2_hintmask_isValid( const CF2_HintMask hintmask ) - { - return hintmask->isValid; - } - - - FT_LOCAL_DEF( FT_Bool ) - cf2_hintmask_isNew( const CF2_HintMask hintmask ) - { - return hintmask->isNew; - } - - - FT_LOCAL_DEF( void ) - cf2_hintmask_setNew( CF2_HintMask hintmask, - FT_Bool val ) - { - hintmask->isNew = val; - } - - - /* clients call `getMaskPtr' in order to iterate */ - /* through hint mask */ - - FT_LOCAL_DEF( FT_Byte* ) - cf2_hintmask_getMaskPtr( CF2_HintMask hintmask ) - { - return hintmask->mask; - } - - - static size_t - cf2_hintmask_setCounts( CF2_HintMask hintmask, - size_t bitCount ) - { - if ( bitCount > CF2_MAX_HINTS ) - { - /* total of h and v stems must be <= 96 */ - CF2_SET_ERROR( hintmask->error, Invalid_Glyph_Format ); - return 0; - } - - hintmask->bitCount = bitCount; - hintmask->byteCount = ( hintmask->bitCount + 7 ) / 8; - - hintmask->isValid = TRUE; - hintmask->isNew = TRUE; - - return bitCount; - } - - - /* consume the hintmask bytes from the charstring, advancing the src */ - /* pointer */ - static void - cf2_hintmask_read( CF2_HintMask hintmask, - CF2_Buffer charstring, - size_t bitCount ) - { - size_t i; - -#ifndef CF2_NDEBUG - /* these are the bits in the final mask byte that should be zero */ - /* Note: this variable is only used in an assert expression below */ - /* and then only if CF2_NDEBUG is not defined */ - CF2_UInt mask = ( 1 << ( -(CF2_Int)bitCount & 7 ) ) - 1; -#endif - - - /* initialize counts and isValid */ - if ( cf2_hintmask_setCounts( hintmask, bitCount ) == 0 ) - return; - - FT_ASSERT( hintmask->byteCount > 0 ); - - FT_TRACE4(( " (maskbytes:" )); - - /* set mask and advance interpreter's charstring pointer */ - for ( i = 0; i < hintmask->byteCount; i++ ) - { - hintmask->mask[i] = (FT_Byte)cf2_buf_readByte( charstring ); - FT_TRACE4(( " 0x%02X", hintmask->mask[i] )); - } - - FT_TRACE4(( ")\n" )); - - /* assert any unused bits in last byte are zero unless there's a prior */ - /* error */ - /* bitCount -> mask, 0 -> 0, 1 -> 7f, 2 -> 3f, ... 6 -> 3, 7 -> 1 */ -#ifndef CF2_NDEBUG - FT_ASSERT( ( hintmask->mask[hintmask->byteCount - 1] & mask ) == 0 || - *hintmask->error ); -#endif - } - - - FT_LOCAL_DEF( void ) - cf2_hintmask_setAll( CF2_HintMask hintmask, - size_t bitCount ) - { - size_t i; - CF2_UInt mask = ( 1 << ( -(CF2_Int)bitCount & 7 ) ) - 1; - - - /* initialize counts and isValid */ - if ( cf2_hintmask_setCounts( hintmask, bitCount ) == 0 ) - return; - - FT_ASSERT( hintmask->byteCount > 0 ); - FT_ASSERT( hintmask->byteCount <= - sizeof ( hintmask->mask ) / sizeof ( hintmask->mask[0] ) ); - - /* set mask to all ones */ - for ( i = 0; i < hintmask->byteCount; i++ ) - hintmask->mask[i] = 0xFF; - - /* clear unused bits */ - /* bitCount -> mask, 0 -> 0, 1 -> 7f, 2 -> 3f, ... 6 -> 3, 7 -> 1 */ - hintmask->mask[hintmask->byteCount - 1] &= ~mask; - } - - - /* Type2 charstring opcodes */ - enum - { - cf2_cmdRESERVED_0, /* 0 */ - cf2_cmdHSTEM, /* 1 */ - cf2_cmdRESERVED_2, /* 2 */ - cf2_cmdVSTEM, /* 3 */ - cf2_cmdVMOVETO, /* 4 */ - cf2_cmdRLINETO, /* 5 */ - cf2_cmdHLINETO, /* 6 */ - cf2_cmdVLINETO, /* 7 */ - cf2_cmdRRCURVETO, /* 8 */ - cf2_cmdCLOSEPATH, /* 9 T1 only */ - cf2_cmdCALLSUBR, /* 10 */ - cf2_cmdRETURN, /* 11 */ - cf2_cmdESC, /* 12 */ - cf2_cmdHSBW, /* 13 T1 only */ - cf2_cmdENDCHAR, /* 14 */ - cf2_cmdVSINDEX, /* 15 */ - cf2_cmdBLEND, /* 16 */ - cf2_cmdRESERVED_17, /* 17 */ - cf2_cmdHSTEMHM, /* 18 */ - cf2_cmdHINTMASK, /* 19 */ - cf2_cmdCNTRMASK, /* 20 */ - cf2_cmdRMOVETO, /* 21 */ - cf2_cmdHMOVETO, /* 22 */ - cf2_cmdVSTEMHM, /* 23 */ - cf2_cmdRCURVELINE, /* 24 */ - cf2_cmdRLINECURVE, /* 25 */ - cf2_cmdVVCURVETO, /* 26 */ - cf2_cmdHHCURVETO, /* 27 */ - cf2_cmdEXTENDEDNMBR, /* 28 */ - cf2_cmdCALLGSUBR, /* 29 */ - cf2_cmdVHCURVETO, /* 30 */ - cf2_cmdHVCURVETO /* 31 */ - }; - - enum - { - cf2_escDOTSECTION, /* 0 */ - cf2_escVSTEM3, /* 1 T1 only */ - cf2_escHSTEM3, /* 2 T1 only */ - cf2_escAND, /* 3 */ - cf2_escOR, /* 4 */ - cf2_escNOT, /* 5 */ - cf2_escSEAC, /* 6 T1 only */ - cf2_escSBW, /* 7 T1 only */ - cf2_escRESERVED_8, /* 8 */ - cf2_escABS, /* 9 */ - cf2_escADD, /* 10 like otherADD */ - cf2_escSUB, /* 11 like otherSUB */ - cf2_escDIV, /* 12 */ - cf2_escRESERVED_13, /* 13 */ - cf2_escNEG, /* 14 */ - cf2_escEQ, /* 15 */ - cf2_escCALLOTHERSUBR,/* 16 T1 only */ - cf2_escPOP, /* 17 T1 only */ - cf2_escDROP, /* 18 */ - cf2_escRESERVED_19, /* 19 */ - cf2_escPUT, /* 20 like otherPUT */ - cf2_escGET, /* 21 like otherGET */ - cf2_escIFELSE, /* 22 like otherIFELSE */ - cf2_escRANDOM, /* 23 like otherRANDOM */ - cf2_escMUL, /* 24 like otherMUL */ - cf2_escRESERVED_25, /* 25 */ - cf2_escSQRT, /* 26 */ - cf2_escDUP, /* 27 like otherDUP */ - cf2_escEXCH, /* 28 like otherEXCH */ - cf2_escINDEX, /* 29 */ - cf2_escROLL, /* 30 */ - cf2_escRESERVED_31, /* 31 */ - cf2_escRESERVED_32, /* 32 */ - cf2_escSETCURRENTPT, /* 33 T1 only */ - cf2_escHFLEX, /* 34 */ - cf2_escFLEX, /* 35 */ - cf2_escHFLEX1, /* 36 */ - cf2_escFLEX1, /* 37 */ - cf2_escRESERVED_38 /* 38 & all higher */ - }; - - - /* `stemHintArray' does not change once we start drawing the outline. */ - static void - cf2_doStems( const CF2_Font font, - CF2_Stack opStack, - CF2_ArrStack stemHintArray, - CF2_Fixed* width, - FT_Bool* haveWidth, - CF2_Fixed hintOffset ) - { - CF2_UInt i; - CF2_UInt count = cf2_stack_count( opStack ); - FT_Bool hasWidthArg = (FT_Bool)( count & 1 ); - - /* variable accumulates delta values from operand stack */ - CF2_Fixed position = hintOffset; - - if ( font->isT1 && !font->decoder->flex_state && !*haveWidth ) - FT_ERROR(( "cf2_doStems (Type 1 mode):" - " No width. Use hsbw/sbw as first op\n" )); - - if ( !font->isT1 && hasWidthArg && !*haveWidth ) - *width = ADD_INT32( cf2_stack_getReal( opStack, 0 ), - cf2_getNominalWidthX( font->decoder ) ); - - if ( font->decoder->width_only ) - goto exit; - - for ( i = hasWidthArg ? 1 : 0; i < count; i += 2 ) - { - /* construct a CF2_StemHint and push it onto the list */ - CF2_StemHintRec stemhint; - - - stemhint.min = - position = ADD_INT32( position, - cf2_stack_getReal( opStack, i ) ); - stemhint.max = - position = ADD_INT32( position, - cf2_stack_getReal( opStack, i + 1 ) ); - - stemhint.used = FALSE; - stemhint.maxDS = - stemhint.minDS = 0; - - cf2_arrstack_push( stemHintArray, &stemhint ); /* defer error check */ - } - - cf2_stack_clear( opStack ); - - exit: - /* cf2_doStems must define a width (may be default) */ - *haveWidth = TRUE; - } - - - static void - cf2_doFlex( CF2_Stack opStack, - CF2_Fixed* curX, - CF2_Fixed* curY, - CF2_GlyphPath glyphPath, - const FT_Bool* readFromStack, - FT_Bool doConditionalLastRead ) - { - CF2_Fixed vals[14]; - CF2_UInt idx; - FT_Bool isHFlex; - CF2_Int top, i, j; - - - vals[0] = *curX; - vals[1] = *curY; - idx = 0; - isHFlex = FT_BOOL( readFromStack[9] == FALSE ); - top = isHFlex ? 9 : 10; - - for ( i = 0; i < top; i++ ) - { - vals[i + 2] = vals[i]; - if ( readFromStack[i] ) - vals[i + 2] = ADD_INT32( vals[i + 2], cf2_stack_getReal( opStack, - idx++ ) ); - } - - if ( isHFlex ) - vals[9 + 2] = *curY; - - if ( doConditionalLastRead ) - { - FT_Bool lastIsX = (FT_Bool)( - cf2_fixedAbs( SUB_INT32( vals[10], *curX ) ) > - cf2_fixedAbs( SUB_INT32( vals[11], *curY ) ) ); - CF2_Fixed lastVal = cf2_stack_getReal( opStack, idx ); - - - if ( lastIsX ) - { - vals[12] = ADD_INT32( vals[10], lastVal ); - vals[13] = *curY; - } - else - { - vals[12] = *curX; - vals[13] = ADD_INT32( vals[11], lastVal ); - } - } - else - { - if ( readFromStack[10] ) - vals[12] = ADD_INT32( vals[10], - cf2_stack_getReal( opStack, idx++ ) ); - else - vals[12] = *curX; - - if ( readFromStack[11] ) - vals[13] = ADD_INT32( vals[11], - cf2_stack_getReal( opStack, idx ) ); - else - vals[13] = *curY; - } - - for ( j = 0; j < 2; j++ ) - cf2_glyphpath_curveTo( glyphPath, vals[j * 6 + 2], - vals[j * 6 + 3], - vals[j * 6 + 4], - vals[j * 6 + 5], - vals[j * 6 + 6], - vals[j * 6 + 7] ); - - cf2_stack_clear( opStack ); - - *curX = vals[12]; - *curY = vals[13]; - } - - - /* Blend numOperands on the stack, */ - /* store results into the first numBlends values, */ - /* then pop remaining arguments. */ - static void - cf2_doBlend( const CFF_Blend blend, - CF2_Stack opStack, - CF2_UInt numBlends ) - { - CF2_UInt delta; - CF2_UInt base; - CF2_UInt i, j; - CF2_UInt numOperands = (CF2_UInt)( numBlends * blend->lenBV ); - - - base = cf2_stack_count( opStack ) - numOperands; - delta = base + numBlends; - - for ( i = 0; i < numBlends; i++ ) - { - const CF2_Fixed* weight = &blend->BV[1]; - - /* start with first term */ - CF2_Fixed sum = cf2_stack_getReal( opStack, i + base ); - - - for ( j = 1; j < blend->lenBV; j++ ) - sum = ADD_INT32( sum, - FT_MulFix( *weight++, - cf2_stack_getReal( opStack, - delta++ ) ) ); - - /* store blended result */ - cf2_stack_setReal( opStack, i + base, sum ); - } - - /* leave only `numBlends' results on stack */ - cf2_stack_pop( opStack, numOperands - numBlends ); - } - - - /* - * `error' is a shared error code used by many objects in this - * routine. Before the code continues from an error, it must check and - * record the error in `*error'. The idea is that this shared - * error code will record the first error encountered. If testing - * for an error anyway, the cost of `goto exit' is small, so we do it, - * even if continuing would be safe. In this case, `lastError' is - * set, so the testing and storing can be done in one place, at `exit'. - * - * Continuing after an error is intended for objects which do their own - * testing of `*error', e.g., array stack functions. This allows us to - * avoid an extra test after the call. - * - * Unimplemented opcodes are ignored. - * - */ - FT_LOCAL_DEF( void ) - cf2_interpT2CharString( CF2_Font font, - CF2_Buffer buf, - CF2_OutlineCallbacks callbacks, - const FT_Vector* translation, - FT_Bool doingSeac, - CF2_Fixed curX, - CF2_Fixed curY, - CF2_Fixed* width ) - { - /* lastError is used for errors that are immediately tested */ - FT_Error lastError = FT_Err_Ok; - - /* pointer to parsed font object */ - PS_Decoder* decoder = font->decoder; - - FT_Error* error = &font->error; - FT_Memory memory = font->memory; - - CF2_Fixed scaleY = font->innerTransform.d; - CF2_Fixed nominalWidthX = cf2_getNominalWidthX( decoder ); - - /* stuff for Type 1 */ - FT_Int known_othersubr_result_cnt = 0; - FT_Bool large_int = FALSE; - FT_Bool initial_map_ready = FALSE; - -#define PS_STORAGE_SIZE 3 - CF2_F16Dot16 results[PS_STORAGE_SIZE]; /* for othersubr results */ - FT_Int result_cnt = 0; - - /* save this for hinting seac accents */ - CF2_Fixed hintOriginY = curY; - - CF2_Stack opStack = NULL; - FT_UInt stackSize; - FT_Byte op1; /* first opcode byte */ - - CF2_F16Dot16 storage[CF2_STORAGE_SIZE]; /* for `put' and `get' */ - CF2_F16Dot16 flexStore[6]; /* for Type 1 flex */ - - /* instruction limit; 20,000,000 matches Avalon */ - FT_UInt32 instructionLimit = 20000000UL; - - CF2_ArrStackRec subrStack; - - FT_Bool haveWidth; - CF2_Buffer charstring = NULL; - - CF2_Int charstringIndex = -1; /* initialize to empty */ - - /* TODO: placeholders for hint structures */ - - /* objects used for hinting */ - CF2_ArrStackRec hStemHintArray; - CF2_ArrStackRec vStemHintArray; - - CF2_HintMaskRec hintMask; - CF2_GlyphPathRec glyphPath; - - - FT_ZERO( &storage ); - FT_ZERO( &results ); - FT_ZERO( &flexStore ); - - /* initialize the remaining objects */ - cf2_arrstack_init( &subrStack, - memory, - error, - sizeof ( CF2_BufferRec ) ); - cf2_arrstack_init( &hStemHintArray, - memory, - error, - sizeof ( CF2_StemHintRec ) ); - cf2_arrstack_init( &vStemHintArray, - memory, - error, - sizeof ( CF2_StemHintRec ) ); - - /* initialize CF2_StemHint arrays */ - cf2_hintmask_init( &hintMask, error ); - - /* initialize path map to manage drawing operations */ - - /* Note: last 4 params are used to handle `MoveToPermissive', which */ - /* may need to call `hintMap.Build' */ - /* TODO: MoveToPermissive is gone; are these still needed? */ - cf2_glyphpath_init( &glyphPath, - font, - callbacks, - scaleY, - /* hShift, */ - &hStemHintArray, - &vStemHintArray, - &hintMask, - hintOriginY, - &font->blues, - translation ); - - /* - * Initialize state for width parsing. From the CFF Spec: - * - * The first stack-clearing operator, which must be one of hstem, - * hstemhm, vstem, vstemhm, cntrmask, hintmask, hmoveto, vmoveto, - * rmoveto, or endchar, takes an additional argument - the width (as - * described earlier), which may be expressed as zero or one numeric - * argument. - * - * What we implement here uses the first validly specified width, but - * does not detect errors for specifying more than one width. - * - * If one of the above operators occurs without explicitly specifying - * a width, we assume the default width. - * - * CFF2 charstrings always return the default width (0). - * - */ - haveWidth = font->isCFF2 ? TRUE : FALSE; - *width = cf2_getDefaultWidthX( decoder ); - - /* - * Note: At this point, all pointers to resources must be NULL - * and all local objects must be initialized. - * There must be no branches to `exit:' above this point. - * - */ - - /* allocate an operand stack */ - stackSize = font->isCFF2 ? cf2_getMaxstack( decoder ) - : CF2_OPERAND_STACK_SIZE; - opStack = cf2_stack_init( memory, error, stackSize ); - - if ( !opStack ) - { - lastError = FT_THROW( Out_Of_Memory ); - goto exit; - } - - /* initialize subroutine stack by placing top level charstring as */ - /* first element (max depth plus one for the charstring) */ - /* Note: Caller owns and must finalize the first charstring. */ - /* Our copy of it does not change that requirement. */ - cf2_arrstack_setCount( &subrStack, CF2_MAX_SUBR + 1 ); - - charstring = (CF2_Buffer)cf2_arrstack_getBuffer( &subrStack ); - *charstring = *buf; /* structure copy */ - - charstringIndex = 0; /* entry is valid now */ - - /* catch errors so far */ - if ( *error ) - goto exit; - - /* main interpreter loop */ - while ( 1 ) - { - if ( font->isT1 ) - FT_ASSERT( known_othersubr_result_cnt == 0 || - result_cnt == 0 ); - - if ( cf2_buf_isEnd( charstring ) ) - { - /* If we've reached the end of the charstring, simulate a */ - /* cf2_cmdRETURN or cf2_cmdENDCHAR. */ - /* We do this for both CFF and CFF2. */ - if ( charstringIndex ) - op1 = cf2_cmdRETURN; /* end of buffer for subroutine */ - else - op1 = cf2_cmdENDCHAR; /* end of buffer for top level charstring */ - } - else - { - op1 = (FT_Byte)cf2_buf_readByte( charstring ); - - /* Explicit RETURN and ENDCHAR in CFF2 should be ignored. */ - /* Note: Trace message will report 0 instead of 11 or 14. */ - if ( ( op1 == cf2_cmdRETURN || op1 == cf2_cmdENDCHAR ) && - font->isCFF2 ) - op1 = cf2_cmdRESERVED_0; - } - - if ( font->isT1 ) - { - if ( !initial_map_ready && - !( op1 == cf2_cmdHSTEM || - op1 == cf2_cmdVSTEM || - op1 == cf2_cmdHSBW || - op1 == cf2_cmdCALLSUBR || - op1 == cf2_cmdRETURN || - op1 == cf2_cmdESC || - op1 == cf2_cmdENDCHAR || - op1 >= 32 /* Numbers */ ) ) - { - /* Skip outline commands first time round. */ - /* `endchar' will trigger initial hintmap build */ - /* and rewind the charstring. */ - cf2_stack_clear( opStack ); - continue; - } - - if ( result_cnt > 0 && - !( op1 == cf2_cmdCALLSUBR || - op1 == cf2_cmdRETURN || - op1 == cf2_cmdESC || - op1 >= 32 /* Numbers */ ) ) - { - /* all operands have been transferred by previous pops */ - result_cnt = 0; - } - - if ( large_int && !( op1 >= 32 || op1 == cf2_escDIV ) ) - { - FT_ERROR(( "cf2_interpT2CharString (Type 1 mode):" - " no `div' after large integer\n" )); - - large_int = FALSE; - } - } - - /* check for errors once per loop */ - if ( *error ) - goto exit; - - instructionLimit--; - if ( instructionLimit == 0 ) - { - lastError = FT_THROW( Invalid_Glyph_Format ); - goto exit; - } - - switch( op1 ) - { - case cf2_cmdRESERVED_0: - case cf2_cmdRESERVED_2: - case cf2_cmdRESERVED_17: - /* we may get here if we have a prior error */ - FT_TRACE4(( " unknown op (%d)\n", op1 )); - break; - - case cf2_cmdVSINDEX: - FT_TRACE4(( " vsindex\n" )); - - if ( !font->isCFF2 ) - break; /* clear stack & ignore */ - - if ( font->blend.usedBV ) - { - /* vsindex not allowed after blend */ - lastError = FT_THROW( Invalid_Glyph_Format ); - goto exit; - } - - { - FT_Int temp = cf2_stack_popInt( opStack ); - - - if ( temp >= 0 ) - font->vsindex = (FT_UInt)temp; - } - break; - - case cf2_cmdBLEND: - { - FT_UInt numBlends; - - - FT_TRACE4(( " blend\n" )); - - if ( !font->isCFF2 ) - break; /* clear stack & ignore */ - - /* do we have a `blend' op in a non-variant font? */ - if ( !font->blend.font ) - { - lastError = FT_THROW( Invalid_Glyph_Format ); - goto exit; - } - - /* check cached blend vector */ - if ( font->cffload->blend_check_vector( &font->blend, - font->vsindex, - font->lenNDV, - font->NDV ) ) - { - lastError = font->cffload->blend_build_vector( &font->blend, - font->vsindex, - font->lenNDV, - font->NDV ); - if ( lastError ) - goto exit; - } - - /* do the blend */ - numBlends = (FT_UInt)cf2_stack_popInt( opStack ); - if ( numBlends > stackSize ) - { - lastError = FT_THROW( Invalid_Glyph_Format ); - goto exit; - } - - cf2_doBlend( &font->blend, opStack, numBlends ); - - font->blend.usedBV = TRUE; - } - continue; /* do not clear the stack */ - - case cf2_cmdHSTEMHM: - case cf2_cmdHSTEM: - FT_TRACE4(( op1 == cf2_cmdHSTEMHM ? " hstemhm\n" : " hstem\n" )); - - if ( !font->isT1 ) - { - /* never add hints after the mask is computed */ - /* except if in Type 1 mode (no hintmask op) */ - if ( cf2_hintmask_isValid( &hintMask ) ) - { - FT_TRACE4(( "cf2_interpT2CharString:" - " invalid horizontal hint mask\n" )); - break; - } - } - - /* add left-sidebearing correction in Type 1 mode */ - cf2_doStems( font, - opStack, - &hStemHintArray, - width, - &haveWidth, - font->isT1 ? decoder->builder.left_bearing->y - : 0 ); - - if ( decoder->width_only ) - goto exit; - - break; - - case cf2_cmdVSTEMHM: - case cf2_cmdVSTEM: - FT_TRACE4(( op1 == cf2_cmdVSTEMHM ? " vstemhm\n" : " vstem\n" )); - - if ( !font->isT1 ) - { - /* never add hints after the mask is computed */ - /* except if in Type 1 mode (no hintmask op) */ - if ( cf2_hintmask_isValid( &hintMask ) ) - { - FT_TRACE4(( "cf2_interpT2CharString:" - " invalid vertical hint mask\n" )); - break; - } - } - - /* add left-sidebearing correction in Type 1 mode */ - cf2_doStems( font, - opStack, - &vStemHintArray, - width, - &haveWidth, - font->isT1 ? decoder->builder.left_bearing->x - : 0 ); - - if ( decoder->width_only ) - goto exit; - - break; - - case cf2_cmdVMOVETO: - FT_TRACE4(( " vmoveto\n" )); - - if ( font->isT1 && !decoder->flex_state && !haveWidth ) - FT_ERROR(( "cf2_interpT2CharString (Type 1 mode):" - " No width. Use hsbw/sbw as first op\n" )); - - if ( cf2_stack_count( opStack ) > 1 && !haveWidth ) - *width = ADD_INT32( cf2_stack_getReal( opStack, 0 ), - nominalWidthX ); - - /* width is defined or default after this */ - haveWidth = TRUE; - - if ( decoder->width_only ) - goto exit; - - curY = ADD_INT32( curY, cf2_stack_popFixed( opStack ) ); - - if ( !decoder->flex_state ) - cf2_glyphpath_moveTo( &glyphPath, curX, curY ); - - break; - - case cf2_cmdRLINETO: - { - CF2_UInt idx; - CF2_UInt count = cf2_stack_count( opStack ); - - - FT_TRACE4(( " rlineto\n" )); - - for ( idx = 0; idx < count; idx += 2 ) - { - curX = ADD_INT32( curX, cf2_stack_getReal( opStack, - idx + 0 ) ); - curY = ADD_INT32( curY, cf2_stack_getReal( opStack, - idx + 1 ) ); - - cf2_glyphpath_lineTo( &glyphPath, curX, curY ); - } - - cf2_stack_clear( opStack ); - } - continue; /* no need to clear stack again */ - - case cf2_cmdHLINETO: - case cf2_cmdVLINETO: - { - CF2_UInt idx; - CF2_UInt count = cf2_stack_count( opStack ); - - FT_Bool isX = FT_BOOL( op1 == cf2_cmdHLINETO ); - - - FT_TRACE4(( isX ? " hlineto\n" : " vlineto\n" )); - - for ( idx = 0; idx < count; idx++ ) - { - CF2_Fixed v = cf2_stack_getReal( opStack, idx ); - - - if ( isX ) - curX = ADD_INT32( curX, v ); - else - curY = ADD_INT32( curY, v ); - - isX = !isX; - - cf2_glyphpath_lineTo( &glyphPath, curX, curY ); - } - - cf2_stack_clear( opStack ); - } - continue; - - case cf2_cmdRCURVELINE: - case cf2_cmdRRCURVETO: - { - CF2_UInt count = cf2_stack_count( opStack ); - CF2_UInt idx = 0; - - - FT_TRACE4(( op1 == cf2_cmdRCURVELINE ? " rcurveline\n" - : " rrcurveto\n" )); - - while ( idx + 6 <= count ) - { - CF2_Fixed x1, y1, x2, y2, x3, y3; - - - x1 = ADD_INT32( cf2_stack_getReal( opStack, idx + 0 ), curX ); - y1 = ADD_INT32( cf2_stack_getReal( opStack, idx + 1 ), curY ); - x2 = ADD_INT32( cf2_stack_getReal( opStack, idx + 2 ), x1 ); - y2 = ADD_INT32( cf2_stack_getReal( opStack, idx + 3 ), y1 ); - x3 = ADD_INT32( cf2_stack_getReal( opStack, idx + 4 ), x2 ); - y3 = ADD_INT32( cf2_stack_getReal( opStack, idx + 5 ), y2 ); - - cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 ); - - curX = x3; - curY = y3; - idx += 6; - } - - if ( op1 == cf2_cmdRCURVELINE ) - { - curX = ADD_INT32( curX, cf2_stack_getReal( opStack, - idx + 0 ) ); - curY = ADD_INT32( curY, cf2_stack_getReal( opStack, - idx + 1 ) ); - - cf2_glyphpath_lineTo( &glyphPath, curX, curY ); - } - - cf2_stack_clear( opStack ); - } - continue; /* no need to clear stack again */ - - case cf2_cmdCLOSEPATH: - if ( !font->isT1 ) - FT_TRACE4(( " unknown op (%d)\n", op1 )); - else - { - FT_TRACE4(( " closepath" )); - - /* if there is no path, `closepath' is a no-op */ - ps_builder_close_contour( &decoder->builder ); - - haveWidth = TRUE; - } - break; - - case cf2_cmdCALLGSUBR: - case cf2_cmdCALLSUBR: - { - CF2_Int subrNum; - - - FT_TRACE4(( op1 == cf2_cmdCALLGSUBR ? " callgsubr" - : " callsubr" )); - - if ( ( !font->isT1 && charstringIndex > CF2_MAX_SUBR ) || - ( font->isT1 && charstringIndex > T1_MAX_SUBRS_CALLS ) ) - { - /* max subr plus one for charstring */ - lastError = FT_THROW( Invalid_Glyph_Format ); - goto exit; /* overflow of stack */ - } - - /* push our current CFF charstring region on subrStack */ - charstring = (CF2_Buffer) - cf2_arrstack_getPointer( - &subrStack, - (size_t)charstringIndex + 1 ); - - /* set up the new CFF region and pointer */ - subrNum = cf2_stack_popInt( opStack ); - - if ( font->isT1 && decoder->locals_hash ) - { - size_t* val = ft_hash_num_lookup( subrNum, - decoder->locals_hash ); - - - if ( val ) - subrNum = *val; - else - subrNum = -1; - } - - switch ( op1 ) - { - case cf2_cmdCALLGSUBR: - FT_TRACE4(( " (idx %d, entering level %d)\n", - subrNum + decoder->globals_bias, - charstringIndex + 1 )); - - if ( cf2_initGlobalRegionBuffer( decoder, - subrNum, - charstring ) ) - { - lastError = FT_THROW( Invalid_Glyph_Format ); - goto exit; /* subroutine lookup or stream error */ - } - break; - - default: - /* cf2_cmdCALLSUBR */ - FT_TRACE4(( " (idx %d, entering level %d)\n", - subrNum + decoder->locals_bias, - charstringIndex + 1 )); - - if ( cf2_initLocalRegionBuffer( decoder, - subrNum, - charstring ) ) - { - lastError = FT_THROW( Invalid_Glyph_Format ); - goto exit; /* subroutine lookup or stream error */ - } - } - - charstringIndex += 1; /* entry is valid now */ - } - continue; /* do not clear the stack */ - - case cf2_cmdRETURN: - FT_TRACE4(( " return (leaving level %d)\n", charstringIndex )); - - if ( charstringIndex < 1 ) - { - /* Note: cannot return from top charstring */ - lastError = FT_THROW( Invalid_Glyph_Format ); - goto exit; /* underflow of stack */ - } - - /* restore position in previous charstring */ - charstring = (CF2_Buffer) - cf2_arrstack_getPointer( - &subrStack, - (CF2_UInt)--charstringIndex ); - continue; /* do not clear the stack */ - - case cf2_cmdESC: - { - FT_Byte op2 = (FT_Byte)cf2_buf_readByte( charstring ); - - - /* first switch for 2-byte operators handles CFF2 */ - /* and opcodes that are reserved for both CFF and CFF2 */ - switch ( op2 ) - { - case cf2_escHFLEX: - { - static const FT_Bool readFromStack[12] = - { - TRUE /* dx1 */, FALSE /* dy1 */, - TRUE /* dx2 */, TRUE /* dy2 */, - TRUE /* dx3 */, FALSE /* dy3 */, - TRUE /* dx4 */, FALSE /* dy4 */, - TRUE /* dx5 */, FALSE /* dy5 */, - TRUE /* dx6 */, FALSE /* dy6 */ - }; - - - FT_TRACE4(( " hflex\n" )); - - cf2_doFlex( opStack, - &curX, - &curY, - &glyphPath, - readFromStack, - FALSE /* doConditionalLastRead */ ); - } - continue; - - case cf2_escFLEX: - { - static const FT_Bool readFromStack[12] = - { - TRUE /* dx1 */, TRUE /* dy1 */, - TRUE /* dx2 */, TRUE /* dy2 */, - TRUE /* dx3 */, TRUE /* dy3 */, - TRUE /* dx4 */, TRUE /* dy4 */, - TRUE /* dx5 */, TRUE /* dy5 */, - TRUE /* dx6 */, TRUE /* dy6 */ - }; - - - FT_TRACE4(( " flex\n" )); - - cf2_doFlex( opStack, - &curX, - &curY, - &glyphPath, - readFromStack, - FALSE /* doConditionalLastRead */ ); - } - break; /* TODO: why is this not a continue? */ - - case cf2_escHFLEX1: - { - static const FT_Bool readFromStack[12] = - { - TRUE /* dx1 */, TRUE /* dy1 */, - TRUE /* dx2 */, TRUE /* dy2 */, - TRUE /* dx3 */, FALSE /* dy3 */, - TRUE /* dx4 */, FALSE /* dy4 */, - TRUE /* dx5 */, TRUE /* dy5 */, - TRUE /* dx6 */, FALSE /* dy6 */ - }; - - - FT_TRACE4(( " hflex1\n" )); - - cf2_doFlex( opStack, - &curX, - &curY, - &glyphPath, - readFromStack, - FALSE /* doConditionalLastRead */ ); - } - continue; - - case cf2_escFLEX1: - { - static const FT_Bool readFromStack[12] = - { - TRUE /* dx1 */, TRUE /* dy1 */, - TRUE /* dx2 */, TRUE /* dy2 */, - TRUE /* dx3 */, TRUE /* dy3 */, - TRUE /* dx4 */, TRUE /* dy4 */, - TRUE /* dx5 */, TRUE /* dy5 */, - FALSE /* dx6 */, FALSE /* dy6 */ - }; - - - FT_TRACE4(( " flex1\n" )); - - cf2_doFlex( opStack, - &curX, - &curY, - &glyphPath, - readFromStack, - TRUE /* doConditionalLastRead */ ); - } - continue; - - /* these opcodes are always reserved */ - case cf2_escRESERVED_8: - case cf2_escRESERVED_13: - case cf2_escRESERVED_19: - case cf2_escRESERVED_25: - case cf2_escRESERVED_31: - case cf2_escRESERVED_32: - FT_TRACE4(( " unknown op (12, %d)\n", op2 )); - break; - - default: - { - if ( font->isCFF2 || op2 >= cf2_escRESERVED_38 ) - FT_TRACE4(( " unknown op (12, %d)\n", op2 )); - else if ( font->isT1 && result_cnt > 0 && op2 != cf2_escPOP ) - { - /* all operands have been transferred by previous pops */ - result_cnt = 0; - } - else - { - /* second switch for 2-byte operators handles */ - /* CFF and Type 1 */ - switch ( op2 ) - { - - case cf2_escDOTSECTION: - /* something about `flip type of locking' -- ignore it */ - FT_TRACE4(( " dotsection\n" )); - - break; - - case cf2_escVSTEM3: - case cf2_escHSTEM3: - /* - * Type 1: Type 2: - * x0 dx0 x1 dx1 x2 dx2 vstem3 x dx {dxa dxb}* vstem - * y0 dy0 y1 dy1 y2 dy2 hstem3 y dy {dya dyb}* hstem - * relative to lsb point relative to zero - * - */ - { - if ( !font->isT1 ) - FT_TRACE4(( " unknown op (12, %d)\n", op2 )); - else - { - CF2_F16Dot16 v0, v1, v2; - - FT_Bool isV = FT_BOOL( op2 == cf2_escVSTEM3 ); - - - FT_TRACE4(( isV ? " vstem3\n" - : " hstem3\n" )); - - FT_ASSERT( cf2_stack_count( opStack ) == 6 ); - - v0 = cf2_stack_getReal( opStack, 0 ); - v1 = cf2_stack_getReal( opStack, 2 ); - v2 = cf2_stack_getReal( opStack, 4 ); - - cf2_stack_setReal( - opStack, 2, - SUB_INT32( SUB_INT32( v1, v0 ), - cf2_stack_getReal( opStack, 1 ) ) ); - cf2_stack_setReal( - opStack, 4, - SUB_INT32( SUB_INT32( v2, v1 ), - cf2_stack_getReal( opStack, 3 ) ) ); - - /* add left-sidebearing correction */ - cf2_doStems( font, - opStack, - isV ? &vStemHintArray : &hStemHintArray, - width, - &haveWidth, - isV ? decoder->builder.left_bearing->x - : decoder->builder.left_bearing->y ); - - if ( decoder->width_only ) - goto exit; - } - } - break; - - case cf2_escAND: - { - CF2_F16Dot16 arg1; - CF2_F16Dot16 arg2; - - - FT_TRACE4(( " and\n" )); - - arg2 = cf2_stack_popFixed( opStack ); - arg1 = cf2_stack_popFixed( opStack ); - - cf2_stack_pushInt( opStack, arg1 && arg2 ); - } - continue; /* do not clear the stack */ - - case cf2_escOR: - { - CF2_F16Dot16 arg1; - CF2_F16Dot16 arg2; - - - FT_TRACE4(( " or\n" )); - - arg2 = cf2_stack_popFixed( opStack ); - arg1 = cf2_stack_popFixed( opStack ); - - cf2_stack_pushInt( opStack, arg1 || arg2 ); - } - continue; /* do not clear the stack */ - - case cf2_escNOT: - { - CF2_F16Dot16 arg; - - - FT_TRACE4(( " not\n" )); - - arg = cf2_stack_popFixed( opStack ); - - cf2_stack_pushInt( opStack, !arg ); - } - continue; /* do not clear the stack */ - - case cf2_escSEAC: - if ( !font->isT1 ) - FT_TRACE4(( " unknown op (12, %d)\n", op2 )); - else - { - FT_Error error2; - CF2_Int bchar_index, achar_index; - FT_Vector left_bearing, advance; - -#ifdef FT_CONFIG_OPTION_INCREMENTAL - T1_Face face = (T1_Face)decoder->builder.face; -#endif - CF2_BufferRec component; - CF2_Fixed dummyWidth; - - CF2_Int achar = cf2_stack_popInt( opStack ); - CF2_Int bchar = cf2_stack_popInt( opStack ); - - FT_Pos ady = cf2_stack_popFixed ( opStack ); - FT_Pos adx = cf2_stack_popFixed ( opStack ); - FT_Pos asb = cf2_stack_popFixed ( opStack ); - - - FT_TRACE4(( " seac\n" )); - - if ( doingSeac ) - { - FT_ERROR(( " nested seac\n" )); - lastError = FT_THROW( Invalid_Glyph_Format ); - goto exit; /* nested seac */ - } - - if ( decoder->builder.metrics_only ) - { - FT_ERROR(( " unexpected seac\n" )); - lastError = FT_THROW( Invalid_Glyph_Format ); - goto exit; /* unexpected seac */ - } - - /* `glyph_names' is set to 0 for CID fonts which do */ - /* not include an encoding. How can we deal with */ - /* these? */ -#ifdef FT_CONFIG_OPTION_INCREMENTAL - if ( decoder->glyph_names == 0 && - !face->root.internal->incremental_interface ) -#else - if ( decoder->glyph_names == 0 ) -#endif /* FT_CONFIG_OPTION_INCREMENTAL */ - { - FT_ERROR(( - "cf2_interpT2CharString: (Type 1 seac)" - " glyph names table not available in this font\n" )); - lastError = FT_THROW( Invalid_Glyph_Format ); - goto exit; - } - - /* seac weirdness */ - adx += decoder->builder.left_bearing->x; - -#ifdef FT_CONFIG_OPTION_INCREMENTAL - if ( face->root.internal->incremental_interface ) - { - /* the caller must handle the font encoding also */ - bchar_index = bchar; - achar_index = achar; - } - else -#endif - { - bchar_index = t1_lookup_glyph_by_stdcharcode_ps( - decoder, bchar ); - achar_index = t1_lookup_glyph_by_stdcharcode_ps( - decoder, achar ); - } - - if ( bchar_index < 0 || achar_index < 0 ) - { - FT_ERROR(( - "cf2_interpT2CharString: (Type 1 seac)" - " invalid seac character code arguments\n" )); - lastError = FT_THROW( Invalid_Glyph_Format ); - goto exit; - } - - /* if we are trying to load a composite glyph, */ - /* do not load the accent character and return */ - /* the array of subglyphs. */ - if ( decoder->builder.no_recurse ) - { - FT_GlyphSlot glyph = (FT_GlyphSlot)decoder->builder.glyph; - FT_GlyphLoader loader = glyph->internal->loader; - FT_SubGlyph subg; - - - /* reallocate subglyph array if necessary */ - error2 = FT_GlyphLoader_CheckSubGlyphs( loader, 2 ); - if ( error2 ) - { - lastError = error2; /* pass FreeType error through */ - goto exit; - } - - subg = loader->current.subglyphs; - - /* subglyph 0 = base character */ - subg->index = bchar_index; - subg->flags = FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES | - FT_SUBGLYPH_FLAG_USE_MY_METRICS; - subg->arg1 = 0; - subg->arg2 = 0; - subg++; - - /* subglyph 1 = accent character */ - subg->index = achar_index; - subg->flags = FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES; - subg->arg1 = (FT_Int)FIXED_TO_INT( adx - asb ); - subg->arg2 = (FT_Int)FIXED_TO_INT( ady ); - - /* set up remaining glyph fields */ - glyph->num_subglyphs = 2; - glyph->subglyphs = loader->base.subglyphs; - glyph->format = FT_GLYPH_FORMAT_COMPOSITE; - - loader->current.num_subglyphs = 2; - - goto exit; - } - - /* First load `bchar' in builder */ - /* now load the unscaled outline */ - - /* prepare loader */ - FT_GlyphLoader_Prepare( decoder->builder.loader ); - - error2 = cf2_getT1SeacComponent( decoder, - (FT_UInt)bchar_index, - &component ); - if ( error2 ) - { - lastError = error2; /* pass FreeType error through */ - goto exit; - } - cf2_interpT2CharString( font, - &component, - callbacks, - translation, - TRUE, - 0, - 0, - &dummyWidth ); - cf2_freeT1SeacComponent( decoder, &component ); - - /* save the left bearing and width of the base */ - /* character as they will be erased by the next load */ - - left_bearing = *decoder->builder.left_bearing; - advance = *decoder->builder.advance; - - decoder->builder.left_bearing->x = 0; - decoder->builder.left_bearing->y = 0; - - /* Now load `achar' on top of */ - /* the base outline */ - - error2 = cf2_getT1SeacComponent( decoder, - (FT_UInt)achar_index, - &component ); - if ( error2 ) - { - lastError = error2; /* pass FreeType error through */ - goto exit; - } - cf2_interpT2CharString( font, - &component, - callbacks, - translation, - TRUE, - adx - asb, - ady, - &dummyWidth ); - cf2_freeT1SeacComponent( decoder, &component ); - - /* restore the left side bearing and */ - /* advance width of the base character */ - - *decoder->builder.left_bearing = left_bearing; - *decoder->builder.advance = advance; - - goto exit; - } - break; - - case cf2_escSBW: - if ( !font->isT1 ) - FT_TRACE4(( " unknown op (12, %d)\n", op2 )); - else - { - CF2_Fixed lsb_x, lsb_y; - PS_Builder* builder; - - - FT_TRACE4(( " sbw" )); - - builder = &decoder->builder; - - builder->advance->y = cf2_stack_popFixed( opStack ); - builder->advance->x = cf2_stack_popFixed( opStack ); - - lsb_y = cf2_stack_popFixed( opStack ); - lsb_x = cf2_stack_popFixed( opStack ); - - builder->left_bearing->x = - ADD_INT32( builder->left_bearing->x, lsb_x ); - builder->left_bearing->y = - ADD_INT32( builder->left_bearing->y, lsb_y ); - - haveWidth = TRUE; - - /* the `metrics_only' indicates that we only want */ - /* to compute the glyph's metrics (lsb + advance */ - /* width), not load the rest of it; so exit */ - /* immediately */ - if ( builder->metrics_only ) - goto exit; - - if ( initial_map_ready ) - { - curX = ADD_INT32( curX, lsb_x ); - curY = ADD_INT32( curY, lsb_y ); - } - } - break; - - case cf2_escABS: - { - CF2_F16Dot16 arg; - - - FT_TRACE4(( " abs\n" )); - - arg = cf2_stack_popFixed( opStack ); - - if ( arg < -CF2_FIXED_MAX ) - cf2_stack_pushFixed( opStack, CF2_FIXED_MAX ); - else - cf2_stack_pushFixed( opStack, FT_ABS( arg ) ); - } - continue; /* do not clear the stack */ - - case cf2_escADD: - { - CF2_F16Dot16 summand1; - CF2_F16Dot16 summand2; - - - FT_TRACE4(( " add\n" )); - - summand2 = cf2_stack_popFixed( opStack ); - summand1 = cf2_stack_popFixed( opStack ); - - cf2_stack_pushFixed( opStack, - ADD_INT32( summand1, - summand2 ) ); - } - continue; /* do not clear the stack */ - - case cf2_escSUB: - { - CF2_F16Dot16 minuend; - CF2_F16Dot16 subtrahend; - - - FT_TRACE4(( " sub\n" )); - - subtrahend = cf2_stack_popFixed( opStack ); - minuend = cf2_stack_popFixed( opStack ); - - cf2_stack_pushFixed( opStack, - SUB_INT32( minuend, subtrahend ) ); - } - continue; /* do not clear the stack */ - - case cf2_escDIV: - { - CF2_F16Dot16 dividend; - CF2_F16Dot16 divisor; - - - FT_TRACE4(( " div\n" )); - - if ( font->isT1 && large_int ) - { - divisor = (CF2_F16Dot16)cf2_stack_popInt( opStack ); - dividend = (CF2_F16Dot16)cf2_stack_popInt( opStack ); - - large_int = FALSE; - } - else - { - divisor = cf2_stack_popFixed( opStack ); - dividend = cf2_stack_popFixed( opStack ); - } - - cf2_stack_pushFixed( opStack, - FT_DivFix( dividend, divisor ) ); - - } - continue; /* do not clear the stack */ - - case cf2_escNEG: - { - CF2_F16Dot16 arg; - - - FT_TRACE4(( " neg\n" )); - - arg = cf2_stack_popFixed( opStack ); - - if ( arg < -CF2_FIXED_MAX ) - cf2_stack_pushFixed( opStack, CF2_FIXED_MAX ); - else - cf2_stack_pushFixed( opStack, -arg ); - } - continue; /* do not clear the stack */ - - case cf2_escEQ: - { - CF2_F16Dot16 arg1; - CF2_F16Dot16 arg2; - - - FT_TRACE4(( " eq\n" )); - - arg2 = cf2_stack_popFixed( opStack ); - arg1 = cf2_stack_popFixed( opStack ); - - cf2_stack_pushInt( opStack, arg1 == arg2 ); - } - continue; /* do not clear the stack */ - - case cf2_escCALLOTHERSUBR: - if ( !font->isT1 ) - FT_TRACE4(( " unknown op (12, %d)\n", op2 )); - else - { - CF2_Int subr_no; - CF2_Int arg_cnt; - CF2_UInt count; - CF2_UInt opIdx = 0; - - - FT_TRACE4(( " callothersubr\n" )); - - subr_no = cf2_stack_popInt( opStack ); - arg_cnt = cf2_stack_popInt( opStack ); - - /*******************************************************/ - /* */ - /* remove all operands to callothersubr from the stack */ - /* */ - /* for handled othersubrs, where we know the number of */ - /* arguments, we increase the stack by the value of */ - /* known_othersubr_result_cnt */ - /* */ - /* for unhandled othersubrs the following pops adjust */ - /* the stack pointer as necessary */ - - count = cf2_stack_count( opStack ); - FT_ASSERT( (CF2_UInt)arg_cnt <= count ); - - opIdx += count - (CF2_UInt)arg_cnt; - - known_othersubr_result_cnt = 0; - result_cnt = 0; - - /* XXX TODO: The checks to `arg_count == <whatever>' */ - /* might not be correct; an othersubr expects a */ - /* certain number of operands on the PostScript stack */ - /* (as opposed to the T1 stack) but it doesn't have to */ - /* put them there by itself; previous othersubrs might */ - /* have left the operands there if they were not */ - /* followed by an appropriate number of pops */ - /* */ - /* On the other hand, Adobe Reader 7.0.8 for Linux */ - /* doesn't accept a font that contains charstrings */ - /* like */ - /* */ - /* 100 200 2 20 callothersubr */ - /* 300 1 20 callothersubr pop */ - /* */ - /* Perhaps this is the reason why BuildCharArray */ - /* exists. */ - - switch ( subr_no ) - { - case 0: /* end flex feature */ - if ( arg_cnt != 3 ) - goto Unexpected_OtherSubr; - - if ( initial_map_ready && - ( !decoder->flex_state || - decoder->num_flex_vectors != 7 ) ) - { - FT_ERROR(( "cf2_interpT2CharString (Type 1 mode):" - " unexpected flex end\n" )); - lastError = FT_THROW( Invalid_Glyph_Format ); - goto exit; - } - - /* the two `results' are popped */ - /* by the following setcurrentpoint */ - cf2_stack_pushFixed( opStack, curX ); - cf2_stack_pushFixed( opStack, curY ); - known_othersubr_result_cnt = 2; - break; - - case 1: /* start flex feature */ - if ( arg_cnt != 0 ) - goto Unexpected_OtherSubr; - - if ( !initial_map_ready ) - break; - - if ( ps_builder_check_points( &decoder->builder, 6 ) ) - goto exit; - - decoder->flex_state = 1; - decoder->num_flex_vectors = 0; - break; - - case 2: /* add flex vectors */ - { - FT_Int idx; - FT_Int idx2; - - - if ( arg_cnt != 0 ) - goto Unexpected_OtherSubr; - - if ( !initial_map_ready ) - break; - - if ( !decoder->flex_state ) - { - FT_ERROR(( "cf2_interpT2CharString (Type 1 mode):" - " missing flex start\n" )); - lastError = FT_THROW( Invalid_Glyph_Format ); - goto exit; - } - - /* note that we should not add a point for */ - /* index 0; this will move our current position */ - /* to the flex point without adding any point */ - /* to the outline */ - idx = decoder->num_flex_vectors++; - if ( idx > 0 && idx < 7 ) - { - /* in malformed fonts it is possible to have */ - /* other opcodes in the middle of a flex (which */ - /* don't increase `num_flex_vectors'); we thus */ - /* have to check whether we can add a point */ - - if ( ps_builder_check_points( &decoder->builder, - 1 ) ) - { - lastError = FT_THROW( Invalid_Glyph_Format ); - goto exit; - } - - /* map: 1->2 2->4 3->6 4->2 5->4 6->6 */ - idx2 = ( idx > 3 ? idx - 3 : idx ) * 2; - - flexStore[idx2 - 2] = curX; - flexStore[idx2 - 1] = curY; - - if ( idx == 3 || idx == 6 ) - cf2_glyphpath_curveTo( &glyphPath, - flexStore[0], - flexStore[1], - flexStore[2], - flexStore[3], - flexStore[4], - flexStore[5] ); - } - } - break; - - case 3: /* change hints */ - if ( arg_cnt != 1 ) - goto Unexpected_OtherSubr; - - if ( initial_map_ready ) - { - /* do not clear hints if initial hintmap */ - /* is not ready - we need to collate all */ - cf2_arrstack_clear( &vStemHintArray ); - cf2_arrstack_clear( &hStemHintArray ); - - cf2_hintmask_init( &hintMask, error ); - hintMask.isValid = FALSE; - hintMask.isNew = TRUE; - } - - known_othersubr_result_cnt = 1; - break; - - case 12: - case 13: - /* counter control hints, clear stack */ - cf2_stack_clear( opStack ); - break; - - case 14: - case 15: - case 16: - case 17: - case 18: /* multiple masters */ - { - PS_Blend blend = decoder->blend; - FT_UInt num_points, nn, mm; - CF2_UInt delta; - CF2_UInt values; - - - if ( !blend ) - { - FT_ERROR(( - "cf2_interpT2CharString:" - " unexpected multiple masters operator\n" )); - lastError = FT_THROW( Invalid_Glyph_Format ); - goto exit; - } - - num_points = (FT_UInt)subr_no - 13 + - ( subr_no == 18 ); - if ( arg_cnt != (FT_Int)( num_points * - blend->num_designs ) ) - { - FT_ERROR(( - "cf2_interpT2CharString:" - " incorrect number of multiple masters arguments\n" )); - lastError = FT_THROW( Invalid_Glyph_Format ); - goto exit; - } - - /* We want to compute */ - /* */ - /* a0*w0 + a1*w1 + ... + ak*wk */ - /* */ - /* but we only have a0, a1-a0, a2-a0, ..., ak-a0. */ - /* */ - /* However, given that w0 + w1 + ... + wk == 1, we */ - /* can rewrite it easily as */ - /* */ - /* a0 + (a1-a0)*w1 + (a2-a0)*w2 + ... + (ak-a0)*wk */ - /* */ - /* where k == num_designs-1. */ - /* */ - /* I guess that's why it's written in this `compact' */ - /* form. */ - /* */ - delta = opIdx + num_points; - values = opIdx; - for ( nn = 0; nn < num_points; nn++ ) - { - CF2_Fixed tmp = cf2_stack_getReal( opStack, - values ); - - - for ( mm = 1; mm < blend->num_designs; mm++ ) - tmp = ADD_INT32( tmp, - FT_MulFix( - cf2_stack_getReal( opStack, - delta++ ), - blend->weight_vector[mm] ) ); - - cf2_stack_setReal( opStack, values++, tmp ); - } - cf2_stack_pop( opStack, - (CF2_UInt)arg_cnt - num_points ); - - known_othersubr_result_cnt = (FT_Int)num_points; - break; - } - - case 19: - /* <idx> 1 19 callothersubr */ - /* ==> replace elements starting from index */ - /* cvi( <idx> ) of BuildCharArray with */ - /* WeightVector */ - { - FT_Int idx; - PS_Blend blend = decoder->blend; - - - if ( arg_cnt != 1 || !blend ) - goto Unexpected_OtherSubr; - - idx = cf2_stack_popInt( opStack ); - - if ( idx < 0 || - (FT_UInt)idx + blend->num_designs > - decoder->len_buildchar ) - goto Unexpected_OtherSubr; - - ft_memcpy( &decoder->buildchar[idx], - blend->weight_vector, - blend->num_designs * - sizeof ( blend->weight_vector[0] ) ); - } - break; - - case 20: - /* <arg1> <arg2> 2 20 callothersubr pop */ - /* ==> push <arg1> + <arg2> onto T1 stack */ - { - CF2_F16Dot16 summand1; - CF2_F16Dot16 summand2; - - - if ( arg_cnt != 2 ) - goto Unexpected_OtherSubr; - - summand2 = cf2_stack_popFixed( opStack ); - summand1 = cf2_stack_popFixed( opStack ); - - cf2_stack_pushFixed( opStack, - ADD_INT32( summand1, - summand2 ) ); - known_othersubr_result_cnt = 1; - } - break; - - case 21: - /* <arg1> <arg2> 2 21 callothersubr pop */ - /* ==> push <arg1> - <arg2> onto T1 stack */ - { - CF2_F16Dot16 minuend; - CF2_F16Dot16 subtrahend; - - - if ( arg_cnt != 2 ) - goto Unexpected_OtherSubr; - - subtrahend = cf2_stack_popFixed( opStack ); - minuend = cf2_stack_popFixed( opStack ); - - cf2_stack_pushFixed( opStack, - SUB_INT32( minuend, - subtrahend ) ); - known_othersubr_result_cnt = 1; - } - break; - - case 22: - /* <arg1> <arg2> 2 22 callothersubr pop */ - /* ==> push <arg1> * <arg2> onto T1 stack */ - { - CF2_F16Dot16 factor1; - CF2_F16Dot16 factor2; - - - if ( arg_cnt != 2 ) - goto Unexpected_OtherSubr; - - factor2 = cf2_stack_popFixed( opStack ); - factor1 = cf2_stack_popFixed( opStack ); - - cf2_stack_pushFixed( opStack, - FT_MulFix( factor1, factor2 ) ); - known_othersubr_result_cnt = 1; - } - break; - - case 23: - /* <arg1> <arg2> 2 23 callothersubr pop */ - /* ==> push <arg1> / <arg2> onto T1 stack */ - { - CF2_F16Dot16 dividend; - CF2_F16Dot16 divisor; - - - if ( arg_cnt != 2 ) - goto Unexpected_OtherSubr; - - divisor = cf2_stack_popFixed( opStack ); - dividend = cf2_stack_popFixed( opStack ); - - if ( divisor == 0 ) - goto Unexpected_OtherSubr; - - cf2_stack_pushFixed( opStack, - FT_DivFix( dividend, - divisor ) ); - known_othersubr_result_cnt = 1; - } - break; - - case 24: - /* <val> <idx> 2 24 callothersubr */ - /* ==> set BuildCharArray[cvi( <idx> )] = <val> */ - { - CF2_Int idx; - PS_Blend blend = decoder->blend; - - - if ( arg_cnt != 2 || !blend ) - goto Unexpected_OtherSubr; - - idx = cf2_stack_popInt( opStack ); - - if ( idx < 0 || - (FT_UInt)idx >= decoder->len_buildchar ) - goto Unexpected_OtherSubr; - - decoder->buildchar[idx] = - cf2_stack_popFixed( opStack ); - } - break; - - case 25: - /* <idx> 1 25 callothersubr pop */ - /* ==> push BuildCharArray[cvi( idx )] */ - /* onto T1 stack */ - { - CF2_Int idx; - PS_Blend blend = decoder->blend; - - - if ( arg_cnt != 1 || !blend ) - goto Unexpected_OtherSubr; - - idx = cf2_stack_popInt( opStack ); - - if ( idx < 0 || - (FT_UInt)idx >= decoder->len_buildchar ) - goto Unexpected_OtherSubr; - - cf2_stack_pushFixed( opStack, - decoder->buildchar[idx] ); - known_othersubr_result_cnt = 1; - } - break; - -#if 0 - case 26: - /* <val> mark <idx> */ - /* ==> set BuildCharArray[cvi( <idx> )] = <val>, */ - /* leave mark on T1 stack */ - /* <val> <idx> */ - /* ==> set BuildCharArray[cvi( <idx> )] = <val> */ - XXX which routine has left its mark on the - XXX (PostScript) stack?; - break; -#endif - - case 27: - /* <res1> <res2> <val1> <val2> 4 27 callothersubr pop */ - /* ==> push <res1> onto T1 stack if <val1> <= <val2>, */ - /* otherwise push <res2> */ - { - CF2_F16Dot16 arg1; - CF2_F16Dot16 arg2; - CF2_F16Dot16 cond1; - CF2_F16Dot16 cond2; - - - if ( arg_cnt != 4 ) - goto Unexpected_OtherSubr; - - cond2 = cf2_stack_popFixed( opStack ); - cond1 = cf2_stack_popFixed( opStack ); - arg2 = cf2_stack_popFixed( opStack ); - arg1 = cf2_stack_popFixed( opStack ); - - cf2_stack_pushFixed( opStack, - cond1 <= cond2 ? arg1 : arg2 ); - known_othersubr_result_cnt = 1; - } - break; - - case 28: - /* 0 28 callothersubr pop */ - /* ==> push random value from interval [0, 1) */ - /* onto stack */ - { - CF2_F16Dot16 r; - - - if ( arg_cnt != 0 ) - goto Unexpected_OtherSubr; - - /* only use the lower 16 bits of `random' */ - /* to generate a number in the range (0;1] */ - r = (CF2_F16Dot16) - ( ( decoder->current_subfont->random & 0xFFFF ) + 1 ); - - decoder->current_subfont->random = - cff_random( decoder->current_subfont->random ); - - cf2_stack_pushFixed( opStack, r ); - known_othersubr_result_cnt = 1; - } - break; - - default: - if ( arg_cnt >= 0 && subr_no >= 0 ) - { - FT_Int i; - - - FT_ERROR(( - "cf2_interpT2CharString (Type 1 mode):" - " unknown othersubr [%d %d], wish me luck\n", - arg_cnt, subr_no )); - - /* store the unused args */ - /* for this unhandled OtherSubr */ - - if ( arg_cnt > PS_STORAGE_SIZE ) - arg_cnt = PS_STORAGE_SIZE; - result_cnt = arg_cnt; - - for ( i = 1; i <= arg_cnt; i++ ) - results[result_cnt - i] = - cf2_stack_popFixed( opStack ); - - break; - } - /* fall through */ - - Unexpected_OtherSubr: - FT_ERROR(( "cf2_interpT2CharString (Type 1 mode):" - " invalid othersubr [%d %d]\n", - arg_cnt, subr_no )); - lastError = FT_THROW( Invalid_Glyph_Format ); - goto exit; - } - } - continue; /* do not clear the stack */ - - case cf2_escPOP: - if ( !font->isT1 ) - FT_TRACE4(( " unknown op (12, %d)\n", op2 )); - else - { - FT_TRACE4(( " pop" )); - - if ( known_othersubr_result_cnt > 0 ) - { - known_othersubr_result_cnt--; - /* ignore, we pushed the operands ourselves */ - continue; - } - - if ( result_cnt == 0 ) - { - FT_ERROR(( "cf2_interpT2CharString (Type 1 mode):" - " no more operands for othersubr\n" )); - lastError = FT_THROW( Invalid_Glyph_Format ); - goto exit; - } - - result_cnt--; - cf2_stack_pushFixed( opStack, results[result_cnt] ); - } - continue; /* do not clear the stack */ - - case cf2_escDROP: - FT_TRACE4(( " drop\n" )); - - (void)cf2_stack_popFixed( opStack ); - continue; /* do not clear the stack */ - - case cf2_escPUT: - { - CF2_F16Dot16 val; - CF2_Int idx; - - - FT_TRACE4(( " put\n" )); - - idx = cf2_stack_popInt( opStack ); - val = cf2_stack_popFixed( opStack ); - - if ( idx >= 0 && idx < CF2_STORAGE_SIZE ) - storage[idx] = val; - } - continue; /* do not clear the stack */ - - case cf2_escGET: - { - CF2_Int idx; - - - FT_TRACE4(( " get\n" )); - - idx = cf2_stack_popInt( opStack ); - - if ( idx >= 0 && idx < CF2_STORAGE_SIZE ) - cf2_stack_pushFixed( opStack, storage[idx] ); - } - continue; /* do not clear the stack */ - - case cf2_escIFELSE: - { - CF2_F16Dot16 arg1; - CF2_F16Dot16 arg2; - CF2_F16Dot16 cond1; - CF2_F16Dot16 cond2; - - - FT_TRACE4(( " ifelse\n" )); - - cond2 = cf2_stack_popFixed( opStack ); - cond1 = cf2_stack_popFixed( opStack ); - arg2 = cf2_stack_popFixed( opStack ); - arg1 = cf2_stack_popFixed( opStack ); - - cf2_stack_pushFixed( opStack, - cond1 <= cond2 ? arg1 : arg2 ); - } - continue; /* do not clear the stack */ - - case cf2_escRANDOM: /* in spec */ - { - CF2_F16Dot16 r; - - - FT_TRACE4(( " random\n" )); - - /* only use the lower 16 bits of `random' */ - /* to generate a number in the range (0;1] */ - r = (CF2_F16Dot16) - ( ( decoder->current_subfont->random & 0xFFFF ) + 1 ); - - decoder->current_subfont->random = - cff_random( decoder->current_subfont->random ); - - cf2_stack_pushFixed( opStack, r ); - } - continue; /* do not clear the stack */ - - case cf2_escMUL: - { - CF2_F16Dot16 factor1; - CF2_F16Dot16 factor2; - - - FT_TRACE4(( " mul\n" )); - - factor2 = cf2_stack_popFixed( opStack ); - factor1 = cf2_stack_popFixed( opStack ); - - cf2_stack_pushFixed( opStack, - FT_MulFix( factor1, factor2 ) ); - } - continue; /* do not clear the stack */ - - case cf2_escSQRT: - { - CF2_F16Dot16 arg; - - - FT_TRACE4(( " sqrt\n" )); - - arg = cf2_stack_popFixed( opStack ); - if ( arg > 0 ) - { - /* use a start value that doesn't make */ - /* the algorithm's addition overflow */ - FT_Fixed root = arg < 10 ? arg : arg >> 1; - FT_Fixed new_root; - - - /* Babylonian method */ - for (;;) - { - new_root = ( root + FT_DivFix( arg, root ) + 1 ) >> 1; - if ( new_root == root ) - break; - root = new_root; - } - arg = new_root; - } - else - arg = 0; - - cf2_stack_pushFixed( opStack, arg ); - } - continue; /* do not clear the stack */ - - case cf2_escDUP: - { - CF2_F16Dot16 arg; - - - FT_TRACE4(( " dup\n" )); - - arg = cf2_stack_popFixed( opStack ); - - cf2_stack_pushFixed( opStack, arg ); - cf2_stack_pushFixed( opStack, arg ); - } - continue; /* do not clear the stack */ - - case cf2_escEXCH: - { - CF2_F16Dot16 arg1; - CF2_F16Dot16 arg2; - - - FT_TRACE4(( " exch\n" )); - - arg2 = cf2_stack_popFixed( opStack ); - arg1 = cf2_stack_popFixed( opStack ); - - cf2_stack_pushFixed( opStack, arg2 ); - cf2_stack_pushFixed( opStack, arg1 ); - } - continue; /* do not clear the stack */ - - case cf2_escINDEX: - { - CF2_Int idx; - CF2_UInt size; - - - FT_TRACE4(( " index\n" )); - - idx = cf2_stack_popInt( opStack ); - size = cf2_stack_count( opStack ); - - if ( size > 0 ) - { - /* for `cf2_stack_getReal', */ - /* index 0 is bottom of stack */ - CF2_UInt gr_idx; - - - if ( idx < 0 ) - gr_idx = size - 1; - else if ( (CF2_UInt)idx >= size ) - gr_idx = 0; - else - gr_idx = size - 1 - (CF2_UInt)idx; - - cf2_stack_pushFixed( opStack, - cf2_stack_getReal( opStack, - gr_idx ) ); - } - } - continue; /* do not clear the stack */ - - case cf2_escROLL: - { - CF2_Int idx; - CF2_Int count; - - - FT_TRACE4(( " roll\n" )); - - idx = cf2_stack_popInt( opStack ); - count = cf2_stack_popInt( opStack ); - - cf2_stack_roll( opStack, count, idx ); - } - continue; /* do not clear the stack */ - - case cf2_escSETCURRENTPT: - if ( !font->isT1 ) - FT_TRACE4(( " unknown op (12, %d)\n", op2 )); - else - { - FT_TRACE4(( " setcurrentpoint" )); - - if ( !initial_map_ready ) - break; - - /* From the T1 specification, section 6.4: */ - /* */ - /* The setcurrentpoint command is used only in */ - /* conjunction with results from OtherSubrs */ - /* procedures. */ - - /* known_othersubr_result_cnt != 0 is already handled */ - /* above. */ - - /* Note, however, that both Ghostscript and Adobe */ - /* Distiller handle this situation by silently */ - /* ignoring the inappropriate `setcurrentpoint' */ - /* instruction. So we do the same. */ -#if 0 - - if ( decoder->flex_state != 1 ) - { - FT_ERROR(( "cf2_interpT2CharString:" - " unexpected `setcurrentpoint'\n" )); - goto Syntax_Error; - } - else - ... -#endif - - curY = cf2_stack_popFixed( opStack ); - curX = cf2_stack_popFixed( opStack ); - - decoder->flex_state = 0; - } - break; - - } /* end of 2nd switch checking op2 */ - } - } - } /* end of 1st switch checking op2 */ - } /* case cf2_cmdESC */ - - break; - - case cf2_cmdHSBW: - if ( !font->isT1 ) - FT_TRACE4(( " unknown op (%d)\n", op1 )); - else - { - CF2_Fixed lsb_x; - PS_Builder* builder; - - - FT_TRACE4(( " hsbw" )); - - builder = &decoder->builder; - - builder->advance->x = cf2_stack_popFixed( opStack ); - builder->advance->y = 0; - - lsb_x = cf2_stack_popFixed( opStack ); - - builder->left_bearing->x = ADD_INT32( builder->left_bearing->x, - lsb_x ); - - haveWidth = TRUE; - - /* the `metrics_only' indicates that we only want to compute */ - /* the glyph's metrics (lsb + advance width), not load the */ - /* rest of it; so exit immediately */ - if ( builder->metrics_only ) - goto exit; - - if ( initial_map_ready ) - curX = ADD_INT32( curX, lsb_x ); - } - break; - - case cf2_cmdENDCHAR: - FT_TRACE4(( " endchar\n" )); - - if ( font->isT1 && !initial_map_ready ) - { - FT_TRACE5(( "cf2_interpT2CharString (Type 1 mode): " - "Build initial hintmap, rewinding...\n" )); - - /* trigger initial hintmap build */ - cf2_glyphpath_moveTo( &glyphPath, curX, curY ); - - initial_map_ready = TRUE; - - /* change hints routine - clear for rewind */ - cf2_arrstack_clear( &vStemHintArray ); - cf2_arrstack_clear( &hStemHintArray ); - - cf2_hintmask_init( &hintMask, error ); - hintMask.isValid = FALSE; - hintMask.isNew = TRUE; - - /* rewind charstring */ - /* some charstrings use endchar from a final subroutine call */ - /* without returning, detect these and exit to the top level */ - /* charstring */ - while ( charstringIndex > 0 ) - { - FT_TRACE4(( " return (leaving level %d)\n", charstringIndex )); - - /* restore position in previous charstring */ - charstring = (CF2_Buffer) - cf2_arrstack_getPointer( - &subrStack, - (CF2_UInt)--charstringIndex ); - } - charstring->ptr = charstring->start; - - break; - } - - if ( cf2_stack_count( opStack ) == 1 || - cf2_stack_count( opStack ) == 5 ) - { - if ( !haveWidth ) - *width = ADD_INT32( cf2_stack_getReal( opStack, 0 ), - nominalWidthX ); - } - - /* width is defined or default after this */ - haveWidth = TRUE; - - if ( decoder->width_only ) - goto exit; - - /* close path if still open */ - cf2_glyphpath_closeOpenPath( &glyphPath ); - - /* disable seac for CFF2 and Type1 */ - /* (charstring ending with args on stack) */ - if ( !font->isCFF2 && !font->isT1 && cf2_stack_count( opStack ) > 1 ) - { - /* must be either 4 or 5 -- */ - /* this is a (deprecated) implied `seac' operator */ - - CF2_Int achar; - CF2_Int bchar; - CF2_BufferRec component; - CF2_Fixed dummyWidth; /* ignore component width */ - FT_Error error2; - - - if ( doingSeac ) - { - lastError = FT_THROW( Invalid_Glyph_Format ); - goto exit; /* nested seac */ - } - - achar = cf2_stack_popInt( opStack ); - bchar = cf2_stack_popInt( opStack ); - - curY = cf2_stack_popFixed( opStack ); - curX = cf2_stack_popFixed( opStack ); - - error2 = cf2_getSeacComponent( decoder, achar, &component ); - if ( error2 ) - { - lastError = error2; /* pass FreeType error through */ - goto exit; - } - cf2_interpT2CharString( font, - &component, - callbacks, - translation, - TRUE, - curX, - curY, - &dummyWidth ); - cf2_freeSeacComponent( decoder, &component ); - - error2 = cf2_getSeacComponent( decoder, bchar, &component ); - if ( error2 ) - { - lastError = error2; /* pass FreeType error through */ - goto exit; - } - cf2_interpT2CharString( font, - &component, - callbacks, - translation, - TRUE, - 0, - 0, - &dummyWidth ); - cf2_freeSeacComponent( decoder, &component ); - } - goto exit; - - case cf2_cmdCNTRMASK: - case cf2_cmdHINTMASK: - /* the final \n in the tracing message gets added in */ - /* `cf2_hintmask_read' (which also traces the mask bytes) */ - FT_TRACE4(( op1 == cf2_cmdCNTRMASK ? " cntrmask" : " hintmask" )); - - /* never add hints after the mask is computed */ - if ( cf2_stack_count( opStack ) > 1 && - cf2_hintmask_isValid( &hintMask ) ) - { - FT_TRACE4(( "cf2_interpT2CharString: invalid hint mask\n" )); - break; - } - - /* if there are arguments on the stack, there this is an */ - /* implied cf2_cmdVSTEMHM */ - cf2_doStems( font, - opStack, - &vStemHintArray, - width, - &haveWidth, - 0 ); - - if ( decoder->width_only ) - goto exit; - - if ( op1 == cf2_cmdHINTMASK ) - { - /* consume the hint mask bytes which follow the operator */ - cf2_hintmask_read( &hintMask, - charstring, - cf2_arrstack_size( &hStemHintArray ) + - cf2_arrstack_size( &vStemHintArray ) ); - } - else - { - /* - * Consume the counter mask bytes which follow the operator: - * Build a temporary hint map, just to place and lock those - * stems participating in the counter mask. These are most - * likely the dominant hstems, and are grouped together in a - * few counter groups, not necessarily in correspondence - * with the hint groups. This reduces the chances of - * conflicts between hstems that are initially placed in - * separate hint groups and then brought together. The - * positions are copied back to `hStemHintArray', so we can - * discard `counterMask' and `counterHintMap'. - * - */ - CF2_HintMapRec counterHintMap; - CF2_HintMaskRec counterMask; - - - cf2_hintmap_init( &counterHintMap, - font, - &glyphPath.initialHintMap, - &glyphPath.hintMoves, - scaleY ); - cf2_hintmask_init( &counterMask, error ); - - cf2_hintmask_read( &counterMask, - charstring, - cf2_arrstack_size( &hStemHintArray ) + - cf2_arrstack_size( &vStemHintArray ) ); - cf2_hintmap_build( &counterHintMap, - &hStemHintArray, - &vStemHintArray, - &counterMask, - 0, - FALSE ); - } - break; - - case cf2_cmdRMOVETO: - FT_TRACE4(( " rmoveto\n" )); - - if ( font->isT1 && !decoder->flex_state && !haveWidth ) - FT_ERROR(( "cf2_interpT2CharString (Type 1 mode):" - " No width. Use hsbw/sbw as first op\n" )); - - if ( cf2_stack_count( opStack ) > 2 && !haveWidth ) - *width = ADD_INT32( cf2_stack_getReal( opStack, 0 ), - nominalWidthX ); - - /* width is defined or default after this */ - haveWidth = TRUE; - - if ( decoder->width_only ) - goto exit; - - curY = ADD_INT32( curY, cf2_stack_popFixed( opStack ) ); - curX = ADD_INT32( curX, cf2_stack_popFixed( opStack ) ); - - if ( !decoder->flex_state ) - cf2_glyphpath_moveTo( &glyphPath, curX, curY ); - - break; - - case cf2_cmdHMOVETO: - FT_TRACE4(( " hmoveto\n" )); - - if ( font->isT1 && !decoder->flex_state && !haveWidth ) - FT_ERROR(( "cf2_interpT2CharString (Type 1 mode):" - " No width. Use hsbw/sbw as first op\n" )); - - if ( cf2_stack_count( opStack ) > 1 && !haveWidth ) - *width = ADD_INT32( cf2_stack_getReal( opStack, 0 ), - nominalWidthX ); - - /* width is defined or default after this */ - haveWidth = TRUE; - - if ( decoder->width_only ) - goto exit; - - curX = ADD_INT32( curX, cf2_stack_popFixed( opStack ) ); - - if ( !decoder->flex_state ) - cf2_glyphpath_moveTo( &glyphPath, curX, curY ); - - break; - - case cf2_cmdRLINECURVE: - { - CF2_UInt count = cf2_stack_count( opStack ); - CF2_UInt idx = 0; - - - FT_TRACE4(( " rlinecurve\n" )); - - while ( idx + 6 < count ) - { - curX = ADD_INT32( curX, cf2_stack_getReal( opStack, - idx + 0 ) ); - curY = ADD_INT32( curY, cf2_stack_getReal( opStack, - idx + 1 ) ); - - cf2_glyphpath_lineTo( &glyphPath, curX, curY ); - idx += 2; - } - - while ( idx < count ) - { - CF2_Fixed x1, y1, x2, y2, x3, y3; - - - x1 = ADD_INT32( cf2_stack_getReal( opStack, idx + 0 ), curX ); - y1 = ADD_INT32( cf2_stack_getReal( opStack, idx + 1 ), curY ); - x2 = ADD_INT32( cf2_stack_getReal( opStack, idx + 2 ), x1 ); - y2 = ADD_INT32( cf2_stack_getReal( opStack, idx + 3 ), y1 ); - x3 = ADD_INT32( cf2_stack_getReal( opStack, idx + 4 ), x2 ); - y3 = ADD_INT32( cf2_stack_getReal( opStack, idx + 5 ), y2 ); - - cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 ); - - curX = x3; - curY = y3; - idx += 6; - } - - cf2_stack_clear( opStack ); - } - continue; /* no need to clear stack again */ - - case cf2_cmdVVCURVETO: - { - CF2_UInt count, count1 = cf2_stack_count( opStack ); - CF2_UInt idx = 0; - - - /* if `cf2_stack_count' isn't of the form 4n or 4n+1, */ - /* we enforce it by clearing the second bit */ - /* (and sorting the stack indexing to suit) */ - count = count1 & ~2U; - idx += count1 - count; - - FT_TRACE4(( " vvcurveto\n" )); - - while ( idx < count ) - { - CF2_Fixed x1, y1, x2, y2, x3, y3; - - - if ( ( count - idx ) & 1 ) - { - x1 = ADD_INT32( cf2_stack_getReal( opStack, idx ), curX ); - - idx++; - } - else - x1 = curX; - - y1 = ADD_INT32( cf2_stack_getReal( opStack, idx + 0 ), curY ); - x2 = ADD_INT32( cf2_stack_getReal( opStack, idx + 1 ), x1 ); - y2 = ADD_INT32( cf2_stack_getReal( opStack, idx + 2 ), y1 ); - x3 = x2; - y3 = ADD_INT32( cf2_stack_getReal( opStack, idx + 3 ), y2 ); - - cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 ); - - curX = x3; - curY = y3; - idx += 4; - } - - cf2_stack_clear( opStack ); - } - continue; /* no need to clear stack again */ - - case cf2_cmdHHCURVETO: - { - CF2_UInt count, count1 = cf2_stack_count( opStack ); - CF2_UInt idx = 0; - - - /* if `cf2_stack_count' isn't of the form 4n or 4n+1, */ - /* we enforce it by clearing the second bit */ - /* (and sorting the stack indexing to suit) */ - count = count1 & ~2U; - idx += count1 - count; - - FT_TRACE4(( " hhcurveto\n" )); - - while ( idx < count ) - { - CF2_Fixed x1, y1, x2, y2, x3, y3; - - - if ( ( count - idx ) & 1 ) - { - y1 = ADD_INT32( cf2_stack_getReal( opStack, idx ), curY ); - - idx++; - } - else - y1 = curY; - - x1 = ADD_INT32( cf2_stack_getReal( opStack, idx + 0 ), curX ); - x2 = ADD_INT32( cf2_stack_getReal( opStack, idx + 1 ), x1 ); - y2 = ADD_INT32( cf2_stack_getReal( opStack, idx + 2 ), y1 ); - x3 = ADD_INT32( cf2_stack_getReal( opStack, idx + 3 ), x2 ); - y3 = y2; - - cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 ); - - curX = x3; - curY = y3; - idx += 4; - } - - cf2_stack_clear( opStack ); - } - continue; /* no need to clear stack again */ - - case cf2_cmdVHCURVETO: - case cf2_cmdHVCURVETO: - { - CF2_UInt count, count1 = cf2_stack_count( opStack ); - CF2_UInt idx = 0; - - FT_Bool alternate = FT_BOOL( op1 == cf2_cmdHVCURVETO ); - - - /* if `cf2_stack_count' isn't of the form 8n, 8n+1, */ - /* 8n+4, or 8n+5, we enforce it by clearing the */ - /* second bit */ - /* (and sorting the stack indexing to suit) */ - count = count1 & ~2U; - idx += count1 - count; - - FT_TRACE4(( alternate ? " hvcurveto\n" : " vhcurveto\n" )); - - while ( idx < count ) - { - CF2_Fixed x1, x2, x3, y1, y2, y3; - - - if ( alternate ) - { - x1 = ADD_INT32( cf2_stack_getReal( opStack, idx + 0 ), curX ); - y1 = curY; - x2 = ADD_INT32( cf2_stack_getReal( opStack, idx + 1 ), x1 ); - y2 = ADD_INT32( cf2_stack_getReal( opStack, idx + 2 ), y1 ); - y3 = ADD_INT32( cf2_stack_getReal( opStack, idx + 3 ), y2 ); - - if ( count - idx == 5 ) - { - x3 = ADD_INT32( cf2_stack_getReal( opStack, idx + 4 ), x2 ); - - idx++; - } - else - x3 = x2; - - alternate = FALSE; - } - else - { - x1 = curX; - y1 = ADD_INT32( cf2_stack_getReal( opStack, idx + 0 ), curY ); - x2 = ADD_INT32( cf2_stack_getReal( opStack, idx + 1 ), x1 ); - y2 = ADD_INT32( cf2_stack_getReal( opStack, idx + 2 ), y1 ); - x3 = ADD_INT32( cf2_stack_getReal( opStack, idx + 3 ), x2 ); - - if ( count - idx == 5 ) - { - y3 = ADD_INT32( cf2_stack_getReal( opStack, idx + 4 ), y2 ); - - idx++; - } - else - y3 = y2; - - alternate = TRUE; - } - - cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 ); - - curX = x3; - curY = y3; - idx += 4; - } - - cf2_stack_clear( opStack ); - } - continue; /* no need to clear stack again */ - - case cf2_cmdEXTENDEDNMBR: - { - CF2_Int v; - - CF2_Int byte1 = cf2_buf_readByte( charstring ); - CF2_Int byte2 = cf2_buf_readByte( charstring ); - - - v = (FT_Short)( ( byte1 << 8 ) | - byte2 ); - - FT_TRACE4(( " %d", v )); - - cf2_stack_pushInt( opStack, v ); - } - continue; - - default: - /* numbers */ - { - if ( /* op1 >= 32 && */ op1 <= 246 ) - { - CF2_Int v; - - - v = op1 - 139; - - FT_TRACE4(( " %d", v )); - - /* -107 .. 107 */ - cf2_stack_pushInt( opStack, v ); - } - - else if ( /* op1 >= 247 && */ op1 <= 250 ) - { - CF2_Int v; - - - v = op1; - v -= 247; - v *= 256; - v += cf2_buf_readByte( charstring ); - v += 108; - - FT_TRACE4(( " %d", v )); - - /* 108 .. 1131 */ - cf2_stack_pushInt( opStack, v ); - } - - else if ( /* op1 >= 251 && */ op1 <= 254 ) - { - CF2_Int v; - - - v = op1; - v -= 251; - v *= 256; - v += cf2_buf_readByte( charstring ); - v = -v - 108; - - FT_TRACE4(( " %d", v )); - - /* -1131 .. -108 */ - cf2_stack_pushInt( opStack, v ); - } - - else /* op1 == 255 */ - { - CF2_Fixed v; - - FT_UInt32 byte1 = (FT_UInt32)cf2_buf_readByte( charstring ); - FT_UInt32 byte2 = (FT_UInt32)cf2_buf_readByte( charstring ); - FT_UInt32 byte3 = (FT_UInt32)cf2_buf_readByte( charstring ); - FT_UInt32 byte4 = (FT_UInt32)cf2_buf_readByte( charstring ); - - - v = (CF2_Fixed)( ( byte1 << 24 ) | - ( byte2 << 16 ) | - ( byte3 << 8 ) | - byte4 ); - - /* - * For Type 1: - * - * According to the specification, values > 32000 or < -32000 - * must be followed by a `div' operator to make the result be - * in the range [-32000;32000]. We expect that the second - * argument of `div' is not a large number. Additionally, we - * don't handle stuff like `<large1> <large2> <num> div <num> - * div' or <large1> <large2> <num> div div'. This is probably - * not allowed anyway. - * - * <large> <num> <num>+ div is not checked but should not be - * allowed as the large value remains untouched. - * - */ - if ( font->isT1 ) - { - if ( v > 32000 || v < -32000 ) - { - if ( large_int ) - FT_ERROR(( "cf2_interpT2CharString (Type 1 mode):" - " no `div' after large integer\n" )); - else - large_int = TRUE; - } - - FT_TRACE4(( " %d", v )); - - cf2_stack_pushInt( opStack, (CF2_Int)v ); - } - else - { - FT_TRACE4(( " %.5fF", v / 65536.0 )); - - cf2_stack_pushFixed( opStack, v ); - } - } - } - continue; /* don't clear stack */ - - } /* end of switch statement checking `op1' */ - - cf2_stack_clear( opStack ); - - } /* end of main interpreter loop */ - - /* we get here if the charstring ends without cf2_cmdENDCHAR */ - FT_TRACE4(( "cf2_interpT2CharString:" - " charstring ends without ENDCHAR\n" )); - - exit: - /* check whether last error seen is also the first one */ - cf2_setError( error, lastError ); - - if ( *error ) - FT_TRACE4(( "charstring error %d\n", *error )); - - /* free resources from objects we've used */ - cf2_glyphpath_finalize( &glyphPath ); - cf2_arrstack_finalize( &vStemHintArray ); - cf2_arrstack_finalize( &hStemHintArray ); - cf2_arrstack_finalize( &subrStack ); - cf2_stack_free( opStack ); - - FT_TRACE4(( "\n" )); - - return; - } - - -/* END */ diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/src/sfnt/sfdriver.c b/extensions/gdx-freetype/jni/freetype-2.9.1/src/sfnt/sfdriver.c deleted file mode 100644 index 303e1ca9f..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/src/sfnt/sfdriver.c +++ /dev/null @@ -1,1288 +0,0 @@ -/***************************************************************************/ -/* */ -/* sfdriver.c */ -/* */ -/* High-level SFNT driver interface (body). */ -/* */ -/* Copyright 1996-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#include <ft2build.h> -#include FT_INTERNAL_DEBUG_H -#include FT_INTERNAL_SFNT_H -#include FT_INTERNAL_OBJECTS_H -#include FT_TRUETYPE_IDS_H - -#include "sfdriver.h" -#include "ttload.h" -#include "sfobjs.h" -#include "sfntpic.h" - -#include "sferrors.h" - -#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS -#include "ttsbit.h" -#endif - -#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES -#include "ttpost.h" -#endif - -#ifdef TT_CONFIG_OPTION_BDF -#include "ttbdf.h" -#include FT_SERVICE_BDF_H -#endif - -#include "ttcmap.h" -#include "ttkern.h" -#include "ttmtx.h" - -#include FT_SERVICE_GLYPH_DICT_H -#include FT_SERVICE_POSTSCRIPT_NAME_H -#include FT_SERVICE_SFNT_H -#include FT_SERVICE_TT_CMAP_H - -#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT -#include FT_MULTIPLE_MASTERS_H -#include FT_SERVICE_MULTIPLE_MASTERS_H -#endif - - - /*************************************************************************/ - /* */ - /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ - /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */ - /* messages during execution. */ - /* */ -#undef FT_COMPONENT -#define FT_COMPONENT trace_sfdriver - - - /* - * SFNT TABLE SERVICE - * - */ - - static void* - get_sfnt_table( TT_Face face, - FT_Sfnt_Tag tag ) - { - void* table; - - - switch ( tag ) - { - case FT_SFNT_HEAD: - table = &face->header; - break; - - case FT_SFNT_HHEA: - table = &face->horizontal; - break; - - case FT_SFNT_VHEA: - table = face->vertical_info ? &face->vertical : NULL; - break; - - case FT_SFNT_OS2: - table = ( face->os2.version == 0xFFFFU ) ? NULL : &face->os2; - break; - - case FT_SFNT_POST: - table = &face->postscript; - break; - - case FT_SFNT_MAXP: - table = &face->max_profile; - break; - - case FT_SFNT_PCLT: - table = face->pclt.Version ? &face->pclt : NULL; - break; - - default: - table = NULL; - } - - return table; - } - - - static FT_Error - sfnt_table_info( TT_Face face, - FT_UInt idx, - FT_ULong *tag, - FT_ULong *offset, - FT_ULong *length ) - { - if ( !offset || !length ) - return FT_THROW( Invalid_Argument ); - - if ( !tag ) - *length = face->num_tables; - else - { - if ( idx >= face->num_tables ) - return FT_THROW( Table_Missing ); - - *tag = face->dir_tables[idx].Tag; - *offset = face->dir_tables[idx].Offset; - *length = face->dir_tables[idx].Length; - } - - return FT_Err_Ok; - } - - - FT_DEFINE_SERVICE_SFNT_TABLEREC( - sfnt_service_sfnt_table, - - (FT_SFNT_TableLoadFunc)tt_face_load_any, /* load_table */ - (FT_SFNT_TableGetFunc) get_sfnt_table, /* get_table */ - (FT_SFNT_TableInfoFunc)sfnt_table_info /* table_info */ - ) - - -#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES - - /* - * GLYPH DICT SERVICE - * - */ - - static FT_Error - sfnt_get_glyph_name( FT_Face face, - FT_UInt glyph_index, - FT_Pointer buffer, - FT_UInt buffer_max ) - { - FT_String* gname; - FT_Error error; - - - error = tt_face_get_ps_name( (TT_Face)face, glyph_index, &gname ); - if ( !error ) - FT_STRCPYN( buffer, gname, buffer_max ); - - return error; - } - - - static FT_UInt - sfnt_get_name_index( FT_Face face, - FT_String* glyph_name ) - { - TT_Face ttface = (TT_Face)face; - - FT_UInt i, max_gid = FT_UINT_MAX; - - - if ( face->num_glyphs < 0 ) - return 0; - else if ( (FT_ULong)face->num_glyphs < FT_UINT_MAX ) - max_gid = (FT_UInt)face->num_glyphs; - else - FT_TRACE0(( "Ignore glyph names for invalid GID 0x%08x - 0x%08x\n", - FT_UINT_MAX, face->num_glyphs )); - - for ( i = 0; i < max_gid; i++ ) - { - FT_String* gname; - FT_Error error = tt_face_get_ps_name( ttface, i, &gname ); - - - if ( error ) - continue; - - if ( !ft_strcmp( glyph_name, gname ) ) - return i; - } - - return 0; - } - - - FT_DEFINE_SERVICE_GLYPHDICTREC( - sfnt_service_glyph_dict, - - (FT_GlyphDict_GetNameFunc) sfnt_get_glyph_name, /* get_name */ - (FT_GlyphDict_NameIndexFunc)sfnt_get_name_index /* name_index */ - ) - -#endif /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */ - - - /* - * POSTSCRIPT NAME SERVICE - * - */ - - /* an array representing allowed ASCII characters in a PS string */ - static const unsigned char sfnt_ps_map[16] = - { - /* 4 0 C 8 */ - 0x00, 0x00, /* 0x00: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 */ - 0x00, 0x00, /* 0x10: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 */ - 0xDE, 0x7C, /* 0x20: 1 1 0 1 1 1 1 0 0 1 1 1 1 1 0 0 */ - 0xFF, 0xAF, /* 0x30: 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 */ - 0xFF, 0xFF, /* 0x40: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 */ - 0xFF, 0xD7, /* 0x50: 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 */ - 0xFF, 0xFF, /* 0x60: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 */ - 0xFF, 0x57 /* 0x70: 1 1 1 1 1 1 1 1 0 1 0 1 0 1 1 1 */ - }; - - - static int - sfnt_is_postscript( int c ) - { - unsigned int cc; - - - if ( c < 0 || c >= 0x80 ) - return 0; - - cc = (unsigned int)c; - - return sfnt_ps_map[cc >> 3] & ( 1 << ( cc & 0x07 ) ); - } - - -#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT - - /* Only ASCII letters and digits are taken for a variation font */ - /* instance's PostScript name. */ - /* */ - /* `ft_isalnum' is a macro, but we need a function here, thus */ - /* this definition. */ - static int - sfnt_is_alphanumeric( int c ) - { - return ft_isalnum( c ); - } - - - /* the implementation of MurmurHash3 is taken and adapted from */ - /* https://github.com/aappleby/smhasher/blob/master/src/MurmurHash3.cpp */ - -#define ROTL32( x, r ) ( x << r ) | ( x >> ( 32 - r ) ) - - - static FT_UInt32 - fmix32( FT_UInt32 h ) - { - h ^= h >> 16; - h *= 0x85ebca6b; - h ^= h >> 13; - h *= 0xc2b2ae35; - h ^= h >> 16; - - return h; - } - - - static void - murmur_hash_3_128( const void* key, - const unsigned int len, - FT_UInt32 seed, - void* out ) - { - const FT_Byte* data = (const FT_Byte*)key; - const int nblocks = (int)len / 16; - - FT_UInt32 h1 = seed; - FT_UInt32 h2 = seed; - FT_UInt32 h3 = seed; - FT_UInt32 h4 = seed; - - const FT_UInt32 c1 = 0x239b961b; - const FT_UInt32 c2 = 0xab0e9789; - const FT_UInt32 c3 = 0x38b34ae5; - const FT_UInt32 c4 = 0xa1e38b93; - - const FT_UInt32* blocks = (const FT_UInt32*)( data + nblocks * 16 ); - - int i; - - - for( i = -nblocks; i; i++ ) - { - FT_UInt32 k1 = blocks[i * 4 + 0]; - FT_UInt32 k2 = blocks[i * 4 + 1]; - FT_UInt32 k3 = blocks[i * 4 + 2]; - FT_UInt32 k4 = blocks[i * 4 + 3]; - - - k1 *= c1; - k1 = ROTL32( k1, 15 ); - k1 *= c2; - h1 ^= k1; - - h1 = ROTL32( h1, 19 ); - h1 += h2; - h1 = h1 * 5 + 0x561ccd1b; - - k2 *= c2; - k2 = ROTL32( k2, 16 ); - k2 *= c3; - h2 ^= k2; - - h2 = ROTL32( h2, 17 ); - h2 += h3; - h2 = h2 * 5 + 0x0bcaa747; - - k3 *= c3; - k3 = ROTL32( k3, 17 ); - k3 *= c4; - h3 ^= k3; - - h3 = ROTL32( h3, 15 ); - h3 += h4; - h3 = h3 * 5 + 0x96cd1c35; - - k4 *= c4; - k4 = ROTL32( k4, 18 ); - k4 *= c1; - h4 ^= k4; - - h4 = ROTL32( h4, 13 ); - h4 += h1; - h4 = h4 * 5 + 0x32ac3b17; - } - - { - const FT_Byte* tail = (const FT_Byte*)( data + nblocks * 16 ); - - FT_UInt32 k1 = 0; - FT_UInt32 k2 = 0; - FT_UInt32 k3 = 0; - FT_UInt32 k4 = 0; - - - switch ( len & 15 ) - { - case 15: - k4 ^= (FT_UInt32)tail[14] << 16; - case 14: - k4 ^= (FT_UInt32)tail[13] << 8; - case 13: - k4 ^= (FT_UInt32)tail[12]; - k4 *= c4; - k4 = ROTL32( k4, 18 ); - k4 *= c1; - h4 ^= k4; - - case 12: - k3 ^= (FT_UInt32)tail[11] << 24; - case 11: - k3 ^= (FT_UInt32)tail[10] << 16; - case 10: - k3 ^= (FT_UInt32)tail[9] << 8; - case 9: - k3 ^= (FT_UInt32)tail[8]; - k3 *= c3; - k3 = ROTL32( k3, 17 ); - k3 *= c4; - h3 ^= k3; - - case 8: - k2 ^= (FT_UInt32)tail[7] << 24; - case 7: - k2 ^= (FT_UInt32)tail[6] << 16; - case 6: - k2 ^= (FT_UInt32)tail[5] << 8; - case 5: - k2 ^= (FT_UInt32)tail[4]; - k2 *= c2; - k2 = ROTL32( k2, 16 ); - k2 *= c3; - h2 ^= k2; - - case 4: - k1 ^= (FT_UInt32)tail[3] << 24; - case 3: - k1 ^= (FT_UInt32)tail[2] << 16; - case 2: - k1 ^= (FT_UInt32)tail[1] << 8; - case 1: - k1 ^= (FT_UInt32)tail[0]; - k1 *= c1; - k1 = ROTL32( k1, 15 ); - k1 *= c2; - h1 ^= k1; - } - } - - h1 ^= len; - h2 ^= len; - h3 ^= len; - h4 ^= len; - - h1 += h2; - h1 += h3; - h1 += h4; - - h2 += h1; - h3 += h1; - h4 += h1; - - h1 = fmix32( h1 ); - h2 = fmix32( h2 ); - h3 = fmix32( h3 ); - h4 = fmix32( h4 ); - - h1 += h2; - h1 += h3; - h1 += h4; - - h2 += h1; - h3 += h1; - h4 += h1; - - ((FT_UInt32*)out)[0] = h1; - ((FT_UInt32*)out)[1] = h2; - ((FT_UInt32*)out)[2] = h3; - ((FT_UInt32*)out)[3] = h4; - } - - -#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */ - - - typedef int (*char_type_func)( int c ); - - - /* handling of PID/EID 3/0 and 3/1 is the same */ -#define IS_WIN( n ) ( (n)->platformID == 3 && \ - ( (n)->encodingID == 1 || (n)->encodingID == 0 ) && \ - (n)->languageID == 0x409 ) - -#define IS_APPLE( n ) ( (n)->platformID == 1 && \ - (n)->encodingID == 0 && \ - (n)->languageID == 0 ) - - static char* - get_win_string( FT_Memory memory, - FT_Stream stream, - TT_Name entry, - char_type_func char_type, - FT_Bool report_invalid_characters ) - { - FT_Error error = FT_Err_Ok; - - char* result = NULL; - FT_String* r; - FT_Char* p; - FT_UInt len; - - FT_UNUSED( error ); - - - if ( FT_ALLOC( result, entry->stringLength / 2 + 1 ) ) - return NULL; - - if ( FT_STREAM_SEEK( entry->stringOffset ) || - FT_FRAME_ENTER( entry->stringLength ) ) - { - FT_FREE( result ); - entry->stringLength = 0; - entry->stringOffset = 0; - FT_FREE( entry->string ); - - return NULL; - } - - r = (FT_String*)result; - p = (FT_Char*)stream->cursor; - - for ( len = entry->stringLength / 2; len > 0; len--, p += 2 ) - { - if ( p[0] == 0 ) - { - if ( char_type( p[1] ) ) - *r++ = p[1]; - else - { - if ( report_invalid_characters ) - { - FT_TRACE0(( "get_win_string:" - " Character `%c' (0x%X) invalid in PS name string\n", - p[1], p[1] )); - /* it's not the job of FreeType to correct PS names... */ - *r++ = p[1]; - } - } - } - } - *r = '\0'; - - FT_FRAME_EXIT(); - - return result; - } - - - static char* - get_apple_string( FT_Memory memory, - FT_Stream stream, - TT_Name entry, - char_type_func char_type, - FT_Bool report_invalid_characters ) - { - FT_Error error = FT_Err_Ok; - - char* result = NULL; - FT_String* r; - FT_Char* p; - FT_UInt len; - - FT_UNUSED( error ); - - - if ( FT_ALLOC( result, entry->stringLength + 1 ) ) - return NULL; - - if ( FT_STREAM_SEEK( entry->stringOffset ) || - FT_FRAME_ENTER( entry->stringLength ) ) - { - FT_FREE( result ); - entry->stringOffset = 0; - entry->stringLength = 0; - FT_FREE( entry->string ); - - return NULL; - } - - r = (FT_String*)result; - p = (FT_Char*)stream->cursor; - - for ( len = entry->stringLength; len > 0; len--, p++ ) - { - if ( char_type( *p ) ) - *r++ = *p; - else - { - if ( report_invalid_characters ) - { - FT_TRACE0(( "get_apple_string:" - " Character `%c' (0x%X) invalid in PS name string\n", - *p, *p )); - /* it's not the job of FreeType to correct PS names... */ - *r++ = *p; - } - } - } - *r = '\0'; - - FT_FRAME_EXIT(); - - return result; - } - - - static FT_Bool - sfnt_get_name_id( TT_Face face, - FT_UShort id, - FT_Int *win, - FT_Int *apple ) - { - FT_Int n; - - - *win = -1; - *apple = -1; - - for ( n = 0; n < face->num_names; n++ ) - { - TT_Name name = face->name_table.names + n; - - - if ( name->nameID == id && name->stringLength > 0 ) - { - if ( IS_WIN( name ) ) - *win = n; - - if ( IS_APPLE( name ) ) - *apple = n; - } - } - - return ( *win >= 0 ) || ( *apple >= 0 ); - } - - -#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT - - /* - The maximum length of an axis value descriptor. - - We need 65536 different values for the decimal fraction; this fits - nicely into five decimal places. Consequently, it consists of - - . the minus sign if the number is negative, - . up to five characters for the digits before the decimal point, - . the decimal point if there is a fractional part, and - . up to five characters for the digits after the decimal point. - - We also need one byte for the leading `_' character and up to four - bytes for the axis tag. - */ -#define MAX_VALUE_DESCRIPTOR_LEN ( 1 + 5 + 1 + 5 + 1 + 4 ) - - - /* the maximum length of PostScript font names */ -#define MAX_PS_NAME_LEN 127 - - - /* - * Find the shortest decimal representation of a 16.16 fixed point - * number. The function fills `buf' with the result, returning a pointer - * to the position after the representation's last byte. - */ - - static char* - fixed2float( FT_Int fixed, - char* buf ) - { - char* p; - char* q; - char tmp[5]; - - FT_Int int_part; - FT_Int frac_part; - - FT_Int i; - - - p = buf; - - if ( fixed == 0 ) - { - *p++ = '0'; - return p; - } - - if ( fixed < 0 ) - { - *p++ = '-'; - fixed = -fixed; - } - - int_part = ( fixed >> 16 ) & 0xFFFF; - frac_part = fixed & 0xFFFF; - - /* get digits of integer part (in reverse order) */ - q = tmp; - while ( int_part > 0 ) - { - *q++ = '0' + int_part % 10; - int_part /= 10; - } - - /* copy digits in correct order to buffer */ - while ( q > tmp ) - *p++ = *--q; - - if ( !frac_part ) - return p; - - /* save position of point */ - q = p; - *p++ = '.'; - - /* apply rounding */ - frac_part = frac_part * 10 + 5; - - /* get digits of fractional part */ - for ( i = 0; i < 5; i++ ) - { - *p++ = '0' + (char)( frac_part / 0x10000L ); - - frac_part %= 0x10000L; - if ( !frac_part ) - break; - - frac_part *= 10; - } - - /* - If the remainder stored in `frac_part' (after the last FOR loop) is - smaller than 34480*10, the resulting decimal value minus 0.00001 is - an equivalent representation of `fixed'. - - The above FOR loop always finds the larger of the two values; I - verified this by iterating over all possible fixed point numbers. - - If the remainder is 17232*10, both values are equally good, and we - take the next even number (following IEEE 754's `round to nearest, - ties to even' rounding rule). - - If the remainder is smaller than 17232*10, the lower of the two - numbers is nearer to the exact result (values 17232 and 34480 were - also found by testing all possible fixed point values). - - We use this to find a shorter decimal representation. If not ending - with digit zero, we take the representation with less error. - */ - p--; - if ( p - q == 5 ) /* five digits? */ - { - /* take the representation that has zero as the last digit */ - if ( frac_part < 34480 * 10 && - *p == '1' ) - *p = '0'; - - /* otherwise use the one with less error */ - else if ( frac_part == 17232 * 10 && - *p & 1 ) - *p -= 1; - - else if ( frac_part < 17232 * 10 && - *p != '0' ) - *p -= 1; - } - - /* remove trailing zeros */ - while ( *p == '0' ) - *p-- = '\0'; - - return p + 1; - } - - - static const char hexdigits[16] = - { - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' - }; - - - static const char* - sfnt_get_var_ps_name( TT_Face face ) - { - FT_Error error; - FT_Memory memory = face->root.memory; - - FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm; - - FT_UInt num_coords; - FT_Fixed* coords; - FT_MM_Var* mm_var; - - FT_Int found, win, apple; - FT_UInt i, j; - - char* result = NULL; - char* p; - - - if ( !face->var_postscript_prefix ) - { - FT_UInt len; - - - /* check whether we have a Variations PostScript Name Prefix */ - found = sfnt_get_name_id( face, - TT_NAME_ID_VARIATIONS_PREFIX, - &win, - &apple ); - if ( !found ) - { - /* otherwise use the typographic family name */ - found = sfnt_get_name_id( face, - TT_NAME_ID_TYPOGRAPHIC_FAMILY, - &win, - &apple ); - } - - if ( !found ) - { - /* as a last resort we try the family name; note that this is */ - /* not in the Adobe TechNote, but GX fonts (which predate the */ - /* TechNote) benefit from this behaviour */ - found = sfnt_get_name_id( face, - TT_NAME_ID_FONT_FAMILY, - &win, - &apple ); - } - - if ( !found ) - { - FT_TRACE0(( "sfnt_get_var_ps_name:" - " Can't construct PS name prefix for font instances\n" )); - return NULL; - } - - /* prefer Windows entries over Apple */ - if ( win != -1 ) - result = get_win_string( face->root.memory, - face->name_table.stream, - face->name_table.names + win, - sfnt_is_alphanumeric, - 0 ); - else - result = get_apple_string( face->root.memory, - face->name_table.stream, - face->name_table.names + apple, - sfnt_is_alphanumeric, - 0 ); - - len = ft_strlen( result ); - - /* sanitize if necessary; we reserve space for 36 bytes (a 128bit */ - /* checksum as a hex number, preceded by `-' and followed by three */ - /* ASCII dots, to be used if the constructed PS name would be too */ - /* long); this is also sufficient for a single instance */ - if ( len > MAX_PS_NAME_LEN - ( 1 + 32 + 3 ) ) - { - len = MAX_PS_NAME_LEN - ( 1 + 32 + 3 ); - result[len] = '\0'; - - FT_TRACE0(( "sfnt_get_var_ps_name:" - " Shortening variation PS name prefix\n" - " " - " to %d characters\n", len )); - } - - face->var_postscript_prefix = result; - face->var_postscript_prefix_len = len; - } - - mm->get_var_blend( FT_FACE( face ), - &num_coords, - &coords, - NULL, - &mm_var ); - - if ( FT_IS_NAMED_INSTANCE( FT_FACE( face ) ) && - !FT_IS_VARIATION( FT_FACE( face ) ) ) - { - SFNT_Service sfnt = (SFNT_Service)face->sfnt; - - FT_Long instance = ( ( face->root.face_index & 0x7FFF0000L ) >> 16 ) - 1; - FT_UInt psid = mm_var->namedstyle[instance].psid; - - char* ps_name = NULL; - - - /* try first to load the name string with index `postScriptNameID' */ - if ( psid == 6 || - ( psid > 255 && psid < 32768 ) ) - (void)sfnt->get_name( face, (FT_UShort)psid, &ps_name ); - - if ( ps_name ) - { - result = ps_name; - p = result + ft_strlen( result ) + 1; - - goto check_length; - } - else - { - /* otherwise construct a name using `subfamilyNameID' */ - FT_UInt strid = mm_var->namedstyle[instance].strid; - - char* subfamily_name; - char* s; - - - (void)sfnt->get_name( face, (FT_UShort)strid, &subfamily_name ); - - if ( !subfamily_name ) - { - FT_TRACE1(( "sfnt_get_var_ps_name:" - " can't construct named instance PS name;\n" - " " - " trying to construct normal instance PS name\n" )); - goto construct_instance_name; - } - - /* after the prefix we have character `-' followed by the */ - /* subfamily name (using only characters a-z, A-Z, and 0-9) */ - if ( FT_ALLOC( result, face->var_postscript_prefix_len + - 1 + ft_strlen( subfamily_name ) + 1 ) ) - return NULL; - - ft_strcpy( result, face->var_postscript_prefix ); - - p = result + face->var_postscript_prefix_len; - *p++ = '-'; - - s = subfamily_name; - while ( *s ) - { - if ( ft_isalnum( *s ) ) - *p++ = *s; - s++; - } - *p++ = '\0'; - - FT_FREE( subfamily_name ); - } - } - else - { - FT_Var_Axis* axis; - - - construct_instance_name: - axis = mm_var->axis; - - if ( FT_ALLOC( result, - face->var_postscript_prefix_len + - num_coords * MAX_VALUE_DESCRIPTOR_LEN + 1 ) ) - return NULL; - - p = result; - - ft_strcpy( p, face->var_postscript_prefix ); - p += face->var_postscript_prefix_len; - - for ( i = 0; i < num_coords; i++, coords++, axis++ ) - { - char t; - - - /* omit axis value descriptor if it is identical */ - /* to the default axis value */ - if ( *coords == axis->def ) - continue; - - *p++ = '_'; - p = fixed2float( *coords, p ); - - t = (char)( axis->tag >> 24 ); - if ( t != ' ' && ft_isalnum( t ) ) - *p++ = t; - t = (char)( axis->tag >> 16 ); - if ( t != ' ' && ft_isalnum( t ) ) - *p++ = t; - t = (char)( axis->tag >> 8 ); - if ( t != ' ' && ft_isalnum( t ) ) - *p++ = t; - t = (char)axis->tag; - if ( t != ' ' && ft_isalnum( t ) ) - *p++ = t; - } - } - - check_length: - if ( p - result > MAX_PS_NAME_LEN ) - { - /* the PS name is too long; replace the part after the prefix with */ - /* a checksum; we use MurmurHash 3 with a hash length of 128 bit */ - - FT_UInt32 seed = 123456789; - - FT_UInt32 hash[4]; - FT_UInt32* h; - - - murmur_hash_3_128( result, p - result, seed, hash ); - - p = result + face->var_postscript_prefix_len; - *p++ = '-'; - - /* we convert the hash value to hex digits from back to front */ - p += 32 + 3; - h = hash + 3; - - *p-- = '\0'; - *p-- = '.'; - *p-- = '.'; - *p-- = '.'; - - for ( i = 0; i < 4; i++, h-- ) - { - FT_UInt32 v = *h; - - - for ( j = 0; j < 8; j++ ) - { - *p-- = hexdigits[v & 0xF]; - v >>= 4; - } - } - } - - return result; - } - -#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */ - - - static const char* - sfnt_get_ps_name( TT_Face face ) - { - FT_Int found, win, apple; - const char* result = NULL; - - - if ( face->postscript_name ) - return face->postscript_name; - -#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT - if ( face->blend && - ( FT_IS_NAMED_INSTANCE( FT_FACE( face ) ) || - FT_IS_VARIATION( FT_FACE( face ) ) ) ) - { - face->postscript_name = sfnt_get_var_ps_name( face ); - return face->postscript_name; - } -#endif - - /* scan the name table to see whether we have a Postscript name here, */ - /* either in Macintosh or Windows platform encodings */ - found = sfnt_get_name_id( face, TT_NAME_ID_PS_NAME, &win, &apple ); - if ( !found ) - return NULL; - - /* prefer Windows entries over Apple */ - if ( win != -1 ) - result = get_win_string( face->root.memory, - face->name_table.stream, - face->name_table.names + win, - sfnt_is_postscript, - 1 ); - else - result = get_apple_string( face->root.memory, - face->name_table.stream, - face->name_table.names + apple, - sfnt_is_postscript, - 1 ); - - face->postscript_name = result; - - return result; - } - - - FT_DEFINE_SERVICE_PSFONTNAMEREC( - sfnt_service_ps_name, - - (FT_PsName_GetFunc)sfnt_get_ps_name /* get_ps_font_name */ - ) - - - /* - * TT CMAP INFO - */ - FT_DEFINE_SERVICE_TTCMAPSREC( - tt_service_get_cmap_info, - - (TT_CMap_Info_GetFunc)tt_get_cmap_info /* get_cmap_info */ - ) - - -#ifdef TT_CONFIG_OPTION_BDF - - static FT_Error - sfnt_get_charset_id( TT_Face face, - const char* *acharset_encoding, - const char* *acharset_registry ) - { - BDF_PropertyRec encoding, registry; - FT_Error error; - - - /* XXX: I don't know whether this is correct, since - * tt_face_find_bdf_prop only returns something correct if we have - * previously selected a size that is listed in the BDF table. - * Should we change the BDF table format to include single offsets - * for `CHARSET_REGISTRY' and `CHARSET_ENCODING'? - */ - error = tt_face_find_bdf_prop( face, "CHARSET_REGISTRY", ®istry ); - if ( !error ) - { - error = tt_face_find_bdf_prop( face, "CHARSET_ENCODING", &encoding ); - if ( !error ) - { - if ( registry.type == BDF_PROPERTY_TYPE_ATOM && - encoding.type == BDF_PROPERTY_TYPE_ATOM ) - { - *acharset_encoding = encoding.u.atom; - *acharset_registry = registry.u.atom; - } - else - error = FT_THROW( Invalid_Argument ); - } - } - - return error; - } - - - FT_DEFINE_SERVICE_BDFRec( - sfnt_service_bdf, - - (FT_BDF_GetCharsetIdFunc)sfnt_get_charset_id, /* get_charset_id */ - (FT_BDF_GetPropertyFunc) tt_face_find_bdf_prop /* get_property */ - ) - - -#endif /* TT_CONFIG_OPTION_BDF */ - - - /* - * SERVICE LIST - */ - -#if defined TT_CONFIG_OPTION_POSTSCRIPT_NAMES && defined TT_CONFIG_OPTION_BDF - FT_DEFINE_SERVICEDESCREC5( - sfnt_services, - - FT_SERVICE_ID_SFNT_TABLE, &SFNT_SERVICE_SFNT_TABLE_GET, - FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &SFNT_SERVICE_PS_NAME_GET, - FT_SERVICE_ID_GLYPH_DICT, &SFNT_SERVICE_GLYPH_DICT_GET, - FT_SERVICE_ID_BDF, &SFNT_SERVICE_BDF_GET, - FT_SERVICE_ID_TT_CMAP, &TT_SERVICE_CMAP_INFO_GET ) -#elif defined TT_CONFIG_OPTION_POSTSCRIPT_NAMES - FT_DEFINE_SERVICEDESCREC4( - sfnt_services, - - FT_SERVICE_ID_SFNT_TABLE, &SFNT_SERVICE_SFNT_TABLE_GET, - FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &SFNT_SERVICE_PS_NAME_GET, - FT_SERVICE_ID_GLYPH_DICT, &SFNT_SERVICE_GLYPH_DICT_GET, - FT_SERVICE_ID_TT_CMAP, &TT_SERVICE_CMAP_INFO_GET ) -#elif defined TT_CONFIG_OPTION_BDF - FT_DEFINE_SERVICEDESCREC4( - sfnt_services, - - FT_SERVICE_ID_SFNT_TABLE, &SFNT_SERVICE_SFNT_TABLE_GET, - FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &SFNT_SERVICE_PS_NAME_GET, - FT_SERVICE_ID_BDF, &SFNT_SERVICE_BDF_GET, - FT_SERVICE_ID_TT_CMAP, &TT_SERVICE_CMAP_INFO_GET ) -#else - FT_DEFINE_SERVICEDESCREC3( - sfnt_services, - - FT_SERVICE_ID_SFNT_TABLE, &SFNT_SERVICE_SFNT_TABLE_GET, - FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &SFNT_SERVICE_PS_NAME_GET, - FT_SERVICE_ID_TT_CMAP, &TT_SERVICE_CMAP_INFO_GET ) -#endif - - - FT_CALLBACK_DEF( FT_Module_Interface ) - sfnt_get_interface( FT_Module module, - const char* module_interface ) - { - /* SFNT_SERVICES_GET dereferences `library' in PIC mode */ -#ifdef FT_CONFIG_OPTION_PIC - FT_Library library; - - - if ( !module ) - return NULL; - library = module->library; - if ( !library ) - return NULL; -#else - FT_UNUSED( module ); -#endif - - return ft_service_list_lookup( SFNT_SERVICES_GET, module_interface ); - } - - -#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS -#define PUT_EMBEDDED_BITMAPS( a ) a -#else -#define PUT_EMBEDDED_BITMAPS( a ) NULL -#endif - -#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES -#define PUT_PS_NAMES( a ) a -#else -#define PUT_PS_NAMES( a ) NULL -#endif - - FT_DEFINE_SFNT_INTERFACE( - sfnt_interface, - - tt_face_goto_table, /* TT_Loader_GotoTableFunc goto_table */ - - sfnt_init_face, /* TT_Init_Face_Func init_face */ - sfnt_load_face, /* TT_Load_Face_Func load_face */ - sfnt_done_face, /* TT_Done_Face_Func done_face */ - sfnt_get_interface, /* FT_Module_Requester get_interface */ - - tt_face_load_any, /* TT_Load_Any_Func load_any */ - - tt_face_load_head, /* TT_Load_Table_Func load_head */ - tt_face_load_hhea, /* TT_Load_Metrics_Func load_hhea */ - tt_face_load_cmap, /* TT_Load_Table_Func load_cmap */ - tt_face_load_maxp, /* TT_Load_Table_Func load_maxp */ - tt_face_load_os2, /* TT_Load_Table_Func load_os2 */ - tt_face_load_post, /* TT_Load_Table_Func load_post */ - - tt_face_load_name, /* TT_Load_Table_Func load_name */ - tt_face_free_name, /* TT_Free_Table_Func free_name */ - - tt_face_load_kern, /* TT_Load_Table_Func load_kern */ - tt_face_load_gasp, /* TT_Load_Table_Func load_gasp */ - tt_face_load_pclt, /* TT_Load_Table_Func load_init */ - - /* see `ttload.h' */ - PUT_EMBEDDED_BITMAPS( tt_face_load_bhed ), - /* TT_Load_Table_Func load_bhed */ - PUT_EMBEDDED_BITMAPS( tt_face_load_sbit_image ), - /* TT_Load_SBit_Image_Func load_sbit_image */ - - /* see `ttpost.h' */ - PUT_PS_NAMES( tt_face_get_ps_name ), - /* TT_Get_PS_Name_Func get_psname */ - PUT_PS_NAMES( tt_face_free_ps_names ), - /* TT_Free_Table_Func free_psnames */ - - /* since version 2.1.8 */ - tt_face_get_kerning, /* TT_Face_GetKerningFunc get_kerning */ - - /* since version 2.2 */ - tt_face_load_font_dir, /* TT_Load_Table_Func load_font_dir */ - tt_face_load_hmtx, /* TT_Load_Metrics_Func load_hmtx */ - - /* see `ttsbit.h' and `sfnt.h' */ - PUT_EMBEDDED_BITMAPS( tt_face_load_sbit ), - /* TT_Load_Table_Func load_eblc */ - PUT_EMBEDDED_BITMAPS( tt_face_free_sbit ), - /* TT_Free_Table_Func free_eblc */ - - PUT_EMBEDDED_BITMAPS( tt_face_set_sbit_strike ), - /* TT_Set_SBit_Strike_Func set_sbit_strike */ - PUT_EMBEDDED_BITMAPS( tt_face_load_strike_metrics ), - /* TT_Load_Strike_Metrics_Func load_strike_metrics */ - - tt_face_get_metrics, /* TT_Get_Metrics_Func get_metrics */ - - tt_face_get_name, /* TT_Get_Name_Func get_name */ - sfnt_get_name_id /* TT_Get_Name_ID_Func get_name_id */ - ) - - - FT_DEFINE_MODULE( - sfnt_module_class, - - 0, /* not a font driver or renderer */ - sizeof ( FT_ModuleRec ), - - "sfnt", /* driver name */ - 0x10000L, /* driver version 1.0 */ - 0x20000L, /* driver requires FreeType 2.0 or higher */ - - (const void*)&SFNT_INTERFACE_GET, /* module specific interface */ - - (FT_Module_Constructor)NULL, /* module_init */ - (FT_Module_Destructor) NULL, /* module_done */ - (FT_Module_Requester) sfnt_get_interface /* get_interface */ - ) - - -/* END */ diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/src/tools/ftfuzzer/rasterfuzzer.cc b/extensions/gdx-freetype/jni/freetype-2.9.1/src/tools/ftfuzzer/rasterfuzzer.cc deleted file mode 100644 index c69b95ea0..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/src/tools/ftfuzzer/rasterfuzzer.cc +++ /dev/null @@ -1,129 +0,0 @@ -// rasterfuzzer.cc -// -// A fuzzing function to test FreeType's rasterizers with libFuzzer. -// -// Copyright 2016-2018 by -// David Turner, Robert Wilhelm, and Werner Lemberg. -// -// This file is part of the FreeType project, and may only be used, -// modified, and distributed under the terms of the FreeType project -// license, LICENSE.TXT. By continuing to use, modify, or distribute -// this file you indicate that you have read the license and -// understand and accept it fully. - - -#include <stdint.h> - -#include <vector> - - - using namespace std; - - -#include <ft2build.h> - -#include FT_FREETYPE_H -#include FT_IMAGE_H -#include FT_OUTLINE_H - - - static FT_Library library; - static int InitResult; - - - struct FT_Global { - FT_Global() { - InitResult = FT_Init_FreeType( &library ); - } - ~FT_Global() { - FT_Done_FreeType( library ); - } - }; - - FT_Global global_ft; - - - extern "C" int - LLVMFuzzerTestOneInput( const uint8_t* data, - size_t size_ ) - { - unsigned char pixels[4]; - - FT_Bitmap bitmap_mono = { - 1, // rows - 1, // width - 4, // pitch - pixels, // buffer - 2, // num_grays - FT_PIXEL_MODE_MONO, // pixel_mode - 0, // palette_mode - NULL // palette - }; - - FT_Bitmap bitmap_gray = { - 1, // rows - 1, // width - 4, // pitch - pixels, // buffer - 256, // num_grays - FT_PIXEL_MODE_GRAY, // pixel_mode - 0, // palette_mode - NULL // palette - }; - - const size_t vsize = sizeof ( FT_Vector ); - const size_t tsize = sizeof ( char ); - - // we use the input data for both points and tags - short n_points = short( size_ / ( vsize + tsize ) ); - if ( n_points <= 2 ) - return 0; - - FT_Vector* points = reinterpret_cast<FT_Vector*>( - const_cast<uint8_t*>( - data ) ); - char* tags = reinterpret_cast<char*>( - const_cast<uint8_t*>( - data + size_t( n_points ) * vsize ) ); - - // to reduce the number of invalid outlines that are immediately - // rejected in `FT_Outline_Render', limit values to 2^18 pixels - // (i.e., 2^24 bits) - for ( short i = 0; i < n_points; i++ ) - { - if ( points[i].x == LONG_MIN ) - points[i].x = 0; - else if ( points[i].x < 0 ) - points[i].x = -( -points[i].x & 0xFFFFFF ) - 1; - else - points[i].x = ( points[i].x & 0xFFFFFF ) + 1; - - if ( points[i].y == LONG_MIN ) - points[i].y = 0; - else if ( points[i].y < 0 ) - points[i].y = -( -points[i].y & 0xFFFFFF ) - 1; - else - points[i].y = ( points[i].y & 0xFFFFFF ) + 1; - } - - short contours[1]; - contours[0] = n_points - 1; - - FT_Outline outline = - { - 1, // n_contours - n_points, // n_points - points, // points - tags, // tags - contours, // contours - FT_OUTLINE_NONE // flags - }; - - FT_Outline_Get_Bitmap( library, &outline, &bitmap_mono ); - FT_Outline_Get_Bitmap( library, &outline, &bitmap_gray ); - - return 0; - } - - -// END diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/src/tools/ftrandom/Makefile b/extensions/gdx-freetype/jni/freetype-2.9.1/src/tools/ftrandom/Makefile deleted file mode 100644 index 24dc49c56..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/src/tools/ftrandom/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -# TOP_DIR and OBJ_DIR should be set by the user to the right directories, -# if necessary. - -TOP_DIR ?= ../../.. -OBJ_DIR ?= $(TOP_DIR)/objs - - -# The setup below is for gcc on a Unix-like platform, -# where FreeType has been set up to create a static library -# (which is the default). - -VPATH = $(OBJ_DIR) \ - $(OBJ_DIR)/.libs - -SRC_DIR = $(TOP_DIR)/src/tools/ftrandom - -CC = gcc -WFLAGS = -Wmissing-prototypes \ - -Wunused \ - -Wimplicit \ - -Wreturn-type \ - -Wparentheses \ - -pedantic \ - -Wformat \ - -Wchar-subscripts \ - -Wsequence-point -CFLAGS = $(WFLAGS) \ - -g -INCLUDES = -I $(TOP_DIR)/include -LDFLAGS = -LIBS = -lm \ - -lz \ - -lpng \ - -lbz2 \ - -lharfbuzz - -all: $(OBJ_DIR)/ftrandom - -$(OBJ_DIR)/ftrandom.o: $(SRC_DIR)/ftrandom.c - $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $< - -$(OBJ_DIR)/ftrandom: $(OBJ_DIR)/ftrandom.o libfreetype.a - $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) - -# EOF diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/src/tools/ftrandom/README b/extensions/gdx-freetype/jni/freetype-2.9.1/src/tools/ftrandom/README deleted file mode 100644 index 7c610864b..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/src/tools/ftrandom/README +++ /dev/null @@ -1,69 +0,0 @@ -ftrandom -======== - -This program expects a set of directories containing good fonts, and a set -of extensions of fonts to be tested. It will randomly pick a font, copy it, -introduce an error and then test it. - -The FreeType tests are quite basic; for each erroneous font ftrandom - - . forks off a new tester, - . initializes the library, - . opens each font in the file, - . loads each glyph, - . optionally reviews the contours of the glyph, - . optionally rasterizes the glyph, and - . closes the face. - -If a tester takes longer than 20 seconds, ftrandom saves the erroneous font -and continues. If the tester exits normally or with an error, then the -superstructure removes the test font and continues. - - -Command line options --------------------- - - --all Test every font in the directory(ies) no matter - what its extension. - --check-outlines Call `FT_Outline_Decompose' on each glyph. - --dir <dir> Append <dir> to the list of directories to search - for good fonts. No recursive search. - --error-count <cnt> Introduce <cnt> single-byte errors into the - erroneous fonts (default: 1). - --error-fraction <frac> Multiply the file size of the font by <frac> and - introduce that many errors into the erroneous - font file. <frac> should be in the range [0;1] - (default: 0.0). - --ext <ext> Add <ext> to the set of font types tested. - --help Print out this list of options. - --nohints Specify FT_LOAD_NO_HINTING when loading glyphs. - --rasterize Call `FT_Render_Glyph' as well as loading it. - --result <dir> This is the directory in which test files are - placed. - --test <file> Run a single test on a pre-generated testcase. - This is done in the current process so it can be - debugged more easily. - -The default font extensions tested by ftrandom are - - .ttf .otf .ttc .cid .pfb .pfa .bdf .pcf .pfr .fon .otb .cff - -The default font directory is controlled by the macro `GOOD_FONTS_DIR' in -the source code (and can be thus specified during compilation); its default -value is - - /usr/local/share/fonts - -The default result directory is `results' (in the current directory). - - -Compilation ------------ - -Two possible solutions. - -. Run ftrandom within a debugging tool like `valgrind' to catch various - memory issues. - -. Compile FreeType with sanitizer flags as provided by gcc or clang, for - example, then link it with ftrandom. diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/src/truetype/ttgxvar.c b/extensions/gdx-freetype/jni/freetype-2.9.1/src/truetype/ttgxvar.c deleted file mode 100644 index 29ab2a4ef..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/src/truetype/ttgxvar.c +++ /dev/null @@ -1,4074 +0,0 @@ -/***************************************************************************/ -/* */ -/* ttgxvar.c */ -/* */ -/* TrueType GX Font Variation loader */ -/* */ -/* Copyright 2004-2018 by */ -/* David Turner, Robert Wilhelm, Werner Lemberg, and George Williams. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - - /*************************************************************************/ - /* */ - /* Apple documents the `fvar', `gvar', `cvar', and `avar' tables at */ - /* */ - /* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6[fgca]var.html */ - /* */ - /* The documentation for `gvar' is not intelligible; `cvar' refers you */ - /* to `gvar' and is thus also incomprehensible. */ - /* */ - /* The documentation for `avar' appears correct, but Apple has no fonts */ - /* with an `avar' table, so it is hard to test. */ - /* */ - /* Many thanks to John Jenkins (at Apple) in figuring this out. */ - /* */ - /* */ - /* Apple's `kern' table has some references to tuple indices, but as */ - /* there is no indication where these indices are defined, nor how to */ - /* interpolate the kerning values (different tuples have different */ - /* classes) this issue is ignored. */ - /* */ - /*************************************************************************/ - - -#include <ft2build.h> -#include FT_INTERNAL_DEBUG_H -#include FT_CONFIG_CONFIG_H -#include FT_INTERNAL_STREAM_H -#include FT_INTERNAL_SFNT_H -#include FT_TRUETYPE_TAGS_H -#include FT_TRUETYPE_IDS_H -#include FT_MULTIPLE_MASTERS_H -#include FT_LIST_H - -#include "ttpload.h" -#include "ttgxvar.h" - -#include "tterrors.h" - - -#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT - - -#define FT_Stream_FTell( stream ) \ - (FT_ULong)( (stream)->cursor - (stream)->base ) -#define FT_Stream_SeekSet( stream, off ) \ - (stream)->cursor = \ - ( (off) < (FT_ULong)( (stream)->limit - (stream)->base ) ) \ - ? (stream)->base + (off) \ - : (stream)->limit - - - /*************************************************************************/ - /* */ - /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ - /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */ - /* messages during execution. */ - /* */ -#undef FT_COMPONENT -#define FT_COMPONENT trace_ttgxvar - - - /*************************************************************************/ - /*************************************************************************/ - /***** *****/ - /***** Internal Routines *****/ - /***** *****/ - /*************************************************************************/ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* The macro ALL_POINTS is used in `ft_var_readpackedpoints'. It */ - /* indicates that there is a delta for every point without needing to */ - /* enumerate all of them. */ - /* */ - - /* ensure that value `0' has the same width as a pointer */ -#define ALL_POINTS (FT_UShort*)~(FT_PtrDist)0 - - -#define GX_PT_POINTS_ARE_WORDS 0x80U -#define GX_PT_POINT_RUN_COUNT_MASK 0x7FU - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* ft_var_readpackedpoints */ - /* */ - /* <Description> */ - /* Read a set of points to which the following deltas will apply. */ - /* Points are packed with a run length encoding. */ - /* */ - /* <Input> */ - /* stream :: The data stream. */ - /* */ - /* size :: The size of the table holding the data. */ - /* */ - /* <Output> */ - /* point_cnt :: The number of points read. A zero value means that */ - /* all points in the glyph will be affected, without */ - /* enumerating them individually. */ - /* */ - /* <Return> */ - /* An array of FT_UShort containing the affected points or the */ - /* special value ALL_POINTS. */ - /* */ - static FT_UShort* - ft_var_readpackedpoints( FT_Stream stream, - FT_ULong size, - FT_UInt *point_cnt ) - { - FT_UShort *points = NULL; - FT_UInt n; - FT_UInt runcnt; - FT_UInt i, j; - FT_UShort first; - FT_Memory memory = stream->memory; - FT_Error error = FT_Err_Ok; - - FT_UNUSED( error ); - - - *point_cnt = 0; - - n = FT_GET_BYTE(); - if ( n == 0 ) - return ALL_POINTS; - - if ( n & GX_PT_POINTS_ARE_WORDS ) - { - n &= GX_PT_POINT_RUN_COUNT_MASK; - n <<= 8; - n |= FT_GET_BYTE(); - } - - if ( n > size ) - { - FT_TRACE1(( "ft_var_readpackedpoints: number of points too large\n" )); - return NULL; - } - - /* in the nested loops below we increase `i' twice; */ - /* it is faster to simply allocate one more slot */ - /* than to add another test within the loop */ - if ( FT_NEW_ARRAY( points, n + 1 ) ) - return NULL; - - *point_cnt = n; - - first = 0; - i = 0; - while ( i < n ) - { - runcnt = FT_GET_BYTE(); - if ( runcnt & GX_PT_POINTS_ARE_WORDS ) - { - runcnt &= GX_PT_POINT_RUN_COUNT_MASK; - first += FT_GET_USHORT(); - points[i++] = first; - - /* first point not included in run count */ - for ( j = 0; j < runcnt; j++ ) - { - first += FT_GET_USHORT(); - points[i++] = first; - if ( i >= n ) - break; - } - } - else - { - first += FT_GET_BYTE(); - points[i++] = first; - - for ( j = 0; j < runcnt; j++ ) - { - first += FT_GET_BYTE(); - points[i++] = first; - if ( i >= n ) - break; - } - } - } - - return points; - } - - -#define GX_DT_DELTAS_ARE_ZERO 0x80U -#define GX_DT_DELTAS_ARE_WORDS 0x40U -#define GX_DT_DELTA_RUN_COUNT_MASK 0x3FU - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* ft_var_readpackeddeltas */ - /* */ - /* <Description> */ - /* Read a set of deltas. These are packed slightly differently than */ - /* points. In particular there is no overall count. */ - /* */ - /* <Input> */ - /* stream :: The data stream. */ - /* */ - /* size :: The size of the table holding the data. */ - /* */ - /* delta_cnt :: The number of deltas to be read. */ - /* */ - /* <Return> */ - /* An array of FT_Short containing the deltas for the affected */ - /* points. (This only gets the deltas for one dimension. It will */ - /* generally be called twice, once for x, once for y. When used in */ - /* cvt table, it will only be called once.) */ - /* */ - static FT_Short* - ft_var_readpackeddeltas( FT_Stream stream, - FT_ULong size, - FT_UInt delta_cnt ) - { - FT_Short *deltas = NULL; - FT_UInt runcnt, cnt; - FT_UInt i, j; - FT_Memory memory = stream->memory; - FT_Error error = FT_Err_Ok; - - FT_UNUSED( error ); - - - if ( delta_cnt > size ) - { - FT_TRACE1(( "ft_var_readpackeddeltas: number of points too large\n" )); - return NULL; - } - - if ( FT_NEW_ARRAY( deltas, delta_cnt ) ) - return NULL; - - i = 0; - while ( i < delta_cnt ) - { - runcnt = FT_GET_BYTE(); - cnt = runcnt & GX_DT_DELTA_RUN_COUNT_MASK; - - if ( runcnt & GX_DT_DELTAS_ARE_ZERO ) - { - /* `runcnt' zeroes get added */ - for ( j = 0; j <= cnt && i < delta_cnt; j++ ) - deltas[i++] = 0; - } - else if ( runcnt & GX_DT_DELTAS_ARE_WORDS ) - { - /* `runcnt' shorts from the stack */ - for ( j = 0; j <= cnt && i < delta_cnt; j++ ) - deltas[i++] = FT_GET_SHORT(); - } - else - { - /* `runcnt' signed bytes from the stack */ - for ( j = 0; j <= cnt && i < delta_cnt; j++ ) - deltas[i++] = FT_GET_CHAR(); - } - - if ( j <= cnt ) - { - /* bad format */ - FT_FREE( deltas ); - return NULL; - } - } - - return deltas; - } - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* ft_var_load_avar */ - /* */ - /* <Description> */ - /* Parse the `avar' table if present. It need not be, so we return */ - /* nothing. */ - /* */ - /* <InOut> */ - /* face :: The font face. */ - /* */ - static void - ft_var_load_avar( TT_Face face ) - { - FT_Stream stream = FT_FACE_STREAM( face ); - FT_Memory memory = stream->memory; - GX_Blend blend = face->blend; - GX_AVarSegment segment; - FT_Error error = FT_Err_Ok; - FT_Long version; - FT_Long axisCount; - FT_Int i, j; - FT_ULong table_len; - - FT_UNUSED( error ); - - - FT_TRACE2(( "AVAR " )); - - blend->avar_loaded = TRUE; - error = face->goto_table( face, TTAG_avar, stream, &table_len ); - if ( error ) - { - FT_TRACE2(( "is missing\n" )); - return; - } - - if ( FT_FRAME_ENTER( table_len ) ) - return; - - version = FT_GET_LONG(); - axisCount = FT_GET_LONG(); - - if ( version != 0x00010000L ) - { - FT_TRACE2(( "bad table version\n" )); - goto Exit; - } - - FT_TRACE2(( "loaded\n" )); - - if ( axisCount != (FT_Long)blend->mmvar->num_axis ) - { - FT_TRACE2(( "ft_var_load_avar: number of axes in `avar' and `fvar'\n" - " table are different\n" )); - goto Exit; - } - - if ( FT_NEW_ARRAY( blend->avar_segment, axisCount ) ) - goto Exit; - - segment = &blend->avar_segment[0]; - for ( i = 0; i < axisCount; i++, segment++ ) - { - FT_TRACE5(( " axis %d:\n", i )); - - segment->pairCount = FT_GET_USHORT(); - if ( (FT_ULong)segment->pairCount * 4 > table_len || - FT_NEW_ARRAY( segment->correspondence, segment->pairCount ) ) - { - /* Failure. Free everything we have done so far. We must do */ - /* it right now since loading the `avar' table is optional. */ - - for ( j = i - 1; j >= 0; j-- ) - FT_FREE( blend->avar_segment[j].correspondence ); - - FT_FREE( blend->avar_segment ); - blend->avar_segment = NULL; - goto Exit; - } - - for ( j = 0; j < segment->pairCount; j++ ) - { - /* convert to Fixed */ - segment->correspondence[j].fromCoord = FT_GET_SHORT() * 4; - segment->correspondence[j].toCoord = FT_GET_SHORT() * 4; - - FT_TRACE5(( " mapping %.5f to %.5f\n", - segment->correspondence[j].fromCoord / 65536.0, - segment->correspondence[j].toCoord / 65536.0 )); - } - - FT_TRACE5(( "\n" )); - } - - Exit: - FT_FRAME_EXIT(); - } - - - /* some macros we need */ -#define FT_FIXED_ONE ( (FT_Fixed)0x10000 ) - -#define FT_fdot14ToFixed( x ) \ - ( (FT_Fixed)( (FT_ULong)(x) << 2 ) ) -#define FT_intToFixed( i ) \ - ( (FT_Fixed)( (FT_ULong)(i) << 16 ) ) -#define FT_fixedToInt( x ) \ - ( (FT_Short)( ( (FT_UInt32)(x) + 0x8000U ) >> 16 ) ) - - - static FT_Error - ft_var_load_item_variation_store( TT_Face face, - FT_ULong offset, - GX_ItemVarStore itemStore ) - { - FT_Stream stream = FT_FACE_STREAM( face ); - FT_Memory memory = stream->memory; - - FT_Error error; - FT_UShort format; - FT_ULong region_offset; - FT_UInt i, j, k; - FT_UInt shortDeltaCount; - - GX_Blend blend = face->blend; - GX_ItemVarData varData; - - FT_ULong* dataOffsetArray = NULL; - - - if ( FT_STREAM_SEEK( offset ) || - FT_READ_USHORT( format ) ) - goto Exit; - - if ( format != 1 ) - { - FT_TRACE2(( "ft_var_load_item_variation_store: bad store format %d\n", - format )); - error = FT_THROW( Invalid_Table ); - goto Exit; - } - - /* read top level fields */ - if ( FT_READ_ULONG( region_offset ) || - FT_READ_USHORT( itemStore->dataCount ) ) - goto Exit; - - /* we need at least one entry in `itemStore->varData' */ - if ( !itemStore->dataCount ) - { - FT_TRACE2(( "ft_var_load_item_variation_store: missing varData\n" )); - error = FT_THROW( Invalid_Table ); - goto Exit; - } - - /* make temporary copy of item variation data offsets; */ - /* we will parse region list first, then come back */ - if ( FT_NEW_ARRAY( dataOffsetArray, itemStore->dataCount ) ) - goto Exit; - - for ( i = 0; i < itemStore->dataCount; i++ ) - { - if ( FT_READ_ULONG( dataOffsetArray[i] ) ) - goto Exit; - } - - /* parse array of region records (region list) */ - if ( FT_STREAM_SEEK( offset + region_offset ) ) - goto Exit; - - if ( FT_READ_USHORT( itemStore->axisCount ) || - FT_READ_USHORT( itemStore->regionCount ) ) - goto Exit; - - if ( itemStore->axisCount != (FT_Long)blend->mmvar->num_axis ) - { - FT_TRACE2(( "ft_var_load_item_variation_store:" - " number of axes in item variation store\n" - " " - " and `fvar' table are different\n" )); - error = FT_THROW( Invalid_Table ); - goto Exit; - } - - if ( FT_NEW_ARRAY( itemStore->varRegionList, itemStore->regionCount ) ) - goto Exit; - - for ( i = 0; i < itemStore->regionCount; i++ ) - { - GX_AxisCoords axisCoords; - - - if ( FT_NEW_ARRAY( itemStore->varRegionList[i].axisList, - itemStore->axisCount ) ) - goto Exit; - - axisCoords = itemStore->varRegionList[i].axisList; - - for ( j = 0; j < itemStore->axisCount; j++ ) - { - FT_Short start, peak, end; - - - if ( FT_READ_SHORT( start ) || - FT_READ_SHORT( peak ) || - FT_READ_SHORT( end ) ) - goto Exit; - - axisCoords[j].startCoord = FT_fdot14ToFixed( start ); - axisCoords[j].peakCoord = FT_fdot14ToFixed( peak ); - axisCoords[j].endCoord = FT_fdot14ToFixed( end ); - } - } - - /* end of region list parse */ - - /* use dataOffsetArray now to parse varData items */ - if ( FT_NEW_ARRAY( itemStore->varData, itemStore->dataCount ) ) - goto Exit; - - for ( i = 0; i < itemStore->dataCount; i++ ) - { - varData = &itemStore->varData[i]; - - if ( FT_STREAM_SEEK( offset + dataOffsetArray[i] ) ) - goto Exit; - - if ( FT_READ_USHORT( varData->itemCount ) || - FT_READ_USHORT( shortDeltaCount ) || - FT_READ_USHORT( varData->regionIdxCount ) ) - goto Exit; - - /* check some data consistency */ - if ( shortDeltaCount > varData->regionIdxCount ) - { - FT_TRACE2(( "bad short count %d or region count %d\n", - shortDeltaCount, - varData->regionIdxCount )); - error = FT_THROW( Invalid_Table ); - goto Exit; - } - - if ( varData->regionIdxCount > itemStore->regionCount ) - { - FT_TRACE2(( "inconsistent regionCount %d in varData[%d]\n", - varData->regionIdxCount, - i )); - error = FT_THROW( Invalid_Table ); - goto Exit; - } - - /* parse region indices */ - if ( FT_NEW_ARRAY( varData->regionIndices, - varData->regionIdxCount ) ) - goto Exit; - - for ( j = 0; j < varData->regionIdxCount; j++ ) - { - if ( FT_READ_USHORT( varData->regionIndices[j] ) ) - goto Exit; - - if ( varData->regionIndices[j] >= itemStore->regionCount ) - { - FT_TRACE2(( "bad region index %d\n", - varData->regionIndices[j] )); - error = FT_THROW( Invalid_Table ); - goto Exit; - } - } - - /* Parse delta set. */ - /* */ - /* On input, deltas are (shortDeltaCount + regionIdxCount) bytes */ - /* each; on output, deltas are expanded to `regionIdxCount' shorts */ - /* each. */ - if ( FT_NEW_ARRAY( varData->deltaSet, - varData->regionIdxCount * varData->itemCount ) ) - goto Exit; - - /* the delta set is stored as a 2-dimensional array of shorts; */ - /* sign-extend signed bytes to signed shorts */ - for ( j = 0; j < varData->itemCount * varData->regionIdxCount; ) - { - for ( k = 0; k < shortDeltaCount; k++, j++ ) - { - /* read the short deltas */ - FT_Short delta; - - - if ( FT_READ_SHORT( delta ) ) - goto Exit; - - varData->deltaSet[j] = delta; - } - - for ( ; k < varData->regionIdxCount; k++, j++ ) - { - /* read the (signed) byte deltas */ - FT_Char delta; - - - if ( FT_READ_CHAR( delta ) ) - goto Exit; - - varData->deltaSet[j] = delta; - } - } - } - - Exit: - FT_FREE( dataOffsetArray ); - - return error; - } - - - static FT_Error - ft_var_load_delta_set_index_mapping( TT_Face face, - FT_ULong offset, - GX_DeltaSetIdxMap map, - GX_ItemVarStore itemStore ) - { - FT_Stream stream = FT_FACE_STREAM( face ); - FT_Memory memory = stream->memory; - - FT_Error error; - - FT_UShort format; - FT_UInt entrySize; - FT_UInt innerBitCount; - FT_UInt innerIndexMask; - FT_UInt i, j; - - - if ( FT_STREAM_SEEK( offset ) || - FT_READ_USHORT( format ) || - FT_READ_USHORT( map->mapCount ) ) - goto Exit; - - if ( format & 0xFFC0 ) - { - FT_TRACE2(( "bad map format %d\n", format )); - error = FT_THROW( Invalid_Table ); - goto Exit; - } - - /* bytes per entry: 1, 2, 3, or 4 */ - entrySize = ( ( format & 0x0030 ) >> 4 ) + 1; - innerBitCount = ( format & 0x000F ) + 1; - innerIndexMask = ( 1 << innerBitCount ) - 1; - - if ( FT_NEW_ARRAY( map->innerIndex, map->mapCount ) ) - goto Exit; - - if ( FT_NEW_ARRAY( map->outerIndex, map->mapCount ) ) - goto Exit; - - for ( i = 0; i < map->mapCount; i++ ) - { - FT_UInt mapData = 0; - FT_UInt outerIndex, innerIndex; - - - /* read map data one unsigned byte at a time, big endian */ - for ( j = 0; j < entrySize; j++ ) - { - FT_Byte data; - - - if ( FT_READ_BYTE( data ) ) - goto Exit; - - mapData = ( mapData << 8 ) | data; - } - - outerIndex = mapData >> innerBitCount; - - if ( outerIndex >= itemStore->dataCount ) - { - FT_TRACE2(( "outerIndex[%d] == %d out of range\n", - i, - outerIndex )); - error = FT_THROW( Invalid_Table ); - goto Exit; - } - - map->outerIndex[i] = outerIndex; - - innerIndex = mapData & innerIndexMask; - - if ( innerIndex >= itemStore->varData[outerIndex].itemCount ) - { - FT_TRACE2(( "innerIndex[%d] == %d out of range\n", - i, - innerIndex )); - error = FT_THROW( Invalid_Table ); - goto Exit; - } - - map->innerIndex[i] = innerIndex; - } - - Exit: - return error; - } - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* ft_var_load_hvvar */ - /* */ - /* <Description> */ - /* If `vertical' is zero, parse the `HVAR' table and set */ - /* `blend->hvar_loaded' to TRUE. On success, `blend->hvar_checked' */ - /* is set to TRUE. */ - /* */ - /* If `vertical' is not zero, parse the `VVAR' table and set */ - /* `blend->vvar_loaded' to TRUE. On success, `blend->vvar_checked' */ - /* is set to TRUE. */ - /* */ - /* Some memory may remain allocated on error; it is always freed in */ - /* `tt_done_blend', however. */ - /* */ - /* <InOut> */ - /* face :: The font face. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - static FT_Error - ft_var_load_hvvar( TT_Face face, - FT_Bool vertical ) - { - FT_Stream stream = FT_FACE_STREAM( face ); - FT_Memory memory = stream->memory; - - GX_Blend blend = face->blend; - - GX_HVVarTable table; - - FT_Error error; - FT_UShort majorVersion; - FT_ULong table_len; - FT_ULong table_offset; - FT_ULong store_offset; - FT_ULong widthMap_offset; - - - if ( vertical ) - { - blend->vvar_loaded = TRUE; - - FT_TRACE2(( "VVAR " )); - - error = face->goto_table( face, TTAG_VVAR, stream, &table_len ); - } - else - { - blend->hvar_loaded = TRUE; - - FT_TRACE2(( "HVAR " )); - - error = face->goto_table( face, TTAG_HVAR, stream, &table_len ); - } - - if ( error ) - { - FT_TRACE2(( "is missing\n" )); - goto Exit; - } - - table_offset = FT_STREAM_POS(); - - /* skip minor version */ - if ( FT_READ_USHORT( majorVersion ) || - FT_STREAM_SKIP( 2 ) ) - goto Exit; - - if ( majorVersion != 1 ) - { - FT_TRACE2(( "bad table version %d\n", majorVersion )); - error = FT_THROW( Invalid_Table ); - goto Exit; - } - - if ( FT_READ_ULONG( store_offset ) || - FT_READ_ULONG( widthMap_offset ) ) - goto Exit; - - if ( vertical ) - { - if ( FT_NEW( blend->vvar_table ) ) - goto Exit; - table = blend->vvar_table; - } - else - { - if ( FT_NEW( blend->hvar_table ) ) - goto Exit; - table = blend->hvar_table; - } - - error = ft_var_load_item_variation_store( - face, - table_offset + store_offset, - &table->itemStore ); - if ( error ) - goto Exit; - - if ( widthMap_offset ) - { - error = ft_var_load_delta_set_index_mapping( - face, - table_offset + widthMap_offset, - &table->widthMap, - &table->itemStore ); - if ( error ) - goto Exit; - } - - FT_TRACE2(( "loaded\n" )); - error = FT_Err_Ok; - - Exit: - if ( !error ) - { - if ( vertical ) - { - blend->vvar_checked = TRUE; - - /* FreeType doesn't provide functions to quickly retrieve */ - /* TSB, BSB, or VORG values; we thus don't have to implement */ - /* support for those three item variation stores. */ - - face->variation_support |= TT_FACE_FLAG_VAR_VADVANCE; - } - else - { - blend->hvar_checked = TRUE; - - /* FreeType doesn't provide functions to quickly retrieve */ - /* LSB or RSB values; we thus don't have to implement */ - /* support for those two item variation stores. */ - - face->variation_support |= TT_FACE_FLAG_VAR_HADVANCE; - } - } - - return error; - } - - - static FT_Int - ft_var_get_item_delta( TT_Face face, - GX_ItemVarStore itemStore, - FT_UInt outerIndex, - FT_UInt innerIndex ) - { - GX_ItemVarData varData; - FT_Short* deltaSet; - - FT_UInt master, j; - FT_Fixed netAdjustment = 0; /* accumulated adjustment */ - FT_Fixed scaledDelta; - FT_Fixed delta; - - - /* See pseudo code from `Font Variations Overview' */ - /* in the OpenType specification. */ - - varData = &itemStore->varData[outerIndex]; - deltaSet = &varData->deltaSet[varData->regionIdxCount * innerIndex]; - - /* outer loop steps through master designs to be blended */ - for ( master = 0; master < varData->regionIdxCount; master++ ) - { - FT_Fixed scalar = FT_FIXED_ONE; - FT_UInt regionIndex = varData->regionIndices[master]; - - GX_AxisCoords axis = itemStore->varRegionList[regionIndex].axisList; - - - /* inner loop steps through axes in this region */ - for ( j = 0; j < itemStore->axisCount; j++, axis++ ) - { - FT_Fixed axisScalar; - - - /* compute the scalar contribution of this axis; */ - /* ignore invalid ranges */ - if ( axis->startCoord > axis->peakCoord || - axis->peakCoord > axis->endCoord ) - axisScalar = FT_FIXED_ONE; - - else if ( axis->startCoord < 0 && - axis->endCoord > 0 && - axis->peakCoord != 0 ) - axisScalar = FT_FIXED_ONE; - - /* peak of 0 means ignore this axis */ - else if ( axis->peakCoord == 0 ) - axisScalar = FT_FIXED_ONE; - - /* ignore this region if coords are out of range */ - else if ( face->blend->normalizedcoords[j] < axis->startCoord || - face->blend->normalizedcoords[j] > axis->endCoord ) - axisScalar = 0; - - /* calculate a proportional factor */ - else - { - if ( face->blend->normalizedcoords[j] == axis->peakCoord ) - axisScalar = FT_FIXED_ONE; - else if ( face->blend->normalizedcoords[j] < axis->peakCoord ) - axisScalar = - FT_DivFix( face->blend->normalizedcoords[j] - axis->startCoord, - axis->peakCoord - axis->startCoord ); - else - axisScalar = - FT_DivFix( axis->endCoord - face->blend->normalizedcoords[j], - axis->endCoord - axis->peakCoord ); - } - - /* take product of all the axis scalars */ - scalar = FT_MulFix( scalar, axisScalar ); - - } /* per-axis loop */ - - /* get the scaled delta for this region */ - delta = FT_intToFixed( deltaSet[master] ); - scaledDelta = FT_MulFix( scalar, delta ); - - /* accumulate the adjustments from each region */ - netAdjustment = netAdjustment + scaledDelta; - - } /* per-region loop */ - - return FT_fixedToInt( netAdjustment ); - } - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* tt_hvadvance_adjust */ - /* */ - /* <Description> */ - /* Apply `HVAR' advance width or `VVAR' advance height adjustment of */ - /* a given glyph. */ - /* */ - /* <Input> */ - /* gindex :: The glyph index. */ - /* */ - /* vertical :: If set, handle `VVAR' table. */ - /* */ - /* <InOut> */ - /* face :: The font face. */ - /* */ - /* adelta :: Points to width or height value that gets modified. */ - /* */ - static FT_Error - tt_hvadvance_adjust( TT_Face face, - FT_UInt gindex, - FT_Int *avalue, - FT_Bool vertical ) - { - FT_Error error = FT_Err_Ok; - FT_UInt innerIndex, outerIndex; - FT_Int delta; - - GX_HVVarTable table; - - - if ( !face->doblend || !face->blend ) - goto Exit; - - if ( vertical ) - { - if ( !face->blend->vvar_loaded ) - { - /* initialize vvar table */ - face->blend->vvar_error = ft_var_load_hvvar( face, 1 ); - } - - if ( !face->blend->vvar_checked ) - { - error = face->blend->vvar_error; - goto Exit; - } - - table = face->blend->vvar_table; - } - else - { - if ( !face->blend->hvar_loaded ) - { - /* initialize hvar table */ - face->blend->hvar_error = ft_var_load_hvvar( face, 0 ); - } - - if ( !face->blend->hvar_checked ) - { - error = face->blend->hvar_error; - goto Exit; - } - - table = face->blend->hvar_table; - } - - /* advance width or height adjustments are always present in an */ - /* `HVAR' or `VVAR' table; no need to test for this capability */ - - if ( table->widthMap.innerIndex ) - { - FT_UInt idx = gindex; - - - if ( idx >= table->widthMap.mapCount ) - idx = table->widthMap.mapCount - 1; - - /* trust that HVAR parser has checked indices */ - outerIndex = table->widthMap.outerIndex[idx]; - innerIndex = table->widthMap.innerIndex[idx]; - } - else - { - GX_ItemVarData varData; - - - /* no widthMap data */ - outerIndex = 0; - innerIndex = gindex; - - varData = &table->itemStore.varData[outerIndex]; - if ( gindex >= varData->itemCount ) - { - FT_TRACE2(( "gindex %d out of range\n", gindex )); - error = FT_THROW( Invalid_Argument ); - goto Exit; - } - } - - delta = ft_var_get_item_delta( face, - &table->itemStore, - outerIndex, - innerIndex ); - - FT_TRACE5(( "%s value %d adjusted by %d unit%s (%s)\n", - vertical ? "vertical height" : "horizontal width", - *avalue, - delta, - delta == 1 ? "" : "s", - vertical ? "VVAR" : "HVAR" )); - - *avalue += delta; - - Exit: - return error; - } - - - FT_LOCAL_DEF( FT_Error ) - tt_hadvance_adjust( TT_Face face, - FT_UInt gindex, - FT_Int *avalue ) - { - return tt_hvadvance_adjust( face, gindex, avalue, 0 ); - } - - - FT_LOCAL_DEF( FT_Error ) - tt_vadvance_adjust( TT_Face face, - FT_UInt gindex, - FT_Int *avalue ) - { - return tt_hvadvance_adjust( face, gindex, avalue, 1 ); - } - - -#define GX_VALUE_SIZE 8 - - /* all values are FT_Short or FT_UShort entities; */ - /* we treat them consistently as FT_Short */ -#define GX_VALUE_CASE( tag, dflt ) \ - case MVAR_TAG_ ## tag : \ - p = (FT_Short*)&face->dflt; \ - break - -#define GX_GASP_CASE( idx ) \ - case MVAR_TAG_GASP_ ## idx : \ - if ( idx < face->gasp.numRanges - 1 ) \ - p = (FT_Short*)&face->gasp.gaspRanges[idx].maxPPEM; \ - else \ - p = NULL; \ - break - - - static FT_Short* - ft_var_get_value_pointer( TT_Face face, - FT_ULong mvar_tag ) - { - FT_Short* p; - - - switch ( mvar_tag ) - { - GX_GASP_CASE( 0 ); - GX_GASP_CASE( 1 ); - GX_GASP_CASE( 2 ); - GX_GASP_CASE( 3 ); - GX_GASP_CASE( 4 ); - GX_GASP_CASE( 5 ); - GX_GASP_CASE( 6 ); - GX_GASP_CASE( 7 ); - GX_GASP_CASE( 8 ); - GX_GASP_CASE( 9 ); - - GX_VALUE_CASE( CPHT, os2.sCapHeight ); - GX_VALUE_CASE( HASC, os2.sTypoAscender ); - GX_VALUE_CASE( HCLA, os2.usWinAscent ); - GX_VALUE_CASE( HCLD, os2.usWinDescent ); - GX_VALUE_CASE( HCOF, horizontal.caret_Offset ); - GX_VALUE_CASE( HCRN, horizontal.caret_Slope_Run ); - GX_VALUE_CASE( HCRS, horizontal.caret_Slope_Rise ); - GX_VALUE_CASE( HDSC, os2.sTypoDescender ); - GX_VALUE_CASE( HLGP, os2.sTypoLineGap ); - GX_VALUE_CASE( SBXO, os2.ySubscriptXOffset); - GX_VALUE_CASE( SBXS, os2.ySubscriptXSize ); - GX_VALUE_CASE( SBYO, os2.ySubscriptYOffset ); - GX_VALUE_CASE( SBYS, os2.ySubscriptYSize ); - GX_VALUE_CASE( SPXO, os2.ySuperscriptXOffset ); - GX_VALUE_CASE( SPXS, os2.ySuperscriptXSize ); - GX_VALUE_CASE( SPYO, os2.ySuperscriptYOffset ); - GX_VALUE_CASE( SPYS, os2.ySuperscriptYSize ); - GX_VALUE_CASE( STRO, os2.yStrikeoutPosition ); - GX_VALUE_CASE( STRS, os2.yStrikeoutSize ); - GX_VALUE_CASE( UNDO, postscript.underlinePosition ); - GX_VALUE_CASE( UNDS, postscript.underlineThickness ); - GX_VALUE_CASE( VASC, vertical.Ascender ); - GX_VALUE_CASE( VCOF, vertical.caret_Offset ); - GX_VALUE_CASE( VCRN, vertical.caret_Slope_Run ); - GX_VALUE_CASE( VCRS, vertical.caret_Slope_Rise ); - GX_VALUE_CASE( VDSC, vertical.Descender ); - GX_VALUE_CASE( VLGP, vertical.Line_Gap ); - GX_VALUE_CASE( XHGT, os2.sxHeight ); - - default: - /* ignore unknown tag */ - p = NULL; - } - - return p; - } - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* ft_var_load_mvar */ - /* */ - /* <Description> */ - /* Parse the `MVAR' table. */ - /* */ - /* Some memory may remain allocated on error; it is always freed in */ - /* `tt_done_blend', however. */ - /* */ - /* <InOut> */ - /* face :: The font face. */ - /* */ - static void - ft_var_load_mvar( TT_Face face ) - { - FT_Stream stream = FT_FACE_STREAM( face ); - FT_Memory memory = stream->memory; - - GX_Blend blend = face->blend; - GX_ItemVarStore itemStore; - GX_Value value, limit; - - FT_Error error; - FT_UShort majorVersion; - FT_ULong table_len; - FT_ULong table_offset; - FT_UShort store_offset; - FT_ULong records_offset; - - - FT_TRACE2(( "MVAR " )); - - error = face->goto_table( face, TTAG_MVAR, stream, &table_len ); - if ( error ) - { - FT_TRACE2(( "is missing\n" )); - return; - } - - table_offset = FT_STREAM_POS(); - - /* skip minor version */ - if ( FT_READ_USHORT( majorVersion ) || - FT_STREAM_SKIP( 2 ) ) - return; - - if ( majorVersion != 1 ) - { - FT_TRACE2(( "bad table version %d\n", majorVersion )); - return; - } - - if ( FT_NEW( blend->mvar_table ) ) - return; - - /* skip reserved entry and value record size */ - if ( FT_STREAM_SKIP( 4 ) || - FT_READ_USHORT( blend->mvar_table->valueCount ) || - FT_READ_USHORT( store_offset ) ) - return; - - records_offset = FT_STREAM_POS(); - - error = ft_var_load_item_variation_store( - face, - table_offset + store_offset, - &blend->mvar_table->itemStore ); - if ( error ) - return; - - if ( FT_NEW_ARRAY( blend->mvar_table->values, - blend->mvar_table->valueCount ) ) - return; - - if ( FT_STREAM_SEEK( records_offset ) || - FT_FRAME_ENTER( blend->mvar_table->valueCount * GX_VALUE_SIZE ) ) - return; - - value = blend->mvar_table->values; - limit = value + blend->mvar_table->valueCount; - itemStore = &blend->mvar_table->itemStore; - - for ( ; value < limit; value++ ) - { - value->tag = FT_GET_ULONG(); - value->outerIndex = FT_GET_USHORT(); - value->innerIndex = FT_GET_USHORT(); - - if ( value->outerIndex >= itemStore->dataCount || - value->innerIndex >= itemStore->varData[value->outerIndex] - .itemCount ) - { - error = FT_THROW( Invalid_Table ); - break; - } - } - - FT_FRAME_EXIT(); - - if ( error ) - return; - - FT_TRACE2(( "loaded\n" )); - - value = blend->mvar_table->values; - limit = value + blend->mvar_table->valueCount; - - /* save original values of the data MVAR is going to modify */ - for ( ; value < limit; value++ ) - { - FT_Short* p = ft_var_get_value_pointer( face, value->tag ); - - - if ( p ) - value->unmodified = *p; -#ifdef FT_DEBUG_LEVEL_TRACE - else - FT_TRACE1(( "ft_var_load_mvar: Ignoring unknown tag `%c%c%c%c'\n", - (FT_Char)( value->tag >> 24 ), - (FT_Char)( value->tag >> 16 ), - (FT_Char)( value->tag >> 8 ), - (FT_Char)( value->tag ) )); -#endif - } - - face->variation_support |= TT_FACE_FLAG_VAR_MVAR; - } - - - static FT_Error - tt_size_reset_iterator( FT_ListNode node, - void* user ) - { - TT_Size size = (TT_Size)node->data; - - FT_UNUSED( user ); - - - tt_size_reset( size, 1 ); - - return FT_Err_Ok; - } - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* tt_apply_mvar */ - /* */ - /* <Description> */ - /* Apply `MVAR' table adjustments. */ - /* */ - /* <InOut> */ - /* face :: The font face. */ - /* */ - FT_LOCAL_DEF( void ) - tt_apply_mvar( TT_Face face ) - { - GX_Blend blend = face->blend; - GX_Value value, limit; - - - if ( !( face->variation_support & TT_FACE_FLAG_VAR_MVAR ) ) - return; - - value = blend->mvar_table->values; - limit = value + blend->mvar_table->valueCount; - - for ( ; value < limit; value++ ) - { - FT_Short* p = ft_var_get_value_pointer( face, value->tag ); - FT_Int delta; - - - delta = ft_var_get_item_delta( face, - &blend->mvar_table->itemStore, - value->outerIndex, - value->innerIndex ); - - if ( p ) - { - FT_TRACE5(( "value %c%c%c%c (%d unit%s) adjusted by %d unit%s (MVAR)\n", - (FT_Char)( value->tag >> 24 ), - (FT_Char)( value->tag >> 16 ), - (FT_Char)( value->tag >> 8 ), - (FT_Char)( value->tag ), - value->unmodified, - value->unmodified == 1 ? "" : "s", - delta, - delta == 1 ? "" : "s" )); - - /* since we handle both signed and unsigned values as FT_Short, */ - /* ensure proper overflow arithmetic */ - *p = (FT_Short)( value->unmodified + (FT_Short)delta ); - } - } - - /* adjust all derived values */ - { - FT_Face root = &face->root; - - - if ( face->os2.version != 0xFFFFU ) - { - if ( face->os2.sTypoAscender || face->os2.sTypoDescender ) - { - root->ascender = face->os2.sTypoAscender; - root->descender = face->os2.sTypoDescender; - - root->height = root->ascender - root->descender + - face->os2.sTypoLineGap; - } - else - { - root->ascender = (FT_Short)face->os2.usWinAscent; - root->descender = -(FT_Short)face->os2.usWinDescent; - - root->height = root->ascender - root->descender; - } - } - - root->underline_position = face->postscript.underlinePosition - - face->postscript.underlineThickness / 2; - root->underline_thickness = face->postscript.underlineThickness; - - /* iterate over all FT_Size objects and call `tt_size_reset' */ - /* to propagate the metrics changes */ - FT_List_Iterate( &root->sizes_list, - tt_size_reset_iterator, - NULL ); - } - } - - - typedef struct GX_GVar_Head_ - { - FT_Long version; - FT_UShort axisCount; - FT_UShort globalCoordCount; - FT_ULong offsetToCoord; - FT_UShort glyphCount; - FT_UShort flags; - FT_ULong offsetToData; - - } GX_GVar_Head; - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* ft_var_load_gvar */ - /* */ - /* <Description> */ - /* Parse the `gvar' table if present. If `fvar' is there, `gvar' had */ - /* better be there too. */ - /* */ - /* <InOut> */ - /* face :: The font face. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - static FT_Error - ft_var_load_gvar( TT_Face face ) - { - FT_Stream stream = FT_FACE_STREAM( face ); - FT_Memory memory = stream->memory; - GX_Blend blend = face->blend; - FT_Error error; - FT_UInt i, j; - FT_ULong table_len; - FT_ULong gvar_start; - FT_ULong offsetToData; - GX_GVar_Head gvar_head; - - static const FT_Frame_Field gvar_fields[] = - { - -#undef FT_STRUCTURE -#define FT_STRUCTURE GX_GVar_Head - - FT_FRAME_START( 20 ), - FT_FRAME_LONG ( version ), - FT_FRAME_USHORT( axisCount ), - FT_FRAME_USHORT( globalCoordCount ), - FT_FRAME_ULONG ( offsetToCoord ), - FT_FRAME_USHORT( glyphCount ), - FT_FRAME_USHORT( flags ), - FT_FRAME_ULONG ( offsetToData ), - FT_FRAME_END - }; - - - FT_TRACE2(( "GVAR " )); - - if ( FT_SET_ERROR( face->goto_table( face, - TTAG_gvar, - stream, - &table_len ) ) ) - { - FT_TRACE2(( "is missing\n" )); - goto Exit; - } - - gvar_start = FT_STREAM_POS( ); - if ( FT_STREAM_READ_FIELDS( gvar_fields, &gvar_head ) ) - goto Exit; - - if ( gvar_head.version != 0x00010000L ) - { - FT_TRACE1(( "bad table version\n" )); - error = FT_THROW( Invalid_Table ); - goto Exit; - } - - if ( gvar_head.axisCount != (FT_UShort)blend->mmvar->num_axis ) - { - FT_TRACE1(( "ft_var_load_gvar: number of axes in `gvar' and `cvar'\n" - " table are different\n" )); - error = FT_THROW( Invalid_Table ); - goto Exit; - } - - /* rough sanity check, ignoring offsets */ - if ( (FT_ULong)gvar_head.globalCoordCount * gvar_head.axisCount > - table_len / 2 ) - { - FT_TRACE1(( "ft_var_load_gvar:" - " invalid number of global coordinates\n" )); - error = FT_THROW( Invalid_Table ); - goto Exit; - } - - /* rough sanity check: offsets can be either 2 or 4 bytes */ - if ( (FT_ULong)gvar_head.glyphCount * - ( ( gvar_head.flags & 1 ) ? 4 : 2 ) > table_len ) - { - FT_TRACE1(( "ft_var_load_gvar: invalid number of glyphs\n" )); - error = FT_THROW( Invalid_Table ); - goto Exit; - } - - FT_TRACE2(( "loaded\n" )); - - blend->gvar_size = table_len; - blend->tuplecount = gvar_head.globalCoordCount; - blend->gv_glyphcnt = gvar_head.glyphCount; - offsetToData = gvar_start + gvar_head.offsetToData; - - FT_TRACE5(( "gvar: there %s %d shared coordinate%s:\n", - blend->tuplecount == 1 ? "is" : "are", - blend->tuplecount, - blend->tuplecount == 1 ? "" : "s" )); - - if ( FT_NEW_ARRAY( blend->glyphoffsets, blend->gv_glyphcnt + 1 ) ) - goto Exit; - - if ( gvar_head.flags & 1 ) - { - /* long offsets (one more offset than glyphs, to mark size of last) */ - if ( FT_FRAME_ENTER( ( blend->gv_glyphcnt + 1 ) * 4L ) ) - goto Exit; - - for ( i = 0; i <= blend->gv_glyphcnt; i++ ) - blend->glyphoffsets[i] = offsetToData + FT_GET_ULONG(); - - FT_FRAME_EXIT(); - } - else - { - /* short offsets (one more offset than glyphs, to mark size of last) */ - if ( FT_FRAME_ENTER( ( blend->gv_glyphcnt + 1 ) * 2L ) ) - goto Exit; - - for ( i = 0; i <= blend->gv_glyphcnt; i++ ) - blend->glyphoffsets[i] = offsetToData + FT_GET_USHORT() * 2; - /* XXX: Undocumented: `*2'! */ - - FT_FRAME_EXIT(); - } - - if ( blend->tuplecount != 0 ) - { - if ( FT_NEW_ARRAY( blend->tuplecoords, - gvar_head.axisCount * blend->tuplecount ) ) - goto Exit; - - if ( FT_STREAM_SEEK( gvar_start + gvar_head.offsetToCoord ) || - FT_FRAME_ENTER( blend->tuplecount * gvar_head.axisCount * 2L ) ) - goto Exit; - - for ( i = 0; i < blend->tuplecount; i++ ) - { - FT_TRACE5(( " [ " )); - for ( j = 0; j < (FT_UInt)gvar_head.axisCount; j++ ) - { - blend->tuplecoords[i * gvar_head.axisCount + j] = - FT_GET_SHORT() * 4; /* convert to FT_Fixed */ - FT_TRACE5(( "%.5f ", - blend->tuplecoords[i * gvar_head.axisCount + j] / 65536.0 )); - } - FT_TRACE5(( "]\n" )); - } - - FT_TRACE5(( "\n" )); - - FT_FRAME_EXIT(); - } - - Exit: - return error; - } - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* ft_var_apply_tuple */ - /* */ - /* <Description> */ - /* Figure out whether a given tuple (design) applies to the current */ - /* blend, and if so, what is the scaling factor. */ - /* */ - /* <Input> */ - /* blend :: The current blend of the font. */ - /* */ - /* tupleIndex :: A flag saying whether this is an intermediate */ - /* tuple or not. */ - /* */ - /* tuple_coords :: The coordinates of the tuple in normalized axis */ - /* units. */ - /* */ - /* im_start_coords :: The initial coordinates where this tuple starts */ - /* to apply (for intermediate coordinates). */ - /* */ - /* im_end_coords :: The final coordinates after which this tuple no */ - /* longer applies (for intermediate coordinates). */ - /* */ - /* <Return> */ - /* An FT_Fixed value containing the scaling factor. */ - /* */ - static FT_Fixed - ft_var_apply_tuple( GX_Blend blend, - FT_UShort tupleIndex, - FT_Fixed* tuple_coords, - FT_Fixed* im_start_coords, - FT_Fixed* im_end_coords ) - { - FT_UInt i; - FT_Fixed apply = 0x10000L; - - - for ( i = 0; i < blend->num_axis; i++ ) - { - FT_TRACE6(( " axis coordinate %d (%.5f):\n", - i, blend->normalizedcoords[i] / 65536.0 )); - if ( !( tupleIndex & GX_TI_INTERMEDIATE_TUPLE ) ) - FT_TRACE6(( " intermediate coordinates %d (%.5f, %.5f):\n", - i, - im_start_coords[i] / 65536.0, - im_end_coords[i] / 65536.0 )); - - /* It's not clear why (for intermediate tuples) we don't need */ - /* to check against start/end -- the documentation says we don't. */ - /* Similarly, it's unclear why we don't need to scale along the */ - /* axis. */ - - if ( tuple_coords[i] == 0 ) - { - FT_TRACE6(( " tuple coordinate is zero, ignored\n", i )); - continue; - } - - if ( blend->normalizedcoords[i] == 0 ) - { - FT_TRACE6(( " axis coordinate is zero, stop\n" )); - apply = 0; - break; - } - - if ( blend->normalizedcoords[i] == tuple_coords[i] ) - { - FT_TRACE6(( " tuple coordinate value %.5f fits perfectly\n", - tuple_coords[i] / 65536.0 )); - /* `apply' does not change */ - continue; - } - - if ( !( tupleIndex & GX_TI_INTERMEDIATE_TUPLE ) ) - { - /* not an intermediate tuple */ - - if ( blend->normalizedcoords[i] < FT_MIN( 0, tuple_coords[i] ) || - blend->normalizedcoords[i] > FT_MAX( 0, tuple_coords[i] ) ) - { - FT_TRACE6(( " tuple coordinate value %.5f is exceeded, stop\n", - tuple_coords[i] / 65536.0 )); - apply = 0; - break; - } - - FT_TRACE6(( " tuple coordinate value %.5f fits\n", - tuple_coords[i] / 65536.0 )); - apply = FT_MulDiv( apply, - blend->normalizedcoords[i], - tuple_coords[i] ); - } - else - { - /* intermediate tuple */ - - if ( blend->normalizedcoords[i] < im_start_coords[i] || - blend->normalizedcoords[i] > im_end_coords[i] ) - { - FT_TRACE6(( " intermediate tuple range [%.5f;%.5f] is exceeded," - " stop\n", - im_start_coords[i] / 65536.0, - im_end_coords[i] / 65536.0 )); - apply = 0; - break; - } - - else if ( blend->normalizedcoords[i] < tuple_coords[i] ) - { - FT_TRACE6(( " intermediate tuple range [%.5f;%.5f] fits\n", - im_start_coords[i] / 65536.0, - im_end_coords[i] / 65536.0 )); - apply = FT_MulDiv( apply, - blend->normalizedcoords[i] - im_start_coords[i], - tuple_coords[i] - im_start_coords[i] ); - } - - else - { - FT_TRACE6(( " intermediate tuple range [%.5f;%.5f] fits\n", - im_start_coords[i] / 65536.0, - im_end_coords[i] / 65536.0 )); - apply = FT_MulDiv( apply, - im_end_coords[i] - blend->normalizedcoords[i], - im_end_coords[i] - tuple_coords[i] ); - } - } - } - - FT_TRACE6(( " apply factor is %.5f\n", apply / 65536.0 )); - - return apply; - } - - - /* convert from design coordinates to normalized coordinates */ - - static void - ft_var_to_normalized( TT_Face face, - FT_UInt num_coords, - FT_Fixed* coords, - FT_Fixed* normalized ) - { - GX_Blend blend; - FT_MM_Var* mmvar; - FT_UInt i, j; - FT_Var_Axis* a; - GX_AVarSegment av; - - - blend = face->blend; - mmvar = blend->mmvar; - - if ( num_coords > mmvar->num_axis ) - { - FT_TRACE2(( "ft_var_to_normalized:" - " only using first %d of %d coordinates\n", - mmvar->num_axis, num_coords )); - num_coords = mmvar->num_axis; - } - - /* Axis normalization is a two-stage process. First we normalize */ - /* based on the [min,def,max] values for the axis to be [-1,0,1]. */ - /* Then, if there's an `avar' table, we renormalize this range. */ - - a = mmvar->axis; - for ( i = 0; i < num_coords; i++, a++ ) - { - FT_Fixed coord = coords[i]; - - - FT_TRACE5(( " %d: %.5f\n", i, coord / 65536.0 )); - if ( coord > a->maximum || coord < a->minimum ) - { - FT_TRACE1(( - "ft_var_to_normalized: design coordinate %.5f\n" - " is out of range [%.5f;%.5f]; clamping\n", - coord / 65536.0, - a->minimum / 65536.0, - a->maximum / 65536.0 )); - - if ( coord > a->maximum ) - coord = a->maximum; - else - coord = a->minimum; - } - - if ( coord < a->def ) - normalized[i] = -FT_DivFix( coord - a->def, - a->minimum - a->def ); - else if ( coord > a->def ) - normalized[i] = FT_DivFix( coord - a->def, - a->maximum - a->def ); - else - normalized[i] = 0; - } - - FT_TRACE5(( "\n" )); - - for ( ; i < mmvar->num_axis; i++ ) - normalized[i] = 0; - - if ( blend->avar_segment ) - { - FT_TRACE5(( "normalized design coordinates" - " before applying `avar' data:\n" )); - - av = blend->avar_segment; - for ( i = 0; i < mmvar->num_axis; i++, av++ ) - { - for ( j = 1; j < (FT_UInt)av->pairCount; j++ ) - { - if ( normalized[i] < av->correspondence[j].fromCoord ) - { - FT_TRACE5(( " %.5f\n", normalized[i] / 65536.0 )); - - normalized[i] = - FT_MulDiv( normalized[i] - av->correspondence[j - 1].fromCoord, - av->correspondence[j].toCoord - - av->correspondence[j - 1].toCoord, - av->correspondence[j].fromCoord - - av->correspondence[j - 1].fromCoord ) + - av->correspondence[j - 1].toCoord; - break; - } - } - } - } - } - - - /* convert from normalized coordinates to design coordinates */ - - static void - ft_var_to_design( TT_Face face, - FT_UInt num_coords, - FT_Fixed* coords, - FT_Fixed* design ) - { - GX_Blend blend; - FT_MM_Var* mmvar; - FT_Var_Axis* a; - - FT_UInt i, j, nc; - - - blend = face->blend; - - nc = num_coords; - if ( num_coords > blend->num_axis ) - { - FT_TRACE2(( "ft_var_to_design:" - " only using first %d of %d coordinates\n", - blend->num_axis, num_coords )); - nc = blend->num_axis; - } - - for ( i = 0; i < nc; i++ ) - design[i] = coords[i]; - - for ( ; i < num_coords; i++ ) - design[i] = 0; - - if ( blend->avar_segment ) - { - GX_AVarSegment av = blend->avar_segment; - - - FT_TRACE5(( "design coordinates" - " after removing `avar' distortion:\n" )); - - for ( i = 0; i < nc; i++, av++ ) - { - for ( j = 1; j < (FT_UInt)av->pairCount; j++ ) - { - if ( design[i] < av->correspondence[j].toCoord ) - { - design[i] = - FT_MulDiv( design[i] - av->correspondence[j - 1].toCoord, - av->correspondence[j].fromCoord - - av->correspondence[j - 1].fromCoord, - av->correspondence[j].toCoord - - av->correspondence[j - 1].toCoord ) + - av->correspondence[j - 1].fromCoord; - - FT_TRACE5(( " %.5f\n", design[i] / 65536.0 )); - break; - } - } - } - } - - mmvar = blend->mmvar; - a = mmvar->axis; - - for ( i = 0; i < nc; i++, a++ ) - { - if ( design[i] < 0 ) - design[i] = a->def + FT_MulFix( design[i], - a->def - a->minimum ); - else if ( design[i] > 0 ) - design[i] = a->def + FT_MulFix( design[i], - a->maximum - a->def ); - else - design[i] = a->def; - } - } - - - /*************************************************************************/ - /*************************************************************************/ - /***** *****/ - /***** MULTIPLE MASTERS SERVICE FUNCTIONS *****/ - /***** *****/ - /*************************************************************************/ - /*************************************************************************/ - - - typedef struct GX_FVar_Head_ - { - FT_Long version; - FT_UShort offsetToData; - FT_UShort axisCount; - FT_UShort axisSize; - FT_UShort instanceCount; - FT_UShort instanceSize; - - } GX_FVar_Head; - - - typedef struct fvar_axis_ - { - FT_ULong axisTag; - FT_Fixed minValue; - FT_Fixed defaultValue; - FT_Fixed maxValue; - FT_UShort flags; - FT_UShort nameID; - - } GX_FVar_Axis; - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* TT_Get_MM_Var */ - /* */ - /* <Description> */ - /* Check that the font's `fvar' table is valid, parse it, and return */ - /* those data. It also loads (and parses) the `MVAR' table, if */ - /* possible. */ - /* */ - /* <InOut> */ - /* face :: The font face. */ - /* TT_Get_MM_Var initializes the blend structure. */ - /* */ - /* <Output> */ - /* master :: The `fvar' data (must be freed by caller). Can be NULL, */ - /* which makes this function simply load MM support. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - FT_LOCAL_DEF( FT_Error ) - TT_Get_MM_Var( TT_Face face, - FT_MM_Var* *master ) - { - FT_Stream stream = face->root.stream; - FT_Memory memory = face->root.memory; - FT_ULong table_len; - FT_Error error = FT_Err_Ok; - FT_ULong fvar_start = 0; - FT_UInt i, j; - FT_MM_Var* mmvar = NULL; - FT_Fixed* next_coords; - FT_Fixed* nsc; - FT_String* next_name; - FT_Var_Axis* a; - FT_Fixed* c; - FT_Var_Named_Style* ns; - GX_FVar_Head fvar_head; - FT_Bool usePsName = 0; - FT_UInt num_instances; - FT_UInt num_axes; - FT_UShort* axis_flags; - - FT_Offset mmvar_size; - FT_Offset axis_flags_size; - FT_Offset axis_size; - FT_Offset namedstyle_size; - FT_Offset next_coords_size; - FT_Offset next_name_size; - - FT_Bool need_init; - - static const FT_Frame_Field fvar_fields[] = - { - -#undef FT_STRUCTURE -#define FT_STRUCTURE GX_FVar_Head - - FT_FRAME_START( 16 ), - FT_FRAME_LONG ( version ), - FT_FRAME_USHORT ( offsetToData ), - FT_FRAME_SKIP_SHORT, - FT_FRAME_USHORT ( axisCount ), - FT_FRAME_USHORT ( axisSize ), - FT_FRAME_USHORT ( instanceCount ), - FT_FRAME_USHORT ( instanceSize ), - FT_FRAME_END - }; - - static const FT_Frame_Field fvaraxis_fields[] = - { - -#undef FT_STRUCTURE -#define FT_STRUCTURE GX_FVar_Axis - - FT_FRAME_START( 20 ), - FT_FRAME_ULONG ( axisTag ), - FT_FRAME_LONG ( minValue ), - FT_FRAME_LONG ( defaultValue ), - FT_FRAME_LONG ( maxValue ), - FT_FRAME_USHORT( flags ), - FT_FRAME_USHORT( nameID ), - FT_FRAME_END - }; - - - /* read the font data and set up the internal representation */ - /* if not already done */ - - need_init = !face->blend; - - if ( need_init ) - { - FT_TRACE2(( "FVAR " )); - - /* both `fvar' and `gvar' must be present */ - if ( FT_SET_ERROR( face->goto_table( face, TTAG_gvar, - stream, &table_len ) ) ) - { - /* CFF2 is an alternate to gvar here */ - if ( FT_SET_ERROR( face->goto_table( face, TTAG_CFF2, - stream, &table_len ) ) ) - { - FT_TRACE1(( "\n" - "TT_Get_MM_Var: `gvar' or `CFF2' table is missing\n" )); - goto Exit; - } - } - - if ( FT_SET_ERROR( face->goto_table( face, TTAG_fvar, - stream, &table_len ) ) ) - { - FT_TRACE1(( "is missing\n" )); - goto Exit; - } - - fvar_start = FT_STREAM_POS( ); - - /* the validity of the `fvar' header data was already checked */ - /* in function `sfnt_init_face' */ - if ( FT_STREAM_READ_FIELDS( fvar_fields, &fvar_head ) ) - goto Exit; - - usePsName = FT_BOOL( fvar_head.instanceSize == - 6 + 4 * fvar_head.axisCount ); - - FT_TRACE2(( "loaded\n" )); - - FT_TRACE5(( "%d variation ax%s\n", - fvar_head.axisCount, - fvar_head.axisCount == 1 ? "is" : "es" )); - - if ( FT_NEW( face->blend ) ) - goto Exit; - - num_axes = fvar_head.axisCount; - face->blend->num_axis = num_axes; - } - else - num_axes = face->blend->num_axis; - - /* `num_instances' holds the number of all named instances, */ - /* including the default instance which might be missing */ - /* in fvar's table of named instances */ - num_instances = (FT_UInt)face->root.style_flags >> 16; - - /* prepare storage area for MM data; this cannot overflow */ - /* 32-bit arithmetic because of the size limits used in the */ - /* `fvar' table validity check in `sfnt_init_face' */ - - /* the various `*_size' variables, which we also use as */ - /* offsets into the `mmlen' array, must be multiples of the */ - /* pointer size (except the last one); without such an */ - /* alignment there might be runtime errors due to */ - /* misaligned addresses */ -#undef ALIGN_SIZE -#define ALIGN_SIZE( n ) \ - ( ( (n) + sizeof (void*) - 1 ) & ~( sizeof (void*) - 1 ) ) - - mmvar_size = ALIGN_SIZE( sizeof ( FT_MM_Var ) ); - axis_flags_size = ALIGN_SIZE( num_axes * - sizeof ( FT_UShort ) ); - axis_size = ALIGN_SIZE( num_axes * - sizeof ( FT_Var_Axis ) ); - namedstyle_size = ALIGN_SIZE( num_instances * - sizeof ( FT_Var_Named_Style ) ); - next_coords_size = ALIGN_SIZE( num_instances * - num_axes * - sizeof ( FT_Fixed ) ); - next_name_size = num_axes * 5; - - if ( need_init ) - { - face->blend->mmvar_len = mmvar_size + - axis_flags_size + - axis_size + - namedstyle_size + - next_coords_size + - next_name_size; - - if ( FT_ALLOC( mmvar, face->blend->mmvar_len ) ) - goto Exit; - face->blend->mmvar = mmvar; - - /* set up pointers and offsets into the `mmvar' array; */ - /* the data gets filled in later on */ - - mmvar->num_axis = - num_axes; - mmvar->num_designs = - ~0U; /* meaningless in this context; each glyph */ - /* may have a different number of designs */ - /* (or tuples, as called by Apple) */ - mmvar->num_namedstyles = - num_instances; - - /* alas, no public field in `FT_Var_Axis' for axis flags */ - axis_flags = - (FT_UShort*)( (char*)mmvar + mmvar_size ); - mmvar->axis = - (FT_Var_Axis*)( (char*)axis_flags + axis_flags_size ); - mmvar->namedstyle = - (FT_Var_Named_Style*)( (char*)mmvar->axis + axis_size ); - - next_coords = (FT_Fixed*)( (char*)mmvar->namedstyle + - namedstyle_size ); - for ( i = 0; i < num_instances; i++ ) - { - mmvar->namedstyle[i].coords = next_coords; - next_coords += num_axes; - } - - next_name = (FT_String*)( (char*)mmvar->namedstyle + - namedstyle_size + next_coords_size ); - for ( i = 0; i < num_axes; i++ ) - { - mmvar->axis[i].name = next_name; - next_name += 5; - } - - /* now fill in the data */ - - if ( FT_STREAM_SEEK( fvar_start + fvar_head.offsetToData ) ) - goto Exit; - - a = mmvar->axis; - for ( i = 0; i < num_axes; i++ ) - { - GX_FVar_Axis axis_rec; - -#ifdef FT_DEBUG_LEVEL_TRACE - int invalid = 0; -#endif - - - if ( FT_STREAM_READ_FIELDS( fvaraxis_fields, &axis_rec ) ) - goto Exit; - a->tag = axis_rec.axisTag; - a->minimum = axis_rec.minValue; - a->def = axis_rec.defaultValue; - a->maximum = axis_rec.maxValue; - a->strid = axis_rec.nameID; - - a->name[0] = (FT_String)( a->tag >> 24 ); - a->name[1] = (FT_String)( ( a->tag >> 16 ) & 0xFF ); - a->name[2] = (FT_String)( ( a->tag >> 8 ) & 0xFF ); - a->name[3] = (FT_String)( ( a->tag ) & 0xFF ); - a->name[4] = '\0'; - - *axis_flags = axis_rec.flags; - - if ( a->minimum > a->def || - a->def > a->maximum ) - { - a->minimum = a->def; - a->maximum = a->def; - -#ifdef FT_DEBUG_LEVEL_TRACE - invalid = 1; -#endif - } - -#ifdef FT_DEBUG_LEVEL_TRACE - if ( i == 0 ) - FT_TRACE5(( " idx tag " - /* " XXX `XXXX'" */ - " minimum default maximum flags\n" )); - /* " XXXX.XXXXX XXXX.XXXXX XXXX.XXXXX 0xXXXX" */ - - FT_TRACE5(( " %3d `%s'" - " %10.5f %10.5f %10.5f 0x%04X%s\n", - i, - a->name, - a->minimum / 65536.0, - a->def / 65536.0, - a->maximum / 65536.0, - *axis_flags, - invalid ? " (invalid, disabled)" : "" )); -#endif - - a++; - axis_flags++; - } - - FT_TRACE5(( "\n" )); - - /* named instance coordinates are stored as design coordinates; */ - /* we have to convert them to normalized coordinates also */ - if ( FT_NEW_ARRAY( face->blend->normalized_stylecoords, - num_axes * num_instances ) ) - goto Exit; - - if ( fvar_head.instanceCount && !face->blend->avar_loaded ) - { - FT_ULong offset = FT_STREAM_POS(); - - - ft_var_load_avar( face ); - - if ( FT_STREAM_SEEK( offset ) ) - goto Exit; - } - - FT_TRACE5(( "%d instance%s\n", - fvar_head.instanceCount, - fvar_head.instanceCount == 1 ? "" : "s" )); - - ns = mmvar->namedstyle; - nsc = face->blend->normalized_stylecoords; - for ( i = 0; i < fvar_head.instanceCount; i++, ns++ ) - { - /* PostScript names add 2 bytes to the instance record size */ - if ( FT_FRAME_ENTER( ( usePsName ? 6L : 4L ) + - 4L * num_axes ) ) - goto Exit; - - ns->strid = FT_GET_USHORT(); - (void) /* flags = */ FT_GET_USHORT(); - - c = ns->coords; - for ( j = 0; j < num_axes; j++, c++ ) - *c = FT_GET_LONG(); - - /* valid psid values are 6, [256;32767], and 0xFFFF */ - if ( usePsName ) - ns->psid = FT_GET_USHORT(); - else - ns->psid = 0xFFFF; - -#ifdef FT_DEBUG_LEVEL_TRACE - { - SFNT_Service sfnt = (SFNT_Service)face->sfnt; - - FT_String* strname = NULL; - FT_String* psname = NULL; - - FT_ULong pos; - - - pos = FT_STREAM_POS(); - - if ( ns->strid != 0xFFFF ) - { - (void)sfnt->get_name( face, - (FT_UShort)ns->strid, - &strname ); - if ( strname && !ft_strcmp( strname, ".notdef" ) ) - strname = NULL; - } - - if ( ns->psid != 0xFFFF ) - { - (void)sfnt->get_name( face, - (FT_UShort)ns->psid, - &psname ); - if ( psname && !ft_strcmp( psname, ".notdef" ) ) - psname = NULL; - } - - (void)FT_STREAM_SEEK( pos ); - - FT_TRACE5(( " instance %d (%s%s%s, %s%s%s)\n", - i, - strname ? "name: `" : "", - strname ? strname : "unnamed", - strname ? "'" : "", - psname ? "PS name: `" : "", - psname ? psname : "no PS name", - psname ? "'" : "" )); - - FT_FREE( strname ); - FT_FREE( psname ); - } -#endif /* FT_DEBUG_LEVEL_TRACE */ - - ft_var_to_normalized( face, num_axes, ns->coords, nsc ); - nsc += num_axes; - - FT_FRAME_EXIT(); - } - - if ( num_instances != fvar_head.instanceCount ) - { - SFNT_Service sfnt = (SFNT_Service)face->sfnt; - - FT_Int found, dummy1, dummy2; - FT_UInt strid = ~0U; - - - /* the default instance is missing in array the */ - /* of named instances; try to synthesize an entry */ - found = sfnt->get_name_id( face, - TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY, - &dummy1, - &dummy2 ); - if ( found ) - strid = TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY; - else - { - found = sfnt->get_name_id( face, - TT_NAME_ID_FONT_SUBFAMILY, - &dummy1, - &dummy2 ); - if ( found ) - strid = TT_NAME_ID_FONT_SUBFAMILY; - } - - if ( found ) - { - found = sfnt->get_name_id( face, - TT_NAME_ID_PS_NAME, - &dummy1, - &dummy2 ); - if ( found ) - { - FT_TRACE5(( "TT_Get_MM_Var:" - " Adding default instance to named instances\n" )); - - ns = &mmvar->namedstyle[fvar_head.instanceCount]; - - ns->strid = strid; - ns->psid = TT_NAME_ID_PS_NAME; - - a = mmvar->axis; - c = ns->coords; - for ( j = 0; j < num_axes; j++, a++, c++ ) - *c = a->def; - } - } - } - - ft_var_load_mvar( face ); - } - - /* fill the output array if requested */ - - if ( master ) - { - FT_UInt n; - - - if ( FT_ALLOC( mmvar, face->blend->mmvar_len ) ) - goto Exit; - FT_MEM_COPY( mmvar, face->blend->mmvar, face->blend->mmvar_len ); - - axis_flags = - (FT_UShort*)( (char*)mmvar + mmvar_size ); - mmvar->axis = - (FT_Var_Axis*)( (char*)axis_flags + axis_flags_size ); - mmvar->namedstyle = - (FT_Var_Named_Style*)( (char*)mmvar->axis+ axis_size ); - - next_coords = (FT_Fixed*)( (char*)mmvar->namedstyle + - namedstyle_size ); - for ( n = 0; n < mmvar->num_namedstyles; n++ ) - { - mmvar->namedstyle[n].coords = next_coords; - next_coords += num_axes; - } - - a = mmvar->axis; - next_name = (FT_String*)( (char*)mmvar->namedstyle + - namedstyle_size + next_coords_size ); - for ( n = 0; n < num_axes; n++ ) - { - a->name = next_name; - - /* standard PostScript names for some standard apple tags */ - if ( a->tag == TTAG_wght ) - a->name = (char*)"Weight"; - else if ( a->tag == TTAG_wdth ) - a->name = (char*)"Width"; - else if ( a->tag == TTAG_opsz ) - a->name = (char*)"OpticalSize"; - else if ( a->tag == TTAG_slnt ) - a->name = (char*)"Slant"; - - next_name += 5; - a++; - } - - *master = mmvar; - } - - Exit: - return error; - } - - - static FT_Error - tt_set_mm_blend( TT_Face face, - FT_UInt num_coords, - FT_Fixed* coords, - FT_Bool set_design_coords ) - { - FT_Error error = FT_Err_Ok; - GX_Blend blend; - FT_MM_Var* mmvar; - FT_UInt i; - - FT_Bool all_design_coords = FALSE; - - FT_Memory memory = face->root.memory; - - enum - { - mcvt_retain, - mcvt_modify, - mcvt_load - - } manageCvt; - - - face->doblend = FALSE; - - if ( !face->blend ) - { - if ( FT_SET_ERROR( TT_Get_MM_Var( face, NULL ) ) ) - goto Exit; - } - - blend = face->blend; - mmvar = blend->mmvar; - - if ( num_coords > mmvar->num_axis ) - { - FT_TRACE2(( "TT_Set_MM_Blend:" - " only using first %d of %d coordinates\n", - mmvar->num_axis, num_coords )); - num_coords = mmvar->num_axis; - } - - FT_TRACE5(( "TT_Set_MM_Blend:\n" - " normalized design coordinates:\n" )); - - for ( i = 0; i < num_coords; i++ ) - { - FT_TRACE5(( " %.5f\n", coords[i] / 65536.0 )); - if ( coords[i] < -0x00010000L || coords[i] > 0x00010000L ) - { - FT_TRACE1(( "TT_Set_MM_Blend: normalized design coordinate %.5f\n" - " is out of range [-1;1]\n", - coords[i] / 65536.0 )); - error = FT_THROW( Invalid_Argument ); - goto Exit; - } - } - - FT_TRACE5(( "\n" )); - - if ( !face->is_cff2 && !blend->glyphoffsets ) - if ( FT_SET_ERROR( ft_var_load_gvar( face ) ) ) - goto Exit; - - if ( !blend->coords ) - { - if ( FT_NEW_ARRAY( blend->coords, mmvar->num_axis ) ) - goto Exit; - - /* the first time we have to compute all design coordinates */ - all_design_coords = TRUE; - } - - if ( !blend->normalizedcoords ) - { - if ( FT_NEW_ARRAY( blend->normalizedcoords, mmvar->num_axis ) ) - goto Exit; - - manageCvt = mcvt_modify; - - /* If we have not set the blend coordinates before this, then the */ - /* cvt table will still be what we read from the `cvt ' table and */ - /* we don't need to reload it. We may need to change it though... */ - } - else - { - FT_Bool have_diff = 0; - FT_UInt j; - FT_Fixed* c; - FT_Fixed* n; - - - manageCvt = mcvt_retain; - - for ( i = 0; i < num_coords; i++ ) - { - if ( blend->normalizedcoords[i] != coords[i] ) - { - manageCvt = mcvt_load; - have_diff = 1; - break; - } - } - - if ( FT_IS_NAMED_INSTANCE( FT_FACE( face ) ) ) - { - FT_UInt idx = (FT_UInt)face->root.face_index >> 16; - - - c = blend->normalizedcoords + i; - n = blend->normalized_stylecoords + idx * mmvar->num_axis + i; - for ( j = i; j < mmvar->num_axis; j++, n++, c++ ) - if ( *c != *n ) - have_diff = 1; - } - else - { - c = blend->normalizedcoords + i; - for ( j = i; j < mmvar->num_axis; j++, c++ ) - if ( *c != 0 ) - have_diff = 1; - } - - /* return value -1 indicates `no change' */ - if ( !have_diff ) - return -1; - - for ( ; i < mmvar->num_axis; i++ ) - { - if ( blend->normalizedcoords[i] != 0 ) - { - manageCvt = mcvt_load; - break; - } - } - - /* If we don't change the blend coords then we don't need to do */ - /* anything to the cvt table. It will be correct. Otherwise we */ - /* no longer have the original cvt (it was modified when we set */ - /* the blend last time), so we must reload and then modify it. */ - } - - blend->num_axis = mmvar->num_axis; - FT_MEM_COPY( blend->normalizedcoords, - coords, - num_coords * sizeof ( FT_Fixed ) ); - - if ( set_design_coords ) - ft_var_to_design( face, - all_design_coords ? blend->num_axis : num_coords, - blend->normalizedcoords, - blend->coords ); - - face->doblend = TRUE; - - if ( face->cvt ) - { - switch ( manageCvt ) - { - case mcvt_load: - /* The cvt table has been loaded already; every time we change the */ - /* blend we may need to reload and remodify the cvt table. */ - FT_FREE( face->cvt ); - face->cvt = NULL; - - error = tt_face_load_cvt( face, face->root.stream ); - break; - - case mcvt_modify: - /* The original cvt table is in memory. All we need to do is */ - /* apply the `cvar' table (if any). */ - error = tt_face_vary_cvt( face, face->root.stream ); - break; - - case mcvt_retain: - /* The cvt table is correct for this set of coordinates. */ - break; - } - } - - /* enforce recomputation of the PostScript name; */ - FT_FREE( face->postscript_name ); - face->postscript_name = NULL; - - Exit: - return error; - } - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* TT_Set_MM_Blend */ - /* */ - /* <Description> */ - /* Set the blend (normalized) coordinates for this instance of the */ - /* font. Check that the `gvar' table is reasonable and does some */ - /* initial preparation. */ - /* */ - /* <InOut> */ - /* face :: The font. */ - /* Initialize the blend structure with `gvar' data. */ - /* */ - /* <Input> */ - /* num_coords :: The number of available coordinates. If it is */ - /* larger than the number of axes, ignore the excess */ - /* values. If it is smaller than the number of axes, */ - /* use the default value (0) for the remaining axes. */ - /* */ - /* coords :: An array of `num_coords', each between [-1,1]. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - FT_LOCAL_DEF( FT_Error ) - TT_Set_MM_Blend( TT_Face face, - FT_UInt num_coords, - FT_Fixed* coords ) - { - FT_Error error; - - - error = tt_set_mm_blend( face, num_coords, coords, 1 ); - if ( error ) - return error; - - if ( num_coords ) - face->root.face_flags |= FT_FACE_FLAG_VARIATION; - else - face->root.face_flags &= ~FT_FACE_FLAG_VARIATION; - - return FT_Err_Ok; - } - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* TT_Get_MM_Blend */ - /* */ - /* <Description> */ - /* Get the blend (normalized) coordinates for this instance of the */ - /* font. */ - /* */ - /* <InOut> */ - /* face :: The font. */ - /* Initialize the blend structure with `gvar' data. */ - /* */ - /* <Input> */ - /* num_coords :: The number of available coordinates. If it is */ - /* larger than the number of axes, set the excess */ - /* values to 0. */ - /* */ - /* coords :: An array of `num_coords', each between [-1,1]. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - FT_LOCAL_DEF( FT_Error ) - TT_Get_MM_Blend( TT_Face face, - FT_UInt num_coords, - FT_Fixed* coords ) - { - FT_Error error = FT_Err_Ok; - GX_Blend blend; - FT_UInt i, nc; - - - if ( !face->blend ) - { - if ( FT_SET_ERROR( TT_Get_MM_Var( face, NULL ) ) ) - return error; - } - - blend = face->blend; - - if ( !blend->coords ) - { - /* select default instance coordinates */ - /* if no instance is selected yet */ - if ( FT_SET_ERROR( tt_set_mm_blend( face, 0, NULL, 1 ) ) ) - return error; - } - - nc = num_coords; - if ( num_coords > blend->num_axis ) - { - FT_TRACE2(( "TT_Get_MM_Blend:" - " only using first %d of %d coordinates\n", - blend->num_axis, num_coords )); - nc = blend->num_axis; - } - - if ( face->doblend ) - { - for ( i = 0; i < nc; i++ ) - coords[i] = blend->normalizedcoords[i]; - } - else - { - for ( i = 0; i < nc; i++ ) - coords[i] = 0; - } - - for ( ; i < num_coords; i++ ) - coords[i] = 0; - - return FT_Err_Ok; - } - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* TT_Set_Var_Design */ - /* */ - /* <Description> */ - /* Set the coordinates for the instance, measured in the user */ - /* coordinate system. Parse the `avar' table (if present) to convert */ - /* from user to normalized coordinates. */ - /* */ - /* <InOut> */ - /* face :: The font face. */ - /* Initialize the blend struct with `gvar' data. */ - /* */ - /* <Input> */ - /* num_coords :: The number of available coordinates. If it is */ - /* larger than the number of axes, ignore the excess */ - /* values. If it is smaller than the number of axes, */ - /* use the default values for the remaining axes. */ - /* */ - /* coords :: A coordinate array with `num_coords' elements. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - FT_LOCAL_DEF( FT_Error ) - TT_Set_Var_Design( TT_Face face, - FT_UInt num_coords, - FT_Fixed* coords ) - { - FT_Error error = FT_Err_Ok; - GX_Blend blend; - FT_MM_Var* mmvar; - FT_UInt i; - FT_Memory memory = face->root.memory; - - FT_Fixed* c; - FT_Fixed* n; - FT_Fixed* normalized = NULL; - - FT_Bool have_diff = 0; - - - if ( !face->blend ) - { - if ( FT_SET_ERROR( TT_Get_MM_Var( face, NULL ) ) ) - goto Exit; - } - - blend = face->blend; - mmvar = blend->mmvar; - - if ( num_coords > mmvar->num_axis ) - { - FT_TRACE2(( "TT_Set_Var_Design:" - " only using first %d of %d coordinates\n", - mmvar->num_axis, num_coords )); - num_coords = mmvar->num_axis; - } - - if ( !blend->coords ) - { - if ( FT_NEW_ARRAY( blend->coords, mmvar->num_axis ) ) - goto Exit; - } - - c = blend->coords; - n = coords; - for ( i = 0; i < num_coords; i++, n++, c++ ) - { - if ( *c != *n ) - { - *c = *n; - have_diff = 1; - } - } - - if ( FT_IS_NAMED_INSTANCE( FT_FACE( face ) ) ) - { - FT_UInt instance_index; - FT_Var_Named_Style* named_style; - - - instance_index = (FT_UInt)face->root.face_index >> 16; - named_style = mmvar->namedstyle + instance_index - 1; - - n = named_style->coords + num_coords; - for ( ; i < mmvar->num_axis; i++, n++, c++ ) - { - if ( *c != *n ) - { - *c = *n; - have_diff = 1; - } - } - } - else - { - FT_Var_Axis* a; - - - a = mmvar->axis + num_coords; - for ( ; i < mmvar->num_axis; i++, a++, c++ ) - { - if ( *c != a->def ) - { - *c = a->def; - have_diff = 1; - } - } - } - - /* return value -1 indicates `no change'; */ - /* we can exit early if `normalizedcoords' is already computed */ - if ( blend->normalizedcoords && !have_diff ) - return -1; - - if ( FT_NEW_ARRAY( normalized, mmvar->num_axis ) ) - goto Exit; - - if ( !face->blend->avar_loaded ) - ft_var_load_avar( face ); - - FT_TRACE5(( "TT_Set_Var_Design:\n" - " normalized design coordinates:\n" )); - ft_var_to_normalized( face, num_coords, blend->coords, normalized ); - - error = tt_set_mm_blend( face, mmvar->num_axis, normalized, 0 ); - if ( error ) - goto Exit; - - if ( num_coords ) - face->root.face_flags |= FT_FACE_FLAG_VARIATION; - else - face->root.face_flags &= ~FT_FACE_FLAG_VARIATION; - - Exit: - FT_FREE( normalized ); - return error; - } - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* TT_Get_Var_Design */ - /* */ - /* <Description> */ - /* Get the design coordinates of the currently selected interpolated */ - /* font. */ - /* */ - /* <Input> */ - /* face :: A handle to the source face. */ - /* */ - /* num_coords :: The number of design coordinates to retrieve. If it */ - /* is larger than the number of axes, set the excess */ - /* values to~0. */ - /* */ - /* <Output> */ - /* coords :: The design coordinates array. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - FT_LOCAL_DEF( FT_Error ) - TT_Get_Var_Design( TT_Face face, - FT_UInt num_coords, - FT_Fixed* coords ) - { - FT_Error error = FT_Err_Ok; - GX_Blend blend; - FT_UInt i, nc; - - - if ( !face->blend ) - { - if ( FT_SET_ERROR( TT_Get_MM_Var( face, NULL ) ) ) - return error; - } - - blend = face->blend; - - if ( !blend->coords ) - { - /* select default instance coordinates */ - /* if no instance is selected yet */ - if ( FT_SET_ERROR( tt_set_mm_blend( face, 0, NULL, 1 ) ) ) - return error; - } - - nc = num_coords; - if ( num_coords > blend->num_axis ) - { - FT_TRACE2(( "TT_Get_Var_Design:" - " only using first %d of %d coordinates\n", - blend->num_axis, num_coords )); - nc = blend->num_axis; - } - - if ( face->doblend ) - { - for ( i = 0; i < nc; i++ ) - coords[i] = blend->coords[i]; - } - else - { - for ( i = 0; i < nc; i++ ) - coords[i] = 0; - } - - for ( ; i < num_coords; i++ ) - coords[i] = 0; - - return FT_Err_Ok; - } - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* TT_Set_Named_Instance */ - /* */ - /* <Description> */ - /* Set the given named instance, also resetting any further */ - /* variation. */ - /* */ - /* <Input> */ - /* face :: A handle to the source face. */ - /* */ - /* instance_index :: The instance index, starting with value 1. */ - /* Value 0 indicates to not use an instance. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - FT_LOCAL_DEF( FT_Error ) - TT_Set_Named_Instance( TT_Face face, - FT_UInt instance_index ) - { - FT_Error error = FT_ERR( Invalid_Argument ); - GX_Blend blend; - FT_MM_Var* mmvar; - - FT_UInt num_instances; - - - if ( !face->blend ) - { - if ( FT_SET_ERROR( TT_Get_MM_Var( face, NULL ) ) ) - goto Exit; - } - - blend = face->blend; - mmvar = blend->mmvar; - - num_instances = (FT_UInt)face->root.style_flags >> 16; - - /* `instance_index' starts with value 1, thus `>' */ - if ( instance_index > num_instances ) - goto Exit; - - if ( instance_index > 0 && mmvar->namedstyle ) - { - FT_Memory memory = face->root.memory; - SFNT_Service sfnt = (SFNT_Service)face->sfnt; - - FT_Var_Named_Style* named_style; - FT_String* style_name; - - - named_style = mmvar->namedstyle + instance_index - 1; - - error = sfnt->get_name( face, - (FT_UShort)named_style->strid, - &style_name ); - if ( error ) - goto Exit; - - /* set (or replace) style name */ - FT_FREE( face->root.style_name ); - face->root.style_name = style_name; - - /* finally, select the named instance */ - error = TT_Set_Var_Design( face, - mmvar->num_axis, - named_style->coords ); - if ( error ) - goto Exit; - } - else - error = TT_Set_Var_Design( face, 0, NULL ); - - face->root.face_index = ( instance_index << 16 ) | - ( face->root.face_index & 0xFFFFL ); - face->root.face_flags &= ~FT_FACE_FLAG_VARIATION; - - Exit: - return error; - } - - - /*************************************************************************/ - /*************************************************************************/ - /***** *****/ - /***** GX VAR PARSING ROUTINES *****/ - /***** *****/ - /*************************************************************************/ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* tt_face_vary_cvt */ - /* */ - /* <Description> */ - /* Modify the loaded cvt table according to the `cvar' table and the */ - /* font's blend. */ - /* */ - /* <InOut> */ - /* face :: A handle to the target face object. */ - /* */ - /* <Input> */ - /* stream :: A handle to the input stream. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - /* Most errors are ignored. It is perfectly valid not to have a */ - /* `cvar' table even if there is a `gvar' and `fvar' table. */ - /* */ - FT_LOCAL_DEF( FT_Error ) - tt_face_vary_cvt( TT_Face face, - FT_Stream stream ) - { - FT_Error error; - FT_Memory memory = stream->memory; - FT_ULong table_start; - FT_ULong table_len; - FT_UInt tupleCount; - FT_ULong offsetToData; - FT_ULong here; - FT_UInt i, j; - FT_Fixed* tuple_coords = NULL; - FT_Fixed* im_start_coords = NULL; - FT_Fixed* im_end_coords = NULL; - GX_Blend blend = face->blend; - FT_UInt point_count, spoint_count = 0; - FT_UShort* sharedpoints = NULL; - FT_UShort* localpoints = NULL; - FT_UShort* points; - FT_Short* deltas; - - - FT_TRACE2(( "CVAR " )); - - if ( !blend ) - { - FT_TRACE2(( "\n" - "tt_face_vary_cvt: no blend specified\n" )); - error = FT_Err_Ok; - goto Exit; - } - - if ( !face->cvt ) - { - FT_TRACE2(( "\n" - "tt_face_vary_cvt: no `cvt ' table\n" )); - error = FT_Err_Ok; - goto Exit; - } - - error = face->goto_table( face, TTAG_cvar, stream, &table_len ); - if ( error ) - { - FT_TRACE2(( "is missing\n" )); - - error = FT_Err_Ok; - goto Exit; - } - - if ( FT_FRAME_ENTER( table_len ) ) - { - error = FT_Err_Ok; - goto Exit; - } - - table_start = FT_Stream_FTell( stream ); - if ( FT_GET_LONG() != 0x00010000L ) - { - FT_TRACE2(( "bad table version\n" )); - - error = FT_Err_Ok; - goto FExit; - } - - FT_TRACE2(( "loaded\n" )); - - if ( FT_NEW_ARRAY( tuple_coords, blend->num_axis ) || - FT_NEW_ARRAY( im_start_coords, blend->num_axis ) || - FT_NEW_ARRAY( im_end_coords, blend->num_axis ) ) - goto FExit; - - tupleCount = FT_GET_USHORT(); - offsetToData = FT_GET_USHORT(); - - /* rough sanity test */ - if ( offsetToData + ( tupleCount & GX_TC_TUPLE_COUNT_MASK ) * 4 > - table_len ) - { - FT_TRACE2(( "tt_face_vary_cvt:" - " invalid CVT variation array header\n" )); - - error = FT_THROW( Invalid_Table ); - goto FExit; - } - - offsetToData += table_start; - - if ( tupleCount & GX_TC_TUPLES_SHARE_POINT_NUMBERS ) - { - here = FT_Stream_FTell( stream ); - - FT_Stream_SeekSet( stream, offsetToData ); - - sharedpoints = ft_var_readpackedpoints( stream, - table_len, - &spoint_count ); - offsetToData = FT_Stream_FTell( stream ); - - FT_Stream_SeekSet( stream, here ); - } - - FT_TRACE5(( "cvar: there %s %d tuple%s:\n", - ( tupleCount & 0xFFF ) == 1 ? "is" : "are", - tupleCount & 0xFFF, - ( tupleCount & 0xFFF ) == 1 ? "" : "s" )); - - for ( i = 0; i < ( tupleCount & 0xFFF ); i++ ) - { - FT_UInt tupleDataSize; - FT_UInt tupleIndex; - FT_Fixed apply; - - - FT_TRACE6(( " tuple %d:\n", i )); - - tupleDataSize = FT_GET_USHORT(); - tupleIndex = FT_GET_USHORT(); - - if ( tupleIndex & GX_TI_EMBEDDED_TUPLE_COORD ) - { - for ( j = 0; j < blend->num_axis; j++ ) - tuple_coords[j] = FT_GET_SHORT() * 4; /* convert from */ - /* short frac to fixed */ - } - else if ( ( tupleIndex & GX_TI_TUPLE_INDEX_MASK ) >= blend->tuplecount ) - { - FT_TRACE2(( "tt_face_vary_cvt:" - " invalid tuple index\n" )); - - error = FT_THROW( Invalid_Table ); - goto Exit; - } - else - FT_MEM_COPY( - tuple_coords, - &blend->tuplecoords[( tupleIndex & 0xFFF ) * blend->num_axis], - blend->num_axis * sizeof ( FT_Fixed ) ); - - if ( tupleIndex & GX_TI_INTERMEDIATE_TUPLE ) - { - for ( j = 0; j < blend->num_axis; j++ ) - im_start_coords[j] = FT_GET_SHORT() * 4; - for ( j = 0; j < blend->num_axis; j++ ) - im_end_coords[j] = FT_GET_SHORT() * 4; - } - - apply = ft_var_apply_tuple( blend, - (FT_UShort)tupleIndex, - tuple_coords, - im_start_coords, - im_end_coords ); - - if ( apply == 0 ) /* tuple isn't active for our blend */ - { - offsetToData += tupleDataSize; - continue; - } - - here = FT_Stream_FTell( stream ); - - FT_Stream_SeekSet( stream, offsetToData ); - - if ( tupleIndex & GX_TI_PRIVATE_POINT_NUMBERS ) - { - localpoints = ft_var_readpackedpoints( stream, - table_len, - &point_count ); - points = localpoints; - } - else - { - points = sharedpoints; - point_count = spoint_count; - } - - deltas = ft_var_readpackeddeltas( stream, - table_len, - point_count == 0 ? face->cvt_size - : point_count ); - - if ( !points || - !deltas || - ( localpoints == ALL_POINTS && point_count != face->cvt_size ) ) - ; /* failure, ignore it */ - - else if ( localpoints == ALL_POINTS ) - { -#ifdef FT_DEBUG_LEVEL_TRACE - int count = 0; -#endif - - - FT_TRACE7(( " CVT deltas:\n" )); - - /* this means that there are deltas for every entry in cvt */ - for ( j = 0; j < face->cvt_size; j++ ) - { - FT_Long orig_cvt = face->cvt[j]; - - - face->cvt[j] = (FT_Short)( orig_cvt + - FT_MulFix( deltas[j], apply ) ); - -#ifdef FT_DEBUG_LEVEL_TRACE - if ( orig_cvt != face->cvt[j] ) - { - FT_TRACE7(( " %d: %d -> %d\n", - j, orig_cvt, face->cvt[j] )); - count++; - } -#endif - } - -#ifdef FT_DEBUG_LEVEL_TRACE - if ( !count ) - FT_TRACE7(( " none\n" )); -#endif - } - - else - { -#ifdef FT_DEBUG_LEVEL_TRACE - int count = 0; -#endif - - - FT_TRACE7(( " CVT deltas:\n" )); - - for ( j = 0; j < point_count; j++ ) - { - int pindex; - FT_Long orig_cvt; - - - pindex = points[j]; - if ( (FT_ULong)pindex >= face->cvt_size ) - continue; - - orig_cvt = face->cvt[pindex]; - face->cvt[pindex] = (FT_Short)( orig_cvt + - FT_MulFix( deltas[j], apply ) ); - -#ifdef FT_DEBUG_LEVEL_TRACE - if ( orig_cvt != face->cvt[pindex] ) - { - FT_TRACE7(( " %d: %d -> %d\n", - pindex, orig_cvt, face->cvt[pindex] )); - count++; - } -#endif - } - -#ifdef FT_DEBUG_LEVEL_TRACE - if ( !count ) - FT_TRACE7(( " none\n" )); -#endif - } - - if ( localpoints != ALL_POINTS ) - FT_FREE( localpoints ); - FT_FREE( deltas ); - - offsetToData += tupleDataSize; - - FT_Stream_SeekSet( stream, here ); - } - - FT_TRACE5(( "\n" )); - - FExit: - FT_FRAME_EXIT(); - - Exit: - if ( sharedpoints != ALL_POINTS ) - FT_FREE( sharedpoints ); - FT_FREE( tuple_coords ); - FT_FREE( im_start_coords ); - FT_FREE( im_end_coords ); - - return error; - } - - - /* Shift the original coordinates of all points between indices `p1' */ - /* and `p2', using the same difference as given by index `ref'. */ - - /* modeled after `af_iup_shift' */ - - static void - tt_delta_shift( int p1, - int p2, - int ref, - FT_Vector* in_points, - FT_Vector* out_points ) - { - int p; - FT_Vector delta; - - - delta.x = out_points[ref].x - in_points[ref].x; - delta.y = out_points[ref].y - in_points[ref].y; - - if ( delta.x == 0 && delta.y == 0 ) - return; - - for ( p = p1; p < ref; p++ ) - { - out_points[p].x += delta.x; - out_points[p].y += delta.y; - } - - for ( p = ref + 1; p <= p2; p++ ) - { - out_points[p].x += delta.x; - out_points[p].y += delta.y; - } - } - - - /* Interpolate the original coordinates of all points with indices */ - /* between `p1' and `p2', using `ref1' and `ref2' as the reference */ - /* point indices. */ - - /* modeled after `af_iup_interp', `_iup_worker_interpolate', and */ - /* `Ins_IUP' */ - - static void - tt_delta_interpolate( int p1, - int p2, - int ref1, - int ref2, - FT_Vector* in_points, - FT_Vector* out_points ) - { - int p, i; - - FT_Pos out, in1, in2, out1, out2, d1, d2; - - - if ( p1 > p2 ) - return; - - /* handle both horizontal and vertical coordinates */ - for ( i = 0; i <= 1; i++ ) - { - /* shift array pointers so that we can access `foo.y' as `foo.x' */ - in_points = (FT_Vector*)( (FT_Pos*)in_points + i ); - out_points = (FT_Vector*)( (FT_Pos*)out_points + i ); - - if ( in_points[ref1].x > in_points[ref2].x ) - { - p = ref1; - ref1 = ref2; - ref2 = p; - } - - in1 = in_points[ref1].x; - in2 = in_points[ref2].x; - out1 = out_points[ref1].x; - out2 = out_points[ref2].x; - d1 = out1 - in1; - d2 = out2 - in2; - - /* If the reference points have the same coordinate but different */ - /* delta, inferred delta is zero. Otherwise interpolate. */ - if ( in1 != in2 || out1 == out2 ) - { - FT_Fixed scale = in1 != in2 ? FT_DivFix( out2 - out1, in2 - in1 ) - : 0; - - - for ( p = p1; p <= p2; p++ ) - { - out = in_points[p].x; - - if ( out <= in1 ) - out += d1; - else if ( out >= in2 ) - out += d2; - else - out = out1 + FT_MulFix( out - in1, scale ); - - out_points[p].x = out; - } - } - } - } - - - /* Interpolate points without delta values, similar to */ - /* the `IUP' hinting instruction. */ - - /* modeled after `Ins_IUP */ - - static void - tt_interpolate_deltas( FT_Outline* outline, - FT_Vector* out_points, - FT_Vector* in_points, - FT_Bool* has_delta ) - { - FT_Int first_point; - FT_Int end_point; - - FT_Int first_delta; - FT_Int cur_delta; - - FT_Int point; - FT_Short contour; - - - /* ignore empty outlines */ - if ( !outline->n_contours ) - return; - - contour = 0; - point = 0; - - do - { - end_point = outline->contours[contour]; - first_point = point; - - /* search first point that has a delta */ - while ( point <= end_point && !has_delta[point] ) - point++; - - if ( point <= end_point ) - { - first_delta = point; - cur_delta = point; - - point++; - - while ( point <= end_point ) - { - /* search next point that has a delta */ - /* and interpolate intermediate points */ - if ( has_delta[point] ) - { - tt_delta_interpolate( cur_delta + 1, - point - 1, - cur_delta, - point, - in_points, - out_points ); - cur_delta = point; - } - - point++; - } - - /* shift contour if we only have a single delta */ - if ( cur_delta == first_delta ) - tt_delta_shift( first_point, - end_point, - cur_delta, - in_points, - out_points ); - else - { - /* otherwise handle remaining points */ - /* at the end and beginning of the contour */ - tt_delta_interpolate( cur_delta + 1, - end_point, - cur_delta, - first_delta, - in_points, - out_points ); - - if ( first_delta > 0 ) - tt_delta_interpolate( first_point, - first_delta - 1, - cur_delta, - first_delta, - in_points, - out_points ); - } - } - contour++; - - } while ( contour < outline->n_contours ); - } - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* TT_Vary_Apply_Glyph_Deltas */ - /* */ - /* <Description> */ - /* Apply the appropriate deltas to the current glyph. */ - /* */ - /* <Input> */ - /* face :: A handle to the target face object. */ - /* */ - /* glyph_index :: The index of the glyph being modified. */ - /* */ - /* n_points :: The number of the points in the glyph, including */ - /* phantom points. */ - /* */ - /* <InOut> */ - /* outline :: The outline to change. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - FT_LOCAL_DEF( FT_Error ) - TT_Vary_Apply_Glyph_Deltas( TT_Face face, - FT_UInt glyph_index, - FT_Outline* outline, - FT_UInt n_points ) - { - FT_Stream stream = face->root.stream; - FT_Memory memory = stream->memory; - GX_Blend blend = face->blend; - - FT_Vector* points_org = NULL; - FT_Vector* points_out = NULL; - FT_Bool* has_delta = NULL; - - FT_Error error; - FT_ULong glyph_start; - FT_UInt tupleCount; - FT_ULong offsetToData; - FT_ULong here; - FT_UInt i, j; - FT_Fixed* tuple_coords = NULL; - FT_Fixed* im_start_coords = NULL; - FT_Fixed* im_end_coords = NULL; - FT_UInt point_count, spoint_count = 0; - FT_UShort* sharedpoints = NULL; - FT_UShort* localpoints = NULL; - FT_UShort* points; - FT_Short *deltas_x, *deltas_y; - - - if ( !face->doblend || !blend ) - return FT_THROW( Invalid_Argument ); - - if ( glyph_index >= blend->gv_glyphcnt || - blend->glyphoffsets[glyph_index] == - blend->glyphoffsets[glyph_index + 1] ) - { - FT_TRACE2(( "TT_Vary_Apply_Glyph_Deltas:" - " no variation data for this glyph\n" )); - return FT_Err_Ok; - } - - if ( FT_NEW_ARRAY( points_org, n_points ) || - FT_NEW_ARRAY( points_out, n_points ) || - FT_NEW_ARRAY( has_delta, n_points ) ) - goto Fail1; - - if ( FT_STREAM_SEEK( blend->glyphoffsets[glyph_index] ) || - FT_FRAME_ENTER( blend->glyphoffsets[glyph_index + 1] - - blend->glyphoffsets[glyph_index] ) ) - goto Fail1; - - glyph_start = FT_Stream_FTell( stream ); - - /* each set of glyph variation data is formatted similarly to `cvar' */ - - if ( FT_NEW_ARRAY( tuple_coords, blend->num_axis ) || - FT_NEW_ARRAY( im_start_coords, blend->num_axis ) || - FT_NEW_ARRAY( im_end_coords, blend->num_axis ) ) - goto Fail2; - - tupleCount = FT_GET_USHORT(); - offsetToData = FT_GET_USHORT(); - - /* rough sanity test */ - if ( offsetToData + ( tupleCount & GX_TC_TUPLE_COUNT_MASK ) * 4 > - blend->gvar_size ) - { - FT_TRACE2(( "TT_Vary_Apply_Glyph_Deltas:" - " invalid glyph variation array header\n" )); - - error = FT_THROW( Invalid_Table ); - goto Fail2; - } - - offsetToData += glyph_start; - - if ( tupleCount & GX_TC_TUPLES_SHARE_POINT_NUMBERS ) - { - here = FT_Stream_FTell( stream ); - - FT_Stream_SeekSet( stream, offsetToData ); - - sharedpoints = ft_var_readpackedpoints( stream, - blend->gvar_size, - &spoint_count ); - offsetToData = FT_Stream_FTell( stream ); - - FT_Stream_SeekSet( stream, here ); - } - - FT_TRACE5(( "gvar: there %s %d tuple%s:\n", - ( tupleCount & GX_TC_TUPLE_COUNT_MASK ) == 1 ? "is" : "are", - tupleCount & GX_TC_TUPLE_COUNT_MASK, - ( tupleCount & GX_TC_TUPLE_COUNT_MASK ) == 1 ? "" : "s" )); - - for ( j = 0; j < n_points; j++ ) - points_org[j] = outline->points[j]; - - for ( i = 0; i < ( tupleCount & GX_TC_TUPLE_COUNT_MASK ); i++ ) - { - FT_UInt tupleDataSize; - FT_UInt tupleIndex; - FT_Fixed apply; - - - FT_TRACE6(( " tuple %d:\n", i )); - - tupleDataSize = FT_GET_USHORT(); - tupleIndex = FT_GET_USHORT(); - - if ( tupleIndex & GX_TI_EMBEDDED_TUPLE_COORD ) - { - for ( j = 0; j < blend->num_axis; j++ ) - tuple_coords[j] = FT_GET_SHORT() * 4; /* convert from */ - /* short frac to fixed */ - } - else if ( ( tupleIndex & GX_TI_TUPLE_INDEX_MASK ) >= blend->tuplecount ) - { - FT_TRACE2(( "TT_Vary_Apply_Glyph_Deltas:" - " invalid tuple index\n" )); - - error = FT_THROW( Invalid_Table ); - goto Fail2; - } - else - FT_MEM_COPY( - tuple_coords, - &blend->tuplecoords[( tupleIndex & 0xFFF ) * blend->num_axis], - blend->num_axis * sizeof ( FT_Fixed ) ); - - if ( tupleIndex & GX_TI_INTERMEDIATE_TUPLE ) - { - for ( j = 0; j < blend->num_axis; j++ ) - im_start_coords[j] = FT_GET_SHORT() * 4; - for ( j = 0; j < blend->num_axis; j++ ) - im_end_coords[j] = FT_GET_SHORT() * 4; - } - - apply = ft_var_apply_tuple( blend, - (FT_UShort)tupleIndex, - tuple_coords, - im_start_coords, - im_end_coords ); - - if ( apply == 0 ) /* tuple isn't active for our blend */ - { - offsetToData += tupleDataSize; - continue; - } - - here = FT_Stream_FTell( stream ); - - FT_Stream_SeekSet( stream, offsetToData ); - - if ( tupleIndex & GX_TI_PRIVATE_POINT_NUMBERS ) - { - localpoints = ft_var_readpackedpoints( stream, - blend->gvar_size, - &point_count ); - points = localpoints; - } - else - { - points = sharedpoints; - point_count = spoint_count; - } - - deltas_x = ft_var_readpackeddeltas( stream, - blend->gvar_size, - point_count == 0 ? n_points - : point_count ); - deltas_y = ft_var_readpackeddeltas( stream, - blend->gvar_size, - point_count == 0 ? n_points - : point_count ); - - if ( !points || !deltas_y || !deltas_x ) - ; /* failure, ignore it */ - - else if ( points == ALL_POINTS ) - { -#ifdef FT_DEBUG_LEVEL_TRACE - int count = 0; -#endif - - - FT_TRACE7(( " point deltas:\n" )); - - /* this means that there are deltas for every point in the glyph */ - for ( j = 0; j < n_points; j++ ) - { - FT_Pos delta_x = FT_MulFix( deltas_x[j], apply ); - FT_Pos delta_y = FT_MulFix( deltas_y[j], apply ); - - - if ( j < n_points - 4 ) - { - outline->points[j].x += delta_x; - outline->points[j].y += delta_y; - } - else - { - /* To avoid double adjustment of advance width or height, */ - /* adjust phantom points only if there is no HVAR or VVAR */ - /* support, respectively. */ - if ( j == ( n_points - 4 ) && - !( face->variation_support & - TT_FACE_FLAG_VAR_LSB ) ) - outline->points[j].x += delta_x; - - else if ( j == ( n_points - 3 ) && - !( face->variation_support & - TT_FACE_FLAG_VAR_HADVANCE ) ) - outline->points[j].x += delta_x; - - else if ( j == ( n_points - 2 ) && - !( face->variation_support & - TT_FACE_FLAG_VAR_TSB ) ) - outline->points[j].y += delta_y; - - else if ( j == ( n_points - 1 ) && - !( face->variation_support & - TT_FACE_FLAG_VAR_VADVANCE ) ) - outline->points[j].y += delta_y; - } - -#ifdef FT_DEBUG_LEVEL_TRACE - if ( delta_x || delta_y ) - { - FT_TRACE7(( " %d: (%d, %d) -> (%d, %d)\n", - j, - outline->points[j].x - delta_x, - outline->points[j].y - delta_y, - outline->points[j].x, - outline->points[j].y )); - count++; - } -#endif - } - -#ifdef FT_DEBUG_LEVEL_TRACE - if ( !count ) - FT_TRACE7(( " none\n" )); -#endif - } - - else - { -#ifdef FT_DEBUG_LEVEL_TRACE - int count = 0; -#endif - - - /* we have to interpolate the missing deltas similar to the */ - /* IUP bytecode instruction */ - for ( j = 0; j < n_points; j++ ) - { - has_delta[j] = FALSE; - points_out[j] = points_org[j]; - } - - for ( j = 0; j < point_count; j++ ) - { - FT_UShort idx = points[j]; - - - if ( idx >= n_points ) - continue; - - has_delta[idx] = TRUE; - - points_out[idx].x += FT_MulFix( deltas_x[j], apply ); - points_out[idx].y += FT_MulFix( deltas_y[j], apply ); - } - - /* no need to handle phantom points here, */ - /* since solitary points can't be interpolated */ - tt_interpolate_deltas( outline, - points_out, - points_org, - has_delta ); - - FT_TRACE7(( " point deltas:\n" )); - - for ( j = 0; j < n_points; j++ ) - { - FT_Pos delta_x = points_out[j].x - points_org[j].x; - FT_Pos delta_y = points_out[j].y - points_org[j].y; - - - if ( j < n_points - 4 ) - { - outline->points[j].x += delta_x; - outline->points[j].y += delta_y; - } - else - { - /* To avoid double adjustment of advance width or height, */ - /* adjust phantom points only if there is no HVAR or VVAR */ - /* support, respectively. */ - if ( j == ( n_points - 4 ) && - !( face->variation_support & - TT_FACE_FLAG_VAR_LSB ) ) - outline->points[j].x += delta_x; - - else if ( j == ( n_points - 3 ) && - !( face->variation_support & - TT_FACE_FLAG_VAR_HADVANCE ) ) - outline->points[j].x += delta_x; - - else if ( j == ( n_points - 2 ) && - !( face->variation_support & - TT_FACE_FLAG_VAR_TSB ) ) - outline->points[j].y += delta_y; - - else if ( j == ( n_points - 1 ) && - !( face->variation_support & - TT_FACE_FLAG_VAR_VADVANCE ) ) - outline->points[j].y += delta_y; - } - -#ifdef FT_DEBUG_LEVEL_TRACE - if ( delta_x || delta_y ) - { - FT_TRACE7(( " %d: (%d, %d) -> (%d, %d)\n", - j, - outline->points[j].x - delta_x, - outline->points[j].y - delta_y, - outline->points[j].x, - outline->points[j].y )); - count++; - } -#endif - } - -#ifdef FT_DEBUG_LEVEL_TRACE - if ( !count ) - FT_TRACE7(( " none\n" )); -#endif - } - - if ( localpoints != ALL_POINTS ) - FT_FREE( localpoints ); - FT_FREE( deltas_x ); - FT_FREE( deltas_y ); - - offsetToData += tupleDataSize; - - FT_Stream_SeekSet( stream, here ); - } - - FT_TRACE5(( "\n" )); - - Fail2: - if ( sharedpoints != ALL_POINTS ) - FT_FREE( sharedpoints ); - FT_FREE( tuple_coords ); - FT_FREE( im_start_coords ); - FT_FREE( im_end_coords ); - - FT_FRAME_EXIT(); - - Fail1: - FT_FREE( points_org ); - FT_FREE( points_out ); - FT_FREE( has_delta ); - - return error; - } - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* tt_get_var_blend */ - /* */ - /* <Description> */ - /* An extended internal version of `TT_Get_MM_Blend' that returns */ - /* pointers instead of copying data, without any initialization of */ - /* the MM machinery in case it isn't loaded yet. */ - /* */ - FT_LOCAL_DEF( FT_Error ) - tt_get_var_blend( TT_Face face, - FT_UInt *num_coords, - FT_Fixed* *coords, - FT_Fixed* *normalizedcoords, - FT_MM_Var* *mm_var ) - { - if ( face->blend ) - { - if ( num_coords ) - *num_coords = face->blend->num_axis; - if ( coords ) - *coords = face->blend->coords; - if ( normalizedcoords ) - *normalizedcoords = face->blend->normalizedcoords; - if ( mm_var ) - *mm_var = face->blend->mmvar; - } - else - { - if ( num_coords ) - *num_coords = 0; - if ( coords ) - *coords = NULL; - if ( mm_var ) - *mm_var = NULL; - } - - return FT_Err_Ok; - } - - - static void - ft_var_done_item_variation_store( TT_Face face, - GX_ItemVarStore itemStore ) - { - FT_Memory memory = FT_FACE_MEMORY( face ); - FT_UInt i; - - - if ( itemStore->varData ) - { - for ( i = 0; i < itemStore->dataCount; i++ ) - { - FT_FREE( itemStore->varData[i].regionIndices ); - FT_FREE( itemStore->varData[i].deltaSet ); - } - - FT_FREE( itemStore->varData ); - } - - if ( itemStore->varRegionList ) - { - for ( i = 0; i < itemStore->regionCount; i++ ) - FT_FREE( itemStore->varRegionList[i].axisList ); - - FT_FREE( itemStore->varRegionList ); - } - } - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* tt_done_blend */ - /* */ - /* <Description> */ - /* Free the blend internal data structure. */ - /* */ - FT_LOCAL_DEF( void ) - tt_done_blend( TT_Face face ) - { - FT_Memory memory = FT_FACE_MEMORY( face ); - GX_Blend blend = face->blend; - - - if ( blend ) - { - FT_UInt i, num_axes; - - - /* blend->num_axis might not be set up yet */ - num_axes = blend->mmvar->num_axis; - - FT_FREE( blend->coords ); - FT_FREE( blend->normalizedcoords ); - FT_FREE( blend->normalized_stylecoords ); - FT_FREE( blend->mmvar ); - - if ( blend->avar_segment ) - { - for ( i = 0; i < num_axes; i++ ) - FT_FREE( blend->avar_segment[i].correspondence ); - FT_FREE( blend->avar_segment ); - } - - if ( blend->hvar_table ) - { - ft_var_done_item_variation_store( face, - &blend->hvar_table->itemStore ); - - FT_FREE( blend->hvar_table->widthMap.innerIndex ); - FT_FREE( blend->hvar_table->widthMap.outerIndex ); - FT_FREE( blend->hvar_table ); - } - - if ( blend->vvar_table ) - { - ft_var_done_item_variation_store( face, - &blend->vvar_table->itemStore ); - - FT_FREE( blend->vvar_table->widthMap.innerIndex ); - FT_FREE( blend->vvar_table->widthMap.outerIndex ); - FT_FREE( blend->vvar_table ); - } - - if ( blend->mvar_table ) - { - ft_var_done_item_variation_store( face, - &blend->mvar_table->itemStore ); - - FT_FREE( blend->mvar_table->values ); - FT_FREE( blend->mvar_table ); - } - - FT_FREE( blend->tuplecoords ); - FT_FREE( blend->glyphoffsets ); - FT_FREE( blend ); - } - } - -#else /* !TT_CONFIG_OPTION_GX_VAR_SUPPORT */ - - /* ANSI C doesn't like empty source files */ - typedef int _tt_gxvar_dummy; - -#endif /* !TT_CONFIG_OPTION_GX_VAR_SUPPORT */ - - -/* END */ diff --git a/extensions/gdx-freetype/jni/freetype-2.9.1/src/truetype/ttgxvar.h b/extensions/gdx-freetype/jni/freetype-2.9.1/src/truetype/ttgxvar.h deleted file mode 100644 index a37bb9026..000000000 --- a/extensions/gdx-freetype/jni/freetype-2.9.1/src/truetype/ttgxvar.h +++ /dev/null @@ -1,453 +0,0 @@ -/***************************************************************************/ -/* */ -/* ttgxvar.h */ -/* */ -/* TrueType GX Font Variation loader (specification) */ -/* */ -/* Copyright 2004-2018 by */ -/* David Turner, Robert Wilhelm, Werner Lemberg and George Williams. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef TTGXVAR_H_ -#define TTGXVAR_H_ - - -#include <ft2build.h> -#include "ttobjs.h" - - -FT_BEGIN_HEADER - - -#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* GX_AVarCorrespondenceRec */ - /* */ - /* <Description> */ - /* A data structure representing `shortFracCorrespondence' in `avar' */ - /* table according to the specifications from Apple. */ - /* */ - typedef struct GX_AVarCorrespondenceRec_ - { - FT_Fixed fromCoord; - FT_Fixed toCoord; - - } GX_AVarCorrespondenceRec_, *GX_AVarCorrespondence; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* GX_AVarRec */ - /* */ - /* <Description> */ - /* Data from the segment field of `avar' table. */ - /* There is one of these for each axis. */ - /* */ - typedef struct GX_AVarSegmentRec_ - { - FT_UShort pairCount; - GX_AVarCorrespondence correspondence; /* array with pairCount entries */ - - } GX_AVarSegmentRec, *GX_AVarSegment; - - - typedef struct GX_ItemVarDataRec_ - { - FT_UInt itemCount; /* number of delta sets per item */ - FT_UInt regionIdxCount; /* number of region indices in this data */ - FT_UInt* regionIndices; /* array of `regionCount' indices; */ - /* these index `varRegionList' */ - FT_Short* deltaSet; /* array of `itemCount' deltas */ - /* use `innerIndex' for this array */ - - } GX_ItemVarDataRec, *GX_ItemVarData; - - - /* contribution of one axis to a region */ - typedef struct GX_AxisCoordsRec_ - { - FT_Fixed startCoord; - FT_Fixed peakCoord; /* zero means no effect (factor = 1) */ - FT_Fixed endCoord; - - } GX_AxisCoordsRec, *GX_AxisCoords; - - - typedef struct GX_VarRegionRec_ - { - GX_AxisCoords axisList; /* array of axisCount records */ - - } GX_VarRegionRec, *GX_VarRegion; - - - /* item variation store */ - typedef struct GX_ItemVarStoreRec_ - { - FT_UInt dataCount; - GX_ItemVarData varData; /* array of dataCount records; */ - /* use `outerIndex' for this array */ - FT_UShort axisCount; - FT_UInt regionCount; /* total number of regions defined */ - GX_VarRegion varRegionList; - - } GX_ItemVarStoreRec, *GX_ItemVarStore; - - - typedef struct GX_DeltaSetIdxMapRec_ - { - FT_UInt mapCount; - FT_UInt* outerIndex; /* indices to item var data */ - FT_UInt* innerIndex; /* indices to delta set */ - - } GX_DeltaSetIdxMapRec, *GX_DeltaSetIdxMap; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* GX_HVVarTableRec */ - /* */ - /* <Description> */ - /* Data from either the `HVAR' or `VVAR' table. */ - /* */ - typedef struct GX_HVVarTableRec_ - { - GX_ItemVarStoreRec itemStore; /* Item Variation Store */ - GX_DeltaSetIdxMapRec widthMap; /* Advance Width Mapping */ - -#if 0 - GX_DeltaSetIdxMapRec lsbMap; /* not implemented */ - GX_DeltaSetIdxMapRec rsbMap; /* not implemented */ - - GX_DeltaSetIdxMapRec tsbMap; /* not implemented */ - GX_DeltaSetIdxMapRec bsbMap; /* not implemented */ - GX_DeltaSetIdxMapRec vorgMap; /* not implemented */ -#endif - - } GX_HVVarTableRec, *GX_HVVarTable; - - -#define MVAR_TAG_GASP_0 FT_MAKE_TAG( 'g', 's', 'p', '0' ) -#define MVAR_TAG_GASP_1 FT_MAKE_TAG( 'g', 's', 'p', '1' ) -#define MVAR_TAG_GASP_2 FT_MAKE_TAG( 'g', 's', 'p', '2' ) -#define MVAR_TAG_GASP_3 FT_MAKE_TAG( 'g', 's', 'p', '3' ) -#define MVAR_TAG_GASP_4 FT_MAKE_TAG( 'g', 's', 'p', '4' ) -#define MVAR_TAG_GASP_5 FT_MAKE_TAG( 'g', 's', 'p', '5' ) -#define MVAR_TAG_GASP_6 FT_MAKE_TAG( 'g', 's', 'p', '6' ) -#define MVAR_TAG_GASP_7 FT_MAKE_TAG( 'g', 's', 'p', '7' ) -#define MVAR_TAG_GASP_8 FT_MAKE_TAG( 'g', 's', 'p', '8' ) -#define MVAR_TAG_GASP_9 FT_MAKE_TAG( 'g', 's', 'p', '9' ) - -#define MVAR_TAG_CPHT FT_MAKE_TAG( 'c', 'p', 'h', 't' ) -#define MVAR_TAG_HASC FT_MAKE_TAG( 'h', 'a', 's', 'c' ) -#define MVAR_TAG_HCLA FT_MAKE_TAG( 'h', 'c', 'l', 'a' ) -#define MVAR_TAG_HCLD FT_MAKE_TAG( 'h', 'c', 'l', 'd' ) -#define MVAR_TAG_HCOF FT_MAKE_TAG( 'h', 'c', 'o', 'f' ) -#define MVAR_TAG_HCRN FT_MAKE_TAG( 'h', 'c', 'r', 'n' ) -#define MVAR_TAG_HCRS FT_MAKE_TAG( 'h', 'c', 'r', 's' ) -#define MVAR_TAG_HDSC FT_MAKE_TAG( 'h', 'd', 's', 'c' ) -#define MVAR_TAG_HLGP FT_MAKE_TAG( 'h', 'l', 'g', 'p' ) -#define MVAR_TAG_SBXO FT_MAKE_TAG( 's', 'b', 'x', 'o' ) -#define MVAR_TAG_SBXS FT_MAKE_TAG( 's', 'b', 'x', 's' ) -#define MVAR_TAG_SBYO FT_MAKE_TAG( 's', 'b', 'y', 'o' ) -#define MVAR_TAG_SBYS FT_MAKE_TAG( 's', 'b', 'y', 's' ) -#define MVAR_TAG_SPXO FT_MAKE_TAG( 's', 'p', 'x', 'o' ) -#define MVAR_TAG_SPXS FT_MAKE_TAG( 's', 'p', 'x', 's' ) -#define MVAR_TAG_SPYO FT_MAKE_TAG( 's', 'p', 'y', 'o' ) -#define MVAR_TAG_SPYS FT_MAKE_TAG( 's', 'p', 'y', 's' ) -#define MVAR_TAG_STRO FT_MAKE_TAG( 's', 't', 'r', 'o' ) -#define MVAR_TAG_STRS FT_MAKE_TAG( 's', 't', 'r', 's' ) -#define MVAR_TAG_UNDO FT_MAKE_TAG( 'u', 'n', 'd', 'o' ) -#define MVAR_TAG_UNDS FT_MAKE_TAG( 'u', 'n', 'd', 's' ) -#define MVAR_TAG_VASC FT_MAKE_TAG( 'v', 'a', 's', 'c' ) -#define MVAR_TAG_VCOF FT_MAKE_TAG( 'v', 'c', 'o', 'f' ) -#define MVAR_TAG_VCRN FT_MAKE_TAG( 'v', 'c', 'r', 'n' ) -#define MVAR_TAG_VCRS FT_MAKE_TAG( 'v', 'c', 'r', 's' ) -#define MVAR_TAG_VDSC FT_MAKE_TAG( 'v', 'd', 's', 'c' ) -#define MVAR_TAG_VLGP FT_MAKE_TAG( 'v', 'l', 'g', 'p' ) -#define MVAR_TAG_XHGT FT_MAKE_TAG( 'x', 'h', 'g', 't' ) - - - typedef struct GX_ValueRec_ - { - FT_ULong tag; - FT_UShort outerIndex; - FT_UShort innerIndex; - - FT_Short unmodified; /* values are either FT_Short or FT_UShort */ - - } GX_ValueRec, *GX_Value; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* GX_MVarTableRec */ - /* */ - /* <Description> */ - /* Data from the `MVAR' table. */ - /* */ - typedef struct GX_MVarTableRec_ - { - FT_UShort valueCount; - - GX_ItemVarStoreRec itemStore; /* Item Variation Store */ - GX_Value values; /* Value Records */ - - } GX_MVarTableRec, *GX_MVarTable; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* GX_BlendRec */ - /* */ - /* <Description> */ - /* Data for interpolating a font from a distortable font specified */ - /* by the GX *var tables ([fgcahvm]var). */ - /* */ - /* <Fields> */ - /* num_axis :: */ - /* The number of axes along which interpolation may happen. */ - /* */ - /* coords :: */ - /* An array of design coordinates (in user space) indicating the */ - /* contribution along each axis to the final interpolated font. */ - /* `normalizedcoords' holds the same values. */ - /* */ - /* normalizedcoords :: */ - /* An array of normalized values (between [-1,1]) indicating the */ - /* contribution along each axis to the final interpolated font. */ - /* `coords' holds the same values. */ - /* */ - /* mmvar :: */ - /* Data from the `fvar' table. */ - /* */ - /* mmvar_len :: */ - /* The length of the `mmvar' structure. */ - /* */ - /* normalized_stylecoords :: */ - /* A two-dimensional array that holds the named instance data from */ - /* `mmvar' as normalized values. */ - /* */ - /* avar_loaded :: */ - /* A Boolean; if set, FreeType tried to load (and parse) the `avar' */ - /* table. */ - /* */ - /* avar_segment :: */ - /* Data from the `avar' table. */ - /* */ - /* hvar_loaded :: */ - /* A Boolean; if set, FreeType tried to load (and parse) the `hvar' */ - /* table. */ - /* */ - /* hvar_checked :: */ - /* A Boolean; if set, FreeType successfully loaded and parsed the */ - /* `hvar' table. */ - /* */ - /* hvar_error :: */ - /* If loading and parsing of the `hvar' table failed, this field */ - /* holds the corresponding error code. */ - /* */ - /* hvar_table :: */ - /* Data from the `hvar' table. */ - /* */ - /* vvar_loaded :: */ - /* A Boolean; if set, FreeType tried to load (and parse) the `vvar' */ - /* table. */ - /* */ - /* vvar_checked :: */ - /* A Boolean; if set, FreeType successfully loaded and parsed the */ - /* `vvar' table. */ - /* */ - /* vvar_error :: */ - /* If loading and parsing of the `vvar' table failed, this field */ - /* holds the corresponding error code. */ - /* */ - /* vvar_table :: */ - /* Data from the `vvar' table. */ - /* */ - /* mvar_table :: */ - /* Data from the `mvar' table. */ - /* */ - /* tuplecount :: */ - /* The number of shared tuples in the `gvar' table. */ - /* */ - /* tuplecoords :: */ - /* A two-dimensional array that holds the shared tuple coordinates */ - /* in the `gvar' table. */ - /* */ - /* gv_glyphcnt :: */ - /* The number of glyphs handled in the `gvar' table. */ - /* */ - /* glyphoffsets :: */ - /* Offsets into the glyph variation data array. */ - /* */ - /* gvar_size :: */ - /* The size of the `gvar' table. */ - /* */ - typedef struct GX_BlendRec_ - { - FT_UInt num_axis; - FT_Fixed* coords; - FT_Fixed* normalizedcoords; - - FT_MM_Var* mmvar; - FT_Offset mmvar_len; - - FT_Fixed* normalized_stylecoords; - /* normalized_stylecoords[num_namedstyles][num_axis] */ - - FT_Bool avar_loaded; - GX_AVarSegment avar_segment; /* avar_segment[num_axis] */ - - FT_Bool hvar_loaded; - FT_Bool hvar_checked; - FT_Error hvar_error; - GX_HVVarTable hvar_table; - - FT_Bool vvar_loaded; - FT_Bool vvar_checked; - FT_Error vvar_error; - GX_HVVarTable vvar_table; - - GX_MVarTable mvar_table; - - FT_UInt tuplecount; - FT_Fixed* tuplecoords; /* tuplecoords[tuplecount][num_axis] */ - - FT_UInt gv_glyphcnt; - FT_ULong* glyphoffsets; /* glyphoffsets[gv_glyphcnt + 1] */ - - FT_ULong gvar_size; - - } GX_BlendRec; - - - /*************************************************************************/ - /* */ - /* <enum> */ - /* GX_TupleCountFlags */ - /* */ - /* <Description> */ - /* Flags used within the `TupleCount' field of the `gvar' table. */ - /* */ - typedef enum GX_TupleCountFlags_ - { - GX_TC_TUPLES_SHARE_POINT_NUMBERS = 0x8000, - GX_TC_RESERVED_TUPLE_FLAGS = 0x7000, - GX_TC_TUPLE_COUNT_MASK = 0x0FFF - - } GX_TupleCountFlags; - - - /*************************************************************************/ - /* */ - /* <enum> */ - /* GX_TupleIndexFlags */ - /* */ - /* <Description> */ - /* Flags used within the `TupleIndex' field of the `gvar' and `cvar' */ - /* tables. */ - /* */ - typedef enum GX_TupleIndexFlags_ - { - GX_TI_EMBEDDED_TUPLE_COORD = 0x8000, - GX_TI_INTERMEDIATE_TUPLE = 0x4000, - GX_TI_PRIVATE_POINT_NUMBERS = 0x2000, - GX_TI_RESERVED_TUPLE_FLAG = 0x1000, - GX_TI_TUPLE_INDEX_MASK = 0x0FFF - - } GX_TupleIndexFlags; - - -#define TTAG_wght FT_MAKE_TAG( 'w', 'g', 'h', 't' ) -#define TTAG_wdth FT_MAKE_TAG( 'w', 'd', 't', 'h' ) -#define TTAG_opsz FT_MAKE_TAG( 'o', 'p', 's', 'z' ) -#define TTAG_slnt FT_MAKE_TAG( 's', 'l', 'n', 't' ) - - - FT_LOCAL( FT_Error ) - TT_Set_MM_Blend( TT_Face face, - FT_UInt num_coords, - FT_Fixed* coords ); - - FT_LOCAL( FT_Error ) - TT_Get_MM_Blend( TT_Face face, - FT_UInt num_coords, - FT_Fixed* coords ); - - FT_LOCAL( FT_Error ) - TT_Set_Var_Design( TT_Face face, - FT_UInt num_coords, - FT_Fixed* coords ); - - FT_LOCAL( FT_Error ) - TT_Get_MM_Var( TT_Face face, - FT_MM_Var* *master ); - - FT_LOCAL( FT_Error ) - TT_Get_Var_Design( TT_Face face, - FT_UInt num_coords, - FT_Fixed* coords ); - - FT_LOCAL( FT_Error ) - TT_Set_Named_Instance( TT_Face face, - FT_UInt instance_index ); - - FT_LOCAL( FT_Error ) - tt_face_vary_cvt( TT_Face face, - FT_Stream stream ); - - - FT_LOCAL( FT_Error ) - TT_Vary_Apply_Glyph_Deltas( TT_Face face, - FT_UInt glyph_index, - FT_Outline* outline, - FT_UInt n_points ); - - FT_LOCAL( FT_Error ) - tt_hadvance_adjust( TT_Face face, - FT_UInt gindex, - FT_Int *adelta ); - - FT_LOCAL( FT_Error ) - tt_vadvance_adjust( TT_Face face, - FT_UInt gindex, - FT_Int *adelta ); - - FT_LOCAL( void ) - tt_apply_mvar( TT_Face face ); - - FT_LOCAL( FT_Error ) - tt_get_var_blend( TT_Face face, - FT_UInt *num_coords, - FT_Fixed* *coords, - FT_Fixed* *normalizedcoords, - FT_MM_Var* *mm_var ); - - FT_LOCAL( void ) - tt_done_blend( TT_Face face ); - -#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */ - - -FT_END_HEADER - - -#endif /* TTGXVAR_H_ */ - - -/* END */ diff --git a/extensions/gdx-jnigen/res/com/badlogic/gdx/jnigen/resources/headers/jvmti.h b/extensions/gdx-jnigen/res/com/badlogic/gdx/jnigen/resources/headers/jvmti.h deleted file mode 100644 index 327a19244..000000000 --- a/extensions/gdx-jnigen/res/com/badlogic/gdx/jnigen/resources/headers/jvmti.h +++ /dev/null @@ -1,2625 +0,0 @@ -/* - * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - /* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */ - - /* Include file for the Java(tm) Virtual Machine Tool Interface */ - -#ifndef _JAVA_JVMTI_H_ -#define _JAVA_JVMTI_H_ - -#include "jni.h" - -#ifdef __cplusplus -extern "C" { -#endif - -enum { - JVMTI_VERSION_1 = 0x30010000, - JVMTI_VERSION_1_0 = 0x30010000, - JVMTI_VERSION_1_1 = 0x30010100, - JVMTI_VERSION_1_2 = 0x30010200, - JVMTI_VERSION_9 = 0x30090000, - JVMTI_VERSION_11 = 0x300B0000, - - JVMTI_VERSION = 0x30000000 + (11 * 0x10000) + (0 * 0x100) + 0 /* version: 11.0.0 */ -}; - -JNIEXPORT jint JNICALL -Agent_OnLoad(JavaVM *vm, char *options, void *reserved); - -JNIEXPORT jint JNICALL -Agent_OnAttach(JavaVM* vm, char* options, void* reserved); - -JNIEXPORT void JNICALL -Agent_OnUnload(JavaVM *vm); - - /* Forward declaration of the environment */ - -struct _jvmtiEnv; - -struct jvmtiInterface_1_; - -#ifdef __cplusplus -typedef _jvmtiEnv jvmtiEnv; -#else -typedef const struct jvmtiInterface_1_ *jvmtiEnv; -#endif /* __cplusplus */ - -/* Derived Base Types */ - -typedef jobject jthread; -typedef jobject jthreadGroup; -typedef jlong jlocation; -struct _jrawMonitorID; -typedef struct _jrawMonitorID *jrawMonitorID; -typedef struct JNINativeInterface_ jniNativeInterface; - - /* Constants */ - - - /* Thread State Flags */ - -enum { - JVMTI_THREAD_STATE_ALIVE = 0x0001, - JVMTI_THREAD_STATE_TERMINATED = 0x0002, - JVMTI_THREAD_STATE_RUNNABLE = 0x0004, - JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER = 0x0400, - JVMTI_THREAD_STATE_WAITING = 0x0080, - JVMTI_THREAD_STATE_WAITING_INDEFINITELY = 0x0010, - JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT = 0x0020, - JVMTI_THREAD_STATE_SLEEPING = 0x0040, - JVMTI_THREAD_STATE_IN_OBJECT_WAIT = 0x0100, - JVMTI_THREAD_STATE_PARKED = 0x0200, - JVMTI_THREAD_STATE_SUSPENDED = 0x100000, - JVMTI_THREAD_STATE_INTERRUPTED = 0x200000, - JVMTI_THREAD_STATE_IN_NATIVE = 0x400000, - JVMTI_THREAD_STATE_VENDOR_1 = 0x10000000, - JVMTI_THREAD_STATE_VENDOR_2 = 0x20000000, - JVMTI_THREAD_STATE_VENDOR_3 = 0x40000000 -}; - - /* java.lang.Thread.State Conversion Masks */ - -enum { - JVMTI_JAVA_LANG_THREAD_STATE_MASK = JVMTI_THREAD_STATE_TERMINATED | JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_RUNNABLE | JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY | JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT, - JVMTI_JAVA_LANG_THREAD_STATE_NEW = 0, - JVMTI_JAVA_LANG_THREAD_STATE_TERMINATED = JVMTI_THREAD_STATE_TERMINATED, - JVMTI_JAVA_LANG_THREAD_STATE_RUNNABLE = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_RUNNABLE, - JVMTI_JAVA_LANG_THREAD_STATE_BLOCKED = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER, - JVMTI_JAVA_LANG_THREAD_STATE_WAITING = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY, - JVMTI_JAVA_LANG_THREAD_STATE_TIMED_WAITING = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT -}; - - /* Thread Priority Constants */ - -enum { - JVMTI_THREAD_MIN_PRIORITY = 1, - JVMTI_THREAD_NORM_PRIORITY = 5, - JVMTI_THREAD_MAX_PRIORITY = 10 -}; - - /* Heap Filter Flags */ - -enum { - JVMTI_HEAP_FILTER_TAGGED = 0x4, - JVMTI_HEAP_FILTER_UNTAGGED = 0x8, - JVMTI_HEAP_FILTER_CLASS_TAGGED = 0x10, - JVMTI_HEAP_FILTER_CLASS_UNTAGGED = 0x20 -}; - - /* Heap Visit Control Flags */ - -enum { - JVMTI_VISIT_OBJECTS = 0x100, - JVMTI_VISIT_ABORT = 0x8000 -}; - - /* Heap Reference Enumeration */ - -typedef enum { - JVMTI_HEAP_REFERENCE_CLASS = 1, - JVMTI_HEAP_REFERENCE_FIELD = 2, - JVMTI_HEAP_REFERENCE_ARRAY_ELEMENT = 3, - JVMTI_HEAP_REFERENCE_CLASS_LOADER = 4, - JVMTI_HEAP_REFERENCE_SIGNERS = 5, - JVMTI_HEAP_REFERENCE_PROTECTION_DOMAIN = 6, - JVMTI_HEAP_REFERENCE_INTERFACE = 7, - JVMTI_HEAP_REFERENCE_STATIC_FIELD = 8, - JVMTI_HEAP_REFERENCE_CONSTANT_POOL = 9, - JVMTI_HEAP_REFERENCE_SUPERCLASS = 10, - JVMTI_HEAP_REFERENCE_JNI_GLOBAL = 21, - JVMTI_HEAP_REFERENCE_SYSTEM_CLASS = 22, - JVMTI_HEAP_REFERENCE_MONITOR = 23, - JVMTI_HEAP_REFERENCE_STACK_LOCAL = 24, - JVMTI_HEAP_REFERENCE_JNI_LOCAL = 25, - JVMTI_HEAP_REFERENCE_THREAD = 26, - JVMTI_HEAP_REFERENCE_OTHER = 27 -} jvmtiHeapReferenceKind; - - /* Primitive Type Enumeration */ - -typedef enum { - JVMTI_PRIMITIVE_TYPE_BOOLEAN = 90, - JVMTI_PRIMITIVE_TYPE_BYTE = 66, - JVMTI_PRIMITIVE_TYPE_CHAR = 67, - JVMTI_PRIMITIVE_TYPE_SHORT = 83, - JVMTI_PRIMITIVE_TYPE_INT = 73, - JVMTI_PRIMITIVE_TYPE_LONG = 74, - JVMTI_PRIMITIVE_TYPE_FLOAT = 70, - JVMTI_PRIMITIVE_TYPE_DOUBLE = 68 -} jvmtiPrimitiveType; - - /* Heap Object Filter Enumeration */ - -typedef enum { - JVMTI_HEAP_OBJECT_TAGGED = 1, - JVMTI_HEAP_OBJECT_UNTAGGED = 2, - JVMTI_HEAP_OBJECT_EITHER = 3 -} jvmtiHeapObjectFilter; - - /* Heap Root Kind Enumeration */ - -typedef enum { - JVMTI_HEAP_ROOT_JNI_GLOBAL = 1, - JVMTI_HEAP_ROOT_SYSTEM_CLASS = 2, - JVMTI_HEAP_ROOT_MONITOR = 3, - JVMTI_HEAP_ROOT_STACK_LOCAL = 4, - JVMTI_HEAP_ROOT_JNI_LOCAL = 5, - JVMTI_HEAP_ROOT_THREAD = 6, - JVMTI_HEAP_ROOT_OTHER = 7 -} jvmtiHeapRootKind; - - /* Object Reference Enumeration */ - -typedef enum { - JVMTI_REFERENCE_CLASS = 1, - JVMTI_REFERENCE_FIELD = 2, - JVMTI_REFERENCE_ARRAY_ELEMENT = 3, - JVMTI_REFERENCE_CLASS_LOADER = 4, - JVMTI_REFERENCE_SIGNERS = 5, - JVMTI_REFERENCE_PROTECTION_DOMAIN = 6, - JVMTI_REFERENCE_INTERFACE = 7, - JVMTI_REFERENCE_STATIC_FIELD = 8, - JVMTI_REFERENCE_CONSTANT_POOL = 9 -} jvmtiObjectReferenceKind; - - /* Iteration Control Enumeration */ - -typedef enum { - JVMTI_ITERATION_CONTINUE = 1, - JVMTI_ITERATION_IGNORE = 2, - JVMTI_ITERATION_ABORT = 0 -} jvmtiIterationControl; - - /* Class Status Flags */ - -enum { - JVMTI_CLASS_STATUS_VERIFIED = 1, - JVMTI_CLASS_STATUS_PREPARED = 2, - JVMTI_CLASS_STATUS_INITIALIZED = 4, - JVMTI_CLASS_STATUS_ERROR = 8, - JVMTI_CLASS_STATUS_ARRAY = 16, - JVMTI_CLASS_STATUS_PRIMITIVE = 32 -}; - - /* Event Enable/Disable */ - -typedef enum { - JVMTI_ENABLE = 1, - JVMTI_DISABLE = 0 -} jvmtiEventMode; - - /* Extension Function/Event Parameter Types */ - -typedef enum { - JVMTI_TYPE_JBYTE = 101, - JVMTI_TYPE_JCHAR = 102, - JVMTI_TYPE_JSHORT = 103, - JVMTI_TYPE_JINT = 104, - JVMTI_TYPE_JLONG = 105, - JVMTI_TYPE_JFLOAT = 106, - JVMTI_TYPE_JDOUBLE = 107, - JVMTI_TYPE_JBOOLEAN = 108, - JVMTI_TYPE_JOBJECT = 109, - JVMTI_TYPE_JTHREAD = 110, - JVMTI_TYPE_JCLASS = 111, - JVMTI_TYPE_JVALUE = 112, - JVMTI_TYPE_JFIELDID = 113, - JVMTI_TYPE_JMETHODID = 114, - JVMTI_TYPE_CCHAR = 115, - JVMTI_TYPE_CVOID = 116, - JVMTI_TYPE_JNIENV = 117 -} jvmtiParamTypes; - - /* Extension Function/Event Parameter Kinds */ - -typedef enum { - JVMTI_KIND_IN = 91, - JVMTI_KIND_IN_PTR = 92, - JVMTI_KIND_IN_BUF = 93, - JVMTI_KIND_ALLOC_BUF = 94, - JVMTI_KIND_ALLOC_ALLOC_BUF = 95, - JVMTI_KIND_OUT = 96, - JVMTI_KIND_OUT_BUF = 97 -} jvmtiParamKind; - - /* Timer Kinds */ - -typedef enum { - JVMTI_TIMER_USER_CPU = 30, - JVMTI_TIMER_TOTAL_CPU = 31, - JVMTI_TIMER_ELAPSED = 32 -} jvmtiTimerKind; - - /* Phases of execution */ - -typedef enum { - JVMTI_PHASE_ONLOAD = 1, - JVMTI_PHASE_PRIMORDIAL = 2, - JVMTI_PHASE_START = 6, - JVMTI_PHASE_LIVE = 4, - JVMTI_PHASE_DEAD = 8 -} jvmtiPhase; - - /* Version Interface Types */ - -enum { - JVMTI_VERSION_INTERFACE_JNI = 0x00000000, - JVMTI_VERSION_INTERFACE_JVMTI = 0x30000000 -}; - - /* Version Masks */ - -enum { - JVMTI_VERSION_MASK_INTERFACE_TYPE = 0x70000000, - JVMTI_VERSION_MASK_MAJOR = 0x0FFF0000, - JVMTI_VERSION_MASK_MINOR = 0x0000FF00, - JVMTI_VERSION_MASK_MICRO = 0x000000FF -}; - - /* Version Shifts */ - -enum { - JVMTI_VERSION_SHIFT_MAJOR = 16, - JVMTI_VERSION_SHIFT_MINOR = 8, - JVMTI_VERSION_SHIFT_MICRO = 0 -}; - - /* Verbose Flag Enumeration */ - -typedef enum { - JVMTI_VERBOSE_OTHER = 0, - JVMTI_VERBOSE_GC = 1, - JVMTI_VERBOSE_CLASS = 2, - JVMTI_VERBOSE_JNI = 4 -} jvmtiVerboseFlag; - - /* JLocation Format Enumeration */ - -typedef enum { - JVMTI_JLOCATION_JVMBCI = 1, - JVMTI_JLOCATION_MACHINEPC = 2, - JVMTI_JLOCATION_OTHER = 0 -} jvmtiJlocationFormat; - - /* Resource Exhaustion Flags */ - -enum { - JVMTI_RESOURCE_EXHAUSTED_OOM_ERROR = 0x0001, - JVMTI_RESOURCE_EXHAUSTED_JAVA_HEAP = 0x0002, - JVMTI_RESOURCE_EXHAUSTED_THREADS = 0x0004 -}; - - /* Errors */ - -typedef enum { - JVMTI_ERROR_NONE = 0, - JVMTI_ERROR_INVALID_THREAD = 10, - JVMTI_ERROR_INVALID_THREAD_GROUP = 11, - JVMTI_ERROR_INVALID_PRIORITY = 12, - JVMTI_ERROR_THREAD_NOT_SUSPENDED = 13, - JVMTI_ERROR_THREAD_SUSPENDED = 14, - JVMTI_ERROR_THREAD_NOT_ALIVE = 15, - JVMTI_ERROR_INVALID_OBJECT = 20, - JVMTI_ERROR_INVALID_CLASS = 21, - JVMTI_ERROR_CLASS_NOT_PREPARED = 22, - JVMTI_ERROR_INVALID_METHODID = 23, - JVMTI_ERROR_INVALID_LOCATION = 24, - JVMTI_ERROR_INVALID_FIELDID = 25, - JVMTI_ERROR_INVALID_MODULE = 26, - JVMTI_ERROR_NO_MORE_FRAMES = 31, - JVMTI_ERROR_OPAQUE_FRAME = 32, - JVMTI_ERROR_TYPE_MISMATCH = 34, - JVMTI_ERROR_INVALID_SLOT = 35, - JVMTI_ERROR_DUPLICATE = 40, - JVMTI_ERROR_NOT_FOUND = 41, - JVMTI_ERROR_INVALID_MONITOR = 50, - JVMTI_ERROR_NOT_MONITOR_OWNER = 51, - JVMTI_ERROR_INTERRUPT = 52, - JVMTI_ERROR_INVALID_CLASS_FORMAT = 60, - JVMTI_ERROR_CIRCULAR_CLASS_DEFINITION = 61, - JVMTI_ERROR_FAILS_VERIFICATION = 62, - JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_ADDED = 63, - JVMTI_ERROR_UNSUPPORTED_REDEFINITION_SCHEMA_CHANGED = 64, - JVMTI_ERROR_INVALID_TYPESTATE = 65, - JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED = 66, - JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED = 67, - JVMTI_ERROR_UNSUPPORTED_VERSION = 68, - JVMTI_ERROR_NAMES_DONT_MATCH = 69, - JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED = 70, - JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED = 71, - JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_ATTRIBUTE_CHANGED = 72, - JVMTI_ERROR_UNMODIFIABLE_CLASS = 79, - JVMTI_ERROR_UNMODIFIABLE_MODULE = 80, - JVMTI_ERROR_NOT_AVAILABLE = 98, - JVMTI_ERROR_MUST_POSSESS_CAPABILITY = 99, - JVMTI_ERROR_NULL_POINTER = 100, - JVMTI_ERROR_ABSENT_INFORMATION = 101, - JVMTI_ERROR_INVALID_EVENT_TYPE = 102, - JVMTI_ERROR_ILLEGAL_ARGUMENT = 103, - JVMTI_ERROR_NATIVE_METHOD = 104, - JVMTI_ERROR_CLASS_LOADER_UNSUPPORTED = 106, - JVMTI_ERROR_OUT_OF_MEMORY = 110, - JVMTI_ERROR_ACCESS_DENIED = 111, - JVMTI_ERROR_WRONG_PHASE = 112, - JVMTI_ERROR_INTERNAL = 113, - JVMTI_ERROR_UNATTACHED_THREAD = 115, - JVMTI_ERROR_INVALID_ENVIRONMENT = 116, - JVMTI_ERROR_MAX = 116 -} jvmtiError; - - /* Event IDs */ - -typedef enum { - JVMTI_MIN_EVENT_TYPE_VAL = 50, - JVMTI_EVENT_VM_INIT = 50, - JVMTI_EVENT_VM_DEATH = 51, - JVMTI_EVENT_THREAD_START = 52, - JVMTI_EVENT_THREAD_END = 53, - JVMTI_EVENT_CLASS_FILE_LOAD_HOOK = 54, - JVMTI_EVENT_CLASS_LOAD = 55, - JVMTI_EVENT_CLASS_PREPARE = 56, - JVMTI_EVENT_VM_START = 57, - JVMTI_EVENT_EXCEPTION = 58, - JVMTI_EVENT_EXCEPTION_CATCH = 59, - JVMTI_EVENT_SINGLE_STEP = 60, - JVMTI_EVENT_FRAME_POP = 61, - JVMTI_EVENT_BREAKPOINT = 62, - JVMTI_EVENT_FIELD_ACCESS = 63, - JVMTI_EVENT_FIELD_MODIFICATION = 64, - JVMTI_EVENT_METHOD_ENTRY = 65, - JVMTI_EVENT_METHOD_EXIT = 66, - JVMTI_EVENT_NATIVE_METHOD_BIND = 67, - JVMTI_EVENT_COMPILED_METHOD_LOAD = 68, - JVMTI_EVENT_COMPILED_METHOD_UNLOAD = 69, - JVMTI_EVENT_DYNAMIC_CODE_GENERATED = 70, - JVMTI_EVENT_DATA_DUMP_REQUEST = 71, - JVMTI_EVENT_MONITOR_WAIT = 73, - JVMTI_EVENT_MONITOR_WAITED = 74, - JVMTI_EVENT_MONITOR_CONTENDED_ENTER = 75, - JVMTI_EVENT_MONITOR_CONTENDED_ENTERED = 76, - JVMTI_EVENT_RESOURCE_EXHAUSTED = 80, - JVMTI_EVENT_GARBAGE_COLLECTION_START = 81, - JVMTI_EVENT_GARBAGE_COLLECTION_FINISH = 82, - JVMTI_EVENT_OBJECT_FREE = 83, - JVMTI_EVENT_VM_OBJECT_ALLOC = 84, - JVMTI_EVENT_SAMPLED_OBJECT_ALLOC = 86, - JVMTI_MAX_EVENT_TYPE_VAL = 86 -} jvmtiEvent; - - - /* Pre-Declarations */ -struct _jvmtiThreadInfo; -typedef struct _jvmtiThreadInfo jvmtiThreadInfo; -struct _jvmtiMonitorStackDepthInfo; -typedef struct _jvmtiMonitorStackDepthInfo jvmtiMonitorStackDepthInfo; -struct _jvmtiThreadGroupInfo; -typedef struct _jvmtiThreadGroupInfo jvmtiThreadGroupInfo; -struct _jvmtiFrameInfo; -typedef struct _jvmtiFrameInfo jvmtiFrameInfo; -struct _jvmtiStackInfo; -typedef struct _jvmtiStackInfo jvmtiStackInfo; -struct _jvmtiHeapReferenceInfoField; -typedef struct _jvmtiHeapReferenceInfoField jvmtiHeapReferenceInfoField; -struct _jvmtiHeapReferenceInfoArray; -typedef struct _jvmtiHeapReferenceInfoArray jvmtiHeapReferenceInfoArray; -struct _jvmtiHeapReferenceInfoConstantPool; -typedef struct _jvmtiHeapReferenceInfoConstantPool jvmtiHeapReferenceInfoConstantPool; -struct _jvmtiHeapReferenceInfoStackLocal; -typedef struct _jvmtiHeapReferenceInfoStackLocal jvmtiHeapReferenceInfoStackLocal; -struct _jvmtiHeapReferenceInfoJniLocal; -typedef struct _jvmtiHeapReferenceInfoJniLocal jvmtiHeapReferenceInfoJniLocal; -struct _jvmtiHeapReferenceInfoReserved; -typedef struct _jvmtiHeapReferenceInfoReserved jvmtiHeapReferenceInfoReserved; -union _jvmtiHeapReferenceInfo; -typedef union _jvmtiHeapReferenceInfo jvmtiHeapReferenceInfo; -struct _jvmtiHeapCallbacks; -typedef struct _jvmtiHeapCallbacks jvmtiHeapCallbacks; -struct _jvmtiClassDefinition; -typedef struct _jvmtiClassDefinition jvmtiClassDefinition; -struct _jvmtiMonitorUsage; -typedef struct _jvmtiMonitorUsage jvmtiMonitorUsage; -struct _jvmtiLineNumberEntry; -typedef struct _jvmtiLineNumberEntry jvmtiLineNumberEntry; -struct _jvmtiLocalVariableEntry; -typedef struct _jvmtiLocalVariableEntry jvmtiLocalVariableEntry; -struct _jvmtiParamInfo; -typedef struct _jvmtiParamInfo jvmtiParamInfo; -struct _jvmtiExtensionFunctionInfo; -typedef struct _jvmtiExtensionFunctionInfo jvmtiExtensionFunctionInfo; -struct _jvmtiExtensionEventInfo; -typedef struct _jvmtiExtensionEventInfo jvmtiExtensionEventInfo; -struct _jvmtiTimerInfo; -typedef struct _jvmtiTimerInfo jvmtiTimerInfo; -struct _jvmtiAddrLocationMap; -typedef struct _jvmtiAddrLocationMap jvmtiAddrLocationMap; - - /* Function Types */ - -typedef void (JNICALL *jvmtiStartFunction) - (jvmtiEnv* jvmti_env, JNIEnv* jni_env, void* arg); - -typedef jint (JNICALL *jvmtiHeapIterationCallback) - (jlong class_tag, jlong size, jlong* tag_ptr, jint length, void* user_data); - -typedef jint (JNICALL *jvmtiHeapReferenceCallback) - (jvmtiHeapReferenceKind reference_kind, const jvmtiHeapReferenceInfo* reference_info, jlong class_tag, jlong referrer_class_tag, jlong size, jlong* tag_ptr, jlong* referrer_tag_ptr, jint length, void* user_data); - -typedef jint (JNICALL *jvmtiPrimitiveFieldCallback) - (jvmtiHeapReferenceKind kind, const jvmtiHeapReferenceInfo* info, jlong object_class_tag, jlong* object_tag_ptr, jvalue value, jvmtiPrimitiveType value_type, void* user_data); - -typedef jint (JNICALL *jvmtiArrayPrimitiveValueCallback) - (jlong class_tag, jlong size, jlong* tag_ptr, jint element_count, jvmtiPrimitiveType element_type, const void* elements, void* user_data); - -typedef jint (JNICALL *jvmtiStringPrimitiveValueCallback) - (jlong class_tag, jlong size, jlong* tag_ptr, const jchar* value, jint value_length, void* user_data); - -typedef jint (JNICALL *jvmtiReservedCallback) - (); - -typedef jvmtiIterationControl (JNICALL *jvmtiHeapObjectCallback) - (jlong class_tag, jlong size, jlong* tag_ptr, void* user_data); - -typedef jvmtiIterationControl (JNICALL *jvmtiHeapRootCallback) - (jvmtiHeapRootKind root_kind, jlong class_tag, jlong size, jlong* tag_ptr, void* user_data); - -typedef jvmtiIterationControl (JNICALL *jvmtiStackReferenceCallback) - (jvmtiHeapRootKind root_kind, jlong class_tag, jlong size, jlong* tag_ptr, jlong thread_tag, jint depth, jmethodID method, jint slot, void* user_data); - -typedef jvmtiIterationControl (JNICALL *jvmtiObjectReferenceCallback) - (jvmtiObjectReferenceKind reference_kind, jlong class_tag, jlong size, jlong* tag_ptr, jlong referrer_tag, jint referrer_index, void* user_data); - -typedef jvmtiError (JNICALL *jvmtiExtensionFunction) - (jvmtiEnv* jvmti_env, ...); - -typedef void (JNICALL *jvmtiExtensionEvent) - (jvmtiEnv* jvmti_env, ...); - - - /* Structure Types */ -struct _jvmtiThreadInfo { - char* name; - jint priority; - jboolean is_daemon; - jthreadGroup thread_group; - jobject context_class_loader; -}; -struct _jvmtiMonitorStackDepthInfo { - jobject monitor; - jint stack_depth; -}; -struct _jvmtiThreadGroupInfo { - jthreadGroup parent; - char* name; - jint max_priority; - jboolean is_daemon; -}; -struct _jvmtiFrameInfo { - jmethodID method; - jlocation location; -}; -struct _jvmtiStackInfo { - jthread thread; - jint state; - jvmtiFrameInfo* frame_buffer; - jint frame_count; -}; -struct _jvmtiHeapReferenceInfoField { - jint index; -}; -struct _jvmtiHeapReferenceInfoArray { - jint index; -}; -struct _jvmtiHeapReferenceInfoConstantPool { - jint index; -}; -struct _jvmtiHeapReferenceInfoStackLocal { - jlong thread_tag; - jlong thread_id; - jint depth; - jmethodID method; - jlocation location; - jint slot; -}; -struct _jvmtiHeapReferenceInfoJniLocal { - jlong thread_tag; - jlong thread_id; - jint depth; - jmethodID method; -}; -struct _jvmtiHeapReferenceInfoReserved { - jlong reserved1; - jlong reserved2; - jlong reserved3; - jlong reserved4; - jlong reserved5; - jlong reserved6; - jlong reserved7; - jlong reserved8; -}; -union _jvmtiHeapReferenceInfo { - jvmtiHeapReferenceInfoField field; - jvmtiHeapReferenceInfoArray array; - jvmtiHeapReferenceInfoConstantPool constant_pool; - jvmtiHeapReferenceInfoStackLocal stack_local; - jvmtiHeapReferenceInfoJniLocal jni_local; - jvmtiHeapReferenceInfoReserved other; -}; -struct _jvmtiHeapCallbacks { - jvmtiHeapIterationCallback heap_iteration_callback; - jvmtiHeapReferenceCallback heap_reference_callback; - jvmtiPrimitiveFieldCallback primitive_field_callback; - jvmtiArrayPrimitiveValueCallback array_primitive_value_callback; - jvmtiStringPrimitiveValueCallback string_primitive_value_callback; - jvmtiReservedCallback reserved5; - jvmtiReservedCallback reserved6; - jvmtiReservedCallback reserved7; - jvmtiReservedCallback reserved8; - jvmtiReservedCallback reserved9; - jvmtiReservedCallback reserved10; - jvmtiReservedCallback reserved11; - jvmtiReservedCallback reserved12; - jvmtiReservedCallback reserved13; - jvmtiReservedCallback reserved14; - jvmtiReservedCallback reserved15; -}; -struct _jvmtiClassDefinition { - jclass klass; - jint class_byte_count; - const unsigned char* class_bytes; -}; -struct _jvmtiMonitorUsage { - jthread owner; - jint entry_count; - jint waiter_count; - jthread* waiters; - jint notify_waiter_count; - jthread* notify_waiters; -}; -struct _jvmtiLineNumberEntry { - jlocation start_location; - jint line_number; -}; -struct _jvmtiLocalVariableEntry { - jlocation start_location; - jint length; - char* name; - char* signature; - char* generic_signature; - jint slot; -}; -struct _jvmtiParamInfo { - char* name; - jvmtiParamKind kind; - jvmtiParamTypes base_type; - jboolean null_ok; -}; -struct _jvmtiExtensionFunctionInfo { - jvmtiExtensionFunction func; - char* id; - char* short_description; - jint param_count; - jvmtiParamInfo* params; - jint error_count; - jvmtiError* errors; -}; -struct _jvmtiExtensionEventInfo { - jint extension_event_index; - char* id; - char* short_description; - jint param_count; - jvmtiParamInfo* params; -}; -struct _jvmtiTimerInfo { - jlong max_value; - jboolean may_skip_forward; - jboolean may_skip_backward; - jvmtiTimerKind kind; - jlong reserved1; - jlong reserved2; -}; -struct _jvmtiAddrLocationMap { - const void* start_address; - jlocation location; -}; - -typedef struct { - unsigned int can_tag_objects : 1; - unsigned int can_generate_field_modification_events : 1; - unsigned int can_generate_field_access_events : 1; - unsigned int can_get_bytecodes : 1; - unsigned int can_get_synthetic_attribute : 1; - unsigned int can_get_owned_monitor_info : 1; - unsigned int can_get_current_contended_monitor : 1; - unsigned int can_get_monitor_info : 1; - unsigned int can_pop_frame : 1; - unsigned int can_redefine_classes : 1; - unsigned int can_signal_thread : 1; - unsigned int can_get_source_file_name : 1; - unsigned int can_get_line_numbers : 1; - unsigned int can_get_source_debug_extension : 1; - unsigned int can_access_local_variables : 1; - unsigned int can_maintain_original_method_order : 1; - unsigned int can_generate_single_step_events : 1; - unsigned int can_generate_exception_events : 1; - unsigned int can_generate_frame_pop_events : 1; - unsigned int can_generate_breakpoint_events : 1; - unsigned int can_suspend : 1; - unsigned int can_redefine_any_class : 1; - unsigned int can_get_current_thread_cpu_time : 1; - unsigned int can_get_thread_cpu_time : 1; - unsigned int can_generate_method_entry_events : 1; - unsigned int can_generate_method_exit_events : 1; - unsigned int can_generate_all_class_hook_events : 1; - unsigned int can_generate_compiled_method_load_events : 1; - unsigned int can_generate_monitor_events : 1; - unsigned int can_generate_vm_object_alloc_events : 1; - unsigned int can_generate_native_method_bind_events : 1; - unsigned int can_generate_garbage_collection_events : 1; - unsigned int can_generate_object_free_events : 1; - unsigned int can_force_early_return : 1; - unsigned int can_get_owned_monitor_stack_depth_info : 1; - unsigned int can_get_constant_pool : 1; - unsigned int can_set_native_method_prefix : 1; - unsigned int can_retransform_classes : 1; - unsigned int can_retransform_any_class : 1; - unsigned int can_generate_resource_exhaustion_heap_events : 1; - unsigned int can_generate_resource_exhaustion_threads_events : 1; - unsigned int can_generate_early_vmstart : 1; - unsigned int can_generate_early_class_hook_events : 1; - unsigned int can_generate_sampled_object_alloc_events : 1; - unsigned int : 4; - unsigned int : 16; - unsigned int : 16; - unsigned int : 16; - unsigned int : 16; - unsigned int : 16; -} jvmtiCapabilities; - - - /* Event Definitions */ - -typedef void (JNICALL *jvmtiEventReserved)(void); - - -typedef void (JNICALL *jvmtiEventBreakpoint) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jmethodID method, - jlocation location); - -typedef void (JNICALL *jvmtiEventClassFileLoadHook) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jclass class_being_redefined, - jobject loader, - const char* name, - jobject protection_domain, - jint class_data_len, - const unsigned char* class_data, - jint* new_class_data_len, - unsigned char** new_class_data); - -typedef void (JNICALL *jvmtiEventClassLoad) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jclass klass); - -typedef void (JNICALL *jvmtiEventClassPrepare) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jclass klass); - -typedef void (JNICALL *jvmtiEventCompiledMethodLoad) - (jvmtiEnv *jvmti_env, - jmethodID method, - jint code_size, - const void* code_addr, - jint map_length, - const jvmtiAddrLocationMap* map, - const void* compile_info); - -typedef void (JNICALL *jvmtiEventCompiledMethodUnload) - (jvmtiEnv *jvmti_env, - jmethodID method, - const void* code_addr); - -typedef void (JNICALL *jvmtiEventDataDumpRequest) - (jvmtiEnv *jvmti_env); - -typedef void (JNICALL *jvmtiEventDynamicCodeGenerated) - (jvmtiEnv *jvmti_env, - const char* name, - const void* address, - jint length); - -typedef void (JNICALL *jvmtiEventException) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jmethodID method, - jlocation location, - jobject exception, - jmethodID catch_method, - jlocation catch_location); - -typedef void (JNICALL *jvmtiEventExceptionCatch) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jmethodID method, - jlocation location, - jobject exception); - -typedef void (JNICALL *jvmtiEventFieldAccess) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jmethodID method, - jlocation location, - jclass field_klass, - jobject object, - jfieldID field); - -typedef void (JNICALL *jvmtiEventFieldModification) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jmethodID method, - jlocation location, - jclass field_klass, - jobject object, - jfieldID field, - char signature_type, - jvalue new_value); - -typedef void (JNICALL *jvmtiEventFramePop) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jmethodID method, - jboolean was_popped_by_exception); - -typedef void (JNICALL *jvmtiEventGarbageCollectionFinish) - (jvmtiEnv *jvmti_env); - -typedef void (JNICALL *jvmtiEventGarbageCollectionStart) - (jvmtiEnv *jvmti_env); - -typedef void (JNICALL *jvmtiEventMethodEntry) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jmethodID method); - -typedef void (JNICALL *jvmtiEventMethodExit) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jmethodID method, - jboolean was_popped_by_exception, - jvalue return_value); - -typedef void (JNICALL *jvmtiEventMonitorContendedEnter) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jobject object); - -typedef void (JNICALL *jvmtiEventMonitorContendedEntered) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jobject object); - -typedef void (JNICALL *jvmtiEventMonitorWait) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jobject object, - jlong timeout); - -typedef void (JNICALL *jvmtiEventMonitorWaited) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jobject object, - jboolean timed_out); - -typedef void (JNICALL *jvmtiEventNativeMethodBind) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jmethodID method, - void* address, - void** new_address_ptr); - -typedef void (JNICALL *jvmtiEventObjectFree) - (jvmtiEnv *jvmti_env, - jlong tag); - -typedef void (JNICALL *jvmtiEventResourceExhausted) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jint flags, - const void* reserved, - const char* description); - -typedef void (JNICALL *jvmtiEventSampledObjectAlloc) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jobject object, - jclass object_klass, - jlong size); - -typedef void (JNICALL *jvmtiEventSingleStep) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jmethodID method, - jlocation location); - -typedef void (JNICALL *jvmtiEventThreadEnd) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread); - -typedef void (JNICALL *jvmtiEventThreadStart) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread); - -typedef void (JNICALL *jvmtiEventVMDeath) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env); - -typedef void (JNICALL *jvmtiEventVMInit) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread); - -typedef void (JNICALL *jvmtiEventVMObjectAlloc) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env, - jthread thread, - jobject object, - jclass object_klass, - jlong size); - -typedef void (JNICALL *jvmtiEventVMStart) - (jvmtiEnv *jvmti_env, - JNIEnv* jni_env); - - /* Event Callback Structure */ - -typedef struct { - /* 50 : VM Initialization Event */ - jvmtiEventVMInit VMInit; - /* 51 : VM Death Event */ - jvmtiEventVMDeath VMDeath; - /* 52 : Thread Start */ - jvmtiEventThreadStart ThreadStart; - /* 53 : Thread End */ - jvmtiEventThreadEnd ThreadEnd; - /* 54 : Class File Load Hook */ - jvmtiEventClassFileLoadHook ClassFileLoadHook; - /* 55 : Class Load */ - jvmtiEventClassLoad ClassLoad; - /* 56 : Class Prepare */ - jvmtiEventClassPrepare ClassPrepare; - /* 57 : VM Start Event */ - jvmtiEventVMStart VMStart; - /* 58 : Exception */ - jvmtiEventException Exception; - /* 59 : Exception Catch */ - jvmtiEventExceptionCatch ExceptionCatch; - /* 60 : Single Step */ - jvmtiEventSingleStep SingleStep; - /* 61 : Frame Pop */ - jvmtiEventFramePop FramePop; - /* 62 : Breakpoint */ - jvmtiEventBreakpoint Breakpoint; - /* 63 : Field Access */ - jvmtiEventFieldAccess FieldAccess; - /* 64 : Field Modification */ - jvmtiEventFieldModification FieldModification; - /* 65 : Method Entry */ - jvmtiEventMethodEntry MethodEntry; - /* 66 : Method Exit */ - jvmtiEventMethodExit MethodExit; - /* 67 : Native Method Bind */ - jvmtiEventNativeMethodBind NativeMethodBind; - /* 68 : Compiled Method Load */ - jvmtiEventCompiledMethodLoad CompiledMethodLoad; - /* 69 : Compiled Method Unload */ - jvmtiEventCompiledMethodUnload CompiledMethodUnload; - /* 70 : Dynamic Code Generated */ - jvmtiEventDynamicCodeGenerated DynamicCodeGenerated; - /* 71 : Data Dump Request */ - jvmtiEventDataDumpRequest DataDumpRequest; - /* 72 */ - jvmtiEventReserved reserved72; - /* 73 : Monitor Wait */ - jvmtiEventMonitorWait MonitorWait; - /* 74 : Monitor Waited */ - jvmtiEventMonitorWaited MonitorWaited; - /* 75 : Monitor Contended Enter */ - jvmtiEventMonitorContendedEnter MonitorContendedEnter; - /* 76 : Monitor Contended Entered */ - jvmtiEventMonitorContendedEntered MonitorContendedEntered; - /* 77 */ - jvmtiEventReserved reserved77; - /* 78 */ - jvmtiEventReserved reserved78; - /* 79 */ - jvmtiEventReserved reserved79; - /* 80 : Resource Exhausted */ - jvmtiEventResourceExhausted ResourceExhausted; - /* 81 : Garbage Collection Start */ - jvmtiEventGarbageCollectionStart GarbageCollectionStart; - /* 82 : Garbage Collection Finish */ - jvmtiEventGarbageCollectionFinish GarbageCollectionFinish; - /* 83 : Object Free */ - jvmtiEventObjectFree ObjectFree; - /* 84 : VM Object Allocation */ - jvmtiEventVMObjectAlloc VMObjectAlloc; - /* 85 */ - jvmtiEventReserved reserved85; - /* 86 : Sampled Object Allocation */ - jvmtiEventSampledObjectAlloc SampledObjectAlloc; -} jvmtiEventCallbacks; - - - /* Function Interface */ - -typedef struct jvmtiInterface_1_ { - - /* 1 : RESERVED */ - void *reserved1; - - /* 2 : Set Event Notification Mode */ - jvmtiError (JNICALL *SetEventNotificationMode) (jvmtiEnv* env, - jvmtiEventMode mode, - jvmtiEvent event_type, - jthread event_thread, - ...); - - /* 3 : Get All Modules */ - jvmtiError (JNICALL *GetAllModules) (jvmtiEnv* env, - jint* module_count_ptr, - jobject** modules_ptr); - - /* 4 : Get All Threads */ - jvmtiError (JNICALL *GetAllThreads) (jvmtiEnv* env, - jint* threads_count_ptr, - jthread** threads_ptr); - - /* 5 : Suspend Thread */ - jvmtiError (JNICALL *SuspendThread) (jvmtiEnv* env, - jthread thread); - - /* 6 : Resume Thread */ - jvmtiError (JNICALL *ResumeThread) (jvmtiEnv* env, - jthread thread); - - /* 7 : Stop Thread */ - jvmtiError (JNICALL *StopThread) (jvmtiEnv* env, - jthread thread, - jobject exception); - - /* 8 : Interrupt Thread */ - jvmtiError (JNICALL *InterruptThread) (jvmtiEnv* env, - jthread thread); - - /* 9 : Get Thread Info */ - jvmtiError (JNICALL *GetThreadInfo) (jvmtiEnv* env, - jthread thread, - jvmtiThreadInfo* info_ptr); - - /* 10 : Get Owned Monitor Info */ - jvmtiError (JNICALL *GetOwnedMonitorInfo) (jvmtiEnv* env, - jthread thread, - jint* owned_monitor_count_ptr, - jobject** owned_monitors_ptr); - - /* 11 : Get Current Contended Monitor */ - jvmtiError (JNICALL *GetCurrentContendedMonitor) (jvmtiEnv* env, - jthread thread, - jobject* monitor_ptr); - - /* 12 : Run Agent Thread */ - jvmtiError (JNICALL *RunAgentThread) (jvmtiEnv* env, - jthread thread, - jvmtiStartFunction proc, - const void* arg, - jint priority); - - /* 13 : Get Top Thread Groups */ - jvmtiError (JNICALL *GetTopThreadGroups) (jvmtiEnv* env, - jint* group_count_ptr, - jthreadGroup** groups_ptr); - - /* 14 : Get Thread Group Info */ - jvmtiError (JNICALL *GetThreadGroupInfo) (jvmtiEnv* env, - jthreadGroup group, - jvmtiThreadGroupInfo* info_ptr); - - /* 15 : Get Thread Group Children */ - jvmtiError (JNICALL *GetThreadGroupChildren) (jvmtiEnv* env, - jthreadGroup group, - jint* thread_count_ptr, - jthread** threads_ptr, - jint* group_count_ptr, - jthreadGroup** groups_ptr); - - /* 16 : Get Frame Count */ - jvmtiError (JNICALL *GetFrameCount) (jvmtiEnv* env, - jthread thread, - jint* count_ptr); - - /* 17 : Get Thread State */ - jvmtiError (JNICALL *GetThreadState) (jvmtiEnv* env, - jthread thread, - jint* thread_state_ptr); - - /* 18 : Get Current Thread */ - jvmtiError (JNICALL *GetCurrentThread) (jvmtiEnv* env, - jthread* thread_ptr); - - /* 19 : Get Frame Location */ - jvmtiError (JNICALL *GetFrameLocation) (jvmtiEnv* env, - jthread thread, - jint depth, - jmethodID* method_ptr, - jlocation* location_ptr); - - /* 20 : Notify Frame Pop */ - jvmtiError (JNICALL *NotifyFramePop) (jvmtiEnv* env, - jthread thread, - jint depth); - - /* 21 : Get Local Variable - Object */ - jvmtiError (JNICALL *GetLocalObject) (jvmtiEnv* env, - jthread thread, - jint depth, - jint slot, - jobject* value_ptr); - - /* 22 : Get Local Variable - Int */ - jvmtiError (JNICALL *GetLocalInt) (jvmtiEnv* env, - jthread thread, - jint depth, - jint slot, - jint* value_ptr); - - /* 23 : Get Local Variable - Long */ - jvmtiError (JNICALL *GetLocalLong) (jvmtiEnv* env, - jthread thread, - jint depth, - jint slot, - jlong* value_ptr); - - /* 24 : Get Local Variable - Float */ - jvmtiError (JNICALL *GetLocalFloat) (jvmtiEnv* env, - jthread thread, - jint depth, - jint slot, - jfloat* value_ptr); - - /* 25 : Get Local Variable - Double */ - jvmtiError (JNICALL *GetLocalDouble) (jvmtiEnv* env, - jthread thread, - jint depth, - jint slot, - jdouble* value_ptr); - - /* 26 : Set Local Variable - Object */ - jvmtiError (JNICALL *SetLocalObject) (jvmtiEnv* env, - jthread thread, - jint depth, - jint slot, - jobject value); - - /* 27 : Set Local Variable - Int */ - jvmtiError (JNICALL *SetLocalInt) (jvmtiEnv* env, - jthread thread, - jint depth, - jint slot, - jint value); - - /* 28 : Set Local Variable - Long */ - jvmtiError (JNICALL *SetLocalLong) (jvmtiEnv* env, - jthread thread, - jint depth, - jint slot, - jlong value); - - /* 29 : Set Local Variable - Float */ - jvmtiError (JNICALL *SetLocalFloat) (jvmtiEnv* env, - jthread thread, - jint depth, - jint slot, - jfloat value); - - /* 30 : Set Local Variable - Double */ - jvmtiError (JNICALL *SetLocalDouble) (jvmtiEnv* env, - jthread thread, - jint depth, - jint slot, - jdouble value); - - /* 31 : Create Raw Monitor */ - jvmtiError (JNICALL *CreateRawMonitor) (jvmtiEnv* env, - const char* name, - jrawMonitorID* monitor_ptr); - - /* 32 : Destroy Raw Monitor */ - jvmtiError (JNICALL *DestroyRawMonitor) (jvmtiEnv* env, - jrawMonitorID monitor); - - /* 33 : Raw Monitor Enter */ - jvmtiError (JNICALL *RawMonitorEnter) (jvmtiEnv* env, - jrawMonitorID monitor); - - /* 34 : Raw Monitor Exit */ - jvmtiError (JNICALL *RawMonitorExit) (jvmtiEnv* env, - jrawMonitorID monitor); - - /* 35 : Raw Monitor Wait */ - jvmtiError (JNICALL *RawMonitorWait) (jvmtiEnv* env, - jrawMonitorID monitor, - jlong millis); - - /* 36 : Raw Monitor Notify */ - jvmtiError (JNICALL *RawMonitorNotify) (jvmtiEnv* env, - jrawMonitorID monitor); - - /* 37 : Raw Monitor Notify All */ - jvmtiError (JNICALL *RawMonitorNotifyAll) (jvmtiEnv* env, - jrawMonitorID monitor); - - /* 38 : Set Breakpoint */ - jvmtiError (JNICALL *SetBreakpoint) (jvmtiEnv* env, - jmethodID method, - jlocation location); - - /* 39 : Clear Breakpoint */ - jvmtiError (JNICALL *ClearBreakpoint) (jvmtiEnv* env, - jmethodID method, - jlocation location); - - /* 40 : Get Named Module */ - jvmtiError (JNICALL *GetNamedModule) (jvmtiEnv* env, - jobject class_loader, - const char* package_name, - jobject* module_ptr); - - /* 41 : Set Field Access Watch */ - jvmtiError (JNICALL *SetFieldAccessWatch) (jvmtiEnv* env, - jclass klass, - jfieldID field); - - /* 42 : Clear Field Access Watch */ - jvmtiError (JNICALL *ClearFieldAccessWatch) (jvmtiEnv* env, - jclass klass, - jfieldID field); - - /* 43 : Set Field Modification Watch */ - jvmtiError (JNICALL *SetFieldModificationWatch) (jvmtiEnv* env, - jclass klass, - jfieldID field); - - /* 44 : Clear Field Modification Watch */ - jvmtiError (JNICALL *ClearFieldModificationWatch) (jvmtiEnv* env, - jclass klass, - jfieldID field); - - /* 45 : Is Modifiable Class */ - jvmtiError (JNICALL *IsModifiableClass) (jvmtiEnv* env, - jclass klass, - jboolean* is_modifiable_class_ptr); - - /* 46 : Allocate */ - jvmtiError (JNICALL *Allocate) (jvmtiEnv* env, - jlong size, - unsigned char** mem_ptr); - - /* 47 : Deallocate */ - jvmtiError (JNICALL *Deallocate) (jvmtiEnv* env, - unsigned char* mem); - - /* 48 : Get Class Signature */ - jvmtiError (JNICALL *GetClassSignature) (jvmtiEnv* env, - jclass klass, - char** signature_ptr, - char** generic_ptr); - - /* 49 : Get Class Status */ - jvmtiError (JNICALL *GetClassStatus) (jvmtiEnv* env, - jclass klass, - jint* status_ptr); - - /* 50 : Get Source File Name */ - jvmtiError (JNICALL *GetSourceFileName) (jvmtiEnv* env, - jclass klass, - char** source_name_ptr); - - /* 51 : Get Class Modifiers */ - jvmtiError (JNICALL *GetClassModifiers) (jvmtiEnv* env, - jclass klass, - jint* modifiers_ptr); - - /* 52 : Get Class Methods */ - jvmtiError (JNICALL *GetClassMethods) (jvmtiEnv* env, - jclass klass, - jint* method_count_ptr, - jmethodID** methods_ptr); - - /* 53 : Get Class Fields */ - jvmtiError (JNICALL *GetClassFields) (jvmtiEnv* env, - jclass klass, - jint* field_count_ptr, - jfieldID** fields_ptr); - - /* 54 : Get Implemented Interfaces */ - jvmtiError (JNICALL *GetImplementedInterfaces) (jvmtiEnv* env, - jclass klass, - jint* interface_count_ptr, - jclass** interfaces_ptr); - - /* 55 : Is Interface */ - jvmtiError (JNICALL *IsInterface) (jvmtiEnv* env, - jclass klass, - jboolean* is_interface_ptr); - - /* 56 : Is Array Class */ - jvmtiError (JNICALL *IsArrayClass) (jvmtiEnv* env, - jclass klass, - jboolean* is_array_class_ptr); - - /* 57 : Get Class Loader */ - jvmtiError (JNICALL *GetClassLoader) (jvmtiEnv* env, - jclass klass, - jobject* classloader_ptr); - - /* 58 : Get Object Hash Code */ - jvmtiError (JNICALL *GetObjectHashCode) (jvmtiEnv* env, - jobject object, - jint* hash_code_ptr); - - /* 59 : Get Object Monitor Usage */ - jvmtiError (JNICALL *GetObjectMonitorUsage) (jvmtiEnv* env, - jobject object, - jvmtiMonitorUsage* info_ptr); - - /* 60 : Get Field Name (and Signature) */ - jvmtiError (JNICALL *GetFieldName) (jvmtiEnv* env, - jclass klass, - jfieldID field, - char** name_ptr, - char** signature_ptr, - char** generic_ptr); - - /* 61 : Get Field Declaring Class */ - jvmtiError (JNICALL *GetFieldDeclaringClass) (jvmtiEnv* env, - jclass klass, - jfieldID field, - jclass* declaring_class_ptr); - - /* 62 : Get Field Modifiers */ - jvmtiError (JNICALL *GetFieldModifiers) (jvmtiEnv* env, - jclass klass, - jfieldID field, - jint* modifiers_ptr); - - /* 63 : Is Field Synthetic */ - jvmtiError (JNICALL *IsFieldSynthetic) (jvmtiEnv* env, - jclass klass, - jfieldID field, - jboolean* is_synthetic_ptr); - - /* 64 : Get Method Name (and Signature) */ - jvmtiError (JNICALL *GetMethodName) (jvmtiEnv* env, - jmethodID method, - char** name_ptr, - char** signature_ptr, - char** generic_ptr); - - /* 65 : Get Method Declaring Class */ - jvmtiError (JNICALL *GetMethodDeclaringClass) (jvmtiEnv* env, - jmethodID method, - jclass* declaring_class_ptr); - - /* 66 : Get Method Modifiers */ - jvmtiError (JNICALL *GetMethodModifiers) (jvmtiEnv* env, - jmethodID method, - jint* modifiers_ptr); - - /* 67 : RESERVED */ - void *reserved67; - - /* 68 : Get Max Locals */ - jvmtiError (JNICALL *GetMaxLocals) (jvmtiEnv* env, - jmethodID method, - jint* max_ptr); - - /* 69 : Get Arguments Size */ - jvmtiError (JNICALL *GetArgumentsSize) (jvmtiEnv* env, - jmethodID method, - jint* size_ptr); - - /* 70 : Get Line Number Table */ - jvmtiError (JNICALL *GetLineNumberTable) (jvmtiEnv* env, - jmethodID method, - jint* entry_count_ptr, - jvmtiLineNumberEntry** table_ptr); - - /* 71 : Get Method Location */ - jvmtiError (JNICALL *GetMethodLocation) (jvmtiEnv* env, - jmethodID method, - jlocation* start_location_ptr, - jlocation* end_location_ptr); - - /* 72 : Get Local Variable Table */ - jvmtiError (JNICALL *GetLocalVariableTable) (jvmtiEnv* env, - jmethodID method, - jint* entry_count_ptr, - jvmtiLocalVariableEntry** table_ptr); - - /* 73 : Set Native Method Prefix */ - jvmtiError (JNICALL *SetNativeMethodPrefix) (jvmtiEnv* env, - const char* prefix); - - /* 74 : Set Native Method Prefixes */ - jvmtiError (JNICALL *SetNativeMethodPrefixes) (jvmtiEnv* env, - jint prefix_count, - char** prefixes); - - /* 75 : Get Bytecodes */ - jvmtiError (JNICALL *GetBytecodes) (jvmtiEnv* env, - jmethodID method, - jint* bytecode_count_ptr, - unsigned char** bytecodes_ptr); - - /* 76 : Is Method Native */ - jvmtiError (JNICALL *IsMethodNative) (jvmtiEnv* env, - jmethodID method, - jboolean* is_native_ptr); - - /* 77 : Is Method Synthetic */ - jvmtiError (JNICALL *IsMethodSynthetic) (jvmtiEnv* env, - jmethodID method, - jboolean* is_synthetic_ptr); - - /* 78 : Get Loaded Classes */ - jvmtiError (JNICALL *GetLoadedClasses) (jvmtiEnv* env, - jint* class_count_ptr, - jclass** classes_ptr); - - /* 79 : Get Classloader Classes */ - jvmtiError (JNICALL *GetClassLoaderClasses) (jvmtiEnv* env, - jobject initiating_loader, - jint* class_count_ptr, - jclass** classes_ptr); - - /* 80 : Pop Frame */ - jvmtiError (JNICALL *PopFrame) (jvmtiEnv* env, - jthread thread); - - /* 81 : Force Early Return - Object */ - jvmtiError (JNICALL *ForceEarlyReturnObject) (jvmtiEnv* env, - jthread thread, - jobject value); - - /* 82 : Force Early Return - Int */ - jvmtiError (JNICALL *ForceEarlyReturnInt) (jvmtiEnv* env, - jthread thread, - jint value); - - /* 83 : Force Early Return - Long */ - jvmtiError (JNICALL *ForceEarlyReturnLong) (jvmtiEnv* env, - jthread thread, - jlong value); - - /* 84 : Force Early Return - Float */ - jvmtiError (JNICALL *ForceEarlyReturnFloat) (jvmtiEnv* env, - jthread thread, - jfloat value); - - /* 85 : Force Early Return - Double */ - jvmtiError (JNICALL *ForceEarlyReturnDouble) (jvmtiEnv* env, - jthread thread, - jdouble value); - - /* 86 : Force Early Return - Void */ - jvmtiError (JNICALL *ForceEarlyReturnVoid) (jvmtiEnv* env, - jthread thread); - - /* 87 : Redefine Classes */ - jvmtiError (JNICALL *RedefineClasses) (jvmtiEnv* env, - jint class_count, - const jvmtiClassDefinition* class_definitions); - - /* 88 : Get Version Number */ - jvmtiError (JNICALL *GetVersionNumber) (jvmtiEnv* env, - jint* version_ptr); - - /* 89 : Get Capabilities */ - jvmtiError (JNICALL *GetCapabilities) (jvmtiEnv* env, - jvmtiCapabilities* capabilities_ptr); - - /* 90 : Get Source Debug Extension */ - jvmtiError (JNICALL *GetSourceDebugExtension) (jvmtiEnv* env, - jclass klass, - char** source_debug_extension_ptr); - - /* 91 : Is Method Obsolete */ - jvmtiError (JNICALL *IsMethodObsolete) (jvmtiEnv* env, - jmethodID method, - jboolean* is_obsolete_ptr); - - /* 92 : Suspend Thread List */ - jvmtiError (JNICALL *SuspendThreadList) (jvmtiEnv* env, - jint request_count, - const jthread* request_list, - jvmtiError* results); - - /* 93 : Resume Thread List */ - jvmtiError (JNICALL *ResumeThreadList) (jvmtiEnv* env, - jint request_count, - const jthread* request_list, - jvmtiError* results); - - /* 94 : Add Module Reads */ - jvmtiError (JNICALL *AddModuleReads) (jvmtiEnv* env, - jobject module, - jobject to_module); - - /* 95 : Add Module Exports */ - jvmtiError (JNICALL *AddModuleExports) (jvmtiEnv* env, - jobject module, - const char* pkg_name, - jobject to_module); - - /* 96 : Add Module Opens */ - jvmtiError (JNICALL *AddModuleOpens) (jvmtiEnv* env, - jobject module, - const char* pkg_name, - jobject to_module); - - /* 97 : Add Module Uses */ - jvmtiError (JNICALL *AddModuleUses) (jvmtiEnv* env, - jobject module, - jclass service); - - /* 98 : Add Module Provides */ - jvmtiError (JNICALL *AddModuleProvides) (jvmtiEnv* env, - jobject module, - jclass service, - jclass impl_class); - - /* 99 : Is Modifiable Module */ - jvmtiError (JNICALL *IsModifiableModule) (jvmtiEnv* env, - jobject module, - jboolean* is_modifiable_module_ptr); - - /* 100 : Get All Stack Traces */ - jvmtiError (JNICALL *GetAllStackTraces) (jvmtiEnv* env, - jint max_frame_count, - jvmtiStackInfo** stack_info_ptr, - jint* thread_count_ptr); - - /* 101 : Get Thread List Stack Traces */ - jvmtiError (JNICALL *GetThreadListStackTraces) (jvmtiEnv* env, - jint thread_count, - const jthread* thread_list, - jint max_frame_count, - jvmtiStackInfo** stack_info_ptr); - - /* 102 : Get Thread Local Storage */ - jvmtiError (JNICALL *GetThreadLocalStorage) (jvmtiEnv* env, - jthread thread, - void** data_ptr); - - /* 103 : Set Thread Local Storage */ - jvmtiError (JNICALL *SetThreadLocalStorage) (jvmtiEnv* env, - jthread thread, - const void* data); - - /* 104 : Get Stack Trace */ - jvmtiError (JNICALL *GetStackTrace) (jvmtiEnv* env, - jthread thread, - jint start_depth, - jint max_frame_count, - jvmtiFrameInfo* frame_buffer, - jint* count_ptr); - - /* 105 : RESERVED */ - void *reserved105; - - /* 106 : Get Tag */ - jvmtiError (JNICALL *GetTag) (jvmtiEnv* env, - jobject object, - jlong* tag_ptr); - - /* 107 : Set Tag */ - jvmtiError (JNICALL *SetTag) (jvmtiEnv* env, - jobject object, - jlong tag); - - /* 108 : Force Garbage Collection */ - jvmtiError (JNICALL *ForceGarbageCollection) (jvmtiEnv* env); - - /* 109 : Iterate Over Objects Reachable From Object */ - jvmtiError (JNICALL *IterateOverObjectsReachableFromObject) (jvmtiEnv* env, - jobject object, - jvmtiObjectReferenceCallback object_reference_callback, - const void* user_data); - - /* 110 : Iterate Over Reachable Objects */ - jvmtiError (JNICALL *IterateOverReachableObjects) (jvmtiEnv* env, - jvmtiHeapRootCallback heap_root_callback, - jvmtiStackReferenceCallback stack_ref_callback, - jvmtiObjectReferenceCallback object_ref_callback, - const void* user_data); - - /* 111 : Iterate Over Heap */ - jvmtiError (JNICALL *IterateOverHeap) (jvmtiEnv* env, - jvmtiHeapObjectFilter object_filter, - jvmtiHeapObjectCallback heap_object_callback, - const void* user_data); - - /* 112 : Iterate Over Instances Of Class */ - jvmtiError (JNICALL *IterateOverInstancesOfClass) (jvmtiEnv* env, - jclass klass, - jvmtiHeapObjectFilter object_filter, - jvmtiHeapObjectCallback heap_object_callback, - const void* user_data); - - /* 113 : RESERVED */ - void *reserved113; - - /* 114 : Get Objects With Tags */ - jvmtiError (JNICALL *GetObjectsWithTags) (jvmtiEnv* env, - jint tag_count, - const jlong* tags, - jint* count_ptr, - jobject** object_result_ptr, - jlong** tag_result_ptr); - - /* 115 : Follow References */ - jvmtiError (JNICALL *FollowReferences) (jvmtiEnv* env, - jint heap_filter, - jclass klass, - jobject initial_object, - const jvmtiHeapCallbacks* callbacks, - const void* user_data); - - /* 116 : Iterate Through Heap */ - jvmtiError (JNICALL *IterateThroughHeap) (jvmtiEnv* env, - jint heap_filter, - jclass klass, - const jvmtiHeapCallbacks* callbacks, - const void* user_data); - - /* 117 : RESERVED */ - void *reserved117; - - /* 118 : RESERVED */ - void *reserved118; - - /* 119 : RESERVED */ - void *reserved119; - - /* 120 : Set JNI Function Table */ - jvmtiError (JNICALL *SetJNIFunctionTable) (jvmtiEnv* env, - const jniNativeInterface* function_table); - - /* 121 : Get JNI Function Table */ - jvmtiError (JNICALL *GetJNIFunctionTable) (jvmtiEnv* env, - jniNativeInterface** function_table); - - /* 122 : Set Event Callbacks */ - jvmtiError (JNICALL *SetEventCallbacks) (jvmtiEnv* env, - const jvmtiEventCallbacks* callbacks, - jint size_of_callbacks); - - /* 123 : Generate Events */ - jvmtiError (JNICALL *GenerateEvents) (jvmtiEnv* env, - jvmtiEvent event_type); - - /* 124 : Get Extension Functions */ - jvmtiError (JNICALL *GetExtensionFunctions) (jvmtiEnv* env, - jint* extension_count_ptr, - jvmtiExtensionFunctionInfo** extensions); - - /* 125 : Get Extension Events */ - jvmtiError (JNICALL *GetExtensionEvents) (jvmtiEnv* env, - jint* extension_count_ptr, - jvmtiExtensionEventInfo** extensions); - - /* 126 : Set Extension Event Callback */ - jvmtiError (JNICALL *SetExtensionEventCallback) (jvmtiEnv* env, - jint extension_event_index, - jvmtiExtensionEvent callback); - - /* 127 : Dispose Environment */ - jvmtiError (JNICALL *DisposeEnvironment) (jvmtiEnv* env); - - /* 128 : Get Error Name */ - jvmtiError (JNICALL *GetErrorName) (jvmtiEnv* env, - jvmtiError error, - char** name_ptr); - - /* 129 : Get JLocation Format */ - jvmtiError (JNICALL *GetJLocationFormat) (jvmtiEnv* env, - jvmtiJlocationFormat* format_ptr); - - /* 130 : Get System Properties */ - jvmtiError (JNICALL *GetSystemProperties) (jvmtiEnv* env, - jint* count_ptr, - char*** property_ptr); - - /* 131 : Get System Property */ - jvmtiError (JNICALL *GetSystemProperty) (jvmtiEnv* env, - const char* property, - char** value_ptr); - - /* 132 : Set System Property */ - jvmtiError (JNICALL *SetSystemProperty) (jvmtiEnv* env, - const char* property, - const char* value_ptr); - - /* 133 : Get Phase */ - jvmtiError (JNICALL *GetPhase) (jvmtiEnv* env, - jvmtiPhase* phase_ptr); - - /* 134 : Get Current Thread CPU Timer Information */ - jvmtiError (JNICALL *GetCurrentThreadCpuTimerInfo) (jvmtiEnv* env, - jvmtiTimerInfo* info_ptr); - - /* 135 : Get Current Thread CPU Time */ - jvmtiError (JNICALL *GetCurrentThreadCpuTime) (jvmtiEnv* env, - jlong* nanos_ptr); - - /* 136 : Get Thread CPU Timer Information */ - jvmtiError (JNICALL *GetThreadCpuTimerInfo) (jvmtiEnv* env, - jvmtiTimerInfo* info_ptr); - - /* 137 : Get Thread CPU Time */ - jvmtiError (JNICALL *GetThreadCpuTime) (jvmtiEnv* env, - jthread thread, - jlong* nanos_ptr); - - /* 138 : Get Timer Information */ - jvmtiError (JNICALL *GetTimerInfo) (jvmtiEnv* env, - jvmtiTimerInfo* info_ptr); - - /* 139 : Get Time */ - jvmtiError (JNICALL *GetTime) (jvmtiEnv* env, - jlong* nanos_ptr); - - /* 140 : Get Potential Capabilities */ - jvmtiError (JNICALL *GetPotentialCapabilities) (jvmtiEnv* env, - jvmtiCapabilities* capabilities_ptr); - - /* 141 : RESERVED */ - void *reserved141; - - /* 142 : Add Capabilities */ - jvmtiError (JNICALL *AddCapabilities) (jvmtiEnv* env, - const jvmtiCapabilities* capabilities_ptr); - - /* 143 : Relinquish Capabilities */ - jvmtiError (JNICALL *RelinquishCapabilities) (jvmtiEnv* env, - const jvmtiCapabilities* capabilities_ptr); - - /* 144 : Get Available Processors */ - jvmtiError (JNICALL *GetAvailableProcessors) (jvmtiEnv* env, - jint* processor_count_ptr); - - /* 145 : Get Class Version Numbers */ - jvmtiError (JNICALL *GetClassVersionNumbers) (jvmtiEnv* env, - jclass klass, - jint* minor_version_ptr, - jint* major_version_ptr); - - /* 146 : Get Constant Pool */ - jvmtiError (JNICALL *GetConstantPool) (jvmtiEnv* env, - jclass klass, - jint* constant_pool_count_ptr, - jint* constant_pool_byte_count_ptr, - unsigned char** constant_pool_bytes_ptr); - - /* 147 : Get Environment Local Storage */ - jvmtiError (JNICALL *GetEnvironmentLocalStorage) (jvmtiEnv* env, - void** data_ptr); - - /* 148 : Set Environment Local Storage */ - jvmtiError (JNICALL *SetEnvironmentLocalStorage) (jvmtiEnv* env, - const void* data); - - /* 149 : Add To Bootstrap Class Loader Search */ - jvmtiError (JNICALL *AddToBootstrapClassLoaderSearch) (jvmtiEnv* env, - const char* segment); - - /* 150 : Set Verbose Flag */ - jvmtiError (JNICALL *SetVerboseFlag) (jvmtiEnv* env, - jvmtiVerboseFlag flag, - jboolean value); - - /* 151 : Add To System Class Loader Search */ - jvmtiError (JNICALL *AddToSystemClassLoaderSearch) (jvmtiEnv* env, - const char* segment); - - /* 152 : Retransform Classes */ - jvmtiError (JNICALL *RetransformClasses) (jvmtiEnv* env, - jint class_count, - const jclass* classes); - - /* 153 : Get Owned Monitor Stack Depth Info */ - jvmtiError (JNICALL *GetOwnedMonitorStackDepthInfo) (jvmtiEnv* env, - jthread thread, - jint* monitor_info_count_ptr, - jvmtiMonitorStackDepthInfo** monitor_info_ptr); - - /* 154 : Get Object Size */ - jvmtiError (JNICALL *GetObjectSize) (jvmtiEnv* env, - jobject object, - jlong* size_ptr); - - /* 155 : Get Local Instance */ - jvmtiError (JNICALL *GetLocalInstance) (jvmtiEnv* env, - jthread thread, - jint depth, - jobject* value_ptr); - - /* 156 : Set Heap Sampling Interval */ - jvmtiError (JNICALL *SetHeapSamplingInterval) (jvmtiEnv* env, - jint sampling_interval); - -} jvmtiInterface_1; - -struct _jvmtiEnv { - const struct jvmtiInterface_1_ *functions; -#ifdef __cplusplus - - - jvmtiError Allocate(jlong size, - unsigned char** mem_ptr) { - return functions->Allocate(this, size, mem_ptr); - } - - jvmtiError Deallocate(unsigned char* mem) { - return functions->Deallocate(this, mem); - } - - jvmtiError GetThreadState(jthread thread, - jint* thread_state_ptr) { - return functions->GetThreadState(this, thread, thread_state_ptr); - } - - jvmtiError GetCurrentThread(jthread* thread_ptr) { - return functions->GetCurrentThread(this, thread_ptr); - } - - jvmtiError GetAllThreads(jint* threads_count_ptr, - jthread** threads_ptr) { - return functions->GetAllThreads(this, threads_count_ptr, threads_ptr); - } - - jvmtiError SuspendThread(jthread thread) { - return functions->SuspendThread(this, thread); - } - - jvmtiError SuspendThreadList(jint request_count, - const jthread* request_list, - jvmtiError* results) { - return functions->SuspendThreadList(this, request_count, request_list, results); - } - - jvmtiError ResumeThread(jthread thread) { - return functions->ResumeThread(this, thread); - } - - jvmtiError ResumeThreadList(jint request_count, - const jthread* request_list, - jvmtiError* results) { - return functions->ResumeThreadList(this, request_count, request_list, results); - } - - jvmtiError StopThread(jthread thread, - jobject exception) { - return functions->StopThread(this, thread, exception); - } - - jvmtiError InterruptThread(jthread thread) { - return functions->InterruptThread(this, thread); - } - - jvmtiError GetThreadInfo(jthread thread, - jvmtiThreadInfo* info_ptr) { - return functions->GetThreadInfo(this, thread, info_ptr); - } - - jvmtiError GetOwnedMonitorInfo(jthread thread, - jint* owned_monitor_count_ptr, - jobject** owned_monitors_ptr) { - return functions->GetOwnedMonitorInfo(this, thread, owned_monitor_count_ptr, owned_monitors_ptr); - } - - jvmtiError GetOwnedMonitorStackDepthInfo(jthread thread, - jint* monitor_info_count_ptr, - jvmtiMonitorStackDepthInfo** monitor_info_ptr) { - return functions->GetOwnedMonitorStackDepthInfo(this, thread, monitor_info_count_ptr, monitor_info_ptr); - } - - jvmtiError GetCurrentContendedMonitor(jthread thread, - jobject* monitor_ptr) { - return functions->GetCurrentContendedMonitor(this, thread, monitor_ptr); - } - - jvmtiError RunAgentThread(jthread thread, - jvmtiStartFunction proc, - const void* arg, - jint priority) { - return functions->RunAgentThread(this, thread, proc, arg, priority); - } - - jvmtiError SetThreadLocalStorage(jthread thread, - const void* data) { - return functions->SetThreadLocalStorage(this, thread, data); - } - - jvmtiError GetThreadLocalStorage(jthread thread, - void** data_ptr) { - return functions->GetThreadLocalStorage(this, thread, data_ptr); - } - - jvmtiError GetTopThreadGroups(jint* group_count_ptr, - jthreadGroup** groups_ptr) { - return functions->GetTopThreadGroups(this, group_count_ptr, groups_ptr); - } - - jvmtiError GetThreadGroupInfo(jthreadGroup group, - jvmtiThreadGroupInfo* info_ptr) { - return functions->GetThreadGroupInfo(this, group, info_ptr); - } - - jvmtiError GetThreadGroupChildren(jthreadGroup group, - jint* thread_count_ptr, - jthread** threads_ptr, - jint* group_count_ptr, - jthreadGroup** groups_ptr) { - return functions->GetThreadGroupChildren(this, group, thread_count_ptr, threads_ptr, group_count_ptr, groups_ptr); - } - - jvmtiError GetStackTrace(jthread thread, - jint start_depth, - jint max_frame_count, - jvmtiFrameInfo* frame_buffer, - jint* count_ptr) { - return functions->GetStackTrace(this, thread, start_depth, max_frame_count, frame_buffer, count_ptr); - } - - jvmtiError GetAllStackTraces(jint max_frame_count, - jvmtiStackInfo** stack_info_ptr, - jint* thread_count_ptr) { - return functions->GetAllStackTraces(this, max_frame_count, stack_info_ptr, thread_count_ptr); - } - - jvmtiError GetThreadListStackTraces(jint thread_count, - const jthread* thread_list, - jint max_frame_count, - jvmtiStackInfo** stack_info_ptr) { - return functions->GetThreadListStackTraces(this, thread_count, thread_list, max_frame_count, stack_info_ptr); - } - - jvmtiError GetFrameCount(jthread thread, - jint* count_ptr) { - return functions->GetFrameCount(this, thread, count_ptr); - } - - jvmtiError PopFrame(jthread thread) { - return functions->PopFrame(this, thread); - } - - jvmtiError GetFrameLocation(jthread thread, - jint depth, - jmethodID* method_ptr, - jlocation* location_ptr) { - return functions->GetFrameLocation(this, thread, depth, method_ptr, location_ptr); - } - - jvmtiError NotifyFramePop(jthread thread, - jint depth) { - return functions->NotifyFramePop(this, thread, depth); - } - - jvmtiError ForceEarlyReturnObject(jthread thread, - jobject value) { - return functions->ForceEarlyReturnObject(this, thread, value); - } - - jvmtiError ForceEarlyReturnInt(jthread thread, - jint value) { - return functions->ForceEarlyReturnInt(this, thread, value); - } - - jvmtiError ForceEarlyReturnLong(jthread thread, - jlong value) { - return functions->ForceEarlyReturnLong(this, thread, value); - } - - jvmtiError ForceEarlyReturnFloat(jthread thread, - jfloat value) { - return functions->ForceEarlyReturnFloat(this, thread, value); - } - - jvmtiError ForceEarlyReturnDouble(jthread thread, - jdouble value) { - return functions->ForceEarlyReturnDouble(this, thread, value); - } - - jvmtiError ForceEarlyReturnVoid(jthread thread) { - return functions->ForceEarlyReturnVoid(this, thread); - } - - jvmtiError FollowReferences(jint heap_filter, - jclass klass, - jobject initial_object, - const jvmtiHeapCallbacks* callbacks, - const void* user_data) { - return functions->FollowReferences(this, heap_filter, klass, initial_object, callbacks, user_data); - } - - jvmtiError IterateThroughHeap(jint heap_filter, - jclass klass, - const jvmtiHeapCallbacks* callbacks, - const void* user_data) { - return functions->IterateThroughHeap(this, heap_filter, klass, callbacks, user_data); - } - - jvmtiError GetTag(jobject object, - jlong* tag_ptr) { - return functions->GetTag(this, object, tag_ptr); - } - - jvmtiError SetTag(jobject object, - jlong tag) { - return functions->SetTag(this, object, tag); - } - - jvmtiError GetObjectsWithTags(jint tag_count, - const jlong* tags, - jint* count_ptr, - jobject** object_result_ptr, - jlong** tag_result_ptr) { - return functions->GetObjectsWithTags(this, tag_count, tags, count_ptr, object_result_ptr, tag_result_ptr); - } - - jvmtiError ForceGarbageCollection() { - return functions->ForceGarbageCollection(this); - } - - jvmtiError IterateOverObjectsReachableFromObject(jobject object, - jvmtiObjectReferenceCallback object_reference_callback, - const void* user_data) { - return functions->IterateOverObjectsReachableFromObject(this, object, object_reference_callback, user_data); - } - - jvmtiError IterateOverReachableObjects(jvmtiHeapRootCallback heap_root_callback, - jvmtiStackReferenceCallback stack_ref_callback, - jvmtiObjectReferenceCallback object_ref_callback, - const void* user_data) { - return functions->IterateOverReachableObjects(this, heap_root_callback, stack_ref_callback, object_ref_callback, user_data); - } - - jvmtiError IterateOverHeap(jvmtiHeapObjectFilter object_filter, - jvmtiHeapObjectCallback heap_object_callback, - const void* user_data) { - return functions->IterateOverHeap(this, object_filter, heap_object_callback, user_data); - } - - jvmtiError IterateOverInstancesOfClass(jclass klass, - jvmtiHeapObjectFilter object_filter, - jvmtiHeapObjectCallback heap_object_callback, - const void* user_data) { - return functions->IterateOverInstancesOfClass(this, klass, object_filter, heap_object_callback, user_data); - } - - jvmtiError GetLocalObject(jthread thread, - jint depth, - jint slot, - jobject* value_ptr) { - return functions->GetLocalObject(this, thread, depth, slot, value_ptr); - } - - jvmtiError GetLocalInstance(jthread thread, - jint depth, - jobject* value_ptr) { - return functions->GetLocalInstance(this, thread, depth, value_ptr); - } - - jvmtiError GetLocalInt(jthread thread, - jint depth, - jint slot, - jint* value_ptr) { - return functions->GetLocalInt(this, thread, depth, slot, value_ptr); - } - - jvmtiError GetLocalLong(jthread thread, - jint depth, - jint slot, - jlong* value_ptr) { - return functions->GetLocalLong(this, thread, depth, slot, value_ptr); - } - - jvmtiError GetLocalFloat(jthread thread, - jint depth, - jint slot, - jfloat* value_ptr) { - return functions->GetLocalFloat(this, thread, depth, slot, value_ptr); - } - - jvmtiError GetLocalDouble(jthread thread, - jint depth, - jint slot, - jdouble* value_ptr) { - return functions->GetLocalDouble(this, thread, depth, slot, value_ptr); - } - - jvmtiError SetLocalObject(jthread thread, - jint depth, - jint slot, - jobject value) { - return functions->SetLocalObject(this, thread, depth, slot, value); - } - - jvmtiError SetLocalInt(jthread thread, - jint depth, - jint slot, - jint value) { - return functions->SetLocalInt(this, thread, depth, slot, value); - } - - jvmtiError SetLocalLong(jthread thread, - jint depth, - jint slot, - jlong value) { - return functions->SetLocalLong(this, thread, depth, slot, value); - } - - jvmtiError SetLocalFloat(jthread thread, - jint depth, - jint slot, - jfloat value) { - return functions->SetLocalFloat(this, thread, depth, slot, value); - } - - jvmtiError SetLocalDouble(jthread thread, - jint depth, - jint slot, - jdouble value) { - return functions->SetLocalDouble(this, thread, depth, slot, value); - } - - jvmtiError SetBreakpoint(jmethodID method, - jlocation location) { - return functions->SetBreakpoint(this, method, location); - } - - jvmtiError ClearBreakpoint(jmethodID method, - jlocation location) { - return functions->ClearBreakpoint(this, method, location); - } - - jvmtiError SetFieldAccessWatch(jclass klass, - jfieldID field) { - return functions->SetFieldAccessWatch(this, klass, field); - } - - jvmtiError ClearFieldAccessWatch(jclass klass, - jfieldID field) { - return functions->ClearFieldAccessWatch(this, klass, field); - } - - jvmtiError SetFieldModificationWatch(jclass klass, - jfieldID field) { - return functions->SetFieldModificationWatch(this, klass, field); - } - - jvmtiError ClearFieldModificationWatch(jclass klass, - jfieldID field) { - return functions->ClearFieldModificationWatch(this, klass, field); - } - - jvmtiError GetAllModules(jint* module_count_ptr, - jobject** modules_ptr) { - return functions->GetAllModules(this, module_count_ptr, modules_ptr); - } - - jvmtiError GetNamedModule(jobject class_loader, - const char* package_name, - jobject* module_ptr) { - return functions->GetNamedModule(this, class_loader, package_name, module_ptr); - } - - jvmtiError AddModuleReads(jobject module, - jobject to_module) { - return functions->AddModuleReads(this, module, to_module); - } - - jvmtiError AddModuleExports(jobject module, - const char* pkg_name, - jobject to_module) { - return functions->AddModuleExports(this, module, pkg_name, to_module); - } - - jvmtiError AddModuleOpens(jobject module, - const char* pkg_name, - jobject to_module) { - return functions->AddModuleOpens(this, module, pkg_name, to_module); - } - - jvmtiError AddModuleUses(jobject module, - jclass service) { - return functions->AddModuleUses(this, module, service); - } - - jvmtiError AddModuleProvides(jobject module, - jclass service, - jclass impl_class) { - return functions->AddModuleProvides(this, module, service, impl_class); - } - - jvmtiError IsModifiableModule(jobject module, - jboolean* is_modifiable_module_ptr) { - return functions->IsModifiableModule(this, module, is_modifiable_module_ptr); - } - - jvmtiError GetLoadedClasses(jint* class_count_ptr, - jclass** classes_ptr) { - return functions->GetLoadedClasses(this, class_count_ptr, classes_ptr); - } - - jvmtiError GetClassLoaderClasses(jobject initiating_loader, - jint* class_count_ptr, - jclass** classes_ptr) { - return functions->GetClassLoaderClasses(this, initiating_loader, class_count_ptr, classes_ptr); - } - - jvmtiError GetClassSignature(jclass klass, - char** signature_ptr, - char** generic_ptr) { - return functions->GetClassSignature(this, klass, signature_ptr, generic_ptr); - } - - jvmtiError GetClassStatus(jclass klass, - jint* status_ptr) { - return functions->GetClassStatus(this, klass, status_ptr); - } - - jvmtiError GetSourceFileName(jclass klass, - char** source_name_ptr) { - return functions->GetSourceFileName(this, klass, source_name_ptr); - } - - jvmtiError GetClassModifiers(jclass klass, - jint* modifiers_ptr) { - return functions->GetClassModifiers(this, klass, modifiers_ptr); - } - - jvmtiError GetClassMethods(jclass klass, - jint* method_count_ptr, - jmethodID** methods_ptr) { - return functions->GetClassMethods(this, klass, method_count_ptr, methods_ptr); - } - - jvmtiError GetClassFields(jclass klass, - jint* field_count_ptr, - jfieldID** fields_ptr) { - return functions->GetClassFields(this, klass, field_count_ptr, fields_ptr); - } - - jvmtiError GetImplementedInterfaces(jclass klass, - jint* interface_count_ptr, - jclass** interfaces_ptr) { - return functions->GetImplementedInterfaces(this, klass, interface_count_ptr, interfaces_ptr); - } - - jvmtiError GetClassVersionNumbers(jclass klass, - jint* minor_version_ptr, - jint* major_version_ptr) { - return functions->GetClassVersionNumbers(this, klass, minor_version_ptr, major_version_ptr); - } - - jvmtiError GetConstantPool(jclass klass, - jint* constant_pool_count_ptr, - jint* constant_pool_byte_count_ptr, - unsigned char** constant_pool_bytes_ptr) { - return functions->GetConstantPool(this, klass, constant_pool_count_ptr, constant_pool_byte_count_ptr, constant_pool_bytes_ptr); - } - - jvmtiError IsInterface(jclass klass, - jboolean* is_interface_ptr) { - return functions->IsInterface(this, klass, is_interface_ptr); - } - - jvmtiError IsArrayClass(jclass klass, - jboolean* is_array_class_ptr) { - return functions->IsArrayClass(this, klass, is_array_class_ptr); - } - - jvmtiError IsModifiableClass(jclass klass, - jboolean* is_modifiable_class_ptr) { - return functions->IsModifiableClass(this, klass, is_modifiable_class_ptr); - } - - jvmtiError GetClassLoader(jclass klass, - jobject* classloader_ptr) { - return functions->GetClassLoader(this, klass, classloader_ptr); - } - - jvmtiError GetSourceDebugExtension(jclass klass, - char** source_debug_extension_ptr) { - return functions->GetSourceDebugExtension(this, klass, source_debug_extension_ptr); - } - - jvmtiError RetransformClasses(jint class_count, - const jclass* classes) { - return functions->RetransformClasses(this, class_count, classes); - } - - jvmtiError RedefineClasses(jint class_count, - const jvmtiClassDefinition* class_definitions) { - return functions->RedefineClasses(this, class_count, class_definitions); - } - - jvmtiError GetObjectSize(jobject object, - jlong* size_ptr) { - return functions->GetObjectSize(this, object, size_ptr); - } - - jvmtiError GetObjectHashCode(jobject object, - jint* hash_code_ptr) { - return functions->GetObjectHashCode(this, object, hash_code_ptr); - } - - jvmtiError GetObjectMonitorUsage(jobject object, - jvmtiMonitorUsage* info_ptr) { - return functions->GetObjectMonitorUsage(this, object, info_ptr); - } - - jvmtiError GetFieldName(jclass klass, - jfieldID field, - char** name_ptr, - char** signature_ptr, - char** generic_ptr) { - return functions->GetFieldName(this, klass, field, name_ptr, signature_ptr, generic_ptr); - } - - jvmtiError GetFieldDeclaringClass(jclass klass, - jfieldID field, - jclass* declaring_class_ptr) { - return functions->GetFieldDeclaringClass(this, klass, field, declaring_class_ptr); - } - - jvmtiError GetFieldModifiers(jclass klass, - jfieldID field, - jint* modifiers_ptr) { - return functions->GetFieldModifiers(this, klass, field, modifiers_ptr); - } - - jvmtiError IsFieldSynthetic(jclass klass, - jfieldID field, - jboolean* is_synthetic_ptr) { - return functions->IsFieldSynthetic(this, klass, field, is_synthetic_ptr); - } - - jvmtiError GetMethodName(jmethodID method, - char** name_ptr, - char** signature_ptr, - char** generic_ptr) { - return functions->GetMethodName(this, method, name_ptr, signature_ptr, generic_ptr); - } - - jvmtiError GetMethodDeclaringClass(jmethodID method, - jclass* declaring_class_ptr) { - return functions->GetMethodDeclaringClass(this, method, declaring_class_ptr); - } - - jvmtiError GetMethodModifiers(jmethodID method, - jint* modifiers_ptr) { - return functions->GetMethodModifiers(this, method, modifiers_ptr); - } - - jvmtiError GetMaxLocals(jmethodID method, - jint* max_ptr) { - return functions->GetMaxLocals(this, method, max_ptr); - } - - jvmtiError GetArgumentsSize(jmethodID method, - jint* size_ptr) { - return functions->GetArgumentsSize(this, method, size_ptr); - } - - jvmtiError GetLineNumberTable(jmethodID method, - jint* entry_count_ptr, - jvmtiLineNumberEntry** table_ptr) { - return functions->GetLineNumberTable(this, method, entry_count_ptr, table_ptr); - } - - jvmtiError GetMethodLocation(jmethodID method, - jlocation* start_location_ptr, - jlocation* end_location_ptr) { - return functions->GetMethodLocation(this, method, start_location_ptr, end_location_ptr); - } - - jvmtiError GetLocalVariableTable(jmethodID method, - jint* entry_count_ptr, - jvmtiLocalVariableEntry** table_ptr) { - return functions->GetLocalVariableTable(this, method, entry_count_ptr, table_ptr); - } - - jvmtiError GetBytecodes(jmethodID method, - jint* bytecode_count_ptr, - unsigned char** bytecodes_ptr) { - return functions->GetBytecodes(this, method, bytecode_count_ptr, bytecodes_ptr); - } - - jvmtiError IsMethodNative(jmethodID method, - jboolean* is_native_ptr) { - return functions->IsMethodNative(this, method, is_native_ptr); - } - - jvmtiError IsMethodSynthetic(jmethodID method, - jboolean* is_synthetic_ptr) { - return functions->IsMethodSynthetic(this, method, is_synthetic_ptr); - } - - jvmtiError IsMethodObsolete(jmethodID method, - jboolean* is_obsolete_ptr) { - return functions->IsMethodObsolete(this, method, is_obsolete_ptr); - } - - jvmtiError SetNativeMethodPrefix(const char* prefix) { - return functions->SetNativeMethodPrefix(this, prefix); - } - - jvmtiError SetNativeMethodPrefixes(jint prefix_count, - char** prefixes) { - return functions->SetNativeMethodPrefixes(this, prefix_count, prefixes); - } - - jvmtiError CreateRawMonitor(const char* name, - jrawMonitorID* monitor_ptr) { - return functions->CreateRawMonitor(this, name, monitor_ptr); - } - - jvmtiError DestroyRawMonitor(jrawMonitorID monitor) { - return functions->DestroyRawMonitor(this, monitor); - } - - jvmtiError RawMonitorEnter(jrawMonitorID monitor) { - return functions->RawMonitorEnter(this, monitor); - } - - jvmtiError RawMonitorExit(jrawMonitorID monitor) { - return functions->RawMonitorExit(this, monitor); - } - - jvmtiError RawMonitorWait(jrawMonitorID monitor, - jlong millis) { - return functions->RawMonitorWait(this, monitor, millis); - } - - jvmtiError RawMonitorNotify(jrawMonitorID monitor) { - return functions->RawMonitorNotify(this, monitor); - } - - jvmtiError RawMonitorNotifyAll(jrawMonitorID monitor) { - return functions->RawMonitorNotifyAll(this, monitor); - } - - jvmtiError SetJNIFunctionTable(const jniNativeInterface* function_table) { - return functions->SetJNIFunctionTable(this, function_table); - } - - jvmtiError GetJNIFunctionTable(jniNativeInterface** function_table) { - return functions->GetJNIFunctionTable(this, function_table); - } - - jvmtiError SetEventCallbacks(const jvmtiEventCallbacks* callbacks, - jint size_of_callbacks) { - return functions->SetEventCallbacks(this, callbacks, size_of_callbacks); - } - - jvmtiError SetEventNotificationMode(jvmtiEventMode mode, - jvmtiEvent event_type, - jthread event_thread, - ...) { - return functions->SetEventNotificationMode(this, mode, event_type, event_thread); - } - - jvmtiError GenerateEvents(jvmtiEvent event_type) { - return functions->GenerateEvents(this, event_type); - } - - jvmtiError GetExtensionFunctions(jint* extension_count_ptr, - jvmtiExtensionFunctionInfo** extensions) { - return functions->GetExtensionFunctions(this, extension_count_ptr, extensions); - } - - jvmtiError GetExtensionEvents(jint* extension_count_ptr, - jvmtiExtensionEventInfo** extensions) { - return functions->GetExtensionEvents(this, extension_count_ptr, extensions); - } - - jvmtiError SetExtensionEventCallback(jint extension_event_index, - jvmtiExtensionEvent callback) { - return functions->SetExtensionEventCallback(this, extension_event_index, callback); - } - - jvmtiError GetPotentialCapabilities(jvmtiCapabilities* capabilities_ptr) { - return functions->GetPotentialCapabilities(this, capabilities_ptr); - } - - jvmtiError AddCapabilities(const jvmtiCapabilities* capabilities_ptr) { - return functions->AddCapabilities(this, capabilities_ptr); - } - - jvmtiError RelinquishCapabilities(const jvmtiCapabilities* capabilities_ptr) { - return functions->RelinquishCapabilities(this, capabilities_ptr); - } - - jvmtiError GetCapabilities(jvmtiCapabilities* capabilities_ptr) { - return functions->GetCapabilities(this, capabilities_ptr); - } - - jvmtiError GetCurrentThreadCpuTimerInfo(jvmtiTimerInfo* info_ptr) { - return functions->GetCurrentThreadCpuTimerInfo(this, info_ptr); - } - - jvmtiError GetCurrentThreadCpuTime(jlong* nanos_ptr) { - return functions->GetCurrentThreadCpuTime(this, nanos_ptr); - } - - jvmtiError GetThreadCpuTimerInfo(jvmtiTimerInfo* info_ptr) { - return functions->GetThreadCpuTimerInfo(this, info_ptr); - } - - jvmtiError GetThreadCpuTime(jthread thread, - jlong* nanos_ptr) { - return functions->GetThreadCpuTime(this, thread, nanos_ptr); - } - - jvmtiError GetTimerInfo(jvmtiTimerInfo* info_ptr) { - return functions->GetTimerInfo(this, info_ptr); - } - - jvmtiError GetTime(jlong* nanos_ptr) { - return functions->GetTime(this, nanos_ptr); - } - - jvmtiError GetAvailableProcessors(jint* processor_count_ptr) { - return functions->GetAvailableProcessors(this, processor_count_ptr); - } - - jvmtiError AddToBootstrapClassLoaderSearch(const char* segment) { - return functions->AddToBootstrapClassLoaderSearch(this, segment); - } - - jvmtiError AddToSystemClassLoaderSearch(const char* segment) { - return functions->AddToSystemClassLoaderSearch(this, segment); - } - - jvmtiError GetSystemProperties(jint* count_ptr, - char*** property_ptr) { - return functions->GetSystemProperties(this, count_ptr, property_ptr); - } - - jvmtiError GetSystemProperty(const char* property, - char** value_ptr) { - return functions->GetSystemProperty(this, property, value_ptr); - } - - jvmtiError SetSystemProperty(const char* property, - const char* value_ptr) { - return functions->SetSystemProperty(this, property, value_ptr); - } - - jvmtiError GetPhase(jvmtiPhase* phase_ptr) { - return functions->GetPhase(this, phase_ptr); - } - - jvmtiError DisposeEnvironment() { - return functions->DisposeEnvironment(this); - } - - jvmtiError SetEnvironmentLocalStorage(const void* data) { - return functions->SetEnvironmentLocalStorage(this, data); - } - - jvmtiError GetEnvironmentLocalStorage(void** data_ptr) { - return functions->GetEnvironmentLocalStorage(this, data_ptr); - } - - jvmtiError GetVersionNumber(jint* version_ptr) { - return functions->GetVersionNumber(this, version_ptr); - } - - jvmtiError GetErrorName(jvmtiError error, - char** name_ptr) { - return functions->GetErrorName(this, error, name_ptr); - } - - jvmtiError SetVerboseFlag(jvmtiVerboseFlag flag, - jboolean value) { - return functions->SetVerboseFlag(this, flag, value); - } - - jvmtiError GetJLocationFormat(jvmtiJlocationFormat* format_ptr) { - return functions->GetJLocationFormat(this, format_ptr); - } - - jvmtiError SetHeapSamplingInterval(jint sampling_interval) { - return functions->SetHeapSamplingInterval(this, sampling_interval); - } - -#endif /* __cplusplus */ -}; - - -#ifdef __cplusplus -} /* extern "C" */ -#endif /* __cplusplus */ - -#endif /* !_JAVA_JVMTI_H_ */ diff --git a/extensions/gdx-jnigen/res/com/badlogic/gdx/jnigen/resources/headers/jvmticmlr.h b/extensions/gdx-jnigen/res/com/badlogic/gdx/jnigen/resources/headers/jvmticmlr.h deleted file mode 100644 index c2106d3a7..000000000 --- a/extensions/gdx-jnigen/res/com/badlogic/gdx/jnigen/resources/headers/jvmticmlr.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * This header file defines the data structures sent by the VM - * through the JVMTI CompiledMethodLoad callback function via the - * "void * compile_info" parameter. The memory pointed to by the - * compile_info parameter may not be referenced after returning from - * the CompiledMethodLoad callback. These are VM implementation - * specific data structures that may evolve in future releases. A - * JVMTI agent should interpret a non-NULL compile_info as a pointer - * to a region of memory containing a list of records. In a typical - * usage scenario, a JVMTI agent would cast each record to a - * jvmtiCompiledMethodLoadRecordHeader, a struct that represents - * arbitrary information. This struct contains a kind field to indicate - * the kind of information being passed, and a pointer to the next - * record. If the kind field indicates inlining information, then the - * agent would cast the record to a jvmtiCompiledMethodLoadInlineRecord. - * This record contains an array of PCStackInfo structs, which indicate - * for every pc address what are the methods on the invocation stack. - * The "methods" and "bcis" fields in each PCStackInfo struct specify a - * 1-1 mapping between these inlined methods and their bytecode indices. - * This can be used to derive the proper source lines of the inlined - * methods. - */ - -#ifndef _JVMTI_CMLR_H_ -#define _JVMTI_CMLR_H_ - -enum { - JVMTI_CMLR_MAJOR_VERSION_1 = 0x00000001, - JVMTI_CMLR_MINOR_VERSION_0 = 0x00000000, - - JVMTI_CMLR_MAJOR_VERSION = 0x00000001, - JVMTI_CMLR_MINOR_VERSION = 0x00000000 - - /* - * This comment is for the "JDK import from HotSpot" sanity check: - * version: 1.0.0 - */ -}; - -typedef enum { - JVMTI_CMLR_DUMMY = 1, - JVMTI_CMLR_INLINE_INFO = 2 -} jvmtiCMLRKind; - -/* - * Record that represents arbitrary information passed through JVMTI - * CompiledMethodLoadEvent void pointer. - */ -typedef struct _jvmtiCompiledMethodLoadRecordHeader { - jvmtiCMLRKind kind; /* id for the kind of info passed in the record */ - jint majorinfoversion; /* major and minor info version values. Init'ed */ - jint minorinfoversion; /* to current version value in jvmtiExport.cpp. */ - - struct _jvmtiCompiledMethodLoadRecordHeader* next; -} jvmtiCompiledMethodLoadRecordHeader; - -/* - * Record that gives information about the methods on the compile-time - * stack at a specific pc address of a compiled method. Each element in - * the methods array maps to same element in the bcis array. - */ -typedef struct _PCStackInfo { - void* pc; /* the pc address for this compiled method */ - jint numstackframes; /* number of methods on the stack */ - jmethodID* methods; /* array of numstackframes method ids */ - jint* bcis; /* array of numstackframes bytecode indices */ -} PCStackInfo; - -/* - * Record that contains inlining information for each pc address of - * an nmethod. - */ -typedef struct _jvmtiCompiledMethodLoadInlineRecord { - jvmtiCompiledMethodLoadRecordHeader header; /* common header for casting */ - jint numpcs; /* number of pc descriptors in this nmethod */ - PCStackInfo* pcinfo; /* array of numpcs pc descriptors */ -} jvmtiCompiledMethodLoadInlineRecord; - -/* - * Dummy record used to test that we can pass records with different - * information through the void pointer provided that they can be cast - * to a jvmtiCompiledMethodLoadRecordHeader. - */ - -typedef struct _jvmtiCompiledMethodLoadDummyRecord { - jvmtiCompiledMethodLoadRecordHeader header; /* common header for casting */ - char message[50]; -} jvmtiCompiledMethodLoadDummyRecord; - -#endif diff --git a/extensions/gdx-jnigen/res/com/badlogic/gdx/jnigen/resources/headers/mac/jawt_md.h b/extensions/gdx-jnigen/res/com/badlogic/gdx/jnigen/resources/headers/mac/jawt_md.h deleted file mode 100644 index 94a13c9ab..000000000 --- a/extensions/gdx-jnigen/res/com/badlogic/gdx/jnigen/resources/headers/mac/jawt_md.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -#ifndef _JAVASOFT_JAWT_MD_H_ -#define _JAVASOFT_JAWT_MD_H_ - -#include "jawt.h" - -#ifdef __OBJC__ -#import <QuartzCore/CALayer.h> -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * MacOS specific declarations for AWT native interface. - * See notes in jawt.h for an example of use. - */ - -/* - * When calling JAWT_GetAWT with a JAWT version less than 1.7, you must pass this - * flag or you will not be able to get a valid drawing surface and JAWT_GetAWT will - * return false. This is to maintain compatibility with applications that used the - * interface with Java 6 which had multiple rendering models. This flag is not necessary - * when JAWT version 1.7 or greater is used as this is the only supported rendering mode. - * - * Example: - * JAWT awt; - * awt.version = JAWT_VERSION_1_4 | JAWT_MACOSX_USE_CALAYER; - * jboolean success = JAWT_GetAWT(env, &awt); - */ -#define JAWT_MACOSX_USE_CALAYER 0x80000000 - -/* - * When the native Cocoa toolkit is in use, the pointer stored in - * JAWT_DrawingSurfaceInfo->platformInfo points to a NSObject that conforms to the - * JAWT_SurfaceLayers protocol. Setting the layer property of this object will cause the - * specified layer to be overlaid on the Components rectangle. If the window the - * Component belongs to has a CALayer attached to it, this layer will be accessible via - * the windowLayer property. - */ -#ifdef __OBJC__ -@protocol JAWT_SurfaceLayers -@property (readwrite, retain) CALayer *layer; -@property (readonly) CALayer *windowLayer; -@end -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* !_JAVASOFT_JAWT_MD_H_ */ diff --git a/extensions/gdx-setup/build.gradle b/extensions/gdx-setup/build.gradle deleted file mode 100644 index 9575ca923..000000000 --- a/extensions/gdx-setup/build.gradle +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright 2011 See AUTHORS file. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - ******************************************************************************/ - -plugins { - id 'application' -} - -application { - mainClassName = 'com.badlogic.gdx.setup.GdxSetup' -} - -jar { - archiveName = 'gdx-setup.jar' - manifest { - attributes 'Main-Class': project.mainClassName - } -} diff --git a/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/android/res/drawable-anydpi-v26/ic_launcher.xml b/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/android/res/drawable-anydpi-v26/ic_launcher.xml deleted file mode 100644 index 6c7313ae1..000000000 --- a/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/android/res/drawable-anydpi-v26/ic_launcher.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<adaptive-icon - xmlns:android="http://schemas.android.com/apk/res/android"> - <background android:drawable="@color/ic_background_color"/> - <foreground android:drawable="@drawable/ic_launcher_foreground"/> -</adaptive-icon> diff --git a/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/android/res/drawable-anydpi-v26/ic_launcher_foreground.xml b/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/android/res/drawable-anydpi-v26/ic_launcher_foreground.xml deleted file mode 100644 index 5916ee8f9..000000000 --- a/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/android/res/drawable-anydpi-v26/ic_launcher_foreground.xml +++ /dev/null @@ -1,40 +0,0 @@ -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="108dp" - android:height="108dp" - android:viewportWidth="108" - android:viewportHeight="108"> - <path - android:pathData="M22,48.667l2.987,0l0,10.667l-2.987,0z" - android:fillColor="#000000" - android:strokeColor="#00000000" - android:fillAlpha="1"/> - <path - android:pathData="M26.907,52.72l2.987,0l0,6.613l-2.987,0z" - android:fillColor="#000000" - android:strokeColor="#00000000" - android:fillAlpha="1"/> - <path - android:pathData="M26.907,48.667l2.987,0l0,2.56l-2.987,0z" - android:fillColor="#000000" - android:strokeColor="#00000000" - android:fillAlpha="1"/> - <path - android:pathData="M31.813,48.667L31.813,52.72 31.813,55.067 31.813,56.767 31.813,59.333l2.992,0 2.117,0c1.654,0 2.998,-1.481 2.998,-3.307 0,-1.826 -1.344,-3.307 -2.998,-3.307l-2.117,0L34.805,48.667ZM34.805,55.067l1.269,0c0.469,0 0.848,0.384 0.848,0.853 0,0.469 -0.379,0.847 -0.848,0.847l-1.269,0z" - android:fillColor="#000000" - android:strokeColor="#00000000" - android:fillAlpha="1"/> - <path - android:pathData="m44.192,48.667c-1.65,0 -2.992,1.481 -2.992,3.307 0,0.023 -0,0.044 0,0.067 0,0.004 -0,0.009 0,0.013l0,3.893c-0.001,0.027 0,0.053 0,0.08 0,1.826 1.341,3.307 2.992,3.307l2.112,0 0.247,0 2.739,0 0.247,0 2.112,0c1.651,0 2.992,-1.481 2.992,-3.307 0,-1.826 -1.341,-3.307 -2.992,-3.307l-1.199,0 -0.48,0 -2.372,0l0,2.347l2.372,0 0.48,0 0.353,0c0.468,0 0.846,0.384 0.846,0.853 0,0.469 -0.378,0.847 -0.846,0.847l-0.833,0 -0.433,0 -0.247,0 -2.739,0 -0.247,0 -0.433,0 -0.833,0c-0.459,0 -0.832,-0.363 -0.846,-0.82l0,-3.893 0,-0.013c0.021,-0.45 0.391,-0.807 0.846,-0.807l0.833,0 0.433,0 1.293,0l0,0.007L54.207,51.24L54.207,48.667l-4.917,0 -1.692,0 -1.293,0 -2.112,0z" - android:fillColor="#e74a45" - android:strokeColor="#00000000" - android:fillAlpha="1"/> - <path - android:pathData="M56.133,48.667L56.133,51.238l5.406,0 1.859,0 1.105,0 0.43,0 0.827,0c0.452,0 0.82,0.356 0.84,0.806l0,0.013 0,3.891c-0.014,0.456 -0.384,0.819 -0.84,0.819l-0.827,0 -0.43,0 -1.899,0 -1.065,0 -2.442,0L59.098,52.724L56.133,52.724l0,4.044 0,1.752 0,0.813l5.406,0 1.065,0 1.899,0 2.098,0c1.639,0 2.971,-1.48 2.971,-3.305 0,-0.027 0.001,-0.053 0,-0.08L69.573,52.058c0,-0.004 -0,-0.009 0,-0.013 0,-0.022 0,-0.044 0,-0.067 0,-1.825 -1.332,-3.305 -2.971,-3.305l-2.098,0 -1.105,0l0,-0.007L56.133,48.667Z" - android:fillColor="#e74a45" - android:strokeColor="#00000000" - android:fillAlpha="1"/> - <path - android:pathData="M69.572,48.667L73.72,48.667L77.787,52.733 81.853,48.667l4.147,0l-5.333,5.333 5.333,5.333L81.853,59.333L77.787,55.267 73.72,59.333l-4.147,0l5.333,-5.333z" - android:fillColor="#e74a45" - android:strokeColor="#00000000"/> -</vector> diff --git a/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/android/res/values/color.xml b/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/android/res/values/color.xml deleted file mode 100644 index 933353e06..000000000 --- a/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/android/res/values/color.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<resources> - <color name="ic_background_color">#FFFFFFFF</color> -</resources> diff --git a/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/desktop/build.gradle b/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/desktop/build.gradle deleted file mode 100644 index 781cae10f..000000000 --- a/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/desktop/build.gradle +++ /dev/null @@ -1,41 +0,0 @@ -apply plugin: "%LANG%" - -sourceCompatibility = 1.7 -sourceSets.main.java.srcDirs = [ "src/" ] -sourceSets.main.resources.srcDirs = ["../%ASSET_PATH%"] - -project.ext.mainClassName = "%PACKAGE%.desktop.DesktopLauncher" -project.ext.assetsDir = new File("../%ASSET_PATH%") - -task run(dependsOn: classes, type: JavaExec) { - main = project.mainClassName - classpath = sourceSets.main.runtimeClasspath - standardInput = System.in - workingDir = project.assetsDir - ignoreExitValue = true -} - -task debug(dependsOn: classes, type: JavaExec) { - main = project.mainClassName - classpath = sourceSets.main.runtimeClasspath - standardInput = System.in - workingDir = project.assetsDir - ignoreExitValue = true - debug = true -} - -task dist(type: Jar) { - manifest { - attributes 'Main-Class': project.mainClassName - } - dependsOn configurations.runtimeClasspath - from { - configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } - } - with jar -} - - -dist.dependsOn classes - -eclipse.project.name = appName + "-desktop" diff --git a/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/gradle/wrapper/gradle-wrapper.jar b/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 5c2d1cf01..000000000 Binary files a/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/ios/data/Base.lproj/LaunchScreen.storyboard b/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/ios/data/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index 5fb346b90..000000000 --- a/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/ios/data/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> - <device id="retina6_1" orientation="portrait" appearance="light"/> - <dependencies> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/> - <capability name="Safe area layout guides" minToolsVersion="9.0"/> - <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> - </dependencies> - <scenes> - <!--View Controller--> - <scene sceneID="EHf-IW-A2E"> - <objects> - <viewController id="01J-lp-oVM" sceneMemberID="viewController"> - <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> - <rect key="frame" x="0.0" y="0.0" width="414" height="896"/> - <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> - <subviews> - <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="Logo" translatesAutoresizingMaskIntoConstraints="NO" id="hN2-E0-Tu8"> - <rect key="frame" x="120" y="402" width="172" height="93"/> - <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/> - </imageView> - </subviews> - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> - <color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> - <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/> - </view> - </viewController> - <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> - </objects> - <point key="canvasLocation" x="52.173913043478265" y="375"/> - </scene> - </scenes> - <resources> - <image name="Logo" width="243" height="41"/> - </resources> -</document> diff --git a/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/ios/data/Media.xcassets/Logo.imageset/Contents.json b/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/ios/data/Media.xcassets/Logo.imageset/Contents.json deleted file mode 100644 index 1a1349946..000000000 --- a/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/ios/data/Media.xcassets/Logo.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "filename" : "libgdx@1x.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "libgdx@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "libgdx@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/ios/data/Media.xcassets/Logo.imageset/libgdx@1x.png b/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/ios/data/Media.xcassets/Logo.imageset/libgdx@1x.png deleted file mode 100644 index 22c41cbe2..000000000 Binary files a/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/ios/data/Media.xcassets/Logo.imageset/libgdx@1x.png and /dev/null differ diff --git a/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/ios/data/Media.xcassets/Logo.imageset/libgdx@2x.png b/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/ios/data/Media.xcassets/Logo.imageset/libgdx@2x.png deleted file mode 100644 index d077d745c..000000000 Binary files a/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/ios/data/Media.xcassets/Logo.imageset/libgdx@2x.png and /dev/null differ diff --git a/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/ios/data/Media.xcassets/Logo.imageset/libgdx@3x.png b/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/ios/data/Media.xcassets/Logo.imageset/libgdx@3x.png deleted file mode 100644 index e1d7262a1..000000000 Binary files a/extensions/gdx-setup/res/com/badlogic/gdx/setup/resources/ios/data/Media.xcassets/Logo.imageset/libgdx@3x.png and /dev/null differ diff --git a/extensions/gdx-tools/src/com/badlogic/gdx/tools/particleeditor/CustomShading.java b/extensions/gdx-tools/src/com/badlogic/gdx/tools/particleeditor/CustomShading.java deleted file mode 100644 index a87b3c9a3..000000000 --- a/extensions/gdx-tools/src/com/badlogic/gdx/tools/particleeditor/CustomShading.java +++ /dev/null @@ -1,160 +0,0 @@ -/******************************************************************************* - * Copyright 2011 See AUTHORS file. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - ******************************************************************************/ - -package com.badlogic.gdx.tools.particleeditor; - -import com.badlogic.gdx.Gdx; -import com.badlogic.gdx.files.FileHandle; -import com.badlogic.gdx.graphics.GL20; -import com.badlogic.gdx.graphics.Texture; -import com.badlogic.gdx.graphics.g2d.SpriteBatch; -import com.badlogic.gdx.graphics.glutils.ShaderProgram; -import com.badlogic.gdx.utils.Array; - -public class CustomShading { - private ShaderProgram shader; - Array<String> extraTexturePaths = new Array<String>(); - Array<Texture> extraTextures = new Array<Texture>(); - String defaultVertexShaderCode; - String defaultFragmentShaderCode; - String vertexShaderCode; - String fragmentShaderCode; - FileHandle lastVertexShaderFile; - FileHandle lastFragmentShaderFile; - boolean hasShaderErrors; - String shaderErrorMessage; - boolean hasMissingSamplers; - String missingSamplerMessage; - - public CustomShading () { - shader = SpriteBatch.createDefaultShader(); - vertexShaderCode = defaultVertexShaderCode = shader.getVertexShaderSource(); - fragmentShaderCode = defaultFragmentShaderCode = shader.getFragmentShaderSource(); - } - - public void begin (SpriteBatch spriteBatch) { - spriteBatch.setShader(shader); - for (int i = 0; i < extraTextures.size; i++) { - extraTextures.get(i).bind(i + 1); - } - Gdx.gl.glActiveTexture(GL20.GL_TEXTURE0); - } - - public void end (SpriteBatch spriteBatch) { - spriteBatch.setShader(null); - for (int i = 0; i < extraTextures.size; i++) { - Gdx.gl.glActiveTexture(GL20.GL_TEXTURE1 + i); - Gdx.gl.glBindTexture(extraTextures.get(i).glTarget, 0); - } - Gdx.gl.glActiveTexture(GL20.GL_TEXTURE0); - } - - public void setVertexShaderFile (String absolutePath) { - if (absolutePath == null) { - lastVertexShaderFile = null; - vertexShaderCode = defaultVertexShaderCode; - } else { - lastVertexShaderFile = Gdx.files.absolute(absolutePath); - vertexShaderCode = lastVertexShaderFile.readString(); - } - updateShader(); - } - - public void setFragmentShaderFile (String absolutePath) { - if (absolutePath == null) { - lastFragmentShaderFile = null; - fragmentShaderCode = defaultFragmentShaderCode; - } else { - lastFragmentShaderFile = Gdx.files.absolute(absolutePath); - fragmentShaderCode = lastFragmentShaderFile.readString(); - } - updateShader(); - } - - public void reloadVertexShader () { - if (lastVertexShaderFile != null) { - vertexShaderCode = lastVertexShaderFile.readString(); - } - updateShader(); - } - - public void reloadFragmentShader () { - if (lastFragmentShaderFile != null) { - fragmentShaderCode = lastFragmentShaderFile.readString(); - } - updateShader(); - } - - private void updateShader () { - ShaderProgram shader = new ShaderProgram(vertexShaderCode, fragmentShaderCode); - if (shader.isCompiled()) { - hasShaderErrors = false; - shaderErrorMessage = null; - if (this.shader != null) { - this.shader.dispose(); - } - this.shader = shader; - updateSamplers(); - } else { - hasShaderErrors = true; - shaderErrorMessage = shader.getLog(); - shader.dispose(); - } - } - - public void addTexture (String absolutePath) { - extraTexturePaths.add(absolutePath); - extraTextures.add(new Texture(Gdx.files.absolute(absolutePath))); - updateSamplers(); - } - - public void swapTexture (int indexA, int indexB) { - extraTexturePaths.swap(indexA, indexB); - extraTextures.swap(indexA, indexB); - updateSamplers(); - } - - public void removeTexture (int index) { - extraTexturePaths.removeIndex(index); - extraTextures.removeIndex(index).dispose(); - updateSamplers(); - } - - public void reloadTexture (int index) { - Texture previousTexture = extraTextures.get(index); - String path = extraTexturePaths.get(index); - Texture texture = new Texture(Gdx.files.absolute(path)); - previousTexture.dispose(); - extraTextures.set(index, texture); - } - - private void updateSamplers () { - hasMissingSamplers = false; - missingSamplerMessage = ""; - - shader.bind(); - for (int i = 0; i < extraTextures.size; i++) { - int unit = i + 1; - int location = shader.fetchUniformLocation("u_texture" + unit, false); - if (location >= 0) { - shader.setUniformi(location, unit); - } else { - hasMissingSamplers = true; - missingSamplerMessage += "uniform sampler2D u_texture" + unit + " missing in shader program.\n"; - } - } - } -} diff --git a/extensions/gdx-tools/src/com/badlogic/gdx/tools/particleeditor/CustomShadingPanel.java b/extensions/gdx-tools/src/com/badlogic/gdx/tools/particleeditor/CustomShadingPanel.java deleted file mode 100644 index 945334dca..000000000 --- a/extensions/gdx-tools/src/com/badlogic/gdx/tools/particleeditor/CustomShadingPanel.java +++ /dev/null @@ -1,265 +0,0 @@ -/******************************************************************************* - * Copyright 2011 See AUTHORS file. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - ******************************************************************************/ - -package com.badlogic.gdx.tools.particleeditor; - -import java.awt.FileDialog; -import java.awt.GridBagConstraints; -import java.awt.GridBagLayout; -import java.awt.GridLayout; -import java.awt.Insets; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.io.File; - -import javax.swing.DefaultListModel; -import javax.swing.JButton; -import javax.swing.JLabel; -import javax.swing.JList; -import javax.swing.JOptionPane; -import javax.swing.JPanel; -import javax.swing.JTextArea; -import javax.swing.ListSelectionModel; - -import com.badlogic.gdx.graphics.g2d.ParticleEmitter; - -public class CustomShadingPanel extends EditorPanel { - JPanel imagesPanel; - JList imageList; - DefaultListModel<String> imageListModel; - String lastDir; - final ParticleEditor editor; - final CustomShading shading; - - public CustomShadingPanel (final ParticleEditor editor, String name, String description) { - super(null, name, description); - this.editor = editor; - this.shading = editor.renderer.customShading; - - JPanel contentPanel = getContentPanel(); - - { - JPanel shaderStagePanel = createShaderStagePanel(editor, contentPanel, true); - contentPanel.add(shaderStagePanel, new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, - GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); - } - - { - JPanel shaderStagePanel = createShaderStagePanel(editor, contentPanel, false); - contentPanel.add(shaderStagePanel, new GridBagConstraints(1, 0, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, - GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); - } - - { - imagesPanel = new JPanel(new GridBagLayout()); - contentPanel.add(imagesPanel, new GridBagConstraints(2, 0, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, - GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); - - imagesPanel.add(new JLabel("Extra Texture Units")); - - imageListModel = new DefaultListModel<String>(); - for (int i = 0; i < shading.extraTexturePaths.size; i++) { - String path = shading.extraTexturePaths.get(i); - imageListModel.addElement(textureDisplayName(i, path)); - } - - imageList = new JList<String>(imageListModel); - imageList.setFixedCellWidth(200); - imageList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); - imagesPanel.add(imageList, new GridBagConstraints(0, 1, 1, 4, 0, 0, GridBagConstraints.NORTHWEST, - GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); - - JButton addButton = new JButton("Add"); - imagesPanel.add(addButton, new GridBagConstraints(1, 1, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, - GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); - addButton.addActionListener(new ActionListener() { - public void actionPerformed (ActionEvent event) { - FileDialog dialog = new FileDialog(editor, "Open Image", FileDialog.LOAD); - if (lastDir != null) dialog.setDirectory(lastDir); - dialog.setVisible(true); - final String file = dialog.getFile(); - final String dir = dialog.getDirectory(); - if (dir == null || file == null || file.trim().length() == 0) return; - lastDir = dir; - addTexture(new File(dir, file).getAbsolutePath()); - } - }); - - JButton upButton = new JButton("\u2191"); - imagesPanel.add(upButton, new GridBagConstraints(1, 2, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, - new Insets(0, 0, 0, 0), 0, 0)); - upButton.addActionListener(new ActionListener() { - @Override - public void actionPerformed (ActionEvent e) { - int index = imageList.getSelectedIndex(); - if (index <= 0) return; - swapTexture(index, index - 1); - imageList.setSelectedIndex(index - 1); - } - }); - JButton downButton = new JButton("\u2193"); - imagesPanel.add(downButton, new GridBagConstraints(1, 3, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, - GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); - downButton.addActionListener(new ActionListener() { - @Override - public void actionPerformed (ActionEvent e) { - int index = imageList.getSelectedIndex(); - if (index < 0 || index >= imageList.getModel().getSize() - 1) return; - final ParticleEmitter emitter = editor.getEmitter(); - swapTexture(index, index + 1); - imageList.setSelectedIndex(index + 1); - } - }); - JButton removeButton = new JButton("X"); - imagesPanel.add(removeButton, new GridBagConstraints(1, 4, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, - GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); - removeButton.addActionListener(new ActionListener() { - @Override - public void actionPerformed (ActionEvent e) { - int index = imageList.getSelectedIndex(); - if (index < 0) return; - removeTexture(index); - } - }); - JButton reloadButton = new JButton("Reload"); - imagesPanel.add(reloadButton, new GridBagConstraints(1, 5, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, - GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); - reloadButton.addActionListener(new ActionListener() { - @Override - public void actionPerformed (ActionEvent e) { - int index = imageList.getSelectedIndex(); - if (index < 0) return; - reloadTexture(index); - } - }); - } - } - - private JPanel createShaderStagePanel (final ParticleEditor editor, JPanel contentPanel, final boolean isVertexShader) { - JPanel buttonsPanel = new JPanel(new GridLayout(5, 1)); - - JLabel label = new JLabel(isVertexShader ? "Vertex Shader" : "Frag. Shader"); - buttonsPanel.add(label); - - JButton defaultButton = new JButton("Default"); - buttonsPanel.add(defaultButton); - defaultButton.addActionListener(new ActionListener() { - public void actionPerformed (ActionEvent event) { - if (isVertexShader) { - shading.setVertexShaderFile(null); - } else { - shading.setFragmentShaderFile(null); - } - displayErrors(); - } - }); - - JButton setButton = new JButton("Set"); - buttonsPanel.add(setButton); - setButton.addActionListener(new ActionListener() { - public void actionPerformed (ActionEvent event) { - FileDialog dialog = new FileDialog(editor, isVertexShader ? "Open Vertex Shader File" : "Open Fragment Shader File", - FileDialog.LOAD); - if (lastDir != null) dialog.setDirectory(lastDir); - dialog.setVisible(true); - final String file = dialog.getFile(); - final String dir = dialog.getDirectory(); - if (dir == null || file == null || file.trim().length() == 0) return; - lastDir = dir; - - String path = new File(dir, file).getAbsolutePath(); - - if (isVertexShader) { - shading.setVertexShaderFile(path); - } else { - shading.setFragmentShaderFile(path); - } - - displayErrors(); - } - }); - - JButton reloadButton = new JButton("Reload"); - buttonsPanel.add(reloadButton); - reloadButton.addActionListener(new ActionListener() { - public void actionPerformed (ActionEvent event) { - if (isVertexShader) { - shading.reloadVertexShader(); - } else { - shading.reloadFragmentShader(); - } - displayErrors(); - } - }); - - JButton showButton = new JButton("Show"); - buttonsPanel.add(showButton); - showButton.addActionListener(new ActionListener() { - public void actionPerformed (ActionEvent event) { - JTextArea text = new JTextArea(isVertexShader ? shading.vertexShaderCode : shading.fragmentShaderCode); - text.setEditable(false); - JOptionPane.showMessageDialog(editor, text, - isVertexShader ? "Current vertex shader code" : "Current fragment shader code", JOptionPane.INFORMATION_MESSAGE); - } - }); - - return buttonsPanel; - } - - protected void displayErrors () { - if (shading.hasShaderErrors) { - JOptionPane.showMessageDialog(editor, shading.shaderErrorMessage, "Shader Error", JOptionPane.ERROR_MESSAGE); - } else if (shading.hasMissingSamplers) { - JOptionPane.showMessageDialog(editor, shading.missingSamplerMessage, "Missing texture sampler", - JOptionPane.WARNING_MESSAGE); - } - } - - private String textureDisplayName (int index, String path) { - int unit = index + 1; - return "u_texture" + unit + ": " + new File(path).getName(); - } - - protected void removeTexture (int index) { - imageListModel.remove(index); - shading.removeTexture(index); - revalidate(); - displayErrors(); - } - - protected void swapTexture (int indexA, int indexB) { - shading.swapTexture(indexA, indexB); - String pathA = shading.extraTexturePaths.get(indexA); - String pathB = shading.extraTexturePaths.get(indexB); - imageListModel.set(indexA, textureDisplayName(indexA, pathA)); - imageListModel.set(indexB, textureDisplayName(indexB, pathB)); - revalidate(); - displayErrors(); - } - - protected void addTexture (String absolutePath) { - imageListModel.addElement(textureDisplayName(imageListModel.getSize(), absolutePath)); - shading.addTexture(absolutePath); - revalidate(); - displayErrors(); - } - - protected void reloadTexture (int index) { - shading.reloadTexture(index); - displayErrors(); - } - -} diff --git a/extensions/gdx-tools/src/com/badlogic/gdx/tools/particleeditor/PreviewImagePanel.java b/extensions/gdx-tools/src/com/badlogic/gdx/tools/particleeditor/PreviewImagePanel.java deleted file mode 100644 index 92838d742..000000000 --- a/extensions/gdx-tools/src/com/badlogic/gdx/tools/particleeditor/PreviewImagePanel.java +++ /dev/null @@ -1,183 +0,0 @@ -/******************************************************************************* - * Copyright 2011 See AUTHORS file. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - ******************************************************************************/ - -package com.badlogic.gdx.tools.particleeditor; - - -import com.badlogic.gdx.Gdx; -import com.badlogic.gdx.files.FileHandle; - -import javax.imageio.ImageIO; -import javax.swing.*; -import java.awt.*; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.image.BufferedImage; -import java.io.File; -import java.io.IOException; - -class PreviewImagePanel extends EditorPanel { - - ParticleEditor editor; - - DefaultListModel<String> imageListModel; - String lastDir; - - JPanel previewContainer; - - Slider valueX; - Slider valueY; - - Slider valueWidth; - Slider valueHeight; - - public PreviewImagePanel (final ParticleEditor editor, String name, String description) { - super(null, name, description); - - this.editor = editor; - - JButton addButton = new JButton("Select preview"); - JButton removeButton = new JButton("Remove preview"); - - previewContainer = new JPanel(new GridLayout(1, 1)); - - addButton.addActionListener(new ActionListener() { - public void actionPerformed (ActionEvent event) { - FileDialog dialog = new FileDialog(editor, "Select Image", FileDialog.LOAD); - if (lastDir != null) dialog.setDirectory(lastDir); - dialog.setVisible(true); - final String file = dialog.getFile(); - final String dir = dialog.getDirectory(); - if (dir == null || file == null || file.trim().length() == 0) return; - lastDir = dir; - - try { - final FileHandle absolute = Gdx.files.absolute(dir + file); - final BufferedImage read = ImageIO.read(absolute.read()); - final Image scaledInstance = read.getScaledInstance(100, -1, Image.SCALE_SMOOTH); - final ImageIcon image = new ImageIcon(scaledInstance); - - JLabel previewImage = new JLabel(image); - previewImage.setOpaque(true); - previewImage.setBackground(Color.MAGENTA); - - buildImagePanel(previewImage, absolute.file()); - } catch (IOException e) { - e.printStackTrace(); - } - - } - - private void buildImagePanel (JLabel previewImage, File file) { - previewContainer.removeAll(); - previewContainer.add(previewImage, new GridBagConstraints(0, 0, 1, 1, 1, 1, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); - previewContainer.updateUI(); - PreviewImagePanel.this.editor.renderer.setImageBackground(file); - } - }); - - removeButton.addActionListener(new ActionListener() { - @Override - public void actionPerformed (ActionEvent e) { - clearImagePanel(); - } - - private void clearImagePanel () { - previewContainer.removeAll(); - previewContainer.updateUI(); - PreviewImagePanel.this.editor.renderer.setImageBackground(null); - } - }); - - JPanel buttonPanel = new JPanel(new GridLayout()); - buttonPanel.add(addButton); - buttonPanel.add(removeButton); - - getContentPanel().add(buttonPanel, new GridBagConstraints(0, 0, 4, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, - new Insets(5, 5, 5, 5), 0, 0)); - - initializeComponents(); - - getContentPanel().add(previewContainer, new GridBagConstraints(0, 4, 2, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, - new Insets(10, 10, 10, 10), 0, 0)); - } - - private void initializeComponents () { - JPanel contentPanel = getContentPanel(); - { - JLabel label = new JLabel("X:"); - contentPanel.add(label, new GridBagConstraints(0, 1, 1, 1, 0, 0, GridBagConstraints.EAST, GridBagConstraints.NONE, - new Insets(0, 0, 0, 6), 0, 0)); - } - { - valueX = new Slider(0, 0, 99999, 1, 0, 500); - contentPanel.add(valueX, new GridBagConstraints(1, 1, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, - new Insets(0, 0, 0, 0), 0, 0)); - } - { - JLabel label = new JLabel("Y:"); - contentPanel.add(label, new GridBagConstraints(2, 1, 1, 1, 0, 0, GridBagConstraints.EAST, GridBagConstraints.NONE, - new Insets(0, 12, 0, 6), 0, 0)); - } - { - valueY = new Slider(0, 0, 99999, 1, 0, 500); - contentPanel.add(valueY, new GridBagConstraints(3, 1, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, - new Insets(0, 0, 0, 0), 0, 0)); - } - { - JLabel label = new JLabel("Width:"); - contentPanel.add(label, new GridBagConstraints(0, 2, 1, 1, 0, 0, GridBagConstraints.EAST, GridBagConstraints.NONE, - new Insets(0, 0, 0, 6), 0, 0)); - } - { - valueWidth = new Slider(0, 0, 99999, 1, 0, 500); - contentPanel.add(valueWidth, new GridBagConstraints(1, 2, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, - new Insets(0, 0, 0, 0), 0, 0)); - } - { - JLabel label = new JLabel("Height:"); - contentPanel.add(label, new GridBagConstraints(2, 2, 1, 1, 0, 0, GridBagConstraints.EAST, GridBagConstraints.NONE, - new Insets(0, 12, 0, 6), 0, 0)); - } - { - valueHeight = new Slider(0, 0, 99999, 1, 0, 500); - contentPanel.add(valueHeight, new GridBagConstraints(3, 2, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, - new Insets(0, 0, 0, 0), 0, 0)); - } - - float x = 0; - float y = 0; - float w = 64; - float h = 64; - - if (editor.renderer.bgImage != null) { - x = editor.renderer.bgImage.getX(); - y = editor.renderer.bgImage.getY(); - w = editor.renderer.bgImage.getWidth(); - h = editor.renderer.bgImage.getHeight(); - } - - valueX.setValue(x); - valueY.setValue(y); - valueWidth.setValue(w); - valueHeight.setValue(h); - } - - public void updateSpritePosition () { - editor.renderer.updateImageBackgroundPosSize(valueX.getValue(), valueY.getValue(), valueWidth.getValue(), valueHeight.getValue()); - } - -} diff --git a/gdx/src/com/badlogic/gdx/graphics/glutils/InstanceBufferObject.java b/gdx/src/com/badlogic/gdx/graphics/glutils/InstanceBufferObject.java deleted file mode 100644 index c6b513853..000000000 --- a/gdx/src/com/badlogic/gdx/graphics/glutils/InstanceBufferObject.java +++ /dev/null @@ -1,286 +0,0 @@ -/******************************************************************************* - * Copyright 2011 See AUTHORS file. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - ******************************************************************************/ - -package com.badlogic.gdx.graphics.glutils; - -import com.badlogic.gdx.Gdx; -import com.badlogic.gdx.graphics.GL20; -import com.badlogic.gdx.graphics.VertexAttribute; -import com.badlogic.gdx.graphics.VertexAttributes; -import com.badlogic.gdx.utils.BufferUtils; -import com.badlogic.gdx.utils.GdxRuntimeException; - -import java.nio.Buffer; -import java.nio.ByteBuffer; -import java.nio.FloatBuffer; - -/** - * Modification of the {@link VertexBufferObject} class. - * Sets the glVertexAttribDivisor for every {@link VertexAttribute} automatically. - * - * @author mrdlink - */ -public class InstanceBufferObject implements InstanceData { - - private VertexAttributes attributes; - private FloatBuffer buffer; - private ByteBuffer byteBuffer; - private boolean ownsBuffer; - private int bufferHandle; - private int usage; - boolean isDirty = false; - boolean isBound = false; - - public InstanceBufferObject (boolean isStatic, int numVertices, VertexAttribute... attributes) { - this(isStatic, numVertices, new VertexAttributes(attributes)); - } - - public InstanceBufferObject (boolean isStatic, int numVertices, VertexAttributes instanceAttributes) { - if (Gdx.gl30 == null) - throw new GdxRuntimeException("InstanceBufferObject requires a device running with GLES 3.0 compatibilty"); - - bufferHandle = Gdx.gl20.glGenBuffer(); - - ByteBuffer data = BufferUtils.newUnsafeByteBuffer(instanceAttributes.vertexSize * numVertices); - data.limit(0); - setBuffer(data, true, instanceAttributes); - setUsage(isStatic ? GL20.GL_STATIC_DRAW : GL20.GL_DYNAMIC_DRAW); - } - - @Override - public VertexAttributes getAttributes () { - return attributes; - } - - @Override - public int getNumInstances () { - return buffer.limit() * 4 / attributes.vertexSize; - } - - @Override - public int getNumMaxInstances () { - return byteBuffer.capacity() / attributes.vertexSize; - } - - @Override - public FloatBuffer getBuffer () { - isDirty = true; - return buffer; - } - - /** - * Low level method to reset the buffer and attributes to the specified values. Use with care! - * - * @param data - * @param ownsBuffer - * @param value - */ - protected void setBuffer (Buffer data, boolean ownsBuffer, VertexAttributes value) { - if (isBound) - throw new GdxRuntimeException("Cannot change attributes while VBO is bound"); - if (this.ownsBuffer && byteBuffer != null) - BufferUtils.disposeUnsafeByteBuffer(byteBuffer); - attributes = value; - if (data instanceof ByteBuffer) - byteBuffer = (ByteBuffer)data; - else - throw new GdxRuntimeException("Only ByteBuffer is currently supported"); - this.ownsBuffer = ownsBuffer; - - final int l = byteBuffer.limit(); - byteBuffer.limit(byteBuffer.capacity()); - buffer = byteBuffer.asFloatBuffer(); - byteBuffer.limit(l); - buffer.limit(l / 4); - } - - private void bufferChanged () { - if (isBound) { - Gdx.gl20.glBufferData(GL20.GL_ARRAY_BUFFER, byteBuffer.limit(), null, usage); - Gdx.gl20.glBufferData(GL20.GL_ARRAY_BUFFER, byteBuffer.limit(), byteBuffer, usage); - isDirty = false; - } - } - - @Override - public void setInstanceData (float[] data, int offset, int count) { - isDirty = true; - BufferUtils.copy(data, byteBuffer, count, offset); - buffer.position(0); - buffer.limit(count); - bufferChanged(); - } - - @Override - public void setInstanceData (FloatBuffer data, int count) { - isDirty = true; - BufferUtils.copy(data, byteBuffer, count); - buffer.position(0); - buffer.limit(count); - bufferChanged(); - } - - @Override - public void updateInstanceData (int targetOffset, float[] data, int sourceOffset, int count) { - isDirty = true; - final int pos = byteBuffer.position(); - byteBuffer.position(targetOffset * 4); - BufferUtils.copy(data, sourceOffset, count, byteBuffer); - byteBuffer.position(pos); - buffer.position(0); - bufferChanged(); - } - - @Override - public void updateInstanceData (int targetOffset, FloatBuffer data, int sourceOffset, int count) { - isDirty = true; - final int pos = byteBuffer.position(); - byteBuffer.position(targetOffset * 4); - data.position(sourceOffset * 4); - BufferUtils.copy(data, byteBuffer, count); - byteBuffer.position(pos); - buffer.position(0); - bufferChanged(); - } - - /** - * @return The GL enum used in the call to {@link GL20#glBufferData(int, int, java.nio.Buffer, int)}, e.g. GL_STATIC_DRAW or - * GL_DYNAMIC_DRAW - */ - protected int getUsage () { - return usage; - } - - /** - * Set the GL enum used in the call to {@link GL20#glBufferData(int, int, java.nio.Buffer, int)}, can only be called when the - * VBO is not bound. - */ - protected void setUsage (int value) { - if (isBound) - throw new GdxRuntimeException("Cannot change usage while VBO is bound"); - usage = value; - } - - /** - * Binds this InstanceBufferObject for rendering via glDrawArraysInstanced or glDrawElementsInstanced - * - * @param shader the shader - */ - @Override - public void bind (ShaderProgram shader) { - bind(shader, null); - } - - @Override - public void bind (ShaderProgram shader, int[] locations) { - final GL20 gl = Gdx.gl20; - - gl.glBindBuffer(GL20.GL_ARRAY_BUFFER, bufferHandle); - if (isDirty) { - byteBuffer.limit(buffer.limit() * 4); - gl.glBufferData(GL20.GL_ARRAY_BUFFER, byteBuffer.limit(), byteBuffer, usage); - isDirty = false; - } - - final int numAttributes = attributes.size(); - if (locations == null) { - for (int i = 0; i < numAttributes; i++) { - final VertexAttribute attribute = attributes.get(i); - final int location = shader.getAttributeLocation(attribute.alias); - if (location < 0) - continue; - int unitOffset = +attribute.unit; - shader.enableVertexAttribute(location + unitOffset); - - shader.setVertexAttribute(location + unitOffset, attribute.numComponents, attribute.type, attribute.normalized, attributes.vertexSize, attribute.offset); - Gdx.gl30.glVertexAttribDivisor(location + unitOffset, 1); - } - - } else { - for (int i = 0; i < numAttributes; i++) { - final VertexAttribute attribute = attributes.get(i); - final int location = locations[i]; - if (location < 0) - continue; - int unitOffset = +attribute.unit; - shader.enableVertexAttribute(location + unitOffset); - - shader.setVertexAttribute(location + unitOffset, attribute.numComponents, attribute.type, attribute.normalized, attributes.vertexSize, attribute.offset); - Gdx.gl30.glVertexAttribDivisor(location + unitOffset, 1); - } - } - isBound = true; - } - - /** - * Unbinds this InstanceBufferObject. - * - * @param shader the shader - */ - @Override - public void unbind (final ShaderProgram shader) { - unbind(shader, null); - } - - @Override - public void unbind (final ShaderProgram shader, final int[] locations) { - final GL20 gl = Gdx.gl20; - final int numAttributes = attributes.size(); - if (locations == null) { - for (int i = 0; i < numAttributes; i++) { - final VertexAttribute attribute = attributes.get(i); - final int location = shader.getAttributeLocation(attribute.alias); - if (location < 0) - continue; - int unitOffset = +attribute.unit; - shader.disableVertexAttribute(location + unitOffset); - } - } else { - for (int i = 0; i < numAttributes; i++) { - final VertexAttribute attribute = attributes.get(i); - final int location = locations[i]; - if (location < 0) - continue; - int unitOffset = +attribute.unit; - shader.disableVertexAttribute(location + unitOffset); - } - } - gl.glBindBuffer(GL20.GL_ARRAY_BUFFER, 0); - isBound = false; - } - - /** - * Invalidates the InstanceBufferObject so a new OpenGL buffer handle is created. Use this in case of a context loss. - */ - @Override - public void invalidate () { - bufferHandle = Gdx.gl20.glGenBuffer(); - isDirty = true; - } - - /** - * Disposes of all resources this InstanceBufferObject uses. - */ - @Override - public void dispose () { - GL20 gl = Gdx.gl20; - gl.glBindBuffer(GL20.GL_ARRAY_BUFFER, 0); - gl.glDeleteBuffer(bufferHandle); - bufferHandle = 0; - if (ownsBuffer) - BufferUtils.disposeUnsafeByteBuffer(byteBuffer); - } -} diff --git a/gdx/src/com/badlogic/gdx/utils/LongQueue.java b/gdx/src/com/badlogic/gdx/utils/LongQueue.java deleted file mode 100644 index 8e5c6fc0a..000000000 --- a/gdx/src/com/badlogic/gdx/utils/LongQueue.java +++ /dev/null @@ -1,356 +0,0 @@ -/******************************************************************************* - * Copyright 2015 See AUTHORS file. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - ******************************************************************************/ - -package com.badlogic.gdx.utils; - -import java.util.NoSuchElementException; - -/** A resizable, ordered array of longs with efficient add and remove at the beginning and end. Values in the backing array may - * wrap back to the beginning, making add and remove at the beginning and end O(1) (unless the backing array needs to resize when - * adding). Deque functionality is provided via {@link #removeLast()} and {@link #addFirst(long)}. */ -public class LongQueue { - /** Contains the values in the queue. Head and tail indices go in a circle around this array, wrapping at the end. */ - protected long[] values; - - /** Index of first element. Logically smaller than tail. Unless empty, it points to a valid element inside queue. */ - protected int head = 0; - - /** Index of last element. Logically bigger than head. Usually points to an empty position, but points to the head when full - * (size == values.length). */ - protected int tail = 0; - - /** Number of elements in the queue. */ - public int size = 0; - - /** Creates a new LongQueue which can hold 16 values without needing to resize backing array. */ - public LongQueue () { - this(16); - } - - /** Creates a new LongQueue which can hold the specified number of values without needing to resize backing array. */ - public LongQueue (int initialSize) { - // noinspection unchecked - this.values = new long[initialSize]; - } - - /** Append given value to the tail. (enqueue to tail) Unless backing array needs resizing, operates in O(1) time. */ - public void addLast (long value) { - long[] values = this.values; - - if (size == values.length) { - resize(values.length << 1);// * 2 - values = this.values; - } - - values[tail++] = value; - if (tail == values.length) { - tail = 0; - } - size++; - } - - /** Prepend given value to the head. (enqueue to head) Unless backing array needs resizing, operates in O(1) time. - * @see #addLast(long) */ - public void addFirst (long value) { - long[] values = this.values; - - if (size == values.length) { - resize(values.length << 1);// * 2 - values = this.values; - } - - int head = this.head; - head--; - if (head == -1) { - head = values.length - 1; - } - values[head] = value; - - this.head = head; - this.size++; - } - - /** Increases the size of the backing array to accommodate the specified number of additional items. Useful before adding many - * items to avoid multiple backing array resizes. */ - public void ensureCapacity (int additional) { - final int needed = size + additional; - if (values.length < needed) { - resize(needed); - } - } - - /** Resize backing array. newSize must be bigger than current size. */ - protected void resize (int newSize) { - final long[] values = this.values; - final int head = this.head; - final int tail = this.tail; - - final long[] newArray = new long[newSize]; - if (head < tail) { - // Continuous - System.arraycopy(values, head, newArray, 0, tail - head); - } else if (size > 0) { - // Wrapped - final int rest = values.length - head; - System.arraycopy(values, head, newArray, 0, rest); - System.arraycopy(values, 0, newArray, rest, tail); - } - this.values = newArray; - this.head = 0; - this.tail = size; - } - - /** Remove the first item from the queue. (dequeue from head) Always O(1). - * @return removed value - * @throws NoSuchElementException when queue is empty */ - public long removeFirst () { - if (size == 0) { - // Underflow - throw new NoSuchElementException("Queue is empty."); - } - - final long[] values = this.values; - - final long result = values[head]; - head++; - if (head == values.length) { - head = 0; - } - size--; - - return result; - } - - /** Remove the last item from the queue. (dequeue from tail) Always O(1). - * @see #removeFirst() - * @return removed - * @throws NoSuchElementException when queue is empty */ - public long removeLast () { - if (size == 0) { - throw new NoSuchElementException("Queue is empty."); - } - - final long[] values = this.values; - int tail = this.tail; - tail--; - if (tail == -1) { - tail = values.length - 1; - } - final long result = values[tail]; - this.tail = tail; - size--; - - return result; - } - - /** Returns the index of first occurrence of value in the queue, or -1 if no such value exists. - * @return An index of first occurrence of value in queue or -1 if no such value exists */ - public int indexOf (long value) { - if (size == 0) return -1; - long[] values = this.values; - final int head = this.head, tail = this.tail; - if (head < tail) { - for (int i = head; i < tail; i++) - if (values[i] == value) return i - head; - } else { - for (int i = head, n = values.length; i < n; i++) - if (values[i] == value) return i - head; - for (int i = 0; i < tail; i++) - if (values[i] == value) return i + values.length - head; - } - return -1; - } - - /** Removes the first instance of the specified value in the queue. - * @return true if value was found and removed, false otherwise */ - public boolean removeValue (long value) { - int index = indexOf(value); - if (index == -1) return false; - removeIndex(index); - return true; - } - - /** Removes and returns the item at the specified index. */ - public long removeIndex (int index) { - if (index < 0) throw new IndexOutOfBoundsException("index can't be < 0: " + index); - if (index >= size) throw new IndexOutOfBoundsException("index can't be >= size: " + index + " >= " + size); - - long[] values = this.values; - int head = this.head, tail = this.tail; - index += head; - long value; - if (head < tail) { // index is between head and tail. - value = values[index]; - System.arraycopy(values, index + 1, values, index, tail - index); - this.tail--; - } else if (index >= values.length) { // index is between 0 and tail. - index -= values.length; - value = values[index]; - System.arraycopy(values, index + 1, values, index, tail - index); - this.tail--; - } else { // index is between head and values.length. - value = values[index]; - System.arraycopy(values, head, values, head + 1, index - head); - this.head++; - if (this.head == values.length) { - this.head = 0; - } - } - size--; - return value; - } - - /** Returns true if the queue has one or more items. */ - public boolean notEmpty () { - return size > 0; - } - - /** Returns true if the queue is empty. */ - public boolean isEmpty () { - return size == 0; - } - - /** Returns the first (head) item in the queue (without removing it). - * @see #addFirst(long) - * @see #removeFirst() - * @throws NoSuchElementException when queue is empty */ - public long first () { - if (size == 0) { - // Underflow - throw new NoSuchElementException("Queue is empty."); - } - return values[head]; - } - - /** Returns the last (tail) item in the queue (without removing it). - * @see #addLast(long) - * @see #removeLast() - * @throws NoSuchElementException when queue is empty */ - public long last () { - if (size == 0) { - // Underflow - throw new NoSuchElementException("Queue is empty."); - } - final long[] values = this.values; - int tail = this.tail; - tail--; - if (tail == -1) { - tail = values.length - 1; - } - return values[tail]; - } - - /** Retrieves the value in queue without removing it. Indexing is from the front to back, zero based. Therefore get(0) is the - * same as {@link #first()}. - * @throws IndexOutOfBoundsException when the index is negative or >= size */ - public long get (int index) { - if (index < 0) throw new IndexOutOfBoundsException("index can't be < 0: " + index); - if (index >= size) throw new IndexOutOfBoundsException("index can't be >= size: " + index + " >= " + size); - final long[] values = this.values; - - int i = head + index; - if (i >= values.length) { - i -= values.length; - } - return values[i]; - } - - /** Removes all values from this queue. */ - public void clear () { - if (size == 0) return; - - this.head = 0; - this.tail = 0; - this.size = 0; - } - - public String toString () { - if (size == 0) { - return "[]"; - } - final long[] values = this.values; - final int head = this.head; - final int tail = this.tail; - - StringBuilder sb = new StringBuilder(64); - sb.append('['); - sb.append(values[head]); - for (int i = (head + 1) % values.length; i != tail; i = (i + 1) % values.length) { - sb.append(", ").append(values[i]); - } - sb.append(']'); - return sb.toString(); - } - - public String toString (String separator) { - if (size == 0) return ""; - final long[] values = this.values; - final int head = this.head; - final int tail = this.tail; - - StringBuilder sb = new StringBuilder(64); - sb.append(values[head]); - for (int i = (head + 1) % values.length; i != tail; i = (i + 1) % values.length) - sb.append(separator).append(values[i]); - return sb.toString(); - } - - public int hashCode () { - final int size = this.size; - final long[] values = this.values; - final int backingLength = values.length; - int index = this.head; - - int hash = size + 1; - for (int s = 0; s < size; s++) { - final long value = values[index]; - - hash += (int)(value ^ (value >>> 32)) * 31; - - index++; - if (index == backingLength) index = 0; - } - - return hash; - } - - public boolean equals (Object o) { - if (this == o) return true; - if (o == null || !(o instanceof LongQueue)) return false; - - LongQueue q = (LongQueue)o; - final int size = this.size; - - if (q.size != size) return false; - - final long[] myValues = this.values; - final int myBackingLength = myValues.length; - final long[] itsValues = q.values; - final int itsBackingLength = itsValues.length; - - int myIndex = head; - int itsIndex = q.head; - for (int s = 0; s < size; s++) { - if (myValues[myIndex] != itsValues[itsIndex]) return false; - myIndex++; - itsIndex++; - if (myIndex == myBackingLength) myIndex = 0; - if (itsIndex == itsBackingLength) itsIndex = 0; - } - return true; - } - -} diff --git a/gdx/src/com/badlogic/gdx/utils/Null.java b/gdx/src/com/badlogic/gdx/utils/Null.java deleted file mode 100644 index 9ceb4e8ad..000000000 --- a/gdx/src/com/badlogic/gdx/utils/Null.java +++ /dev/null @@ -1,14 +0,0 @@ - -package com.badlogic.gdx.utils; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Target; - -/** An element with this annotation claims that the element may have a {@code null} value. Apart from documentation purposes this - * annotation is intended to be used by static analysis tools to validate against probable runtime errors or contract violations. - * @author maltaisn */ -@Documented -@Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE}) -public @interface Null { -} diff --git a/gdx/test/com/badlogic/gdx/graphics/g3d/utils/AnimationControllerTest.java b/gdx/test/com/badlogic/gdx/graphics/g3d/utils/AnimationControllerTest.java deleted file mode 100644 index 02d3c5eff..000000000 --- a/gdx/test/com/badlogic/gdx/graphics/g3d/utils/AnimationControllerTest.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.badlogic.gdx.graphics.g3d.utils; - -import org.junit.Assert; -import org.junit.Test; - -import com.badlogic.gdx.graphics.g3d.model.NodeKeyframe; -import com.badlogic.gdx.utils.Array; - -public class AnimationControllerTest { - - @Test - public void testGetFirstKeyframeIndexAtTimeNominal(){ - - Array<NodeKeyframe<String>> keyFrames = new Array<NodeKeyframe<String>>(); - - keyFrames.add(new NodeKeyframe<String>(0f, "1st")); - keyFrames.add(new NodeKeyframe<String>(3f, "2nd")); - keyFrames.add(new NodeKeyframe<String>(12f, "3rd")); - keyFrames.add(new NodeKeyframe<String>(13f, "4th")); - - Assert.assertEquals(0, BaseAnimationController.getFirstKeyframeIndexAtTime(keyFrames, -1f)); - Assert.assertEquals(0, BaseAnimationController.getFirstKeyframeIndexAtTime(keyFrames, 0f)); - Assert.assertEquals(0, BaseAnimationController.getFirstKeyframeIndexAtTime(keyFrames, 2f)); - Assert.assertEquals(1, BaseAnimationController.getFirstKeyframeIndexAtTime(keyFrames, 9f)); - Assert.assertEquals(2, BaseAnimationController.getFirstKeyframeIndexAtTime(keyFrames, 12.5f)); - Assert.assertEquals(2, BaseAnimationController.getFirstKeyframeIndexAtTime(keyFrames, 13f)); - Assert.assertEquals(0, BaseAnimationController.getFirstKeyframeIndexAtTime(keyFrames, 14f)); - } - - @Test - public void testGetFirstKeyframeIndexAtTimeSingleKey(){ - - Array<NodeKeyframe<String>> keyFrames = new Array<NodeKeyframe<String>>(); - - keyFrames.add(new NodeKeyframe<String>(10f, "1st")); - - Assert.assertEquals(0, BaseAnimationController.getFirstKeyframeIndexAtTime(keyFrames, 9f)); - Assert.assertEquals(0, BaseAnimationController.getFirstKeyframeIndexAtTime(keyFrames, 10f)); - Assert.assertEquals(0, BaseAnimationController.getFirstKeyframeIndexAtTime(keyFrames, 11f)); - } - - @Test - public void testGetFirstKeyframeIndexAtTimeEmpty(){ - - Array<NodeKeyframe<String>> keyFrames = new Array<NodeKeyframe<String>>(); - - Assert.assertEquals(0, BaseAnimationController.getFirstKeyframeIndexAtTime(keyFrames, 3f)); - } -} diff --git a/gdx/test/com/badlogic/gdx/utils/LongQueueTest.java b/gdx/test/com/badlogic/gdx/utils/LongQueueTest.java deleted file mode 100644 index 631e2f7d0..000000000 --- a/gdx/test/com/badlogic/gdx/utils/LongQueueTest.java +++ /dev/null @@ -1,310 +0,0 @@ - -package com.badlogic.gdx.utils; - -import static org.junit.Assert.*; - -import java.util.Iterator; - -import org.junit.Assert; -import org.junit.Test; - -public class LongQueueTest { - @Test - public void addFirstAndLastTest() { - LongQueue queue = new LongQueue(); - queue.addFirst(1); - queue.addLast(2); - queue.addFirst(3); - queue.addLast(4); - - assertEquals(0, queue.indexOf(3)); - assertEquals(1, queue.indexOf(1)); - assertEquals(2, queue.indexOf(2)); - assertEquals(3, queue.indexOf(4)); - } - - @Test - public void removeLastTest() { - LongQueue queue = new LongQueue(); - queue.addLast(1); - queue.addLast(2); - queue.addLast(3); - queue.addLast(4); - - assertEquals(4, queue.size); - assertEquals(3, queue.indexOf(4)); - assertEquals(4, queue.removeLast()); - - assertEquals(3, queue.size); - assertEquals(2, queue.indexOf(3)); - assertEquals(3, queue.removeLast()); - - assertEquals(2, queue.size); - assertEquals(1, queue.indexOf(2)); - assertEquals(2, queue.removeLast()); - - assertEquals(1, queue.size); - assertEquals(0, queue.indexOf(1)); - assertEquals(1, queue.removeLast()); - - assertEquals(0, queue.size); - } - - @Test - public void removeFirstTest() { - LongQueue queue = new LongQueue(); - queue.addLast(1); - queue.addLast(2); - queue.addLast(3); - queue.addLast(4); - - assertEquals(4, queue.size); - assertEquals(0, queue.indexOf(1)); - assertEquals(1, queue.removeFirst()); - - assertEquals(3, queue.size); - assertEquals(0, queue.indexOf(2)); - assertEquals(2, queue.removeFirst()); - - assertEquals(2, queue.size); - assertEquals(0, queue.indexOf(3)); - assertEquals(3, queue.removeFirst()); - - assertEquals(1, queue.size); - assertEquals(0, queue.indexOf(4)); - assertEquals(4, queue.removeFirst()); - - assertEquals(0, queue.size); - } - - @Test - public void resizableQueueTest () { - final LongQueue q = new LongQueue(8); - - assertTrue("New queue is not empty!", q.size == 0); - - for (int i = 0; i < 100; i++) { - - for (int j = 0; j < i; j++) { - try { - q.addLast(j); - } catch (IllegalStateException e) { - fail("Failed to add element " + j + " (" + i + ")"); - } - final long peeked = q.last(); - assertTrue("peekLast shows " + peeked + ", should be " + j + " (" + i + ")", peeked == j); - final int size = q.size; - assertTrue("Size should be " + (j + 1) + " but is " + size + " (" + i + ")", size == j + 1); - } - - if (i != 0) { - final long peek = q.first(); - assertTrue("First thing is not zero but " + peek + " (" + i + ")", peek == 0); - } - - for (int j = 0; j < i; j++) { - final long pop = q.removeFirst(); - assertTrue("Popped should be " + j + " but is " + pop + " (" + i + ")", pop == j); - - final int size = q.size; - assertTrue("Size should be " + (i - 1 - j) + " but is " + size + " (" + i + ")", size == i - 1 - j); - } - - assertTrue("Not empty after cycle " + i, q.size == 0); - } - - for (int i = 0; i < 56; i++) { - q.addLast(42); - } - q.clear(); - assertTrue("Clear did not clear properly", q.size == 0); - } - - /** Same as resizableQueueTest, but in reverse */ - @Test - public void resizableDequeTest () { - final LongQueue q = new LongQueue(8); - - assertTrue("New deque is not empty!", q.size == 0); - - for (int i = 0; i < 100; i++) { - - for (int j = 0; j < i; j++) { - try { - q.addFirst(j); - } catch (IllegalStateException e) { - fail("Failed to add element " + j + " (" + i + ")"); - } - final long peeked = q.first(); - assertTrue("peek shows " + peeked + ", should be " + j + " (" + i + ")", peeked == j); - final int size = q.size; - assertTrue("Size should be " + (j + 1) + " but is " + size + " (" + i + ")", size == j + 1); - } - - if (i != 0) { - final long peek = q.last(); - assertTrue("Last thing is not zero but " + peek + " (" + i + ")", peek == 0); - } - - for (int j = 0; j < i; j++) { - final long pop = q.removeLast(); - assertTrue("Popped should be " + j + " but is " + pop + " (" + i + ")", pop == j); - - final int size = q.size; - assertTrue("Size should be " + (i - 1 - j) + " but is " + size + " (" + i + ")", size == i - 1 - j); - } - - assertTrue("Not empty after cycle " + i, q.size == 0); - } - - for (int i = 0; i < 56; i++) { - q.addFirst(42); - } - q.clear(); - assertTrue("Clear did not clear properly", q.size == 0); - } - - @Test - public void getTest () { - final LongQueue q = new LongQueue(7); - for (int i = 0; i < 5; i++) { - for (int j = 0; j < 4; j++) { - q.addLast(j); - } - assertEquals("get(0) is not equal to peek (" + i + ")", q.get(0), q.first()); - assertEquals("get(size-1) is not equal to peekLast (" + i + ")", q.get(q.size - 1), q.last()); - for (int j = 0; j < 4; j++) { - assertTrue(q.get(j) == j); - } - for (int j = 0; j < 4 - 1; j++) { - q.removeFirst(); - assertEquals("get(0) is not equal to peek (" + i + ")", q.get(0), q.first()); - } - q.removeFirst(); - assert q.size == 0; // Failing this means broken test - try { - q.get(0); - fail("get() on empty queue did not throw"); - } catch (IndexOutOfBoundsException ignore) { - // Expected - } - } - } - - @Test - public void removeTest () { - final LongQueue q = new LongQueue(); - - // Test head < tail. - for (int j = 0; j <= 6; j++) - q.addLast(j); - assertValues(q, 0, 1, 2, 3, 4, 5, 6); - q.removeIndex(0); - assertValues(q, 1, 2, 3, 4, 5, 6); - q.removeIndex(1); - assertValues(q, 1, 3, 4, 5, 6); - q.removeIndex(4); - assertValues(q, 1, 3, 4, 5); - q.removeIndex(2); - assertValues(q, 1, 3, 5); - - // Test head >= tail and index >= head. - q.clear(); - for (int j = 2; j >= 0; j--) - q.addFirst(j); - for (int j = 3; j <= 6; j++) - q.addLast(j); - assertValues(q, 0, 1, 2, 3, 4, 5, 6); - q.removeIndex(1); - assertValues(q, 0, 2, 3, 4, 5, 6); - q.removeIndex(0); - assertValues(q, 2, 3, 4, 5, 6); - - // Test head >= tail and index < tail. - q.clear(); - for (int j = 2; j >= 0; j--) - q.addFirst(j); - for (int j = 3; j <= 6; j++) - q.addLast(j); - assertValues(q, 0, 1, 2, 3, 4, 5, 6); - q.removeIndex(5); - assertValues(q, 0, 1, 2, 3, 4, 6); - q.removeIndex(5); - assertValues(q, 0, 1, 2, 3, 4); - } - - @Test - public void indexOfTest () { - final LongQueue q = new LongQueue(); - - // Test head < tail. - for (int j = 0; j <= 6; j++) - q.addLast(j); - for (int j = 0; j <= 6; j++) - assertEquals(q.indexOf(j), j); - - // Test head >= tail. - q.clear(); - for (int j = 2; j >= 0; j--) - q.addFirst(j); - for (int j = 3; j <= 6; j++) - q.addLast(j); - for (int j = 0; j <= 6; j++) - assertEquals(q.indexOf(j), j); - } - - @Test - public void toStringTest () { - LongQueue q = new LongQueue(1); - assertTrue(q.toString().equals("[]")); - q.addLast(4); - assertTrue(q.toString().equals("[4]")); - q.addLast(5); - q.addLast(6); - q.addLast(7); - assertTrue(q.toString().equals("[4, 5, 6, 7]")); - } - - @Test - public void hashEqualsTest () { - LongQueue q1 = new LongQueue(); - LongQueue q2 = new LongQueue(); - - assertEqualsAndHash(q1, q2); - q1.addFirst(1); - assertNotEquals(q1, q2); - q2.addFirst(1); - assertEqualsAndHash(q1, q2); - - q1.clear(); - q1.addLast(1); - q1.addLast(2); - q2.addLast(2); - assertEqualsAndHash(q1, q2); - - for (int i = 0; i < 100; i++) { - q1.addLast(i); - q1.addLast(i); - q1.removeFirst(); - - assertNotEquals(q1, q2); - - q2.addLast(i); - q2.addLast(i); - q2.removeFirst(); - - assertEqualsAndHash(q1, q2); - } - } - - private void assertEqualsAndHash (LongQueue q1, LongQueue q2) { - assertEquals(q1, q2); - assertEquals("Hash codes are not equal", q1.hashCode(), q2.hashCode()); - } - - private void assertValues (LongQueue q, long... values) { - for (int i = 0, n = values.length; i < n; i++) { - Assert.assertEquals(values[i], q.get(i)); - } - } -} diff --git a/gdx/test/com/badlogic/gdx/utils/MixedPutRemoveTest.java b/gdx/test/com/badlogic/gdx/utils/MixedPutRemoveTest.java deleted file mode 100644 index 719f057a2..000000000 --- a/gdx/test/com/badlogic/gdx/utils/MixedPutRemoveTest.java +++ /dev/null @@ -1,123 +0,0 @@ -package com.badlogic.gdx.utils; - -import org.junit.Assert; -import org.junit.Test; - -import java.util.HashMap; - -public class MixedPutRemoveTest { - @Test - public void testLongMapPut() { - LongMap<Integer> gdxMap = new LongMap<Integer>(); - HashMap<Long, Integer> jdkMap = new HashMap<Long, Integer>(); - long stateA = 0L, stateB = 1L; - int gdxRepeats = 0, jdkRepeats = 0; - long item; - for (int i = 0; i < 0x100000; i++) { // a million should do - // simple-ish RNG that repeats more than RandomXS128; we want repeats to test behavior - stateA += 0xC6BC279692B5C323L; - item = (stateA ^ stateA >>> 31) * (stateB += 0x9E3779B97F4A7C16L); - item &= item >>> 24; // causes 64-bit state to get crammed into 40 bits, with item biased toward low bit counts - if(gdxMap.put(item, i) != null) gdxRepeats++; - if(jdkMap.put(item, i) != null) jdkRepeats++; - Assert.assertEquals(gdxMap.size, jdkMap.size()); - } - Assert.assertEquals(gdxRepeats, jdkRepeats); - } - @Test - public void testLongMapMix() { - LongMap<Integer> gdxMap = new LongMap<Integer>(); - HashMap<Long, Integer> jdkMap = new HashMap<Long, Integer>(); - long stateA = 0L, stateB = 1L; - int gdxRemovals = 0, jdkRemovals = 0; - long item; - for (int i = 0; i < 0x100000; i++) { // 1 million should do - // simple-ish RNG that repeats more than RandomXS128; we want repeats to test behavior - stateA += 0xC6BC279692B5C323L; - item = (stateA ^ stateA >>> 31) * (stateB += 0x9E3779B97F4A7C16L); - item &= item >>> 24; // causes 64-bit state to get crammed into 40 bits, with item biased toward low bit counts - if(gdxMap.remove(item) == null) gdxMap.put(item, i); - else gdxRemovals++; - if(jdkMap.remove(item) == null) jdkMap.put(item, i); - else jdkRemovals++; - Assert.assertEquals(gdxMap.size, jdkMap.size()); - } - Assert.assertEquals(gdxRemovals, jdkRemovals); - } - @Test - public void testIntMapPut() { - IntMap<Integer> gdxMap = new IntMap<Integer>(); - HashMap<Integer, Integer> jdkMap = new HashMap<Integer, Integer>(); - long stateA = 0L, stateB = 1L, temp; - int gdxRepeats = 0, jdkRepeats = 0; - int item; - for (int i = 0; i < 0x100000; i++) { // 1 million should do - // simple-ish RNG that repeats more than RandomXS128; we want repeats to test behavior - stateA += 0xC6BC279692B5C323L; - temp = (stateA ^ stateA >>> 31) * (stateB += 0x9E3779B97F4A7C16L); - item = (int)(temp & temp >>> 24); // causes 64-bit state to get crammed into 32 bits, with item biased toward low bit counts - if(gdxMap.put(item, i) != null) gdxRepeats++; - if(jdkMap.put(item, i) != null) jdkRepeats++; - Assert.assertEquals(gdxMap.size, jdkMap.size()); - } - Assert.assertEquals(gdxRepeats, jdkRepeats); - } - @Test - public void testIntMapMix() { - IntMap<Integer> gdxMap = new IntMap<Integer>(); - HashMap<Integer, Integer> jdkMap = new HashMap<Integer, Integer>(); - long stateA = 0L, stateB = 1L, temp; - int gdxRemovals = 0, jdkRemovals = 0; - int item; - for (int i = 0; i < 0x100000; i++) { // 1 million should do - // simple-ish RNG that repeats more than RandomXS128; we want repeats to test behavior - stateA += 0xC6BC279692B5C323L; - temp = (stateA ^ stateA >>> 31) * (stateB += 0x9E3779B97F4A7C16L); - item = (int)(temp & temp >>> 24); // causes 64-bit state to get crammed into 32 bits, with item biased toward low bit counts - if(gdxMap.remove(item) == null) gdxMap.put(item, i); - else gdxRemovals++; - if(jdkMap.remove(item) == null) jdkMap.put(item, i); - else jdkRemovals++; - Assert.assertEquals(gdxMap.size, jdkMap.size()); - } - Assert.assertEquals(gdxRemovals, jdkRemovals); - } - @Test - public void testObjectMapPut() { - ObjectMap<Integer, Integer> gdxMap = new ObjectMap<Integer, Integer>(); - HashMap<Integer, Integer> jdkMap = new HashMap<Integer, Integer>(); - long stateA = 0L, stateB = 1L, temp; - int gdxRepeats = 0, jdkRepeats = 0; - int item; - for (int i = 0; i < 0x100000; i++) { // 1 million should do - // simple-ish RNG that repeats more than RandomXS128; we want repeats to test behavior - stateA += 0xC6BC279692B5C323L; - temp = (stateA ^ stateA >>> 31) * (stateB += 0x9E3779B97F4A7C16L); - item = (int)(temp & temp >>> 24); // causes 64-bit state to get crammed into 32 bits, with item biased toward low bit counts - if(gdxMap.put(item, i) != null) gdxRepeats++; - if(jdkMap.put(item, i) != null) jdkRepeats++; - Assert.assertEquals(gdxMap.size, jdkMap.size()); - } - Assert.assertEquals(gdxRepeats, jdkRepeats); - } - @Test - public void testObjectMapMix() { - ObjectMap<Integer, Integer> gdxMap = new ObjectMap<Integer, Integer>(); - HashMap<Integer, Integer> jdkMap = new HashMap<Integer, Integer>(); - long stateA = 0L, stateB = 1L, temp; - int gdxRemovals = 0, jdkRemovals = 0; - int item; - for (int i = 0; i < 0x100000; i++) { // 1 million should do - // simple-ish RNG that repeats more than RandomXS128; we want repeats to test behavior - stateA += 0xC6BC279692B5C323L; - temp = (stateA ^ stateA >>> 31) * (stateB += 0x9E3779B97F4A7C16L); - item = (int)(temp & temp >>> 24); // causes 64-bit state to get crammed into 32 bits, with item biased toward low bit counts - if(gdxMap.remove(item) == null) gdxMap.put(item, i); - else gdxRemovals++; - if(jdkMap.remove(item) == null) jdkMap.put(item, i); - else jdkRemovals++; - Assert.assertEquals(gdxMap.size, jdkMap.size()); - } - Assert.assertEquals(gdxRemovals, jdkRemovals); - } -} diff --git a/tests/gdx-tests-android/assets/data/60bpm.mp3 b/tests/gdx-tests-android/assets/data/60bpm.mp3 deleted file mode 100644 index 54fa8f782..000000000 Binary files a/tests/gdx-tests-android/assets/data/60bpm.mp3 and /dev/null differ diff --git a/tests/gdx-tests-android/assets/data/badlogic-with-whitespace.png b/tests/gdx-tests-android/assets/data/badlogic-with-whitespace.png deleted file mode 100644 index 7a62077e9..000000000 Binary files a/tests/gdx-tests-android/assets/data/badlogic-with-whitespace.png and /dev/null differ diff --git a/tests/gdx-tests-android/assets/data/maps/tiled-animations/Start.bmp b/tests/gdx-tests-android/assets/data/maps/tiled-animations/Start.bmp deleted file mode 100644 index 820fd1a43..000000000 Binary files a/tests/gdx-tests-android/assets/data/maps/tiled-animations/Start.bmp and /dev/null differ diff --git a/tests/gdx-tests-android/assets/data/maps/tiled-animations/test-load-animations.tmx b/tests/gdx-tests-android/assets/data/maps/tiled-animations/test-load-animations.tmx deleted file mode 100644 index fd40bc474..000000000 --- a/tests/gdx-tests-android/assets/data/maps/tiled-animations/test-load-animations.tmx +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<map version="1.0" orientation="orthogonal" renderorder="right-down" width="16" height="16" tilewidth="32" tileheight="32" nextobjectid="18"> - <tileset firstgid="1" name="Test" tilewidth="256" tileheight="256" tilecount="3" columns="0"> - <tile id="0"> - <image width="32" height="32" source="Start.bmp"/> - <animation> - <frame tileid="0" duration="500"/> - <frame tileid="1" duration="500"/> - </animation> - </tile> - <tile id="1"> - <image width="32" height="32" source="../../badlogicsmall.jpg"/> - </tile> - <tile id="2"> - <image width="256" height="256" source="../../badlogic.jpg"/> - </tile> - <tile id="3"> - <image width="32" height="32" source="Start.bmp"/> - <animation> - <frame tileid="0" duration="200"/> - <frame tileid="1" duration="200"/> - </animation> - </tile> - </tileset> - <objectgroup name="Objects"> - <object id="3" name="Ellipse" x="59.3333" y="335" width="130" height="87"> - <ellipse/> - </object> - <object id="5" name="Polygon" x="238.667" y="351.333"> - <polygon points="0,0 78,-4 32,73"/> - </object> - <object id="9" name="Rectangle" x="340" y="341.333" width="118.667" height="100"/> - <object id="12" name="Texture" gid="4" x="128" y="298.667" width="256" height="33.667"/> - <object id="14" gid="1073741825" x="384" y="256" width="64" height="32"/> - <object id="17" name="Polyline" x="364" y="155"> - <polyline points="0,0 29,-60 57,4 91,-63"/> - </object> - </objectgroup> -</map> diff --git a/tests/gdx-tests-android/assets/data/maps/tiled-groups/test.tmx b/tests/gdx-tests-android/assets/data/maps/tiled-groups/test.tmx deleted file mode 100644 index 4df554c12..000000000 --- a/tests/gdx-tests-android/assets/data/maps/tiled-groups/test.tmx +++ /dev/null @@ -1,103 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<map version="1.2" tiledversion="1.2.3" orientation="orthogonal" renderorder="right-down" width="20" height="14" tilewidth="30" tileheight="30" infinite="0" nextlayerid="17" nextobjectid="2"> - <properties> - <property name="atlas" value="tileset/packed.atlas"/> - </properties> - <tileset firstgid="1" name="default" tilewidth="30" tileheight="30" tilecount="0" columns="16"> - <image source="tilesets/packed.png" trans="ff00ff" width="480" height="960"/> - </tileset> - <layer id="1" name="Layer 1" width="20" height="14"> - <data encoding="csv"> -17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, -17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, -17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, -17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, -17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, -17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, -17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, -17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, -17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, -17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, -17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, -17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, -17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, -17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17 -</data> - </layer> - <group id="2" name="Group 1"> - <layer id="3" name="Group 1 Layer 2" width="20" height="14"> - <data encoding="csv"> -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,53,54,55,56,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -</data> - </layer> - <layer id="4" name="Group 1 Layer 1" width="20" height="14"> - <data encoding="csv"> -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,37,38,39,40,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -</data> - </layer> - <group id="5" name="Group 2"> - <layer id="6" name="Group 2 Layer 2" width="20" height="14"> - <data encoding="csv"> -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,53,54,55,56,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -</data> - </layer> - <layer id="7" name="Group 2 Layer 1" width="20" height="14"> - <data encoding="csv"> -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,37,38,39,40,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -</data> - </layer> - </group> - </group> -</map> diff --git a/tests/gdx-tests-android/assets/data/maps/tiled-groups/tileset/packed.atlas b/tests/gdx-tests-android/assets/data/maps/tiled-groups/tileset/packed.atlas deleted file mode 100644 index 6bd423468..000000000 --- a/tests/gdx-tests-android/assets/data/maps/tiled-groups/tileset/packed.atlas +++ /dev/null @@ -1,76 +0,0 @@ - -packed.png -size: 256,32 -format: RGBA8888 -filter: Linear,Linear -repeat: none -default - rotate: false - xy: 1, 1 - size: 30, 30 - orig: 30, 30 - offset: 0, 0 - index: 0 -default - rotate: false - xy: 33, 1 - size: 30, 30 - orig: 30, 30 - offset: 0, 0 - index: 16 -default - rotate: false - xy: 65, 1 - size: 30, 30 - orig: 30, 30 - offset: 0, 0 - index: 36 -default - rotate: false - xy: 97, 1 - size: 30, 30 - orig: 30, 30 - offset: 0, 0 - index: 37 -default - rotate: false - xy: 97, 1 - size: 30, 30 - orig: 30, 30 - offset: 0, 0 - index: 38 -default - rotate: false - xy: 129, 1 - size: 30, 30 - orig: 30, 30 - offset: 0, 0 - index: 39 -default - rotate: false - xy: 161, 1 - size: 30, 30 - orig: 30, 30 - offset: 0, 0 - index: 52 -default - rotate: false - xy: 193, 1 - size: 30, 30 - orig: 30, 30 - offset: 0, 0 - index: 53 -default - rotate: false - xy: 193, 1 - size: 30, 30 - orig: 30, 30 - offset: 0, 0 - index: 54 -default - rotate: false - xy: 225, 1 - size: 30, 30 - orig: 30, 30 - offset: 0, 0 - index: 55 diff --git a/tests/gdx-tests-android/assets/data/maps/tiled-groups/tileset/packed.png b/tests/gdx-tests-android/assets/data/maps/tiled-groups/tileset/packed.png deleted file mode 100644 index dd26e609b..000000000 Binary files a/tests/gdx-tests-android/assets/data/maps/tiled-groups/tileset/packed.png and /dev/null differ diff --git a/tests/gdx-tests-android/assets/data/shaders/instanced-rendering.frag b/tests/gdx-tests-android/assets/data/shaders/instanced-rendering.frag deleted file mode 100644 index dda08d964..000000000 --- a/tests/gdx-tests-android/assets/data/shaders/instanced-rendering.frag +++ /dev/null @@ -1,12 +0,0 @@ -#version 300 es - -precision mediump float; - -in vec4 v_color; - -out vec4 FragColor; - - -void main () { - FragColor = v_color; -} diff --git a/tests/gdx-tests-android/assets/data/shaders/instanced-rendering.vert b/tests/gdx-tests-android/assets/data/shaders/instanced-rendering.vert deleted file mode 100644 index ceeb26331..000000000 --- a/tests/gdx-tests-android/assets/data/shaders/instanced-rendering.vert +++ /dev/null @@ -1,12 +0,0 @@ -#version 300 es - -in vec4 a_position; -in vec2 i_offset; -in vec4 i_color; - -out vec4 v_color; - -void main () { - v_color = i_color; - gl_Position = a_position + vec4(i_offset, 0.0, 0.0); -} diff --git a/tests/gdx-tests-android/assets/data/textfield.9.png b/tests/gdx-tests-android/assets/data/textfield.9.png deleted file mode 100644 index cb8ad314f..000000000 Binary files a/tests/gdx-tests-android/assets/data/textfield.9.png and /dev/null differ