summaryrefslogtreecommitdiff
path: root/ThirdParty/freetype/include
diff options
context:
space:
mode:
Diffstat (limited to 'ThirdParty/freetype/include')
-rw-r--r--ThirdParty/freetype/include/freetype/config/ftconfig.h532
-rw-r--r--ThirdParty/freetype/include/freetype/config/ftheader.h64
-rw-r--r--ThirdParty/freetype/include/freetype/config/ftmodule.h8
-rw-r--r--ThirdParty/freetype/include/freetype/config/ftoption.h85
-rw-r--r--ThirdParty/freetype/include/freetype/config/ftstdlib.h2
-rw-r--r--ThirdParty/freetype/include/freetype/config/integer-types.h245
-rw-r--r--ThirdParty/freetype/include/freetype/config/mac-support.h49
-rw-r--r--ThirdParty/freetype/include/freetype/config/public-macros.h120
-rw-r--r--ThirdParty/freetype/include/freetype/freetype.h387
-rw-r--r--ThirdParty/freetype/include/freetype/ftadvanc.h6
-rw-r--r--ThirdParty/freetype/include/freetype/ftbbox.h5
-rw-r--r--ThirdParty/freetype/include/freetype/ftbdf.h5
-rw-r--r--ThirdParty/freetype/include/freetype/ftbitmap.h7
-rw-r--r--ThirdParty/freetype/include/freetype/ftbzip2.h24
-rw-r--r--ThirdParty/freetype/include/freetype/ftcache.h9
-rw-r--r--ThirdParty/freetype/include/freetype/ftchapters.h2
-rw-r--r--ThirdParty/freetype/include/freetype/ftcid.h5
-rw-r--r--ThirdParty/freetype/include/freetype/ftcolor.h1316
-rw-r--r--ThirdParty/freetype/include/freetype/ftdriver.h83
-rw-r--r--ThirdParty/freetype/include/freetype/fterrdef.h2
-rw-r--r--ThirdParty/freetype/include/freetype/fterrors.h29
-rw-r--r--ThirdParty/freetype/include/freetype/ftfntfmt.h5
-rw-r--r--ThirdParty/freetype/include/freetype/ftgasp.h5
-rw-r--r--ThirdParty/freetype/include/freetype/ftglyph.h7
-rw-r--r--ThirdParty/freetype/include/freetype/ftgxval.h5
-rw-r--r--ThirdParty/freetype/include/freetype/ftgzip.h24
-rw-r--r--ThirdParty/freetype/include/freetype/ftimage.h150
-rw-r--r--ThirdParty/freetype/include/freetype/ftincrem.h22
-rw-r--r--ThirdParty/freetype/include/freetype/ftlcdfil.h51
-rw-r--r--ThirdParty/freetype/include/freetype/ftlist.h5
-rw-r--r--ThirdParty/freetype/include/freetype/ftlogging.h184
-rw-r--r--ThirdParty/freetype/include/freetype/ftlzw.h24
-rw-r--r--ThirdParty/freetype/include/freetype/ftmac.h3
-rw-r--r--ThirdParty/freetype/include/freetype/ftmm.h5
-rw-r--r--ThirdParty/freetype/include/freetype/ftmodapi.h41
-rw-r--r--ThirdParty/freetype/include/freetype/ftmoderr.h5
-rw-r--r--ThirdParty/freetype/include/freetype/ftotval.h5
-rw-r--r--ThirdParty/freetype/include/freetype/ftoutln.h21
-rw-r--r--ThirdParty/freetype/include/freetype/ftparams.h5
-rw-r--r--ThirdParty/freetype/include/freetype/ftpfr.h5
-rw-r--r--ThirdParty/freetype/include/freetype/ftrender.h7
-rw-r--r--ThirdParty/freetype/include/freetype/ftsizes.h5
-rw-r--r--ThirdParty/freetype/include/freetype/ftsnames.h7
-rw-r--r--ThirdParty/freetype/include/freetype/ftstroke.h43
-rw-r--r--ThirdParty/freetype/include/freetype/ftsynth.h5
-rw-r--r--ThirdParty/freetype/include/freetype/ftsystem.h3
-rw-r--r--ThirdParty/freetype/include/freetype/fttrigon.h4
-rw-r--r--ThirdParty/freetype/include/freetype/fttypes.h6
-rw-r--r--ThirdParty/freetype/include/freetype/ftwinfnt.h7
-rw-r--r--ThirdParty/freetype/include/freetype/internal/autohint.h232
-rw-r--r--ThirdParty/freetype/include/freetype/internal/cffotypes.h108
-rw-r--r--ThirdParty/freetype/include/freetype/internal/cfftypes.h417
-rw-r--r--ThirdParty/freetype/include/freetype/internal/ftcalc.h510
-rw-r--r--ThirdParty/freetype/include/freetype/internal/ftdebug.h283
-rw-r--r--ThirdParty/freetype/include/freetype/internal/ftdrv.h288
-rw-r--r--ThirdParty/freetype/include/freetype/internal/ftgloadr.h149
-rw-r--r--ThirdParty/freetype/include/freetype/internal/fthash.h136
-rw-r--r--ThirdParty/freetype/include/freetype/internal/ftmemory.h392
-rw-r--r--ThirdParty/freetype/include/freetype/internal/ftobjs.h1236
-rw-r--r--ThirdParty/freetype/include/freetype/internal/ftpsprop.h48
-rw-r--r--ThirdParty/freetype/include/freetype/internal/ftrfork.h246
-rw-r--r--ThirdParty/freetype/include/freetype/internal/ftserv.h521
-rw-r--r--ThirdParty/freetype/include/freetype/internal/ftstream.h561
-rw-r--r--ThirdParty/freetype/include/freetype/internal/fttrace.h156
-rw-r--r--ThirdParty/freetype/include/freetype/internal/ftvalid.h159
-rw-r--r--ThirdParty/freetype/include/freetype/internal/internal.h66
-rw-r--r--ThirdParty/freetype/include/freetype/internal/psaux.h1439
-rw-r--r--ThirdParty/freetype/include/freetype/internal/pshints.h700
-rw-r--r--ThirdParty/freetype/include/freetype/internal/services/svbdf.h66
-rw-r--r--ThirdParty/freetype/include/freetype/internal/services/svcfftl.h90
-rw-r--r--ThirdParty/freetype/include/freetype/internal/services/svcid.h69
-rw-r--r--ThirdParty/freetype/include/freetype/internal/services/svfntfmt.h55
-rw-r--r--ThirdParty/freetype/include/freetype/internal/services/svgldict.h72
-rw-r--r--ThirdParty/freetype/include/freetype/internal/services/svgxval.h72
-rw-r--r--ThirdParty/freetype/include/freetype/internal/services/svkern.h51
-rw-r--r--ThirdParty/freetype/include/freetype/internal/services/svmetric.h125
-rw-r--r--ThirdParty/freetype/include/freetype/internal/services/svmm.h156
-rw-r--r--ThirdParty/freetype/include/freetype/internal/services/svotval.h55
-rw-r--r--ThirdParty/freetype/include/freetype/internal/services/svpfr.h66
-rw-r--r--ThirdParty/freetype/include/freetype/internal/services/svpostnm.h65
-rw-r--r--ThirdParty/freetype/include/freetype/internal/services/svprop.h66
-rw-r--r--ThirdParty/freetype/include/freetype/internal/services/svpscmap.h145
-rw-r--r--ThirdParty/freetype/include/freetype/internal/services/svpsinfo.h86
-rw-r--r--ThirdParty/freetype/include/freetype/internal/services/svsfnt.h88
-rw-r--r--ThirdParty/freetype/include/freetype/internal/services/svttcmap.h90
-rw-r--r--ThirdParty/freetype/include/freetype/internal/services/svtteng.h53
-rw-r--r--ThirdParty/freetype/include/freetype/internal/services/svttglyf.h56
-rw-r--r--ThirdParty/freetype/include/freetype/internal/services/svwinfnt.h50
-rw-r--r--ThirdParty/freetype/include/freetype/internal/sfnt.h875
-rw-r--r--ThirdParty/freetype/include/freetype/internal/t1types.h260
-rw-r--r--ThirdParty/freetype/include/freetype/internal/tttypes.h1854
-rw-r--r--ThirdParty/freetype/include/freetype/t1tables.h5
-rw-r--r--ThirdParty/freetype/include/freetype/ttnameid.h3
-rw-r--r--ThirdParty/freetype/include/freetype/tttables.h5
-rw-r--r--ThirdParty/freetype/include/freetype/tttags.h6
-rw-r--r--ThirdParty/freetype/include/ft2build.h10
96 files changed, 2518 insertions, 13367 deletions
diff --git a/ThirdParty/freetype/include/freetype/config/ftconfig.h b/ThirdParty/freetype/include/freetype/config/ftconfig.h
index 9466603..65effcb 100644
--- a/ThirdParty/freetype/include/freetype/config/ftconfig.h
+++ b/ThirdParty/freetype/include/freetype/config/ftconfig.h
@@ -4,7 +4,7 @@
*
* ANSI-specific configuration file (specification only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -41,533 +41,9 @@
#include FT_CONFIG_OPTIONS_H
#include FT_CONFIG_STANDARD_LIBRARY_H
-
-FT_BEGIN_HEADER
-
-
- /**************************************************************************
- *
- * PLATFORM-SPECIFIC CONFIGURATION MACROS
- *
- * These macros can be toggled to suit a specific system. The current ones
- * are defaults used to compile FreeType in an ANSI C environment (16bit
- * compilers are also supported). Copy this file to your own
- * `builds/<system>` directory, and edit it to port the engine.
- *
- */
-
-
- /* There are systems (like the Texas Instruments 'C54x) where a `char` */
- /* has 16~bits. ANSI~C says that `sizeof(char)` is always~1. Since an */
- /* `int` has 16~bits also for this system, `sizeof(int)` gives~1 which */
- /* is probably unexpected. */
- /* */
- /* `CHAR_BIT` (defined in `limits.h`) gives the number of bits in a */
- /* `char` type. */
-
-#ifndef FT_CHAR_BIT
-#define FT_CHAR_BIT CHAR_BIT
-#endif
-
-
- /* The size of an `int` type. */
-#if FT_UINT_MAX == 0xFFFFUL
-#define FT_SIZEOF_INT ( 16 / FT_CHAR_BIT )
-#elif FT_UINT_MAX == 0xFFFFFFFFUL
-#define FT_SIZEOF_INT ( 32 / FT_CHAR_BIT )
-#elif FT_UINT_MAX > 0xFFFFFFFFUL && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFUL
-#define FT_SIZEOF_INT ( 64 / FT_CHAR_BIT )
-#else
-#error "Unsupported size of `int' type!"
-#endif
-
- /* The size of a `long` type. A five-byte `long` (as used e.g. on the */
- /* DM642) is recognized but avoided. */
-#if FT_ULONG_MAX == 0xFFFFFFFFUL
-#define FT_SIZEOF_LONG ( 32 / FT_CHAR_BIT )
-#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL
-#define FT_SIZEOF_LONG ( 32 / FT_CHAR_BIT )
-#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL
-#define FT_SIZEOF_LONG ( 64 / FT_CHAR_BIT )
-#else
-#error "Unsupported size of `long' type!"
-#endif
-
-
- /* `FT_UNUSED` indicates that a given parameter is not used -- */
- /* this is only used to get rid of unpleasant compiler warnings. */
-#ifndef FT_UNUSED
-#define FT_UNUSED( arg ) ( (arg) = (arg) )
-#endif
-
-
- /**************************************************************************
- *
- * AUTOMATIC CONFIGURATION MACROS
- *
- * These macros are computed from the ones defined above. Don't touch
- * their definition, unless you know precisely what you are doing. No
- * porter should need to mess with them.
- *
- */
-
-
- /**************************************************************************
- *
- * Mac support
- *
- * This is the only necessary change, so it is defined here instead
- * providing a new configuration file.
- */
-#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) )
- /* No Carbon frameworks for 64bit 10.4.x. */
- /* `AvailabilityMacros.h` is available since Mac OS X 10.2, */
- /* so guess the system version by maximum errno before inclusion. */
-#include <errno.h>
-#ifdef ECANCELED /* defined since 10.2 */
-#include "AvailabilityMacros.h"
-#endif
-#if defined( __LP64__ ) && \
- ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
-#undef FT_MACINTOSH
-#endif
-
-#elif defined( __SC__ ) || defined( __MRC__ )
- /* Classic MacOS compilers */
-#include "ConditionalMacros.h"
-#if TARGET_OS_MAC
-#define FT_MACINTOSH 1
-#endif
-
-#endif
-
-
- /* Fix compiler warning with sgi compiler. */
-#if defined( __sgi ) && !defined( __GNUC__ )
-#if defined( _COMPILER_VERSION ) && ( _COMPILER_VERSION >= 730 )
-#pragma set woff 3505
-#endif
-#endif
-
-
- /**************************************************************************
- *
- * @section:
- * basic_types
- *
- */
-
-
- /**************************************************************************
- *
- * @type:
- * FT_Int16
- *
- * @description:
- * A typedef for a 16bit signed integer type.
- */
- typedef signed short FT_Int16;
-
-
- /**************************************************************************
- *
- * @type:
- * FT_UInt16
- *
- * @description:
- * A typedef for a 16bit unsigned integer type.
- */
- typedef unsigned short FT_UInt16;
-
- /* */
-
-
- /* this #if 0 ... #endif clause is for documentation purposes */
-#if 0
-
- /**************************************************************************
- *
- * @type:
- * FT_Int32
- *
- * @description:
- * A typedef for a 32bit signed integer type. The size depends on the
- * configuration.
- */
- typedef signed XXX FT_Int32;
-
-
- /**************************************************************************
- *
- * @type:
- * FT_UInt32
- *
- * A typedef for a 32bit unsigned integer type. The size depends on the
- * configuration.
- */
- typedef unsigned XXX FT_UInt32;
-
-
- /**************************************************************************
- *
- * @type:
- * FT_Int64
- *
- * A typedef for a 64bit signed integer type. The size depends on the
- * configuration. Only defined if there is real 64bit support;
- * otherwise, it gets emulated with a structure (if necessary).
- */
- typedef signed XXX FT_Int64;
-
-
- /**************************************************************************
- *
- * @type:
- * FT_UInt64
- *
- * A typedef for a 64bit unsigned integer type. The size depends on the
- * configuration. Only defined if there is real 64bit support;
- * otherwise, it gets emulated with a structure (if necessary).
- */
- typedef unsigned XXX FT_UInt64;
-
- /* */
-
-#endif
-
-#if FT_SIZEOF_INT == ( 32 / FT_CHAR_BIT )
-
- typedef signed int FT_Int32;
- typedef unsigned int FT_UInt32;
-
-#elif FT_SIZEOF_LONG == ( 32 / FT_CHAR_BIT )
-
- typedef signed long FT_Int32;
- typedef unsigned long FT_UInt32;
-
-#else
-#error "no 32bit type found -- please check your configuration files"
-#endif
-
-
- /* look up an integer type that is at least 32~bits */
-#if FT_SIZEOF_INT >= ( 32 / FT_CHAR_BIT )
-
- typedef int FT_Fast;
- typedef unsigned int FT_UFast;
-
-#elif FT_SIZEOF_LONG >= ( 32 / FT_CHAR_BIT )
-
- typedef long FT_Fast;
- typedef unsigned long FT_UFast;
-
-#endif
-
-
- /* determine whether we have a 64-bit `int` type for platforms without */
- /* Autoconf */
-#if FT_SIZEOF_LONG == ( 64 / FT_CHAR_BIT )
-
- /* `FT_LONG64` must be defined if a 64-bit type is available */
-#define FT_LONG64
-#define FT_INT64 long
-#define FT_UINT64 unsigned long
-
- /**************************************************************************
- *
- * A 64-bit data type may create compilation problems if you compile in
- * strict ANSI mode. To avoid them, we disable other 64-bit data types if
- * `__STDC__` is defined. You can however ignore this rule by defining the
- * `FT_CONFIG_OPTION_FORCE_INT64` configuration macro.
- */
-#elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 )
-
-#if defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L
-
-#define FT_LONG64
-#define FT_INT64 long long int
-#define FT_UINT64 unsigned long long int
-
-#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
-
- /* this compiler provides the `__int64` type */
-#define FT_LONG64
-#define FT_INT64 __int64
-#define FT_UINT64 unsigned __int64
-
-#elif defined( __BORLANDC__ ) /* Borland C++ */
-
- /* XXXX: We should probably check the value of `__BORLANDC__` in order */
- /* to test the compiler version. */
-
- /* this compiler provides the `__int64` type */
-#define FT_LONG64
-#define FT_INT64 __int64
-#define FT_UINT64 unsigned __int64
-
-#elif defined( __WATCOMC__ ) /* Watcom C++ */
-
- /* Watcom doesn't provide 64-bit data types */
-
-#elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */
-
-#define FT_LONG64
-#define FT_INT64 long long int
-#define FT_UINT64 unsigned long long int
-
-#elif defined( __GNUC__ )
-
- /* GCC provides the `long long` type */
-#define FT_LONG64
-#define FT_INT64 long long int
-#define FT_UINT64 unsigned long long int
-
-#endif /* __STDC_VERSION__ >= 199901L */
-
-#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */
-
-#ifdef FT_LONG64
- typedef FT_INT64 FT_Int64;
- typedef FT_UINT64 FT_UInt64;
-#endif
-
-
-#ifdef _WIN64
- /* only 64bit Windows uses the LLP64 data model, i.e., */
- /* 32bit integers, 64bit pointers */
-#define FT_UINT_TO_POINTER( x ) (void*)(unsigned __int64)(x)
-#else
-#define FT_UINT_TO_POINTER( x ) (void*)(unsigned long)(x)
-#endif
-
-
- /**************************************************************************
- *
- * miscellaneous
- *
- */
-
-
-#define FT_BEGIN_STMNT do {
-#define FT_END_STMNT } while ( 0 )
-#define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT
-
-
- /* `typeof` condition taken from gnulib's `intprops.h` header file */
-#if ( ( defined( __GNUC__ ) && __GNUC__ >= 2 ) || \
- ( defined( __IBMC__ ) && __IBMC__ >= 1210 && \
- defined( __IBM__TYPEOF__ ) ) || \
- ( defined( __SUNPRO_C ) && __SUNPRO_C >= 0x5110 && !__STDC__ ) )
-#define FT_TYPEOF( type ) ( __typeof__ ( type ) )
-#else
-#define FT_TYPEOF( type ) /* empty */
-#endif
-
-
- /* Use `FT_LOCAL` and `FT_LOCAL_DEF` to declare and define, */
- /* respectively, a function that gets used only within the scope of a */
- /* module. Normally, both the header and source code files for such a */
- /* function are within a single module directory. */
- /* */
- /* Intra-module arrays should be tagged with `FT_LOCAL_ARRAY` and */
- /* `FT_LOCAL_ARRAY_DEF`. */
- /* */
-#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
-
-#define FT_LOCAL( x ) static x
-#define FT_LOCAL_DEF( x ) static x
-
-#else
-
-#ifdef __cplusplus
-#define FT_LOCAL( x ) extern "C" x
-#define FT_LOCAL_DEF( x ) extern "C" x
-#else
-#define FT_LOCAL( x ) extern x
-#define FT_LOCAL_DEF( x ) x
-#endif
-
-#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
-
-#define FT_LOCAL_ARRAY( x ) extern const x
-#define FT_LOCAL_ARRAY_DEF( x ) const x
-
-
- /* Use `FT_BASE` and `FT_BASE_DEF` to declare and define, respectively, */
- /* functions that are used in more than a single module. In the */
- /* current setup this implies that the declaration is in a header file */
- /* in the `include/freetype/internal` directory, and the function body */
- /* is in a file in `src/base`. */
- /* */
-#ifndef FT_BASE
-
-#ifdef __cplusplus
-#define FT_BASE( x ) extern "C" x
-#else
-#define FT_BASE( x ) extern x
-#endif
-
-#endif /* !FT_BASE */
-
-
-#ifndef FT_BASE_DEF
-
-#ifdef __cplusplus
-#define FT_BASE_DEF( x ) x
-#else
-#define FT_BASE_DEF( x ) x
-#endif
-
-#endif /* !FT_BASE_DEF */
-
-
- /* When compiling FreeType as a DLL or DSO with hidden visibility */
- /* some systems/compilers need a special attribute in front OR after */
- /* the return type of function declarations. */
- /* */
- /* Two macros are used within the FreeType source code to define */
- /* exported library functions: `FT_EXPORT` and `FT_EXPORT_DEF`. */
- /* */
- /* - `FT_EXPORT( return_type )` */
- /* */
- /* is used in a function declaration, as in */
- /* */
- /* ``` */
- /* FT_EXPORT( FT_Error ) */
- /* FT_Init_FreeType( FT_Library* alibrary ); */
- /* ``` */
- /* */
- /* - `FT_EXPORT_DEF( return_type )` */
- /* */
- /* is used in a function definition, as in */
- /* */
- /* ``` */
- /* FT_EXPORT_DEF( FT_Error ) */
- /* FT_Init_FreeType( FT_Library* alibrary ) */
- /* { */
- /* ... some code ... */
- /* return FT_Err_Ok; */
- /* } */
- /* ``` */
- /* */
- /* You can provide your own implementation of `FT_EXPORT` and */
- /* `FT_EXPORT_DEF` here if you want. */
- /* */
- /* To export a variable, use `FT_EXPORT_VAR`. */
- /* */
-#ifndef FT_EXPORT
-
-#ifdef FT2_BUILD_LIBRARY
-
-#if defined( _WIN32 ) && defined( DLL_EXPORT )
-#define FT_EXPORT( x ) __declspec( dllexport ) x
-#elif defined( __GNUC__ ) && __GNUC__ >= 4
-#define FT_EXPORT( x ) __attribute__(( visibility( "default" ) )) x
-#elif defined( __SUNPRO_C ) && __SUNPRO_C >= 0x550
-#define FT_EXPORT( x ) __global x
-#elif defined( __cplusplus )
-#define FT_EXPORT( x ) extern "C" x
-#else
-#define FT_EXPORT( x ) extern x
-#endif
-
-#else
-
-#if defined( _WIN32 ) && defined( DLL_IMPORT )
-#define FT_EXPORT( x ) __declspec( dllimport ) x
-#elif defined( __cplusplus )
-#define FT_EXPORT( x ) extern "C" x
-#else
-#define FT_EXPORT( x ) extern x
-#endif
-
-#endif
-
-#endif /* !FT_EXPORT */
-
-
-#ifndef FT_EXPORT_DEF
-
-#ifdef __cplusplus
-#define FT_EXPORT_DEF( x ) extern "C" x
-#else
-#define FT_EXPORT_DEF( x ) extern x
-#endif
-
-#endif /* !FT_EXPORT_DEF */
-
-
-#ifndef FT_EXPORT_VAR
-
-#ifdef __cplusplus
-#define FT_EXPORT_VAR( x ) extern "C" x
-#else
-#define FT_EXPORT_VAR( x ) extern x
-#endif
-
-#endif /* !FT_EXPORT_VAR */
-
-
- /* The following macros are needed to compile the library with a */
- /* C++ compiler and with 16bit compilers. */
- /* */
-
- /* This is special. Within C++, you must specify `extern "C"` for */
- /* functions which are used via function pointers, and you also */
- /* must do that for structures which contain function pointers to */
- /* assure C linkage -- it's not possible to have (local) anonymous */
- /* functions which are accessed by (global) function pointers. */
- /* */
- /* */
- /* FT_CALLBACK_DEF is used to _define_ a callback function, */
- /* located in the same source code file as the structure that uses */
- /* it. */
- /* */
- /* FT_BASE_CALLBACK and FT_BASE_CALLBACK_DEF are used to declare */
- /* and define a callback function, respectively, in a similar way */
- /* as FT_BASE and FT_BASE_DEF work. */
- /* */
- /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
- /* contains pointers to callback functions. */
- /* */
- /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable */
- /* that contains pointers to callback functions. */
- /* */
- /* */
- /* Some 16bit compilers have to redefine these macros to insert */
- /* the infamous `_cdecl` or `__fastcall` declarations. */
- /* */
-#ifndef FT_CALLBACK_DEF
-#ifdef __cplusplus
-#define FT_CALLBACK_DEF( x ) extern "C" x
-#else
-#define FT_CALLBACK_DEF( x ) static x
-#endif
-#endif /* FT_CALLBACK_DEF */
-
-#ifndef FT_BASE_CALLBACK
-#ifdef __cplusplus
-#define FT_BASE_CALLBACK( x ) extern "C" x
-#define FT_BASE_CALLBACK_DEF( x ) extern "C" x
-#else
-#define FT_BASE_CALLBACK( x ) extern x
-#define FT_BASE_CALLBACK_DEF( x ) x
-#endif
-#endif /* FT_BASE_CALLBACK */
-
-#ifndef FT_CALLBACK_TABLE
-#ifdef __cplusplus
-#define FT_CALLBACK_TABLE extern "C"
-#define FT_CALLBACK_TABLE_DEF extern "C"
-#else
-#define FT_CALLBACK_TABLE extern
-#define FT_CALLBACK_TABLE_DEF /* nothing */
-#endif
-#endif /* FT_CALLBACK_TABLE */
-
-
-FT_END_HEADER
-
+#include <freetype/config/integer-types.h>
+#include <freetype/config/public-macros.h>
+#include <freetype/config/mac-support.h>
#endif /* FTCONFIG_H_ */
diff --git a/ThirdParty/freetype/include/freetype/config/ftheader.h b/ThirdParty/freetype/include/freetype/config/ftheader.h
index 696d6ba..e46d314 100644
--- a/ThirdParty/freetype/include/freetype/config/ftheader.h
+++ b/ThirdParty/freetype/include/freetype/config/ftheader.h
@@ -4,7 +4,7 @@
*
* Build macros of the FreeType 2 library.
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -30,10 +30,12 @@
/* encapsulated in an `extern "C" { .. }` block when included from a */
/* C++ compiler. */
/* */
-#ifdef __cplusplus
-#define FT_BEGIN_HEADER extern "C" {
-#else
-#define FT_BEGIN_HEADER /* nothing */
+#ifndef FT_BEGIN_HEADER
+# ifdef __cplusplus
+# define FT_BEGIN_HEADER extern "C" {
+# else
+# define FT_BEGIN_HEADER /* nothing */
+# endif
#endif
@@ -48,10 +50,12 @@
/* encapsulated in an `extern "C" { .. }` block when included from a */
/* C++ compiler. */
/* */
-#ifdef __cplusplus
-#define FT_END_HEADER }
-#else
-#define FT_END_HEADER /* nothing */
+#ifndef FT_END_HEADER
+# ifdef __cplusplus
+# define FT_END_HEADER }
+# else
+# define FT_END_HEADER /* nothing */
+# endif
#endif
@@ -73,9 +77,16 @@
* Macro definitions used to `#include` specific header files.
*
* @description:
- * The following macros are defined to the name of specific FreeType~2
- * header files. They can be used directly in `#include` statements as
- * in:
+ * In addition to the normal scheme of including header files like
+ *
+ * ```
+ * #include <freetype/freetype.h>
+ * #include <freetype/ftmm.h>
+ * #include <freetype/ftglyph.h>
+ * ```
+ *
+ * it is possible to used named macros instead. They can be used
+ * directly in `#include` statements as in
*
* ```
* #include FT_FREETYPE_H
@@ -83,13 +94,9 @@
* #include FT_GLYPH_H
* ```
*
- * There are several reasons why we are now using macros to name public
- * header files. The first one is that such macros are not limited to
- * the infamous 8.3~naming rule required by DOS (and
- * `FT_MULTIPLE_MASTERS_H` is a lot more meaningful than `ftmm.h`).
- *
- * The second reason is that it allows for more flexibility in the way
- * FreeType~2 is installed on a given system.
+ * These macros were introduced to overcome the infamous 8.3~naming rule
+ * required by DOS (and `FT_MULTIPLE_MASTERS_H` is a lot more meaningful
+ * than `ftmm.h`).
*
*/
@@ -797,16 +804,19 @@
#define FT_CACHE_INTERNAL_IMAGE_H FT_CACHE_H
#define FT_CACHE_INTERNAL_SBITS_H FT_CACHE_H
-
- /*
- * Include internal headers definitions from `<internal/...>` only when
- * building the library.
- */
+/* TODO(david): Move this section below to a different header */
#ifdef FT2_BUILD_LIBRARY
-#define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h>
-#include FT_INTERNAL_INTERNAL_H
-#endif /* FT2_BUILD_LIBRARY */
+#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */
+ /* We disable the warning `conditional expression is constant' here */
+ /* in order to compile cleanly with the maximum level of warnings. */
+ /* In particular, the warning complains about stuff like `while(0)' */
+ /* which is very useful in macro definitions. There is no benefit */
+ /* in having it enabled. */
+#pragma warning( disable : 4127 )
+
+#endif /* _MSC_VER */
+#endif /* FT2_BUILD_LIBRARY */
#endif /* FTHEADER_H_ */
diff --git a/ThirdParty/freetype/include/freetype/config/ftmodule.h b/ThirdParty/freetype/include/freetype/config/ftmodule.h
index 7c603e5..d4ba3f7 100644
--- a/ThirdParty/freetype/include/freetype/config/ftmodule.h
+++ b/ThirdParty/freetype/include/freetype/config/ftmodule.h
@@ -19,14 +19,14 @@ FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class )
FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class )
FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class )
FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class )
+FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )
FT_USE_MODULE( FT_Module_Class, psaux_module_class )
FT_USE_MODULE( FT_Module_Class, psnames_module_class )
FT_USE_MODULE( FT_Module_Class, pshinter_module_class )
-FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class )
FT_USE_MODULE( FT_Module_Class, sfnt_module_class )
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class )
-FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class )
-FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class )
-FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )
+FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class )
+FT_USE_MODULE( FT_Renderer_Class, ft_sdf_renderer_class )
+FT_USE_MODULE( FT_Renderer_Class, ft_bitmap_sdf_renderer_class )
/* EOF */
diff --git a/ThirdParty/freetype/include/freetype/config/ftoption.h b/ThirdParty/freetype/include/freetype/config/ftoption.h
index 12f47a8..4227fd3 100644
--- a/ThirdParty/freetype/include/freetype/config/ftoption.h
+++ b/ThirdParty/freetype/include/freetype/config/ftoption.h
@@ -4,7 +4,7 @@
*
* User-selectable configuration macros (specification only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -42,7 +42,7 @@ FT_BEGIN_HEADER
* the name of a directory that is included _before_ the FreeType include
* path during compilation.
*
- * The default FreeType Makefiles and Jamfiles use the build directory
+ * The default FreeType Makefiles use the build directory
* `builds/<system>` by default, but you can easily change that for your
* own projects.
*
@@ -105,8 +105,7 @@ FT_BEGIN_HEADER
*
* ```
* FREETYPE_PROPERTIES=truetype:interpreter-version=35 \
- * cff:no-stem-darkening=1 \
- * autofitter:warping=1
+ * cff:no-stem-darkening=1
* ```
*
*/
@@ -121,10 +120,8 @@ FT_BEGIN_HEADER
* mitigate color fringes inherent to this technology, you also need to
* explicitly set up LCD filtering.
*
- * Note that this feature is covered by several Microsoft patents and
- * should not be activated in any default build of the library. When this
- * macro is not defined, FreeType offers alternative LCD rendering
- * technology that produces excellent output without LCD filtering.
+ * When this macro is not defined, FreeType offers alternative LCD
+ * rendering technology that produces excellent output.
*/
/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
@@ -294,6 +291,22 @@ FT_BEGIN_HEADER
/**************************************************************************
*
+ * Brotli support.
+ *
+ * FreeType uses the Brotli library to provide support for decompressing
+ * WOFF2 streams.
+ *
+ * Define this macro if you want to enable this 'feature'.
+ *
+ * If you use a build system like cmake or the `configure` script,
+ * options set by those programs have precedence, overwriting the value
+ * here with the configured one.
+ */
+/* #define FT_CONFIG_OPTION_USE_BROTLI */
+
+
+ /**************************************************************************
+ *
* Glyph Postscript Names handling
*
* By default, FreeType 2 is compiled with the 'psnames' module. This
@@ -419,6 +432,23 @@ FT_BEGIN_HEADER
/**************************************************************************
*
+ * Logging
+ *
+ * Compiling FreeType in debug or trace mode makes FreeType write error
+ * and trace log messages to `stderr`. Enabling this macro
+ * automatically forces the `FT_DEBUG_LEVEL_ERROR` and
+ * `FT_DEBUG_LEVEL_TRACE` macros and allows FreeType to write error and
+ * trace log messages to a file instead of `stderr`. For writing logs
+ * to a file, FreeType uses an the external `dlg` library (the source
+ * code is in `src/dlg`).
+ *
+ * This option needs a C99 compiler.
+ */
+/* #define FT_DEBUG_LOGGING */
+
+
+ /**************************************************************************
+ *
* Autofitter debugging
*
* If `FT_DEBUG_AUTOFIT` is defined, FreeType provides some means to
@@ -526,7 +556,7 @@ FT_BEGIN_HEADER
/**************************************************************************
*
- * Define `TT_CONFIG_OPTION_COLOR_LAYERS` if you want to support coloured
+ * Define `TT_CONFIG_OPTION_COLOR_LAYERS` if you want to support colored
* outlines (from the 'COLR'/'CPAL' tables) in all formats using the 'sfnt'
* module (namely TrueType~& OpenType).
*/
@@ -871,27 +901,11 @@ FT_BEGIN_HEADER
*
* Compile 'autofit' module with fallback Indic script support, covering
* some scripts that the 'latin' submodule of the 'autofit' module doesn't
- * (yet) handle.
+ * (yet) handle. Currently, this needs option `AF_CONFIG_OPTION_CJK`.
*/
+#ifdef AF_CONFIG_OPTION_CJK
#define AF_CONFIG_OPTION_INDIC
-
-
- /**************************************************************************
- *
- * Compile 'autofit' module with warp hinting. The idea of the warping
- * code is to slightly scale and shift a glyph within a single dimension so
- * that as much of its segments are aligned (more or less) on the grid. To
- * find out the optimal scaling and shifting value, various parameter
- * combinations are tried and scored.
- *
- * You can switch warping on and off with the `warping` property of the
- * auto-hinter (see file `ftdriver.h` for more information; by default it
- * is switched off).
- *
- * This experimental option is not active if the rendering mode is
- * `FT_RENDER_MODE_LIGHT`.
- */
-#define AF_CONFIG_OPTION_USE_WARPER
+#endif
/**************************************************************************
@@ -946,6 +960,21 @@ FT_BEGIN_HEADER
/*
+ * The TT_SUPPORT_COLRV1 macro is defined to indicate to clients that this
+ * version of FreeType has support for 'COLR' v1 API. This definition is
+ * useful to FreeType clients that want to build in support for 'COLR' v1
+ * depending on a tip-of-tree checkout before it is officially released in
+ * FreeType, and while the feature cannot yet be tested against using
+ * version macros. Don't change this macro. This may be removed once the
+ * feature is in a FreeType release version and version macros can be used
+ * to test for availability.
+ */
+#ifdef TT_CONFIG_OPTION_COLOR_LAYERS
+#define TT_SUPPORT_COLRV1
+#endif
+
+
+ /*
* Check CFF darkening parameters. The checks are the same as in function
* `cff_property_set` in file `cffdrivr.c`.
*/
diff --git a/ThirdParty/freetype/include/freetype/config/ftstdlib.h b/ThirdParty/freetype/include/freetype/config/ftstdlib.h
index 438b614..fea21ff 100644
--- a/ThirdParty/freetype/include/freetype/config/ftstdlib.h
+++ b/ThirdParty/freetype/include/freetype/config/ftstdlib.h
@@ -5,7 +5,7 @@
* ANSI-specific library and header configuration file (specification
* only).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/ThirdParty/freetype/include/freetype/config/integer-types.h b/ThirdParty/freetype/include/freetype/config/integer-types.h
new file mode 100644
index 0000000..4bb3eed
--- /dev/null
+++ b/ThirdParty/freetype/include/freetype/config/integer-types.h
@@ -0,0 +1,245 @@
+/****************************************************************************
+ *
+ * config/integer-types.h
+ *
+ * FreeType integer types definitions.
+ *
+ * Copyright (C) 1996-2021 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 FREETYPE_CONFIG_INTEGER_TYPES_H_
+#define FREETYPE_CONFIG_INTEGER_TYPES_H_
+
+ /* There are systems (like the Texas Instruments 'C54x) where a `char` */
+ /* has 16~bits. ANSI~C says that `sizeof(char)` is always~1. Since an */
+ /* `int` has 16~bits also for this system, `sizeof(int)` gives~1 which */
+ /* is probably unexpected. */
+ /* */
+ /* `CHAR_BIT` (defined in `limits.h`) gives the number of bits in a */
+ /* `char` type. */
+
+#ifndef FT_CHAR_BIT
+#define FT_CHAR_BIT CHAR_BIT
+#endif
+
+#ifndef FT_SIZEOF_INT
+
+ /* The size of an `int` type. */
+#if FT_UINT_MAX == 0xFFFFUL
+#define FT_SIZEOF_INT ( 16 / FT_CHAR_BIT )
+#elif FT_UINT_MAX == 0xFFFFFFFFUL
+#define FT_SIZEOF_INT ( 32 / FT_CHAR_BIT )
+#elif FT_UINT_MAX > 0xFFFFFFFFUL && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFUL
+#define FT_SIZEOF_INT ( 64 / FT_CHAR_BIT )
+#else
+#error "Unsupported size of `int' type!"
+#endif
+
+#endif /* !defined(FT_SIZEOF_INT) */
+
+#ifndef FT_SIZEOF_LONG
+
+ /* The size of a `long` type. A five-byte `long` (as used e.g. on the */
+ /* DM642) is recognized but avoided. */
+#if FT_ULONG_MAX == 0xFFFFFFFFUL
+#define FT_SIZEOF_LONG ( 32 / FT_CHAR_BIT )
+#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL
+#define FT_SIZEOF_LONG ( 32 / FT_CHAR_BIT )
+#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL
+#define FT_SIZEOF_LONG ( 64 / FT_CHAR_BIT )
+#else
+#error "Unsupported size of `long' type!"
+#endif
+
+#endif /* !defined(FT_SIZEOF_LONG) */
+
+ /**************************************************************************
+ *
+ * @section:
+ * basic_types
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @type:
+ * FT_Int16
+ *
+ * @description:
+ * A typedef for a 16bit signed integer type.
+ */
+ typedef signed short FT_Int16;
+
+
+ /**************************************************************************
+ *
+ * @type:
+ * FT_UInt16
+ *
+ * @description:
+ * A typedef for a 16bit unsigned integer type.
+ */
+ typedef unsigned short FT_UInt16;
+
+ /* */
+
+
+ /* this #if 0 ... #endif clause is for documentation purposes */
+#if 0
+
+ /**************************************************************************
+ *
+ * @type:
+ * FT_Int32
+ *
+ * @description:
+ * A typedef for a 32bit signed integer type. The size depends on the
+ * configuration.
+ */
+ typedef signed XXX FT_Int32;
+
+
+ /**************************************************************************
+ *
+ * @type:
+ * FT_UInt32
+ *
+ * A typedef for a 32bit unsigned integer type. The size depends on the
+ * configuration.
+ */
+ typedef unsigned XXX FT_UInt32;
+
+
+ /**************************************************************************
+ *
+ * @type:
+ * FT_Int64
+ *
+ * A typedef for a 64bit signed integer type. The size depends on the
+ * configuration. Only defined if there is real 64bit support;
+ * otherwise, it gets emulated with a structure (if necessary).
+ */
+ typedef signed XXX FT_Int64;
+
+
+ /**************************************************************************
+ *
+ * @type:
+ * FT_UInt64
+ *
+ * A typedef for a 64bit unsigned integer type. The size depends on the
+ * configuration. Only defined if there is real 64bit support;
+ * otherwise, it gets emulated with a structure (if necessary).
+ */
+ typedef unsigned XXX FT_UInt64;
+
+ /* */
+
+#endif
+
+#if FT_SIZEOF_INT == ( 32 / FT_CHAR_BIT )
+
+ typedef signed int FT_Int32;
+ typedef unsigned int FT_UInt32;
+
+#elif FT_SIZEOF_LONG == ( 32 / FT_CHAR_BIT )
+
+ typedef signed long FT_Int32;
+ typedef unsigned long FT_UInt32;
+
+#else
+#error "no 32bit type found -- please check your configuration files"
+#endif
+
+
+ /* look up an integer type that is at least 32~bits */
+#if FT_SIZEOF_INT >= ( 32 / FT_CHAR_BIT )
+
+ typedef int FT_Fast;
+ typedef unsigned int FT_UFast;
+
+#elif FT_SIZEOF_LONG >= ( 32 / FT_CHAR_BIT )
+
+ typedef long FT_Fast;
+ typedef unsigned long FT_UFast;
+
+#endif
+
+
+ /* determine whether we have a 64-bit `int` type for platforms without */
+ /* Autoconf */
+#if FT_SIZEOF_LONG == ( 64 / FT_CHAR_BIT )
+
+ /* `FT_LONG64` must be defined if a 64-bit type is available */
+#define FT_LONG64
+#define FT_INT64 long
+#define FT_UINT64 unsigned long
+
+ /**************************************************************************
+ *
+ * A 64-bit data type may create compilation problems if you compile in
+ * strict ANSI mode. To avoid them, we disable other 64-bit data types if
+ * `__STDC__` is defined. You can however ignore this rule by defining the
+ * `FT_CONFIG_OPTION_FORCE_INT64` configuration macro.
+ */
+#elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 )
+
+#if defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L
+
+#define FT_LONG64
+#define FT_INT64 long long int
+#define FT_UINT64 unsigned long long int
+
+#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
+
+ /* this compiler provides the `__int64` type */
+#define FT_LONG64
+#define FT_INT64 __int64
+#define FT_UINT64 unsigned __int64
+
+#elif defined( __BORLANDC__ ) /* Borland C++ */
+
+ /* XXXX: We should probably check the value of `__BORLANDC__` in order */
+ /* to test the compiler version. */
+
+ /* this compiler provides the `__int64` type */
+#define FT_LONG64
+#define FT_INT64 __int64
+#define FT_UINT64 unsigned __int64
+
+#elif defined( __WATCOMC__ ) /* Watcom C++ */
+
+ /* Watcom doesn't provide 64-bit data types */
+
+#elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */
+
+#define FT_LONG64
+#define FT_INT64 long long int
+#define FT_UINT64 unsigned long long int
+
+#elif defined( __GNUC__ )
+
+ /* GCC provides the `long long` type */
+#define FT_LONG64
+#define FT_INT64 long long int
+#define FT_UINT64 unsigned long long int
+
+#endif /* __STDC_VERSION__ >= 199901L */
+
+#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */
+
+#ifdef FT_LONG64
+ typedef FT_INT64 FT_Int64;
+ typedef FT_UINT64 FT_UInt64;
+#endif
+
+
+#endif /* FREETYPE_CONFIG_INTEGER_TYPES_H_ */
diff --git a/ThirdParty/freetype/include/freetype/config/mac-support.h b/ThirdParty/freetype/include/freetype/config/mac-support.h
new file mode 100644
index 0000000..ef58d8b
--- /dev/null
+++ b/ThirdParty/freetype/include/freetype/config/mac-support.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+ *
+ * config/mac-support.h
+ *
+ * Mac/OS X support configuration header.
+ *
+ * Copyright (C) 1996-2021 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 FREETYPE_CONFIG_MAC_SUPPORT_H_
+#define FREETYPE_CONFIG_MAC_SUPPORT_H_
+
+ /**************************************************************************
+ *
+ * Mac support
+ *
+ * This is the only necessary change, so it is defined here instead
+ * providing a new configuration file.
+ */
+#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) )
+ /* No Carbon frameworks for 64bit 10.4.x. */
+ /* `AvailabilityMacros.h` is available since Mac OS X 10.2, */
+ /* so guess the system version by maximum errno before inclusion. */
+#include <errno.h>
+#ifdef ECANCELED /* defined since 10.2 */
+#include "AvailabilityMacros.h"
+#endif
+#if defined( __LP64__ ) && \
+ ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
+#undef FT_MACINTOSH
+#endif
+
+#elif defined( __SC__ ) || defined( __MRC__ )
+ /* Classic MacOS compilers */
+#include "ConditionalMacros.h"
+#if TARGET_OS_MAC
+#define FT_MACINTOSH 1
+#endif
+
+#endif /* Mac support */
+
+#endif /* FREETYPE_CONFIG_MAC_SUPPORT_H_ */
diff --git a/ThirdParty/freetype/include/freetype/config/public-macros.h b/ThirdParty/freetype/include/freetype/config/public-macros.h
new file mode 100644
index 0000000..fed414e
--- /dev/null
+++ b/ThirdParty/freetype/include/freetype/config/public-macros.h
@@ -0,0 +1,120 @@
+/****************************************************************************
+ *
+ * config/public-macros.h
+ *
+ * Define a set of compiler macros used in public FreeType headers.
+ *
+ * Copyright (C) 2020-2021 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 definitions in this file are used by the public FreeType headers
+ * and thus should be considered part of the public API.
+ *
+ * Other compiler-specific macro definitions that are not exposed by the
+ * FreeType API should go into
+ * `include/freetype/internal/compiler-macros.h` instead.
+ */
+#ifndef FREETYPE_CONFIG_PUBLIC_MACROS_H_
+#define FREETYPE_CONFIG_PUBLIC_MACROS_H_
+
+ /*
+ * `FT_BEGIN_HEADER` and `FT_END_HEADER` might have already been defined
+ * by `freetype/config/ftheader.h`, but we don't want to include this
+ * header here, so redefine the macros here only when needed. Their
+ * definition is very stable, so keeping them in sync with the ones in the
+ * header should not be a maintenance issue.
+ */
+#ifndef FT_BEGIN_HEADER
+#ifdef __cplusplus
+#define FT_BEGIN_HEADER extern "C" {
+#else
+#define FT_BEGIN_HEADER /* empty */
+#endif
+#endif /* FT_BEGIN_HEADER */
+
+#ifndef FT_END_HEADER
+#ifdef __cplusplus
+#define FT_END_HEADER }
+#else
+#define FT_END_HEADER /* empty */
+#endif
+#endif /* FT_END_HEADER */
+
+
+FT_BEGIN_HEADER
+
+ /*
+ * Mark a function declaration as public. This ensures it will be
+ * properly exported to client code. Place this before a function
+ * declaration.
+ *
+ * NOTE: This macro should be considered an internal implementation
+ * detail, and not part of the FreeType API. It is only defined here
+ * because it is needed by `FT_EXPORT`.
+ */
+
+ /* Visual C, mingw */
+#if defined( WIN32 )
+
+#if defined( FT2_BUILD_LIBRARY ) && defined( DLL_EXPORT )
+#define FT_PUBLIC_FUNCTION_ATTRIBUTE __declspec( dllexport )
+#elif defined( DLL_IMPORT )
+#define FT_PUBLIC_FUNCTION_ATTRIBUTE __declspec( dllimport )
+#endif
+
+ /* gcc, clang */
+#elif ( defined( __GNUC__ ) && __GNUC__ >= 4 ) || defined( __clang__ )
+#define FT_PUBLIC_FUNCTION_ATTRIBUTE \
+ __attribute__(( visibility( "default" ) ))
+
+ /* Sun */
+#elif defined( __SUNPRO_C ) && __SUNPRO_C >= 0x550
+#define FT_PUBLIC_FUNCTION_ATTRIBUTE __global
+#endif
+
+
+#ifndef FT_PUBLIC_FUNCTION_ATTRIBUTE
+#define FT_PUBLIC_FUNCTION_ATTRIBUTE /* empty */
+#endif
+
+
+ /*
+ * Define a public FreeType API function. This ensures it is properly
+ * exported or imported at build time. The macro parameter is the
+ * function's return type as in:
+ *
+ * FT_EXPORT( FT_Bool )
+ * FT_Object_Method( FT_Object obj,
+ * ... );
+ *
+ * NOTE: This requires that all `FT_EXPORT` uses are inside
+ * `FT_BEGIN_HEADER ... FT_END_HEADER` blocks. This guarantees that the
+ * functions are exported with C linkage, even when the header is included
+ * by a C++ source file.
+ */
+#define FT_EXPORT( x ) FT_PUBLIC_FUNCTION_ATTRIBUTE extern x
+
+ /*
+ * `FT_UNUSED` indicates that a given parameter is not used -- this is
+ * only used to get rid of unpleasant compiler warnings.
+ *
+ * Technically, this was not meant to be part of the public API, but some
+ * third-party code depends on it.
+ */
+#ifndef FT_UNUSED
+#define FT_UNUSED( arg ) ( (arg) = (arg) )
+#endif
+
+
+FT_END_HEADER
+
+#endif /* FREETYPE_CONFIG_PUBLIC_MACROS_H_ */
diff --git a/ThirdParty/freetype/include/freetype/freetype.h b/ThirdParty/freetype/include/freetype/freetype.h
index 4f2eaca..77fede3 100644
--- a/ThirdParty/freetype/include/freetype/freetype.h
+++ b/ThirdParty/freetype/include/freetype/freetype.h
@@ -4,7 +4,7 @@
*
* FreeType high-level API and common types (specification only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -20,19 +20,10 @@
#define FREETYPE_H_
-#ifndef FT_FREETYPE_H
-#error "`ft2build.h' hasn't been included yet!"
-#error "Please always use macros to include FreeType header files."
-#error "Example:"
-#error " #include <ft2build.h>"
-#error " #include FT_FREETYPE_H"
-#endif
-
-
#include <ft2build.h>
#include FT_CONFIG_CONFIG_H
-#include FT_TYPES_H
-#include FT_ERRORS_H
+#include <freetype/fttypes.h>
+#include <freetype/fterrors.h>
FT_BEGIN_HEADER
@@ -42,6 +33,34 @@ FT_BEGIN_HEADER
/**************************************************************************
*
* @section:
+ * preamble
+ *
+ * @title:
+ * Preamble
+ *
+ * @abstract:
+ * What FreeType is and isn't
+ *
+ * @description:
+ * FreeType is a library that provides access to glyphs in font files. It
+ * scales the glyph images and their metrics to a requested size, and it
+ * rasterizes the glyph images to produce pixel or subpixel alpha coverage
+ * bitmaps.
+ *
+ * Note that FreeType is _not_ a text layout engine. You have to use
+ * higher-level libraries like HarfBuzz, Pango, or ICU for that.
+ *
+ * Note also that FreeType does _not_ perform alpha blending or
+ * compositing the resulting bitmaps or pixmaps by itself. Use your
+ * favourite graphics library (for example, Cairo or Skia) to further
+ * process FreeType's output.
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @section:
* header_inclusion
*
* @title:
@@ -51,22 +70,15 @@ FT_BEGIN_HEADER
* How client applications should include FreeType header files.
*
* @description:
- * To be as flexible as possible (and for historical reasons), FreeType
- * uses a very special inclusion scheme to load header files, for example
+ * To be as flexible as possible (and for historical reasons), you must
+ * load file `ft2build.h` first before other header files, for example
*
* ```
* #include <ft2build.h>
*
- * #include FT_FREETYPE_H
- * #include FT_OUTLINE_H
+ * #include <freetype/freetype.h>
+ * #include <freetype/ftoutln.h>
* ```
- *
- * A compiler and its preprocessor only needs an include path to find the
- * file `ft2build.h`; the exact locations and names of the other FreeType
- * header files are hidden by @header_file_macros, loaded by
- * `ft2build.h`. The API documentation always gives the header macro
- * name needed for a particular function.
- *
*/
@@ -192,6 +204,7 @@ FT_BEGIN_HEADER
* FT_Size_RequestRec
* FT_Size_Request
* FT_Set_Transform
+ * FT_Get_Transform
* FT_Load_Glyph
* FT_Get_Char_Index
* FT_Get_First_Char
@@ -645,7 +658,7 @@ FT_BEGIN_HEADER
* FT_ENCODING_MS_SYMBOL ::
* Microsoft Symbol encoding, used to encode mathematical symbols and
* wingdings. For more information, see
- * 'https://www.microsoft.com/typography/otspec/recom.htm',
+ * 'https://www.microsoft.com/typography/otspec/recom.htm#non-standard-symbol-fonts',
* 'http://www.kostis.net/charsets/symbol.htm', and
* 'http://www.kostis.net/charsets/wingding.htm'.
*
@@ -974,6 +987,9 @@ FT_BEGIN_HEADER
* Note that the bounding box might be off by (at least) one pixel for
* hinted fonts. See @FT_Size_Metrics for further discussion.
*
+ * Note that the bounding box does not vary in OpenType variable fonts
+ * and should only be used in relation to the default instance.
+ *
* units_per_EM ::
* The number of font units per EM square for this face. This is
* typically 2048 for TrueType fonts, and 1000 for Type~1 fonts. Only
@@ -1239,7 +1255,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_HAS_HORIZONTAL( face ) \
- ( (face)->face_flags & FT_FACE_FLAG_HORIZONTAL )
+ ( !!( (face)->face_flags & FT_FACE_FLAG_HORIZONTAL ) )
/**************************************************************************
@@ -1253,7 +1269,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_HAS_VERTICAL( face ) \
- ( (face)->face_flags & FT_FACE_FLAG_VERTICAL )
+ ( !!( (face)->face_flags & FT_FACE_FLAG_VERTICAL ) )
/**************************************************************************
@@ -1267,7 +1283,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_HAS_KERNING( face ) \
- ( (face)->face_flags & FT_FACE_FLAG_KERNING )
+ ( !!( (face)->face_flags & FT_FACE_FLAG_KERNING ) )
/**************************************************************************
@@ -1282,7 +1298,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_IS_SCALABLE( face ) \
- ( (face)->face_flags & FT_FACE_FLAG_SCALABLE )
+ ( !!( (face)->face_flags & FT_FACE_FLAG_SCALABLE ) )
/**************************************************************************
@@ -1301,7 +1317,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_IS_SFNT( face ) \
- ( (face)->face_flags & FT_FACE_FLAG_SFNT )
+ ( !!( (face)->face_flags & FT_FACE_FLAG_SFNT ) )
/**************************************************************************
@@ -1316,7 +1332,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_IS_FIXED_WIDTH( face ) \
- ( (face)->face_flags & FT_FACE_FLAG_FIXED_WIDTH )
+ ( !!( (face)->face_flags & FT_FACE_FLAG_FIXED_WIDTH ) )
/**************************************************************************
@@ -1331,7 +1347,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_HAS_FIXED_SIZES( face ) \
- ( (face)->face_flags & FT_FACE_FLAG_FIXED_SIZES )
+ ( !!( (face)->face_flags & FT_FACE_FLAG_FIXED_SIZES ) )
/**************************************************************************
@@ -1357,7 +1373,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_HAS_GLYPH_NAMES( face ) \
- ( (face)->face_flags & FT_FACE_FLAG_GLYPH_NAMES )
+ ( !!( (face)->face_flags & FT_FACE_FLAG_GLYPH_NAMES ) )
/**************************************************************************
@@ -1372,7 +1388,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_HAS_MULTIPLE_MASTERS( face ) \
- ( (face)->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS )
+ ( !!( (face)->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS ) )
/**************************************************************************
@@ -1394,7 +1410,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_IS_NAMED_INSTANCE( face ) \
- ( (face)->face_index & 0x7FFF0000L )
+ ( !!( (face)->face_index & 0x7FFF0000L ) )
/**************************************************************************
@@ -1412,7 +1428,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_IS_VARIATION( face ) \
- ( (face)->face_flags & FT_FACE_FLAG_VARIATION )
+ ( !!( (face)->face_flags & FT_FACE_FLAG_VARIATION ) )
/**************************************************************************
@@ -1429,7 +1445,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_IS_CID_KEYED( face ) \
- ( (face)->face_flags & FT_FACE_FLAG_CID_KEYED )
+ ( !!( (face)->face_flags & FT_FACE_FLAG_CID_KEYED ) )
/**************************************************************************
@@ -1443,7 +1459,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_IS_TRICKY( face ) \
- ( (face)->face_flags & FT_FACE_FLAG_TRICKY )
+ ( !!( (face)->face_flags & FT_FACE_FLAG_TRICKY ) )
/**************************************************************************
@@ -1460,7 +1476,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_HAS_COLOR( face ) \
- ( (face)->face_flags & FT_FACE_FLAG_COLOR )
+ ( !!( (face)->face_flags & FT_FACE_FLAG_COLOR ) )
/**************************************************************************
@@ -1766,6 +1782,13 @@ FT_BEGIN_HEADER
* transformed, distorted, emboldened, etc. However, it must not be
* freed.
*
+ * [Since 2.10.1] If @FT_LOAD_NO_SCALE is set, outline coordinates of
+ * OpenType variation fonts for a selected instance are internally
+ * handled as 26.6 fractional font units but returned as (rounded)
+ * integers, as expected. To get unrounded font units, don't use
+ * @FT_LOAD_NO_SCALE but load the glyph with @FT_LOAD_NO_HINTING and
+ * scale it, using the font's `units_per_EM` value as the ppem.
+ *
* num_subglyphs ::
* The number of subglyphs in a composite glyph. This field is only
* valid for the composite glyph format that should normally only be
@@ -2071,7 +2094,8 @@ FT_BEGIN_HEADER
* The size in bytes of the file in memory.
*
* pathname ::
- * A pointer to an 8-bit file pathname.
+ * A pointer to an 8-bit file pathname. The pointer is not owned by
+ * FreeType.
*
* stream ::
* A handle to a source stream object.
@@ -2089,8 +2113,7 @@ FT_BEGIN_HEADER
* Extra parameters passed to the font driver when opening a new face.
*
* @note:
- * The stream type is determined by the contents of `flags` that are
- * tested in the following order by @FT_Open_Face:
+ * The stream type is determined by the contents of `flags`:
*
* If the @FT_OPEN_MEMORY bit is set, assume that this is a memory file
* of `memory_size` bytes, located at `memory_address`. The data are not
@@ -2103,6 +2126,9 @@ FT_BEGIN_HEADER
* Otherwise, if the @FT_OPEN_PATHNAME bit is set, assume that this is a
* normal file and use `pathname` to open it.
*
+ * If none of the above bits are set or if multiple are set at the same
+ * time, the flags are invalid and @FT_Open_Face fails.
+ *
* If the @FT_OPEN_DRIVER bit is set, @FT_Open_Face only tries to open
* the file with the driver whose handler is in `driver`.
*
@@ -2275,6 +2301,10 @@ FT_BEGIN_HEADER
* See the discussion of reference counters in the description of
* @FT_Reference_Face.
*
+ * If `FT_OPEN_STREAM` is set in `args->flags`, the stream in
+ * `args->stream` is automatically closed before this function returns
+ * any error (including `FT_Err_Invalid_Argument`).
+ *
* @example:
* To loop over all faces, use code similar to the following snippet
* (omitting the error handling).
@@ -2433,6 +2463,7 @@ FT_BEGIN_HEADER
*
* @since:
* 2.4.2
+ *
*/
FT_EXPORT( FT_Error )
FT_Reference_Face( FT_Face face );
@@ -2879,7 +2910,7 @@ FT_BEGIN_HEADER
*
* If the font is 'tricky' (see @FT_FACE_FLAG_TRICKY for more), using
* `FT_LOAD_NO_SCALE` usually yields meaningless outlines because the
- * subglyphs must be scaled and positioned with hinting instructions.
+ * subglyphs must be scaled and positioned with hinting instructions.
* This can be solved by loading the font without `FT_LOAD_NO_SCALE`
* and setting the character size to `font->units_per_EM`.
*
@@ -3177,9 +3208,16 @@ FT_BEGIN_HEADER
* A pointer to the transformation's 2x2 matrix. Use `NULL` for the
* identity matrix.
* delta ::
- * A pointer to the translation vector. Use `NULL` for the null vector.
+ * A pointer to the translation vector. Use `NULL` for the null
+ * vector.
*
* @note:
+ * This function is provided as a convenience, but keep in mind that
+ * @FT_Matrix coefficients are only 16.16 fixed-point values, which can
+ * limit the accuracy of the results. Using floating-point computations
+ * to perform the transform directly in client code instead will always
+ * yield better numbers.
+ *
* The transformation is only applied to scalable image formats after the
* glyph has been loaded. It means that hinting is unaltered by the
* transformation and is performed on the character size given in the
@@ -3196,6 +3234,39 @@ FT_BEGIN_HEADER
/**************************************************************************
*
+ * @function:
+ * FT_Get_Transform
+ *
+ * @description:
+ * Return the transformation that is applied to glyph images when they
+ * are loaded into a glyph slot through @FT_Load_Glyph. See
+ * @FT_Set_Transform for more details.
+ *
+ * @input:
+ * face ::
+ * A handle to the source face object.
+ *
+ * @output:
+ * matrix ::
+ * A pointer to a transformation's 2x2 matrix. Set this to NULL if you
+ * are not interested in the value.
+ *
+ * delta ::
+ * A pointer a translation vector. Set this to NULL if you are not
+ * interested in the value.
+ *
+ * @since:
+ * 2.11
+ *
+ */
+ FT_EXPORT( void )
+ FT_Get_Transform( FT_Face face,
+ FT_Matrix* matrix,
+ FT_Vector* delta );
+
+
+ /**************************************************************************
+ *
* @enum:
* FT_Render_Mode
*
@@ -3212,6 +3283,10 @@ FT_BEGIN_HEADER
* correction to correctly render non-monochrome glyph bitmaps onto a
* surface; see @FT_Render_Glyph.
*
+ * The @FT_RENDER_MODE_SDF is a special render mode that uses up to 256
+ * distance values, indicating the signed distance from the grid position
+ * to the nearest outline.
+ *
* @values:
* FT_RENDER_MODE_NORMAL ::
* Default render mode; it corresponds to 8-bit anti-aliased bitmaps.
@@ -3237,19 +3312,49 @@ FT_BEGIN_HEADER
* bitmaps that are 3~times the height of the original glyph outline in
* pixels and use the @FT_PIXEL_MODE_LCD_V mode.
*
- * @note:
- * Should you define `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` in your
- * `ftoption.h`, which enables patented ClearType-style rendering, the
- * LCD-optimized glyph bitmaps should be filtered to reduce color fringes
- * inherent to this technology. You can either set up LCD filtering with
- * @FT_Library_SetLcdFilter or @FT_Face_Properties, or do the filtering
- * yourself. The default FreeType LCD rendering technology does not
- * require filtering.
+ * FT_RENDER_MODE_SDF ::
+ * This mode corresponds to 8-bit, single-channel signed distance field
+ * (SDF) bitmaps. Each pixel in the SDF grid is the value from the
+ * pixel's position to the nearest glyph's outline. The distances are
+ * calculated from the center of the pixel and are positive if they are
+ * filled by the outline (i.e., inside the outline) and negative
+ * otherwise. Check the note below on how to convert the output values
+ * to usable data.
*
+ * @note:
* The selected render mode only affects vector glyphs of a font.
* Embedded bitmaps often have a different pixel mode like
* @FT_PIXEL_MODE_MONO. You can use @FT_Bitmap_Convert to transform them
* into 8-bit pixmaps.
+ *
+ * For @FT_RENDER_MODE_SDF the output bitmap buffer contains normalized
+ * distances that are packed into unsigned 8-bit values. To get pixel
+ * values in floating point representation use the following pseudo-C
+ * code for the conversion.
+ *
+ * ```
+ * // Load glyph and render using FT_RENDER_MODE_SDF,
+ * // then use the output buffer as follows.
+ *
+ * ...
+ * FT_Byte buffer = glyph->bitmap->buffer;
+ *
+ *
+ * for pixel in buffer
+ * {
+ * // `sd` is the signed distance and `spread` is the current spread;
+ * // the default spread is 2 and can be changed.
+ *
+ * float sd = (float)pixel - 128.0f;
+ *
+ *
+ * // Convert to pixel values.
+ * sd = ( sd / 128.0f ) * spread;
+ *
+ * // Store `sd` in a buffer or use as required.
+ * }
+ *
+ * ```
*/
typedef enum FT_Render_Mode_
{
@@ -3258,6 +3363,7 @@ FT_BEGIN_HEADER
FT_RENDER_MODE_MONO,
FT_RENDER_MODE_LCD,
FT_RENDER_MODE_LCD_V,
+ FT_RENDER_MODE_SDF,
FT_RENDER_MODE_MAX
@@ -3345,7 +3451,8 @@ FT_BEGIN_HEADER
*
* which is known as the OVER operator.
*
- * To correctly composite an antialiased pixel of a glyph onto a surface,
+ * To correctly composite an anti-aliased pixel of a glyph onto a
+ * surface,
*
* 1. take the foreground and background colors (e.g., in sRGB space)
* and apply gamma to get them in a linear space,
@@ -3932,8 +4039,8 @@ FT_BEGIN_HEADER
* The glyph index. 0~means 'undefined character code'.
*/
FT_EXPORT( FT_UInt )
- FT_Get_Name_Index( FT_Face face,
- FT_String* glyph_name );
+ FT_Get_Name_Index( FT_Face face,
+ const FT_String* glyph_name );
/**************************************************************************
@@ -4025,168 +4132,6 @@ FT_BEGIN_HEADER
/**************************************************************************
*
* @section:
- * layer_management
- *
- * @title:
- * Glyph Layer Management
- *
- * @abstract:
- * Retrieving and manipulating OpenType's 'COLR' table data.
- *
- * @description:
- * The functions described here allow access of colored glyph layer data
- * in OpenType's 'COLR' tables.
- */
-
-
- /**************************************************************************
- *
- * @struct:
- * FT_LayerIterator
- *
- * @description:
- * This iterator object is needed for @FT_Get_Color_Glyph_Layer.
- *
- * @fields:
- * num_layers ::
- * The number of glyph layers for the requested glyph index. Will be
- * set by @FT_Get_Color_Glyph_Layer.
- *
- * layer ::
- * The current layer. Will be set by @FT_Get_Color_Glyph_Layer.
- *
- * p ::
- * An opaque pointer into 'COLR' table data. The caller must set this
- * to `NULL` before the first call of @FT_Get_Color_Glyph_Layer.
- */
- typedef struct FT_LayerIterator_
- {
- FT_UInt num_layers;
- FT_UInt layer;
- FT_Byte* p;
-
- } FT_LayerIterator;
-
-
- /**************************************************************************
- *
- * @function:
- * FT_Get_Color_Glyph_Layer
- *
- * @description:
- * This is an interface to the 'COLR' table in OpenType fonts to
- * iteratively retrieve the colored glyph layers associated with the
- * current glyph slot.
- *
- * https://docs.microsoft.com/en-us/typography/opentype/spec/colr
- *
- * The glyph layer data for a given glyph index, if present, provides an
- * alternative, multi-colour glyph representation: Instead of rendering
- * the outline or bitmap with the given glyph index, glyphs with the
- * indices and colors returned by this function are rendered layer by
- * layer.
- *
- * The returned elements are ordered in the z~direction from bottom to
- * top; the 'n'th element should be rendered with the associated palette
- * color and blended on top of the already rendered layers (elements 0,
- * 1, ..., n-1).
- *
- * @input:
- * face ::
- * A handle to the parent face object.
- *
- * base_glyph ::
- * The glyph index the colored glyph layers are associated with.
- *
- * @inout:
- * iterator ::
- * An @FT_LayerIterator object. For the first call you should set
- * `iterator->p` to `NULL`. For all following calls, simply use the
- * same object again.
- *
- * @output:
- * aglyph_index ::
- * The glyph index of the current layer.
- *
- * acolor_index ::
- * The color index into the font face's color palette of the current
- * layer. The value 0xFFFF is special; it doesn't reference a palette
- * entry but indicates that the text foreground color should be used
- * instead (to be set up by the application outside of FreeType).
- *
- * The color palette can be retrieved with @FT_Palette_Select.
- *
- * @return:
- * Value~1 if everything is OK. If there are no more layers (or if there
- * are no layers at all), value~0 gets returned. In case of an error,
- * value~0 is returned also.
- *
- * @note:
- * This function is necessary if you want to handle glyph layers by
- * yourself. In particular, functions that operate with @FT_GlyphRec
- * objects (like @FT_Get_Glyph or @FT_Glyph_To_Bitmap) don't have access
- * to this information.
- *
- * Note that @FT_Render_Glyph is able to handle colored glyph layers
- * automatically if the @FT_LOAD_COLOR flag is passed to a previous call
- * to @FT_Load_Glyph. [This is an experimental feature.]
- *
- * @example:
- * ```
- * FT_Color* palette;
- * FT_LayerIterator iterator;
- *
- * FT_Bool have_layers;
- * FT_UInt layer_glyph_index;
- * FT_UInt layer_color_index;
- *
- *
- * error = FT_Palette_Select( face, palette_index, &palette );
- * if ( error )
- * palette = NULL;
- *
- * iterator.p = NULL;
- * have_layers = FT_Get_Color_Glyph_Layer( face,
- * glyph_index,
- * &layer_glyph_index,
- * &layer_color_index,
- * &iterator );
- *
- * if ( palette && have_layers )
- * {
- * do
- * {
- * FT_Color layer_color;
- *
- *
- * if ( layer_color_index == 0xFFFF )
- * layer_color = text_foreground_color;
- * else
- * layer_color = palette[layer_color_index];
- *
- * // Load and render glyph `layer_glyph_index', then
- * // blend resulting pixmap (using color `layer_color')
- * // with previously created pixmaps.
- *
- * } while ( FT_Get_Color_Glyph_Layer( face,
- * glyph_index,
- * &layer_glyph_index,
- * &layer_color_index,
- * &iterator ) );
- * }
- * ```
- */
- FT_EXPORT( FT_Bool )
- FT_Get_Color_Glyph_Layer( FT_Face face,
- FT_UInt base_glyph,
- FT_UInt *aglyph_index,
- FT_UInt *acolor_index,
- FT_LayerIterator* iterator );
-
-
- /**************************************************************************
- *
- * @section:
* base_interface
*
*/
@@ -4274,6 +4219,7 @@ FT_BEGIN_HEADER
*
* @since:
* 2.3.8
+ *
*/
FT_EXPORT( FT_UShort )
FT_Get_FSType_Flags( FT_Face face );
@@ -4367,6 +4313,7 @@ FT_BEGIN_HEADER
*
* @since:
* 2.3.6
+ *
*/
FT_EXPORT( FT_UInt )
FT_Face_GetCharVariantIndex( FT_Face face,
@@ -4403,6 +4350,7 @@ FT_BEGIN_HEADER
*
* @since:
* 2.3.6
+ *
*/
FT_EXPORT( FT_Int )
FT_Face_GetCharVariantIsDefault( FT_Face face,
@@ -4434,6 +4382,7 @@ FT_BEGIN_HEADER
*
* @since:
* 2.3.6
+ *
*/
FT_EXPORT( FT_UInt32* )
FT_Face_GetVariantSelectors( FT_Face face );
@@ -4467,6 +4416,7 @@ FT_BEGIN_HEADER
*
* @since:
* 2.3.6
+ *
*/
FT_EXPORT( FT_UInt32* )
FT_Face_GetVariantsOfChar( FT_Face face,
@@ -4501,6 +4451,7 @@ FT_BEGIN_HEADER
*
* @since:
* 2.3.6
+ *
*/
FT_EXPORT( FT_UInt32* )
FT_Face_GetCharsOfVariant( FT_Face face,
@@ -4773,7 +4724,7 @@ FT_BEGIN_HEADER
*
*/
#define FREETYPE_MAJOR 2
-#define FREETYPE_MINOR 10
+#define FREETYPE_MINOR 11
#define FREETYPE_PATCH 0
@@ -4836,6 +4787,7 @@ FT_BEGIN_HEADER
*
* @since:
* 2.3.5
+ *
*/
FT_EXPORT( FT_Bool )
FT_Face_CheckTrueTypePatents( FT_Face face );
@@ -4864,6 +4816,7 @@ FT_BEGIN_HEADER
*
* @since:
* 2.3.5
+ *
*/
FT_EXPORT( FT_Bool )
FT_Face_SetUnpatentedHinting( FT_Face face,
diff --git a/ThirdParty/freetype/include/freetype/ftadvanc.h b/ThirdParty/freetype/include/freetype/ftadvanc.h
index 95c38f9..3a13bd3 100644
--- a/ThirdParty/freetype/include/freetype/ftadvanc.h
+++ b/ThirdParty/freetype/include/freetype/ftadvanc.h
@@ -4,7 +4,7 @@
*
* Quick computation of advance widths (specification only).
*
- * Copyright (C) 2008-2019 by
+ * Copyright (C) 2008-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -20,8 +20,7 @@
#define FTADVANC_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
@@ -96,6 +95,7 @@ FT_BEGIN_HEADER
* load_flags ::
* A set of bit flags similar to those used when calling
* @FT_Load_Glyph, used to determine what kind of advances you need.
+ *
* @output:
* padvance ::
* The advance value. If scaling is performed (based on the value of
diff --git a/ThirdParty/freetype/include/freetype/ftbbox.h b/ThirdParty/freetype/include/freetype/ftbbox.h
index 22da70c..713aedb 100644
--- a/ThirdParty/freetype/include/freetype/ftbbox.h
+++ b/ThirdParty/freetype/include/freetype/ftbbox.h
@@ -4,7 +4,7 @@
*
* FreeType exact bbox computation (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -31,8 +31,7 @@
#define FTBBOX_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
diff --git a/ThirdParty/freetype/include/freetype/ftbdf.h b/ThirdParty/freetype/include/freetype/ftbdf.h
index 1c46da5..c428506 100644
--- a/ThirdParty/freetype/include/freetype/ftbdf.h
+++ b/ThirdParty/freetype/include/freetype/ftbdf.h
@@ -4,7 +4,7 @@
*
* FreeType API for accessing BDF-specific strings (specification).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -19,8 +19,7 @@
#ifndef FTBDF_H_
#define FTBDF_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
diff --git a/ThirdParty/freetype/include/freetype/ftbitmap.h b/ThirdParty/freetype/include/freetype/ftbitmap.h
index a6acdb9..11c45b0 100644
--- a/ThirdParty/freetype/include/freetype/ftbitmap.h
+++ b/ThirdParty/freetype/include/freetype/ftbitmap.h
@@ -4,7 +4,7 @@
*
* FreeType utility functions for bitmaps (specification).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -20,9 +20,8 @@
#define FTBITMAP_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_COLOR_H
+#include <freetype/freetype.h>
+#include <freetype/ftcolor.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
diff --git a/ThirdParty/freetype/include/freetype/ftbzip2.h b/ThirdParty/freetype/include/freetype/ftbzip2.h
index ae88cfd..afd2a82 100644
--- a/ThirdParty/freetype/include/freetype/ftbzip2.h
+++ b/ThirdParty/freetype/include/freetype/ftbzip2.h
@@ -4,7 +4,7 @@
*
* Bzip2-compressed stream support.
*
- * Copyright (C) 2010-2019 by
+ * Copyright (C) 2010-2021 by
* Joel Klinghed.
*
* This file is part of the FreeType project, and may only be used,
@@ -19,8 +19,7 @@
#ifndef FTBZIP2_H_
#define FTBZIP2_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
@@ -43,6 +42,16 @@ FT_BEGIN_HEADER
* Using bzip2-compressed font files.
*
* @description:
+ * In certain builds of the library, bzip2 compression recognition is
+ * automatically handled when calling @FT_New_Face or @FT_Open_Face.
+ * This means that if no font driver is capable of handling the raw
+ * compressed file, the library will try to open a bzip2 compressed
+ * stream from it and re-open the face with it.
+ *
+ * The stream implementation is very basic and resets the decompression
+ * process each time seeking backwards is needed within the stream,
+ * which significantly undermines the performance.
+ *
* This section contains the declaration of Bzip2-specific functions.
*
*/
@@ -75,15 +84,6 @@ FT_BEGIN_HEADER
* **not** call `FT_Stream_Close` on the source stream. None of the
* stream objects will be released to the heap.
*
- * The stream implementation is very basic and resets the decompression
- * process each time seeking backwards is needed within the stream.
- *
- * In certain builds of the library, bzip2 compression recognition is
- * automatically handled when calling @FT_New_Face or @FT_Open_Face.
- * This means that if no font driver is capable of handling the raw
- * compressed file, the library will try to open a bzip2 compressed
- * stream from it and re-open the face with it.
- *
* This function may return `FT_Err_Unimplemented_Feature` if your build
* of FreeType was not compiled with bzip2 support.
*/
diff --git a/ThirdParty/freetype/include/freetype/ftcache.h b/ThirdParty/freetype/include/freetype/ftcache.h
index 0d589d0..70399a3 100644
--- a/ThirdParty/freetype/include/freetype/ftcache.h
+++ b/ThirdParty/freetype/include/freetype/ftcache.h
@@ -4,7 +4,7 @@
*
* FreeType Cache subsystem (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -20,8 +20,7 @@
#define FTCACHE_H_
-#include <ft2build.h>
-#include FT_GLYPH_H
+#include <freetype/ftglyph.h>
FT_BEGIN_HEADER
@@ -87,8 +86,8 @@ FT_BEGIN_HEADER
* later use @FTC_CMapCache_Lookup to perform the equivalent of
* @FT_Get_Char_Index, only much faster.
*
- * If you want to use the @FT_Glyph caching, call @FTC_ImageCache, then
- * later use @FTC_ImageCache_Lookup to retrieve the corresponding
+ * If you want to use the @FT_Glyph caching, call @FTC_ImageCache_New,
+ * then later use @FTC_ImageCache_Lookup to retrieve the corresponding
* @FT_Glyph objects from the cache.
*
* If you need lots of small bitmaps, it is much more memory efficient to
diff --git a/ThirdParty/freetype/include/freetype/ftchapters.h b/ThirdParty/freetype/include/freetype/ftchapters.h
index 2ee2697..4f32cc8 100644
--- a/ThirdParty/freetype/include/freetype/ftchapters.h
+++ b/ThirdParty/freetype/include/freetype/ftchapters.h
@@ -15,6 +15,7 @@
* General Remarks
*
* @sections:
+ * preamble
* header_inclusion
* user_allocation
*
@@ -123,6 +124,7 @@
* gzip
* lzw
* bzip2
+ * debugging_apis
*
*/
diff --git a/ThirdParty/freetype/include/freetype/ftcid.h b/ThirdParty/freetype/include/freetype/ftcid.h
index 8eafc1c..9a415bd 100644
--- a/ThirdParty/freetype/include/freetype/ftcid.h
+++ b/ThirdParty/freetype/include/freetype/ftcid.h
@@ -4,7 +4,7 @@
*
* FreeType API for accessing CID font information (specification).
*
- * Copyright (C) 2007-2019 by
+ * Copyright (C) 2007-2021 by
* Dereg Clegg and Michael Toftdal.
*
* This file is part of the FreeType project, and may only be used,
@@ -19,8 +19,7 @@
#ifndef FTCID_H_
#define FTCID_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
diff --git a/ThirdParty/freetype/include/freetype/ftcolor.h b/ThirdParty/freetype/include/freetype/ftcolor.h
index cf18021..59e6f15 100644
--- a/ThirdParty/freetype/include/freetype/ftcolor.h
+++ b/ThirdParty/freetype/include/freetype/ftcolor.h
@@ -4,7 +4,7 @@
*
* FreeType's glyph color management (specification).
*
- * Copyright (C) 2018-2019 by
+ * Copyright (C) 2018-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -19,8 +19,7 @@
#ifndef FTCOLOR_H_
#define FTCOLOR_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
@@ -125,9 +124,9 @@ FT_BEGIN_HEADER
* The number of palettes.
*
* palette_name_ids ::
- * A read-only array of palette name IDs with `num_palettes` elements,
- * corresponding to entries like 'dark' or 'light' in the font's 'name'
- * table.
+ * An optional read-only array of palette name IDs with `num_palettes`
+ * elements, corresponding to entries like 'dark' or 'light' in the
+ * font's 'name' table.
*
* An empty name ID in the 'CPAL' table gets represented as value
* 0xFFFF.
@@ -135,8 +134,8 @@ FT_BEGIN_HEADER
* `NULL` if the font's 'CPAL' table doesn't contain appropriate data.
*
* palette_flags ::
- * A read-only array of palette flags with `num_palettes` elements.
- * Possible values are an ORed combination of
+ * An optional read-only array of palette flags with `num_palettes`
+ * elements. Possible values are an ORed combination of
* @FT_PALETTE_FOR_LIGHT_BACKGROUND and
* @FT_PALETTE_FOR_DARK_BACKGROUND.
*
@@ -147,7 +146,7 @@ FT_BEGIN_HEADER
* same size.
*
* palette_entry_name_ids ::
- * A read-only array of palette entry name IDs with
+ * An optional read-only array of palette entry name IDs with
* `num_palette_entries`. In each palette, entries with the same index
* have the same function. For example, index~0 might correspond to
* string 'outline' in the font's 'name' table to indicate that this
@@ -163,6 +162,9 @@ FT_BEGIN_HEADER
* Use function @FT_Get_Sfnt_Name to map name IDs and entry name IDs to
* name strings.
*
+ * Use function @FT_Palette_Select to get the colors associated with a
+ * palette entry.
+ *
* @since:
* 2.10
*/
@@ -300,6 +302,1302 @@ FT_BEGIN_HEADER
FT_Palette_Set_Foreground_Color( FT_Face face,
FT_Color foreground_color );
+
+ /**************************************************************************
+ *
+ * @section:
+ * layer_management
+ *
+ * @title:
+ * Glyph Layer Management
+ *
+ * @abstract:
+ * Retrieving and manipulating OpenType's 'COLR' table data.
+ *
+ * @description:
+ * The functions described here allow access of colored glyph layer data
+ * in OpenType's 'COLR' tables.
+ */
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_LayerIterator
+ *
+ * @description:
+ * This iterator object is needed for @FT_Get_Color_Glyph_Layer.
+ *
+ * @fields:
+ * num_layers ::
+ * The number of glyph layers for the requested glyph index. Will be
+ * set by @FT_Get_Color_Glyph_Layer.
+ *
+ * layer ::
+ * The current layer. Will be set by @FT_Get_Color_Glyph_Layer.
+ *
+ * p ::
+ * An opaque pointer into 'COLR' table data. The caller must set this
+ * to `NULL` before the first call of @FT_Get_Color_Glyph_Layer.
+ */
+ typedef struct FT_LayerIterator_
+ {
+ FT_UInt num_layers;
+ FT_UInt layer;
+ FT_Byte* p;
+
+ } FT_LayerIterator;
+
+
+ /**************************************************************************
+ *
+ * @function:
+ * FT_Get_Color_Glyph_Layer
+ *
+ * @description:
+ * This is an interface to the 'COLR' table in OpenType fonts to
+ * iteratively retrieve the colored glyph layers associated with the
+ * current glyph slot.
+ *
+ * https://docs.microsoft.com/en-us/typography/opentype/spec/colr
+ *
+ * The glyph layer data for a given glyph index, if present, provides an
+ * alternative, multi-color glyph representation: Instead of rendering
+ * the outline or bitmap with the given glyph index, glyphs with the
+ * indices and colors returned by this function are rendered layer by
+ * layer.
+ *
+ * The returned elements are ordered in the z~direction from bottom to
+ * top; the 'n'th element should be rendered with the associated palette
+ * color and blended on top of the already rendered layers (elements 0,
+ * 1, ..., n-1).
+ *
+ * @input:
+ * face ::
+ * A handle to the parent face object.
+ *
+ * base_glyph ::
+ * The glyph index the colored glyph layers are associated with.
+ *
+ * @inout:
+ * iterator ::
+ * An @FT_LayerIterator object. For the first call you should set
+ * `iterator->p` to `NULL`. For all following calls, simply use the
+ * same object again.
+ *
+ * @output:
+ * aglyph_index ::
+ * The glyph index of the current layer.
+ *
+ * acolor_index ::
+ * The color index into the font face's color palette of the current
+ * layer. The value 0xFFFF is special; it doesn't reference a palette
+ * entry but indicates that the text foreground color should be used
+ * instead (to be set up by the application outside of FreeType).
+ *
+ * The color palette can be retrieved with @FT_Palette_Select.
+ *
+ * @return:
+ * Value~1 if everything is OK. If there are no more layers (or if there
+ * are no layers at all), value~0 gets returned. In case of an error,
+ * value~0 is returned also.
+ *
+ * @note:
+ * This function is necessary if you want to handle glyph layers by
+ * yourself. In particular, functions that operate with @FT_GlyphRec
+ * objects (like @FT_Get_Glyph or @FT_Glyph_To_Bitmap) don't have access
+ * to this information.
+ *
+ * Note that @FT_Render_Glyph is able to handle colored glyph layers
+ * automatically if the @FT_LOAD_COLOR flag is passed to a previous call
+ * to @FT_Load_Glyph. [This is an experimental feature.]
+ *
+ * @example:
+ * ```
+ * FT_Color* palette;
+ * FT_LayerIterator iterator;
+ *
+ * FT_Bool have_layers;
+ * FT_UInt layer_glyph_index;
+ * FT_UInt layer_color_index;
+ *
+ *
+ * error = FT_Palette_Select( face, palette_index, &palette );
+ * if ( error )
+ * palette = NULL;
+ *
+ * iterator.p = NULL;
+ * have_layers = FT_Get_Color_Glyph_Layer( face,
+ * glyph_index,
+ * &layer_glyph_index,
+ * &layer_color_index,
+ * &iterator );
+ *
+ * if ( palette && have_layers )
+ * {
+ * do
+ * {
+ * FT_Color layer_color;
+ *
+ *
+ * if ( layer_color_index == 0xFFFF )
+ * layer_color = text_foreground_color;
+ * else
+ * layer_color = palette[layer_color_index];
+ *
+ * // Load and render glyph `layer_glyph_index', then
+ * // blend resulting pixmap (using color `layer_color')
+ * // with previously created pixmaps.
+ *
+ * } while ( FT_Get_Color_Glyph_Layer( face,
+ * glyph_index,
+ * &layer_glyph_index,
+ * &layer_color_index,
+ * &iterator ) );
+ * }
+ * ```
+ */
+ FT_EXPORT( FT_Bool )
+ FT_Get_Color_Glyph_Layer( FT_Face face,
+ FT_UInt base_glyph,
+ FT_UInt *aglyph_index,
+ FT_UInt *acolor_index,
+ FT_LayerIterator* iterator );
+
+
+ /**************************************************************************
+ *
+ * @enum:
+ * FT_PaintFormat
+ *
+ * @description:
+ * Enumeration describing the different paint format types of the v1
+ * extensions to the 'COLR' table, see
+ * 'https://github.com/googlefonts/colr-gradients-spec'.
+ *
+ * The enumeration values losely correspond with the format numbers of
+ * the specification: FreeType always returns a fully specified 'Paint'
+ * structure for the 'Transform', 'Translate', 'Scale', 'Rotate', and
+ * 'Skew' table types even though the specification has different formats
+ * depending on whether or not a center is specified, whether the scale
+ * is uniform in x and y~direction or not, etc. Also, only non-variable
+ * format identifiers are listed in this enumeration; as soon as support
+ * for variable 'COLR' v1 fonts is implemented, interpolation is
+ * performed dependent on axis coordinates, which are configured on the
+ * @FT_Face through @FT_Set_Var_Design_Coordinates. This implies that
+ * always static, readily interpolated values are returned in the 'Paint'
+ * structures.
+ *
+ * @since:
+ * 2.11 -- **currently experimental only!** There might be changes
+ * without retaining backward compatibility of both the API and ABI.
+ *
+ */
+ typedef enum FT_PaintFormat_
+ {
+ FT_COLR_PAINTFORMAT_COLR_LAYERS = 1,
+ FT_COLR_PAINTFORMAT_SOLID = 2,
+ FT_COLR_PAINTFORMAT_LINEAR_GRADIENT = 4,
+ FT_COLR_PAINTFORMAT_RADIAL_GRADIENT = 6,
+ FT_COLR_PAINTFORMAT_SWEEP_GRADIENT = 8,
+ FT_COLR_PAINTFORMAT_GLYPH = 10,
+ FT_COLR_PAINTFORMAT_COLR_GLYPH = 11,
+ FT_COLR_PAINTFORMAT_TRANSFORM = 12,
+ FT_COLR_PAINTFORMAT_TRANSLATE = 14,
+ FT_COLR_PAINTFORMAT_SCALE = 16,
+ FT_COLR_PAINTFORMAT_ROTATE = 24,
+ FT_COLR_PAINTFORMAT_SKEW = 28,
+ FT_COLR_PAINTFORMAT_COMPOSITE = 32,
+ FT_COLR_PAINT_FORMAT_MAX = 33,
+ FT_COLR_PAINTFORMAT_UNSUPPORTED = 255
+
+ } FT_PaintFormat;
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_ColorStopIterator
+ *
+ * @description:
+ * This iterator object is needed for @FT_Get_Colorline_Stops. It keeps
+ * state while iterating over the stops of an @FT_ColorLine,
+ * representing the `ColorLine` struct of the v1 extensions to 'COLR',
+ * see 'https://github.com/googlefonts/colr-gradients-spec'.
+ *
+ * @fields:
+ * num_color_stops ::
+ * The number of color stops for the requested glyph index. Set by
+ * @FT_Get_Colorline_Stops.
+ *
+ * current_color_stop ::
+ * The current color stop. Set by @FT_Get_Colorline_Stops.
+ *
+ * p ::
+ * An opaque pointer into 'COLR' table data. The caller must set this
+ * to `NULL` before the first call of @FT_Get_Colorline_Stops.
+ *
+ * @since:
+ * 2.11 -- **currently experimental only!** There might be changes
+ * without retaining backward compatibility of both the API and ABI.
+ *
+ */
+ typedef struct FT_ColorStopIterator_
+ {
+ FT_UInt num_color_stops;
+ FT_UInt current_color_stop;
+
+ FT_Byte* p;
+
+ } FT_ColorStopIterator;
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_ColorIndex
+ *
+ * @description:
+ * A structure representing a `ColorIndex` value of the 'COLR' v1
+ * extensions, see 'https://github.com/googlefonts/colr-gradients-spec'.
+ *
+ * @fields:
+ * palette_index ::
+ * The palette index into a 'CPAL' palette.
+ *
+ * alpha ::
+ * Alpha transparency value multiplied with the value from 'CPAL'.
+ *
+ * @since:
+ * 2.11 -- **currently experimental only!** There might be changes
+ * without retaining backward compatibility of both the API and ABI.
+ *
+ */
+ typedef struct FT_ColorIndex_
+ {
+ FT_UInt16 palette_index;
+ FT_F2Dot14 alpha;
+
+ } FT_ColorIndex;
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_ColorStop
+ *
+ * @description:
+ * A structure representing a `ColorStop` value of the 'COLR' v1
+ * extensions, see 'https://github.com/googlefonts/colr-gradients-spec'.
+ *
+ * @fields:
+ * stop_offset ::
+ * The stop offset between 0 and 1 along the gradient.
+ *
+ * color ::
+ * The color information for this stop, see @FT_ColorIndex.
+ *
+ * @since:
+ * 2.11 -- **currently experimental only!** There might be changes
+ * without retaining backward compatibility of both the API and ABI.
+ *
+ */
+ typedef struct FT_ColorStop_
+ {
+ FT_F2Dot14 stop_offset;
+ FT_ColorIndex color;
+
+ } FT_ColorStop;
+
+
+ /**************************************************************************
+ *
+ * @enum:
+ * FT_PaintExtend
+ *
+ * @description:
+ * An enumeration representing the 'Extend' mode of the 'COLR' v1
+ * extensions, see 'https://github.com/googlefonts/colr-gradients-spec'.
+ * It describes how the gradient fill continues at the other boundaries.
+ *
+ * @since:
+ * 2.11 -- **currently experimental only!** There might be changes
+ * without retaining backward compatibility of both the API and ABI.
+ *
+ */
+ typedef enum FT_PaintExtend_
+ {
+ FT_COLR_PAINT_EXTEND_PAD = 0,
+ FT_COLR_PAINT_EXTEND_REPEAT = 1,
+ FT_COLR_PAINT_EXTEND_REFLECT = 2
+
+ } FT_PaintExtend;
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_ColorLine
+ *
+ * @description:
+ * A structure representing a `ColorLine` value of the 'COLR' v1
+ * extensions, see 'https://github.com/googlefonts/colr-gradients-spec'.
+ * It describes a list of color stops along the defined gradient.
+ *
+ * @fields:
+ * extend ::
+ * The extend mode at the outer boundaries, see @FT_PaintExtend.
+ *
+ * color_stop_iterator ::
+ * The @FT_ColorStopIterator used to enumerate and retrieve the
+ * actual @FT_ColorStop's.
+ *
+ * @since:
+ * 2.11 -- **currently experimental only!** There might be changes
+ * without retaining backward compatibility of both the API and ABI.
+ *
+ */
+ typedef struct FT_ColorLine_
+ {
+ FT_PaintExtend extend;
+ FT_ColorStopIterator color_stop_iterator;
+
+ } FT_ColorLine;
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_Affine23
+ *
+ * @description:
+ * A structure used to store a 2x3 matrix. Coefficients are in
+ * 16.16 fixed-point format. The computation performed is
+ *
+ * ```
+ * x' = x*xx + y*xy + dx
+ * y' = x*yx + y*yy + dy
+ * ```
+ *
+ * @fields:
+ * xx ::
+ * Matrix coefficient.
+ *
+ * xy ::
+ * Matrix coefficient.
+ *
+ * dx ::
+ * x translation.
+ *
+ * yx ::
+ * Matrix coefficient.
+ *
+ * yy ::
+ * Matrix coefficient.
+ *
+ * dy ::
+ * y translation.
+ *
+ * @since:
+ * 2.11 -- **currently experimental only!** There might be changes
+ * without retaining backward compatibility of both the API and ABI.
+ *
+ */
+ typedef struct FT_Affine_23_
+ {
+ FT_Fixed xx, xy, dx;
+ FT_Fixed yx, yy, dy;
+
+ } FT_Affine23;
+
+
+ /**************************************************************************
+ *
+ * @enum:
+ * FT_Composite_Mode
+ *
+ * @description:
+ * An enumeration listing the 'COLR' v1 composite modes used in
+ * @FT_PaintComposite. For more details on each paint mode, see
+ * 'https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators'.
+ *
+ * @since:
+ * 2.11 -- **currently experimental only!** There might be changes
+ * without retaining backward compatibility of both the API and ABI.
+ *
+ */
+ typedef enum FT_Composite_Mode_
+ {
+ FT_COLR_COMPOSITE_CLEAR = 0,
+ FT_COLR_COMPOSITE_SRC = 1,
+ FT_COLR_COMPOSITE_DEST = 2,
+ FT_COLR_COMPOSITE_SRC_OVER = 3,
+ FT_COLR_COMPOSITE_DEST_OVER = 4,
+ FT_COLR_COMPOSITE_SRC_IN = 5,
+ FT_COLR_COMPOSITE_DEST_IN = 6,
+ FT_COLR_COMPOSITE_SRC_OUT = 7,
+ FT_COLR_COMPOSITE_DEST_OUT = 8,
+ FT_COLR_COMPOSITE_SRC_ATOP = 9,
+ FT_COLR_COMPOSITE_DEST_ATOP = 10,
+ FT_COLR_COMPOSITE_XOR = 11,
+ FT_COLR_COMPOSITE_SCREEN = 12,
+ FT_COLR_COMPOSITE_OVERLAY = 13,
+ FT_COLR_COMPOSITE_DARKEN = 14,
+ FT_COLR_COMPOSITE_LIGHTEN = 15,
+ FT_COLR_COMPOSITE_COLOR_DODGE = 16,
+ FT_COLR_COMPOSITE_COLOR_BURN = 17,
+ FT_COLR_COMPOSITE_HARD_LIGHT = 18,
+ FT_COLR_COMPOSITE_SOFT_LIGHT = 19,
+ FT_COLR_COMPOSITE_DIFFERENCE = 20,
+ FT_COLR_COMPOSITE_EXCLUSION = 21,
+ FT_COLR_COMPOSITE_MULTIPLY = 22,
+ FT_COLR_COMPOSITE_HSL_HUE = 23,
+ FT_COLR_COMPOSITE_HSL_SATURATION = 24,
+ FT_COLR_COMPOSITE_HSL_COLOR = 25,
+ FT_COLR_COMPOSITE_HSL_LUMINOSITY = 26,
+ FT_COLR_COMPOSITE_MAX = 27
+
+ } FT_Composite_Mode;
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_OpaquePaint
+ *
+ * @description:
+ * A structure representing an offset to a `Paint` value stored in any
+ * of the paint tables of a 'COLR' v1 font. Compare Offset<24> there.
+ * When 'COLR' v1 paint tables represented by FreeType objects such as
+ * @FT_PaintColrLayers, @FT_PaintComposite, or @FT_PaintTransform
+ * reference downstream nested paint tables, we do not immediately
+ * retrieve them but encapsulate their location in this type. Use
+ * @FT_Get_Paint to retrieve the actual @FT_COLR_Paint object that
+ * describes the details of the respective paint table.
+ *
+ * @fields:
+ * p ::
+ * An internal offset to a Paint table, needs to be set to NULL before
+ * passing this struct as an argument to @FT_Get_Paint.
+ *
+ * insert_root_transform ::
+ * An internal boolean to track whether an initial root transform is
+ * to be provided. Do not set this value.
+ *
+ * @since:
+ * 2.11 -- **currently experimental only!** There might be changes
+ * without retaining backward compatibility of both the API and ABI.
+ *
+ */
+ typedef struct FT_Opaque_Paint_
+ {
+ FT_Byte* p;
+ FT_Bool insert_root_transform;
+ } FT_OpaquePaint;
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_PaintColrLayers
+ *
+ * @description:
+ * A structure representing a `PaintColrLayers` table of a 'COLR' v1
+ * font. This table describes a set of layers that are to be composited
+ * with composite mode `FT_COLR_COMPOSITE_SRC_OVER`. The return value
+ * of this function is an @FT_LayerIterator initialized so that it can
+ * be used with @FT_Get_Paint_Layers to retrieve the @FT_OpaquePaint
+ * objects as references to each layer.
+ *
+ * @fields:
+ * layer_iterator ::
+ * The layer iterator that describes the layers of this paint.
+ *
+ * @since:
+ * 2.11 -- **currently experimental only!** There might be changes
+ * without retaining backward compatibility of both the API and ABI.
+ *
+ */
+ typedef struct FT_PaintColrLayers_
+ {
+ FT_LayerIterator layer_iterator;
+
+ } FT_PaintColrLayers;
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_PaintSolid
+ *
+ * @description:
+ * A structure representing a `PaintSolid` value of the 'COLR' v1
+ * extensions, see 'https://github.com/googlefonts/colr-gradients-spec'.
+ * Using a `PaintSolid` value means that the glyph layer filled with
+ * this paint is solid-colored and does not contain a gradient.
+ *
+ * @fields:
+ * color ::
+ * The color information for this solid paint, see @FT_ColorIndex.
+ *
+ * @since:
+ * 2.11 -- **currently experimental only!** There might be changes
+ * without retaining backward compatibility of both the API and ABI.
+ *
+ */
+ typedef struct FT_PaintSolid_
+ {
+ FT_ColorIndex color;
+
+ } FT_PaintSolid;
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_PaintLinearGradient
+ *
+ * @description:
+ * A structure representing a `PaintLinearGradient` value of the 'COLR'
+ * v1 extensions, see
+ * 'https://github.com/googlefonts/colr-gradients-spec'. The glyph
+ * layer filled with this paint is drawn filled with a linear gradient.
+ *
+ * @fields:
+ * colorline ::
+ * The @FT_ColorLine information for this paint, i.e., the list of
+ * color stops along the gradient.
+ *
+ * p0 ::
+ * The starting point of the gradient definition (in font units).
+ *
+ * p1 ::
+ * The end point of the gradient definition (in font units).
+ *
+ * p2 ::
+ * Optional point~p2 to rotate the gradient (in font units).
+ * Otherwise equal to~p0.
+ *
+ * @since:
+ * 2.11 -- **currently experimental only!** There might be changes
+ * without retaining backward compatibility of both the API and ABI.
+ *
+ */
+ typedef struct FT_PaintLinearGradient_
+ {
+ FT_ColorLine colorline;
+
+ /* TODO: Potentially expose those as x0, y0 etc. */
+ FT_Vector p0;
+ FT_Vector p1;
+ FT_Vector p2;
+
+ } FT_PaintLinearGradient;
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_PaintRadialGradient
+ *
+ * @description:
+ * A structure representing a `PaintRadialGradient` value of the 'COLR'
+ * v1 extensions, see
+ * 'https://github.com/googlefonts/colr-gradients-spec'. The glyph
+ * layer filled with this paint is drawn filled filled with a radial
+ * gradient.
+ *
+ * @fields:
+ * colorline ::
+ * The @FT_ColorLine information for this paint, i.e., the list of
+ * color stops along the gradient.
+ *
+ * c0 ::
+ * The center of the starting point of the radial gradient (in font
+ * units).
+ *
+ * r0 ::
+ * The radius of the starting circle of the radial gradient (in font
+ * units).
+ *
+ * c1 ::
+ * The center of the end point of the radial gradient (in font units).
+ *
+ * r1 ::
+ * The radius of the end circle of the radial gradient (in font
+ * units).
+ *
+ * @since:
+ * 2.11 -- **currently experimental only!** There might be changes
+ * without retaining backward compatibility of both the API and ABI.
+ *
+ */
+ typedef struct FT_PaintRadialGradient_
+ {
+ FT_ColorLine colorline;
+
+ FT_Vector c0;
+ FT_UShort r0;
+ FT_Vector c1;
+ FT_UShort r1;
+
+ } FT_PaintRadialGradient;
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_PaintSweepGradient
+ *
+ * @description:
+ * A structure representing a `PaintSweepGradient` value of the 'COLR'
+ * v1 extensions, see
+ * 'https://github.com/googlefonts/colr-gradients-spec'. The glyph
+ * layer filled with this paint is drawn filled with a sweep gradient
+ * from `start_angle` to `end_angle`.
+ *
+ * @fields:
+ * colorline ::
+ * The @FT_ColorLine information for this paint, i.e., the list of
+ * color stops along the gradient.
+ *
+ * center ::
+ * The center of the sweep gradient (in font units).
+ *
+ * start_angle ::
+ * The start angle of the sweep gradient, in 16.16 fixed point format
+ * specifying degrees. Values are given counter-clockwise, starting
+ * from the (positive) y~axis.
+ *
+ * end_angle ::
+ * The end angle of the sweep gradient, in 16.16 fixed point format
+ * specifying degrees. Values are given counter-clockwise, starting
+ * from the (positive) y~axis.
+ *
+ * @since:
+ * 2.11 -- **currently experimental only!** There might be changes
+ * without retaining backward compatibility of both the API and ABI.
+ *
+ */
+ typedef struct FT_PaintSweepGradient_
+ {
+ FT_ColorLine colorline;
+
+ FT_Vector center;
+ FT_Fixed start_angle;
+ FT_Fixed end_angle;
+
+ } FT_PaintSweepGradient;
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_PaintGlyph
+ *
+ * @description:
+ * A structure representing a 'COLR' v1 `PaintGlyph` paint table.
+ *
+ * @fields:
+ * paint ::
+ * An opaque paint object pointing to a `Paint` table that serves as
+ * the fill for the glyph ID.
+ *
+ * glyphID ::
+ * The glyph ID from the 'glyf' table, which serves as the contour
+ * information that is filled with paint.
+ *
+ * @since:
+ * 2.11 -- **currently experimental only!** There might be changes
+ * without retaining backward compatibility of both the API and ABI.
+ *
+ */
+ typedef struct FT_PaintGlyph_
+ {
+ FT_OpaquePaint paint;
+ FT_UInt glyphID;
+
+ } FT_PaintGlyph;
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_PaintColrGlyph
+ *
+ * @description:
+ * A structure representing a 'COLR' v1 `PaintColorGlyph` paint table.
+ *
+ * @fields:
+ * glyphID ::
+ * The glyph ID from the `BaseGlyphV1List` table that is drawn for
+ * this paint.
+ *
+ * @since:
+ * 2.11 -- **currently experimental only!** There might be changes
+ * without retaining backward compatibility of both the API and ABI.
+ *
+ */
+ typedef struct FT_PaintColrGlyph_
+ {
+ FT_UInt glyphID;
+
+ } FT_PaintColrGlyph;
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_PaintTransform
+ *
+ * @description:
+ * A structure representing a 'COLR' v1 `PaintTransform` paint table.
+ *
+ * @fields:
+ * paint ::
+ * An opaque paint that is subject to being transformed.
+ *
+ * affine ::
+ * A 2x3 transformation matrix in @FT_Affine23 format.
+ *
+ * @since:
+ * 2.11 -- **currently experimental only!** There might be changes
+ * without retaining backward compatibility of both the API and ABI.
+ *
+ */
+ typedef struct FT_PaintTransform_
+ {
+ FT_OpaquePaint paint;
+ FT_Affine23 affine;
+
+ } FT_PaintTransform;
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_PaintTranslate
+ *
+ * @description:
+ * A structure representing a 'COLR' v1 `PaintTranslate` paint table.
+ * Used for translating downstream paints by a given x and y~delta.
+ *
+ * @fields:
+ * paint ::
+ * An @FT_OpaquePaint object referencing the paint that is to be
+ * rotated.
+ *
+ * dx ::
+ * Translation in x~direction (in font units).
+ *
+ * dy ::
+ * Translation in y~direction (in font units).
+ *
+ * @since:
+ * 2.11 -- **currently experimental only!** There might be changes
+ * without retaining backward compatibility of both the API and ABI.
+ *
+ */
+ typedef struct FT_PaintTranslate_
+ {
+ FT_OpaquePaint paint;
+
+ FT_Fixed dx;
+ FT_Fixed dy;
+
+ } FT_PaintTranslate;
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_PaintScale
+ *
+ * @description:
+ * A structure representing all of the 'COLR' v1 'PaintScale*' paint
+ * tables. Used for scaling downstream paints by a given x and y~scale,
+ * with a given center. This structure is used for all 'PaintScale*'
+ * types that are part of specification; fields of this structure are
+ * filled accordingly. If there is a center, the center values are set,
+ * otherwise they are set to the zero coordinate. If the source font
+ * file has 'PaintScaleUniform*' set, the scale values are set
+ * accordingly to the same value.
+ *
+ * @fields:
+ * paint ::
+ * An @FT_OpaquePaint object referencing the paint that is to be
+ * scaled.
+ *
+ * scale_x ::
+ * Scale factor in x~direction.
+ *
+ * scale_y ::
+ * Scale factor in y~direction.
+ *
+ * center_x ::
+ * x~coordinate of center point to scale from.
+ *
+ * center_y ::
+ * y~coordinate of center point to scale from.
+ *
+ * @since:
+ * 2.11 -- **currently experimental only!** There might be changes
+ * without retaining backward-compatibility of both the API and ABI.
+ *
+ */
+ typedef struct FT_PaintScale_
+ {
+ FT_OpaquePaint paint;
+
+ FT_Fixed scale_x;
+ FT_Fixed scale_y;
+
+ FT_Fixed center_x;
+ FT_Fixed center_y;
+
+ } FT_PaintScale;
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_PaintRotate
+ *
+ * @description:
+ * A structure representing a 'COLR' v1 `PaintRotate` paint table. Used
+ * for rotating downstream paints with a given center and angle.
+ *
+ * @fields:
+ * paint ::
+ * An @FT_OpaquePaint object referencing the paint that is to be
+ * rotated.
+ *
+ * angle ::
+ * The rotation angle that is to be applied.
+ *
+ * center_x ::
+ * The x~coordinate of the pivot point of the rotation (in font
+ * units).
+ *
+ * center_y ::
+ * The y~coordinate of the pivot point of the rotation (in font
+ * units).
+ *
+ * @since:
+ * 2.11 -- **currently experimental only!** There might be changes
+ * without retaining backward compatibility of both the API and ABI.
+ *
+ */
+
+ typedef struct FT_PaintRotate_
+ {
+ FT_OpaquePaint paint;
+
+ FT_Fixed angle;
+
+ FT_Fixed center_x;
+ FT_Fixed center_y;
+
+ } FT_PaintRotate;
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_PaintSkew
+ *
+ * @description:
+ * A structure representing a 'COLR' v1 `PaintSkew` paint table. Used
+ * for skewing or shearing downstream paints by a given center and
+ * angle.
+ *
+ * @fields:
+ * paint ::
+ * An @FT_OpaquePaint object referencing the paint that is to be
+ * skewed.
+ *
+ * x_skew_angle ::
+ * The skewing angle in x~direction.
+ *
+ * y_skew_angle ::
+ * The skewing angle in y~direction.
+ *
+ * center_x ::
+ * The x~coordinate of the pivot point of the skew (in font units).
+ *
+ * center_y ::
+ * The y~coordinate of the pivot point of the skew (in font units).
+ *
+ * @since:
+ * 2.11 -- **currently experimental only!** There might be changes
+ * without retaining backward compatibility of both the API and ABI.
+ *
+ */
+ typedef struct FT_PaintSkew_
+ {
+ FT_OpaquePaint paint;
+
+ FT_Fixed x_skew_angle;
+ FT_Fixed y_skew_angle;
+
+ FT_Fixed center_x;
+ FT_Fixed center_y;
+
+ } FT_PaintSkew;
+
+
+ /**************************************************************************
+ *
+ * @struct:
+ * FT_PaintComposite
+ *
+ * @description:
+ * A structure representing a 'COLR'v1 `PaintComposite` paint table.
+ * Used for compositing two paints in a 'COLR' v1 directed acycling
+ * graph.
+ *
+ * @fields:
+ * source_paint ::
+ * An @FT_OpaquePaint object referencing the source that is to be
+ * composited.
+ *
+ * composite_mode ::
+ * An @FT_Composite_Mode enum value determining the composition
+ * operation.
+ *
+ * backdrop_paint ::
+ * An @FT_OpaquePaint object referencing the backdrop paint that
+ * `source_paint` is composited onto.
+ *
+ * @since:
+ * 2.11 -- **currently experimental only!** There might be changes
+ * without retaining backward compatibility of both the API and ABI.
+ *
+ */
+ typedef struct FT_PaintComposite_
+ {
+ FT_OpaquePaint source_paint;
+ FT_Composite_Mode composite_mode;
+ FT_OpaquePaint backdrop_paint;
+
+ } FT_PaintComposite;
+
+
+ /**************************************************************************
+ *
+ * @union:
+ * FT_COLR_Paint
+ *
+ * @description:
+ * A union object representing format and details of a paint table of a
+ * 'COLR' v1 font, see
+ * 'https://github.com/googlefonts/colr-gradients-spec'. Use
+ * @FT_Get_Paint to retrieve a @FT_COLR_Paint for an @FT_OpaquePaint
+ * object.
+ *
+ * @fields:
+ * format ::
+ * The gradient format for this Paint structure.
+ *
+ * u ::
+ * Union of all paint table types:
+ *
+ * * @FT_PaintColrLayers
+ * * @FT_PaintGlyph
+ * * @FT_PaintSolid
+ * * @FT_PaintLinearGradient
+ * * @FT_PaintRadialGradient
+ * * @FT_PaintSweepGradient
+ * * @FT_PaintTransform
+ * * @FT_PaintTranslate
+ * * @FT_PaintRotate
+ * * @FT_PaintSkew
+ * * @FT_PaintComposite
+ * * @FT_PaintColrGlyph
+ *
+ * @since:
+ * 2.11 -- **currently experimental only!** There might be changes
+ * without retaining backward compatibility of both the API and ABI.
+ *
+ */
+ typedef struct FT_COLR_Paint_
+ {
+ FT_PaintFormat format;
+
+ union
+ {
+ FT_PaintColrLayers colr_layers;
+ FT_PaintGlyph glyph;
+ FT_PaintSolid solid;
+ FT_PaintLinearGradient linear_gradient;
+ FT_PaintRadialGradient radial_gradient;
+ FT_PaintSweepGradient sweep_gradient;
+ FT_PaintTransform transform;
+ FT_PaintTranslate translate;
+ FT_PaintScale scale;
+ FT_PaintRotate rotate;
+ FT_PaintSkew skew;
+ FT_PaintComposite composite;
+ FT_PaintColrGlyph colr_glyph;
+
+ } u;
+
+ } FT_COLR_Paint;
+
+
+ /**************************************************************************
+ *
+ * @enum:
+ * FT_Color_Root_Transform
+ *
+ * @description:
+ * An enumeration to specify whether @FT_Get_Color_Glyph_Paint is to
+ * return a root transform to configure the client's graphics context
+ * matrix.
+ *
+ * @values:
+ * FT_COLOR_INCLUDE_ROOT_TRANSFORM ::
+ * Do include the root transform as the initial @FT_COLR_Paint object.
+ *
+ * FT_COLOR_NO_ROOT_TRANSFORM ::
+ * Do not output an initial root transform.
+ *
+ * @since:
+ * 2.11 -- **currently experimental only!** There might be changes
+ * without retaining backward compatibility of both the API and ABI.
+ *
+ */
+ typedef enum FT_Color_Root_Transform_
+ {
+ FT_COLOR_INCLUDE_ROOT_TRANSFORM,
+ FT_COLOR_NO_ROOT_TRANSFORM,
+
+ FT_COLOR_ROOT_TRANSFORM_MAX
+
+ } FT_Color_Root_Transform;
+
+
+ /**************************************************************************
+ *
+ * @function:
+ * FT_Get_Color_Glyph_Paint
+ *
+ * @description:
+ * This is the starting point and interface to color gradient
+ * information in a 'COLR' v1 table in OpenType fonts to recursively
+ * retrieve the paint tables for the directed acyclic graph of a colored
+ * glyph, given a glyph ID.
+ *
+ * https://github.com/googlefonts/colr-gradients-spec
+ *
+ * In a 'COLR' v1 font, each color glyph defines a directed acyclic
+ * graph of nested paint tables, such as `PaintGlyph`, `PaintSolid`,
+ * `PaintLinearGradient`, `PaintRadialGradient`, and so on. Using this
+ * function and specifying a glyph ID, one retrieves the root paint
+ * table for this glyph ID.
+ *
+ * This function allows control whether an initial root transform is
+ * returned to configure scaling, transform, and translation correctly
+ * on the client's graphics context. The initial root transform is
+ * computed and returned according to the values configured for @FT_Size
+ * and @FT_Set_Transform on the @FT_Face object, see below for details
+ * of the `root_transform` parameter. This has implications for a
+ * client 'COLR' v1 implementation: When this function returns an
+ * initially computed root transform, at the time of executing the
+ * @FT_PaintGlyph operation, the contours should be retrieved using
+ * @FT_Load_Glyph at unscaled, untransformed size. This is because the
+ * root transform applied to the graphics context will take care of
+ * correct scaling.
+ *
+ * Alternatively, to allow hinting of contours, at the time of executing
+ * @FT_Load_Glyph, the current graphics context transformation matrix
+ * can be decomposed into a scaling matrix and a remainder, and
+ * @FT_Load_Glyph can be used to retrieve the contours at scaled size.
+ * Care must then be taken to blit or clip to the graphics context with
+ * taking this remainder transformation into account.
+ *
+ * @input:
+ * face ::
+ * A handle to the parent face object.
+ *
+ * base_glyph ::
+ * The glyph index for which to retrieve the root paint table.
+ *
+ * root_transform ::
+ * Specifies whether an initially computed root is returned by the
+ * @FT_PaintTransform operation to account for the activated size
+ * (see @FT_Activate_Size) and the configured transform and translate
+ * (see @FT_Set_Transform).
+ *
+ * This root transform is returned before nodes of the glyph graph of
+ * the font are returned. Subsequent @FT_COLR_Paint structures
+ * contain unscaled and untransformed values. The inserted root
+ * transform enables the client application to apply an initial
+ * transform to its graphics context. When executing subsequent
+ * FT_COLR_Paint operations, values from @FT_COLR_Paint operations
+ * will ultimately be correctly scaled because of the root transform
+ * applied to the graphics context. Use
+ * @FT_COLOR_INCLUDE_ROOT_TRANSFORM to include the root transform, use
+ * @FT_COLOR_NO_ROOT_TRANSFORM to not include it. The latter may be
+ * useful when traversing the 'COLR' v1 glyph graph and reaching a
+ * @FT_PaintColrGlyph. When recursing into @FT_PaintColrGlyph and
+ * painting that inline, no additional root transform is needed as it
+ * has already been applied to the graphics context at the beginning
+ * of drawing this glyph.
+ *
+ * @output:
+ * paint ::
+ * The @FT_OpaquePaint object that references the actual paint table.
+ *
+ * The respective actual @FT_COLR_Paint object is retrieved via
+ * @FT_Get_Paint.
+ *
+ * @return:
+ * Value~1 if everything is OK. If no color glyph is found, or the root
+ * paint could not be retrieved, value~0 gets returned. In case of an
+ * error, value~0 is returned also.
+ *
+ * @since:
+ * 2.11 -- **currently experimental only!** There might be changes
+ * without retaining backward compatibility of both the API and ABI.
+ *
+ */
+ FT_EXPORT( FT_Bool )
+ FT_Get_Color_Glyph_Paint( FT_Face face,
+ FT_UInt base_glyph,
+ FT_Color_Root_Transform root_transform,
+ FT_OpaquePaint* paint );
+
+
+ /**************************************************************************
+ *
+ * @function:
+ * FT_Get_Paint_Layers
+ *
+ * @description:
+ * Access the layers of a `PaintColrLayers` table.
+ *
+ * If the root paint of a color glyph, or a nested paint of a 'COLR'
+ * glyph is a `PaintColrLayers` table, this function retrieves the
+ * layers of the `PaintColrLayers` table.
+ *
+ * The @FT_PaintColrLayers object contains an @FT_LayerIterator, which
+ * is used here to iterate over the layers. Each layer is returned as
+ * an @FT_OpaquePaint object, which then can be used with @FT_Get_Paint
+ * to retrieve the actual paint object.
+ *
+ * @input:
+ * face ::
+ * A handle to the parent face object.
+ *
+ * @inout:
+ * iterator ::
+ * The @FT_LayerIterator from an @FT_PaintColrLayers object, for which
+ * the layers are to be retrieved. The internal state of the iterator
+ * is incremented after one call to this function for retrieving one
+ * layer.
+ *
+ * @output:
+ * paint ::
+ * The @FT_OpaquePaint object that references the actual paint table.
+ * The respective actual @FT_COLR_Paint object is retrieved via
+ * @FT_Get_Paint.
+ *
+ * @return:
+ * Value~1 if everything is OK. Value~0 gets returned when the paint
+ * object can not be retrieved or any other error occurs.
+ *
+ * @since:
+ * 2.11 -- **currently experimental only!** There might be changes
+ * without retaining backward compatibility of both the API and ABI.
+ *
+ */
+ FT_EXPORT( FT_Bool )
+ FT_Get_Paint_Layers( FT_Face face,
+ FT_LayerIterator* iterator,
+ FT_OpaquePaint* paint );
+
+
+ /**************************************************************************
+ *
+ * @function:
+ * FT_Get_Colorline_Stops
+ *
+ * @description:
+ * This is an interface to color gradient information in a 'COLR' v1
+ * table in OpenType fonts to iteratively retrieve the gradient and
+ * solid fill information for colored glyph layers for a specified glyph
+ * ID.
+ *
+ * https://github.com/googlefonts/colr-gradients-spec
+ *
+ * @input:
+ * face ::
+ * A handle to the parent face object.
+ *
+ * @inout:
+ * iterator ::
+ * The retrieved @FT_ColorStopIterator, configured on an @FT_ColorLine,
+ * which in turn got retrieved via paint information in
+ * @FT_PaintLinearGradient or @FT_PaintRadialGradient.
+ *
+ * @output:
+ * color_stop ::
+ * Color index and alpha value for the retrieved color stop.
+ *
+ * @return:
+ * Value~1 if everything is OK. If there are no more color stops,
+ * value~0 gets returned. In case of an error, value~0 is returned
+ * also.
+ *
+ * @since:
+ * 2.11 -- **currently experimental only!** There might be changes
+ * without retaining backward compatibility of both the API and ABI.
+ *
+ */
+ FT_EXPORT( FT_Bool )
+ FT_Get_Colorline_Stops( FT_Face face,
+ FT_ColorStop* color_stop,
+ FT_ColorStopIterator* iterator );
+
+
+ /**************************************************************************
+ *
+ * @function:
+ * FT_Get_Paint
+ *
+ * @description:
+ * Access the details of a paint using an @FT_OpaquePaint opaque paint
+ * object, which internally stores the offset to the respective `Paint`
+ * object in the 'COLR' table.
+ *
+ * @input:
+ * face ::
+ * A handle to the parent face object.
+ *
+ * opaque_paint ::
+ * The opaque paint object for which the underlying @FT_COLR_Paint
+ * data is to be retrieved.
+ *
+ * @output:
+ * paint ::
+ * The specific @FT_COLR_Paint object containing information coming
+ * from one of the font's `Paint*` tables.
+ *
+ * @return:
+ * Value~1 if everything is OK. Value~0 if no details can be found for
+ * this paint or any other error occured.
+ *
+ * @since:
+ * 2.11 -- **currently experimental only!** There might be changes
+ * without retaining backward compatibility of both the API and ABI.
+ *
+ */
+ FT_EXPORT( FT_Bool )
+ FT_Get_Paint( FT_Face face,
+ FT_OpaquePaint opaque_paint,
+ FT_COLR_Paint* paint );
+
/* */
diff --git a/ThirdParty/freetype/include/freetype/ftdriver.h b/ThirdParty/freetype/include/freetype/ftdriver.h
index 497bde9..4936639 100644
--- a/ThirdParty/freetype/include/freetype/ftdriver.h
+++ b/ThirdParty/freetype/include/freetype/ftdriver.h
@@ -4,7 +4,7 @@
*
* FreeType API for controlling driver modules (specification only).
*
- * Copyright (C) 2017-2019 by
+ * Copyright (C) 2017-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -19,9 +19,8 @@
#ifndef FTDRIVER_H_
#define FTDRIVER_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_PARAMETER_TAGS_H
+#include <freetype/freetype.h>
+#include <freetype/ftparams.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
@@ -54,10 +53,10 @@ FT_BEGIN_HEADER
* 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.
+ * (experimental), @darkening-parameters (experimental),
+ * @glyph-to-script-map (experimental), @fallback-script (experimental),
+ * and @default-script (experimental), as documented in the @properties
+ * section.
*
*/
@@ -85,15 +84,15 @@ FT_BEGIN_HEADER
* @properties section.
*
*
- * **Hinting and antialiasing principles of the new engine**
+ * **Hinting and anti-aliasing 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
+ * amount of anti-aliasing 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
+ * 'anti-aliasing' means that stems are not positioned exactly on pixel
* borders, causing a fuzzy appearance.
*
* There are two principles behind this approach.
@@ -109,7 +108,7 @@ FT_BEGIN_HEADER
* 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
+ * One of the reasons to not hint horizontally is anti-aliasing 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
@@ -117,7 +116,7 @@ FT_BEGIN_HEADER
* 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
+ * designs. Even when the rasterizer uses greyscale anti-aliasing 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.
@@ -363,12 +362,8 @@ FT_BEGIN_HEADER
* 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.
+ * For the 'cff' module, the default engine is 'adobe'. For both the
+ * 'type1' and 't1cid' modules, the default engine is 'adobe', too.
*
* @note:
* This property can be used with @FT_Property_Get also.
@@ -427,10 +422,6 @@ FT_BEGIN_HEADER
* 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
@@ -1171,48 +1162,18 @@ FT_BEGIN_HEADER
* warping
*
* @description:
- * **Experimental only**
+ * **Obsolete**
*
- * 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.
+ * This property was always experimental and probably never worked
+ * correctly. It was entirely removed from the FreeType~2 sources. This
+ * entry is only here for historical reference.
*
- * 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
+ * Warping only worked in 'normal' auto-hinting mode replacing it. The
+ * idea of the code was 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
+ * much of its segments were 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.
- *
- * @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.
- *
- * @example:
- * This example 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 );
- * ```
+ * combinations were tried and scored.
*
* @since:
* 2.6
diff --git a/ThirdParty/freetype/include/freetype/fterrdef.h b/ThirdParty/freetype/include/freetype/fterrdef.h
index 9bc7dc6..6e9c4cc 100644
--- a/ThirdParty/freetype/include/freetype/fterrdef.h
+++ b/ThirdParty/freetype/include/freetype/fterrdef.h
@@ -4,7 +4,7 @@
*
* FreeType error codes (specification).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
diff --git a/ThirdParty/freetype/include/freetype/fterrors.h b/ThirdParty/freetype/include/freetype/fterrors.h
index 58f5a3e..151941d 100644
--- a/ThirdParty/freetype/include/freetype/fterrors.h
+++ b/ThirdParty/freetype/include/freetype/fterrors.h
@@ -4,7 +4,7 @@
*
* FreeType error code handling (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -89,7 +89,7 @@
* const char* err_msg;
* } ft_errors[] =
*
- * #include FT_ERRORS_H
+ * #include <freetype/fterrors.h>
* ```
*
* An alternative to using an array is a switch statement.
@@ -124,7 +124,7 @@
/* include module base error codes */
-#include FT_MODULE_ERRORS_H
+#include <freetype/ftmoderr.h>
/*******************************************************************/
@@ -197,7 +197,7 @@
/* now include the error codes */
-#include FT_ERROR_DEFINITIONS_H
+#include <freetype/fterrdef.h>
#ifdef FT_ERROR_END_LIST
@@ -232,11 +232,16 @@
#undef FT_ERR_PREFIX
#endif
- /* FT_INCLUDE_ERR_PROTOS: Control if function prototypes should be */
- /* included with `#include FT_ERRORS_H'. This is */
- /* only true where `FT_ERRORDEF` is undefined. */
- /* FT_ERR_PROTOS_DEFINED: Actual multiple-inclusion protection of */
- /* `fterrors.h`. */
+ /* FT_INCLUDE_ERR_PROTOS: Control whether function prototypes should be */
+ /* included with */
+ /* */
+ /* #include <freetype/fterrors.h> */
+ /* */
+ /* This is only true where `FT_ERRORDEF` is */
+ /* undefined. */
+ /* */
+ /* FT_ERR_PROTOS_DEFINED: Actual multiple-inclusion protection of */
+ /* `fterrors.h`. */
#ifdef FT_INCLUDE_ERR_PROTOS
#undef FT_INCLUDE_ERR_PROTOS
@@ -244,6 +249,8 @@
#define FT_ERR_PROTOS_DEFINED
+FT_BEGIN_HEADER
+
/**************************************************************************
*
* @function:
@@ -274,6 +281,10 @@
FT_EXPORT( const char* )
FT_Error_String( FT_Error error_code );
+ /* */
+
+FT_END_HEADER
+
#endif /* FT_ERR_PROTOS_DEFINED */
diff --git a/ThirdParty/freetype/include/freetype/ftfntfmt.h b/ThirdParty/freetype/include/freetype/ftfntfmt.h
index aae0b13..8e68a4a 100644
--- a/ThirdParty/freetype/include/freetype/ftfntfmt.h
+++ b/ThirdParty/freetype/include/freetype/ftfntfmt.h
@@ -4,7 +4,7 @@
*
* Support functions for font formats.
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -19,8 +19,7 @@
#ifndef FTFNTFMT_H_
#define FTFNTFMT_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
diff --git a/ThirdParty/freetype/include/freetype/ftgasp.h b/ThirdParty/freetype/include/freetype/ftgasp.h
index 24673d8..76c45eb 100644
--- a/ThirdParty/freetype/include/freetype/ftgasp.h
+++ b/ThirdParty/freetype/include/freetype/ftgasp.h
@@ -4,7 +4,7 @@
*
* Access of TrueType's 'gasp' table (specification).
*
- * Copyright (C) 2007-2019 by
+ * Copyright (C) 2007-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -19,8 +19,7 @@
#ifndef FTGASP_H_
#define FTGASP_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
diff --git a/ThirdParty/freetype/include/freetype/ftglyph.h b/ThirdParty/freetype/include/freetype/ftglyph.h
index 4067c2e..479267b 100644
--- a/ThirdParty/freetype/include/freetype/ftglyph.h
+++ b/ThirdParty/freetype/include/freetype/ftglyph.h
@@ -4,7 +4,7 @@
*
* FreeType convenience functions to handle glyphs (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -33,8 +33,7 @@
#define FTGLYPH_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
@@ -210,7 +209,7 @@ FT_BEGIN_HEADER
*
* As the outline is extracted from a glyph slot, its coordinates are
* expressed normally in 26.6 pixels, unless the flag @FT_LOAD_NO_SCALE
- * was used in @FT_Load_Glyph() or @FT_Load_Char().
+ * was used in @FT_Load_Glyph or @FT_Load_Char.
*
* The outline's tables are always owned by the object and are destroyed
* with it.
diff --git a/ThirdParty/freetype/include/freetype/ftgxval.h b/ThirdParty/freetype/include/freetype/ftgxval.h
index b14f637..21bbbde 100644
--- a/ThirdParty/freetype/include/freetype/ftgxval.h
+++ b/ThirdParty/freetype/include/freetype/ftgxval.h
@@ -4,7 +4,7 @@
*
* FreeType API for validating TrueTypeGX/AAT tables (specification).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2021 by
* Masatake YAMATO, Redhat K.K,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
@@ -28,8 +28,7 @@
#ifndef FTGXVAL_H_
#define FTGXVAL_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
diff --git a/ThirdParty/freetype/include/freetype/ftgzip.h b/ThirdParty/freetype/include/freetype/ftgzip.h
index 418c612..ba82bab 100644
--- a/ThirdParty/freetype/include/freetype/ftgzip.h
+++ b/ThirdParty/freetype/include/freetype/ftgzip.h
@@ -4,7 +4,7 @@
*
* Gzip-compressed stream support.
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -19,8 +19,7 @@
#ifndef FTGZIP_H_
#define FTGZIP_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
@@ -43,6 +42,16 @@ FT_BEGIN_HEADER
* Using gzip-compressed font files.
*
* @description:
+ * In certain builds of the library, gzip compression recognition is
+ * automatically handled when calling @FT_New_Face or @FT_Open_Face.
+ * This means that if no font driver is capable of handling the raw
+ * compressed file, the library will try to open a gzipped stream from it
+ * and re-open the face with it.
+ *
+ * The stream implementation is very basic and resets the decompression
+ * process each time seeking backwards is needed within the stream,
+ * which significantly undermines the performance.
+ *
* This section contains the declaration of Gzip-specific functions.
*
*/
@@ -75,15 +84,6 @@ FT_BEGIN_HEADER
* **not** call `FT_Stream_Close` on the source stream. None of the
* stream objects will be released to the heap.
*
- * The stream implementation is very basic and resets the decompression
- * process each time seeking backwards is needed within the stream.
- *
- * In certain builds of the library, gzip compression recognition is
- * automatically handled when calling @FT_New_Face or @FT_Open_Face.
- * This means that if no font driver is capable of handling the raw
- * compressed file, the library will try to open a gzipped stream from it
- * and re-open the face with it.
- *
* This function may return `FT_Err_Unimplemented_Feature` if your build
* of FreeType was not compiled with zlib support.
*/
diff --git a/ThirdParty/freetype/include/freetype/ftimage.h b/ThirdParty/freetype/include/freetype/ftimage.h
index d640b0b..66a8b89 100644
--- a/ThirdParty/freetype/include/freetype/ftimage.h
+++ b/ThirdParty/freetype/include/freetype/ftimage.h
@@ -5,7 +5,7 @@
* FreeType glyph image formats and default raster interface
* (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -30,7 +30,6 @@
/* STANDALONE_ is from ftgrays.c */
#ifndef STANDALONE_
-#include <ft2build.h>
#endif
@@ -202,6 +201,11 @@ FT_BEGIN_HEADER
#define ft_pixel_mode_pal2 FT_PIXEL_MODE_GRAY2
#define ft_pixel_mode_pal4 FT_PIXEL_MODE_GRAY4
+ /* */
+
+ /* For debugging, the @FT_Pixel_Mode enumeration must stay in sync */
+ /* with the `pixel_modes` array in file `ftobjs.c`. */
+
/**************************************************************************
*
@@ -401,6 +405,13 @@ FT_BEGIN_HEADER
* if @FT_OUTLINE_IGNORE_DROPOUTS is set. See below for more
* information.
*
+ * FT_OUTLINE_OVERLAP ::
+ * This flag indicates that this outline contains overlapping contrours
+ * and the anti-aliased renderer should perform oversampling to
+ * mitigate possible artifacts. This flag should _not_ be set for
+ * well designed glyphs without overlaps because it quadruples the
+ * rendering time.
+ *
* FT_OUTLINE_HIGH_PRECISION ::
* This flag indicates that the scan-line converter should try to
* convert this outline to bitmaps with the highest possible quality.
@@ -432,6 +443,7 @@ FT_BEGIN_HEADER
#define FT_OUTLINE_IGNORE_DROPOUTS 0x8
#define FT_OUTLINE_SMART_DROPOUTS 0x10
#define FT_OUTLINE_INCLUDE_STUBS 0x20
+#define FT_OUTLINE_OVERLAP 0x40
#define FT_OUTLINE_HIGH_PRECISION 0x100
#define FT_OUTLINE_SINGLE_PASS 0x200
@@ -765,17 +777,6 @@ FT_BEGIN_HEADER
/*************************************************************************/
- /**************************************************************************
- *
- * A raster is a scan converter, in charge of rendering an outline into a
- * bitmap. This section contains the public API for rasters.
- *
- * Note that in FreeType 2, all rasters are now encapsulated within
- * specific modules called 'renderers'. See `ftrender.h` for more details
- * on renderers.
- *
- */
-
/**************************************************************************
*
@@ -789,16 +790,35 @@ FT_BEGIN_HEADER
* How vectorial outlines are converted into bitmaps and pixmaps.
*
* @description:
- * This section contains technical definitions.
+ * A raster or a rasterizer is a scan converter in charge of producing a
+ * pixel coverage bitmap that can be used as an alpha channel when
+ * compositing a glyph with a background. FreeType comes with two
+ * rasterizers: bilevel `raster1` and anti-aliased `smooth` are two
+ * separate modules. They are usually called from the high-level
+ * @FT_Load_Glyph or @FT_Render_Glyph functions and produce the entire
+ * coverage bitmap at once, while staying largely invisible to users.
+ *
+ * Instead of working with complete coverage bitmaps, it is also possible
+ * to intercept consecutive pixel runs on the same scanline with the same
+ * coverage, called _spans_, and process them individually. Only the
+ * `smooth` rasterizer permits this when calling @FT_Outline_Render with
+ * @FT_Raster_Params as described below.
+ *
+ * Working with either complete bitmaps or spans it is important to think
+ * of them as colorless coverage objects suitable as alpha channels to
+ * blend arbitrary colors with a background. For best results, it is
+ * recommended to use gamma correction, too.
+ *
+ * This section also describes the public API needed to set up alternative
+ * @FT_Renderer modules.
*
* @order:
- * FT_Raster
* FT_Span
* FT_SpanFunc
- *
* FT_Raster_Params
* FT_RASTER_FLAG_XXX
*
+ * FT_Raster
* FT_Raster_NewFunc
* FT_Raster_DoneFunc
* FT_Raster_ResetFunc
@@ -811,24 +831,12 @@ FT_BEGIN_HEADER
/**************************************************************************
*
- * @type:
- * FT_Raster
- *
- * @description:
- * An opaque handle (pointer) to a raster object. Each object can be
- * used independently to convert an outline into a bitmap or pixmap.
- */
- typedef struct FT_RasterRec_* FT_Raster;
-
-
- /**************************************************************************
- *
* @struct:
* FT_Span
*
* @description:
- * A structure used to model a single span of gray pixels when rendering
- * an anti-aliased bitmap.
+ * A structure to model a single span of consecutive pixels when
+ * rendering an anti-aliased bitmap.
*
* @fields:
* x ::
@@ -845,8 +853,8 @@ FT_BEGIN_HEADER
* This structure is used by the span drawing callback type named
* @FT_SpanFunc that takes the y~coordinate of the span as a parameter.
*
- * The coverage value is always between 0 and 255. If you want less gray
- * values, the callback function has to reduce them.
+ * The anti-aliased rasterizer produces coverage values from 0 to 255,
+ * this is, from completely transparent to completely opaque.
*/
typedef struct FT_Span_
{
@@ -864,12 +872,12 @@ FT_BEGIN_HEADER
*
* @description:
* A function used as a call-back by the anti-aliased renderer in order
- * to let client applications draw themselves the gray pixel spans on
- * each scan line.
+ * to let client applications draw themselves the pixel spans on each
+ * scan line.
*
* @input:
* y ::
- * The scanline's y~coordinate.
+ * The scanline's upward y~coordinate.
*
* count ::
* The number of spans to draw on this scanline.
@@ -881,11 +889,12 @@ FT_BEGIN_HEADER
* User-supplied data that is passed to the callback.
*
* @note:
- * This callback allows client applications to directly render the gray
- * spans of the anti-aliased bitmap to any kind of surfaces.
+ * This callback allows client applications to directly render the spans
+ * of the anti-aliased bitmap to any kind of surfaces.
*
* This can be used to write anti-aliased outlines directly to a given
- * background bitmap, and even perform translucency.
+ * background bitmap using alpha compositing. It can also be used for
+ * oversampling and averaging.
*/
typedef void
(*FT_SpanFunc)( int y,
@@ -945,24 +954,27 @@ FT_BEGIN_HEADER
* This flag is set to indicate direct rendering. In this mode, client
* applications must provide their own span callback. This lets them
* directly draw or compose over an existing bitmap. If this bit is
- * not set, the target pixmap's buffer _must_ be zeroed before
- * rendering.
+ * _not_ set, the target pixmap's buffer _must_ be zeroed before
+ * rendering and the output will be clipped to its size.
*
* Direct rendering is only possible with anti-aliased glyphs.
*
* FT_RASTER_FLAG_CLIP ::
* This flag is only used in direct rendering mode. If set, the output
* will be clipped to a box specified in the `clip_box` field of the
- * @FT_Raster_Params structure.
+ * @FT_Raster_Params structure. Otherwise, the `clip_box` is
+ * effectively set to the bounding box and all spans are generated.
*
- * Note that by default, the glyph bitmap is clipped to the target
- * pixmap, except in direct rendering mode where all spans are
- * generated if no clipping box is set.
+ * FT_RASTER_FLAG_SDF ::
+ * This flag is set to indicate that a signed distance field glyph
+ * image should be generated. This is only used while rendering with
+ * the @FT_RENDER_MODE_SDF render mode.
*/
#define FT_RASTER_FLAG_DEFAULT 0x0
#define FT_RASTER_FLAG_AA 0x1
#define FT_RASTER_FLAG_DIRECT 0x2
#define FT_RASTER_FLAG_CLIP 0x4
+#define FT_RASTER_FLAG_SDF 0x8
/* these constants are deprecated; use the corresponding */
/* `FT_RASTER_FLAG_XXX` values instead */
@@ -978,7 +990,8 @@ FT_BEGIN_HEADER
* FT_Raster_Params
*
* @description:
- * A structure to hold the arguments used by a raster's render function.
+ * A structure to hold the parameters used by a raster's render function,
+ * passed as an argument to @FT_Outline_Render.
*
* @fields:
* target ::
@@ -1006,20 +1019,26 @@ FT_BEGIN_HEADER
* User-supplied data that is passed to each drawing callback.
*
* clip_box ::
- * An optional clipping box. It is only used in direct rendering mode.
- * Note that coordinates here should be expressed in _integer_ pixels
- * (and not in 26.6 fixed-point units).
+ * An optional span clipping box expressed in _integer_ pixels
+ * (not in 26.6 fixed-point units).
*
* @note:
- * An anti-aliased glyph bitmap is drawn if the @FT_RASTER_FLAG_AA bit
- * flag is set in the `flags` field, otherwise a monochrome bitmap is
- * generated.
- *
- * If the @FT_RASTER_FLAG_DIRECT bit flag is set in `flags`, the raster
- * will call the `gray_spans` callback to draw gray pixel spans. This
- * allows direct composition over a pre-existing bitmap through
- * user-provided callbacks to perform the span drawing and composition.
- * Not supported by the monochrome rasterizer.
+ * The @FT_RASTER_FLAG_AA bit flag must be set in the `flags` to
+ * generate an anti-aliased glyph bitmap, otherwise a monochrome bitmap
+ * is generated. The `target` should have appropriate pixel mode and its
+ * dimensions define the clipping region.
+ *
+ * If both @FT_RASTER_FLAG_AA and @FT_RASTER_FLAG_DIRECT bit flags
+ * are set in `flags`, the raster calls an @FT_SpanFunc callback
+ * `gray_spans` with `user` data as an argument ignoring `target`. This
+ * allows direct composition over a pre-existing user surface to perform
+ * the span drawing and composition. To optionally clip the spans, set
+ * the @FT_RASTER_FLAG_CLIP flag and `clip_box`. The monochrome raster
+ * does not support the direct mode.
+ *
+ * The gray-level rasterizer always uses 256 gray levels. If you want
+ * fewer gray levels, you have to use @FT_RASTER_FLAG_DIRECT and reduce
+ * the levels in the callback function.
*/
typedef struct FT_Raster_Params_
{
@@ -1038,6 +1057,23 @@ FT_BEGIN_HEADER
/**************************************************************************
*
+ * @type:
+ * FT_Raster
+ *
+ * @description:
+ * An opaque handle (pointer) to a raster object. Each object can be
+ * used independently to convert an outline into a bitmap or pixmap.
+ *
+ * @note:
+ * In FreeType 2, all rasters are now encapsulated within specific
+ * @FT_Renderer modules and only used in their context.
+ *
+ */
+ typedef struct FT_RasterRec_* FT_Raster;
+
+
+ /**************************************************************************
+ *
* @functype:
* FT_Raster_NewFunc
*
diff --git a/ThirdParty/freetype/include/freetype/ftincrem.h b/ThirdParty/freetype/include/freetype/ftincrem.h
index a4db02b..229b947 100644
--- a/ThirdParty/freetype/include/freetype/ftincrem.h
+++ b/ThirdParty/freetype/include/freetype/ftincrem.h
@@ -4,7 +4,7 @@
*
* FreeType incremental loading (specification).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -19,9 +19,8 @@
#ifndef FTINCREM_H_
#define FTINCREM_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_PARAMETER_TAGS_H
+#include <freetype/freetype.h>
+#include <freetype/ftparams.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
@@ -214,9 +213,14 @@ FT_BEGIN_HEADER
*
* @description:
* A function used to retrieve the basic metrics of a given glyph index
- * before accessing its data. This is necessary because, in certain
- * formats like TrueType, the metrics are stored in a different place
- * from the glyph images proper.
+ * before accessing its data. This allows for handling font types such
+ * as PCL~XL Format~1, Class~2 downloaded TrueType fonts, where the glyph
+ * metrics (`hmtx` and `vmtx` tables) are permitted to be omitted from
+ * the font, and the relevant metrics included in the header of the glyph
+ * outline data. Importantly, this is not intended to allow custom glyph
+ * metrics (for example, Postscript Metrics dictionaries), because that
+ * conflicts with the requirements of outline hinting. Such custom
+ * metrics must be handled separately, by the calling application.
*
* @input:
* incremental ::
@@ -236,7 +240,7 @@ FT_BEGIN_HEADER
*
* @output:
* ametrics ::
- * The replacement glyph metrics in font units.
+ * The glyph metrics in font units.
*
*/
typedef FT_Error
@@ -265,7 +269,7 @@ FT_BEGIN_HEADER
*
* get_glyph_metrics ::
* The function to get glyph metrics. May be null if the font does not
- * provide overriding glyph metrics.
+ * require it.
*
*/
typedef struct FT_Incremental_FuncsRec_
diff --git a/ThirdParty/freetype/include/freetype/ftlcdfil.h b/ThirdParty/freetype/include/freetype/ftlcdfil.h
index 3a19d04..107a174 100644
--- a/ThirdParty/freetype/include/freetype/ftlcdfil.h
+++ b/ThirdParty/freetype/include/freetype/ftlcdfil.h
@@ -5,7 +5,7 @@
* FreeType API for color filtering of subpixel bitmap glyphs
* (specification).
*
- * Copyright (C) 2006-2019 by
+ * Copyright (C) 2006-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -20,9 +20,8 @@
#ifndef FTLCDFIL_H_
#define FTLCDFIL_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_PARAMETER_TAGS_H
+#include <freetype/freetype.h>
+#include <freetype/ftparams.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
@@ -47,7 +46,7 @@ FT_BEGIN_HEADER
* @description:
* FreeType provides two alternative subpixel rendering technologies.
* Should you define `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` in your
- * `ftoption.h` file, this enables patented ClearType-style rendering.
+ * `ftoption.h` file, this enables ClearType-style rendering.
* Otherwise, Harmony LCD rendering is enabled. These technologies are
* controlled differently and API described below, although always
* available, performs its function when appropriate method is enabled
@@ -56,13 +55,12 @@ FT_BEGIN_HEADER
* ClearType-style LCD rendering exploits the color-striped structure of
* LCD pixels, increasing the available resolution in the direction of
* the stripe (usually horizontal RGB) by a factor of~3. Using the
- * subpixels coverages unfiltered can create severe color fringes
+ * subpixel coverages unfiltered can create severe color fringes
* especially when rendering thin features. Indeed, to produce
* black-on-white text, the nearby color subpixels must be dimmed
- * equally.
- *
- * A good 5-tap FIR filter should be applied to subpixel coverages
- * regardless of pixel boundaries and should have these properties:
+ * evenly. Therefore, an equalizing 5-tap FIR filter should be applied
+ * to subpixel coverages regardless of pixel boundaries and should have
+ * these properties:
*
* 1. It should be symmetrical, like {~a, b, c, b, a~}, to avoid
* any shifts in appearance.
@@ -85,7 +83,7 @@ FT_BEGIN_HEADER
* Harmony LCD rendering is suitable to panels with any regular subpixel
* structure, not just monitors with 3 color striped subpixels, as long
* as the color subpixels have fixed positions relative to the pixel
- * center. In this case, each color channel is then rendered separately
+ * center. In this case, each color channel can be rendered separately
* after shifting the outline opposite to the subpixel shift so that the
* coverage maps are aligned. This method is immune to color fringes
* because the shifts do not change integral coverage.
@@ -102,9 +100,9 @@ FT_BEGIN_HEADER
* clockwise. Harmony with default LCD geometry is equivalent to
* ClearType with light filter.
*
- * As a result of ClearType filtering or Harmony rendering, the
- * dimensions of LCD bitmaps can be either wider or taller than the
- * dimensions of the corresponding outline with regard to the pixel grid.
+ * As a result of ClearType filtering or Harmony shifts, the resulting
+ * dimensions of LCD bitmaps can be slightly wider or taller than the
+ * dimensions the original outline with regard to the pixel grid.
* For example, for @FT_RENDER_MODE_LCD, the filter adds 2~subpixels to
* the left, and 2~subpixels to the right. The bitmap offset values are
* adjusted accordingly, so clients shouldn't need to modify their layout
@@ -177,7 +175,7 @@ FT_BEGIN_HEADER
* FT_Library_SetLcdFilter
*
* @description:
- * This function is used to apply color filtering to LCD decimated
+ * This function is used to change filter applied to LCD decimated
* bitmaps, like the ones used when calling @FT_Render_Glyph with
* @FT_RENDER_MODE_LCD or @FT_RENDER_MODE_LCD_V.
*
@@ -196,15 +194,14 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success.
*
* @note:
- * This feature is always disabled by default. Clients must make an
- * explicit call to this function with a `filter` value other than
- * @FT_LCD_FILTER_NONE in order to enable it.
+ * Since 2.10.3 the LCD filtering is enabled with @FT_LCD_FILTER_DEFAULT.
+ * It is no longer necessary to call this function explicitly except
+ * to choose a different filter or disable filtering altogether with
+ * @FT_LCD_FILTER_NONE.
*
- * Due to **PATENTS** covering subpixel rendering, this function doesn't
- * do anything except returning `FT_Err_Unimplemented_Feature` if the
- * configuration macro `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` is not
- * defined in your build of the library, which should correspond to all
- * default builds of FreeType.
+ * This function does nothing but returns `FT_Err_Unimplemented_Feature`
+ * if the configuration macro `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` is
+ * not defined in your build of the library.
*
* @since:
* 2.3.0
@@ -235,11 +232,9 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success.
*
* @note:
- * Due to **PATENTS** covering subpixel rendering, this function doesn't
- * do anything except returning `FT_Err_Unimplemented_Feature` if the
- * configuration macro `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` is not
- * defined in your build of the library, which should correspond to all
- * default builds of FreeType.
+ * This function does nothing but returns `FT_Err_Unimplemented_Feature`
+ * if the configuration macro `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` is
+ * not defined in your build of the library.
*
* LCD filter weights can also be set per face using @FT_Face_Properties
* with @FT_PARAM_TAG_LCD_FILTER_WEIGHTS.
diff --git a/ThirdParty/freetype/include/freetype/ftlist.h b/ThirdParty/freetype/include/freetype/ftlist.h
index 4782892..55f0159 100644
--- a/ThirdParty/freetype/include/freetype/ftlist.h
+++ b/ThirdParty/freetype/include/freetype/ftlist.h
@@ -4,7 +4,7 @@
*
* Generic list support for FreeType (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -28,8 +28,7 @@
#define FTLIST_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
diff --git a/ThirdParty/freetype/include/freetype/ftlogging.h b/ThirdParty/freetype/include/freetype/ftlogging.h
new file mode 100644
index 0000000..a558b85
--- /dev/null
+++ b/ThirdParty/freetype/include/freetype/ftlogging.h
@@ -0,0 +1,184 @@
+/****************************************************************************
+ *
+ * ftlogging.h
+ *
+ * Additional debugging APIs.
+ *
+ * Copyright (C) 2020-2021 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 FTLOGGING_H_
+#define FTLOGGING_H_
+
+
+#include <ft2build.h>
+#include FT_CONFIG_CONFIG_H
+
+
+FT_BEGIN_HEADER
+
+
+ /**************************************************************************
+ *
+ * @section:
+ * debugging_apis
+ *
+ * @title:
+ * External Debugging APIs
+ *
+ * @abstract:
+ * Public APIs to control the `FT_DEBUG_LOGGING` macro.
+ *
+ * @description:
+ * This section contains the declarations of public functions that
+ * enables fine control of what the `FT_DEBUG_LOGGING` macro outputs.
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @function:
+ * FT_Trace_Set_Level
+ *
+ * @description:
+ * Change the levels of tracing components of FreeType at run time.
+ *
+ * @input:
+ * tracing_level ::
+ * New tracing value.
+ *
+ * @example:
+ * The following call makes FreeType trace everything but the 'memory'
+ * component.
+ *
+ * ```
+ * FT_Trace_Set_Level( "any:7 memory:0 );
+ * ```
+ *
+ * @note:
+ * This function does nothing if compilation option `FT_DEBUG_LOGGING`
+ * isn't set.
+ *
+ * @since:
+ * 2.11
+ *
+ */
+ FT_EXPORT( void )
+ FT_Trace_Set_Level( const char* tracing_level );
+
+
+ /**************************************************************************
+ *
+ * @function:
+ * FT_Trace_Set_Default_Level
+ *
+ * @description:
+ * Reset tracing value of FreeType's components to the default value
+ * (i.e., to the value of the `FT2_DEBUG` environment value or to NULL
+ * if `FT2_DEBUG` is not set).
+ *
+ * @note:
+ * This function does nothing if compilation option `FT_DEBUG_LOGGING`
+ * isn't set.
+ *
+ * @since:
+ * 2.11
+ *
+ */
+ FT_EXPORT( void )
+ FT_Trace_Set_Default_Level( void );
+
+
+ /**************************************************************************
+ *
+ * @functype:
+ * FT_Custom_Log_Handler
+ *
+ * @description:
+ * A function typedef that is used to handle the logging of tracing and
+ * debug messages on a file system.
+ *
+ * @input:
+ * ft_component ::
+ * The name of `FT_COMPONENT` from which the current debug or error
+ * message is produced.
+ *
+ * fmt ::
+ * Actual debug or tracing message.
+ *
+ * args::
+ * Arguments of debug or tracing messages.
+ *
+ * @since:
+ * 2.11
+ *
+ */
+ typedef void
+ (*FT_Custom_Log_Handler)( const char* ft_component,
+ const char* fmt,
+ va_list args );
+
+
+ /**************************************************************************
+ *
+ * @function:
+ * FT_Set_Log_Handler
+ *
+ * @description:
+ * A function to set a custom log handler.
+ *
+ * @input:
+ * handler ::
+ * New logging function.
+ *
+ * @note:
+ * This function does nothing if compilation option `FT_DEBUG_LOGGING`
+ * isn't set.
+ *
+ * @since:
+ * 2.11
+ *
+ */
+ FT_EXPORT( void )
+ FT_Set_Log_Handler( FT_Custom_Log_Handler handler );
+
+
+ /**************************************************************************
+ *
+ * @function:
+ * FT_Set_Default_Log_Handler
+ *
+ * @description:
+ * A function to undo the effect of @FT_Set_Log_Handler, resetting the
+ * log handler to FreeType's built-in version.
+ *
+ * @note:
+ * This function does nothing if compilation option `FT_DEBUG_LOGGING`
+ * isn't set.
+ *
+ * @since:
+ * 2.11
+ *
+ */
+ FT_EXPORT( void )
+ FT_Set_Default_Log_Handler( void );
+
+ /* */
+
+
+FT_END_HEADER
+
+#endif /* FTLOGGING_H_ */
+
+
+/* END */
diff --git a/ThirdParty/freetype/include/freetype/ftlzw.h b/ThirdParty/freetype/include/freetype/ftlzw.h
index fd22968..fce1c9c 100644
--- a/ThirdParty/freetype/include/freetype/ftlzw.h
+++ b/ThirdParty/freetype/include/freetype/ftlzw.h
@@ -4,7 +4,7 @@
*
* LZW-compressed stream support.
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -19,8 +19,7 @@
#ifndef FTLZW_H_
#define FTLZW_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
@@ -43,6 +42,16 @@ FT_BEGIN_HEADER
* Using LZW-compressed font files.
*
* @description:
+ * In certain builds of the library, LZW compression recognition is
+ * automatically handled when calling @FT_New_Face or @FT_Open_Face.
+ * This means that if no font driver is capable of handling the raw
+ * compressed file, the library will try to open a LZW stream from it and
+ * re-open the face with it.
+ *
+ * The stream implementation is very basic and resets the decompression
+ * process each time seeking backwards is needed within the stream,
+ * which significantly undermines the performance.
+ *
* This section contains the declaration of LZW-specific functions.
*
*/
@@ -73,15 +82,6 @@ FT_BEGIN_HEADER
* **not** call `FT_Stream_Close` on the source stream. None of the
* stream objects will be released to the heap.
*
- * The stream implementation is very basic and resets the decompression
- * process each time seeking backwards is needed within the stream
- *
- * In certain builds of the library, LZW compression recognition is
- * automatically handled when calling @FT_New_Face or @FT_Open_Face.
- * This means that if no font driver is capable of handling the raw
- * compressed file, the library will try to open a LZW stream from it and
- * re-open the face with it.
- *
* This function may return `FT_Err_Unimplemented_Feature` if your build
* of FreeType was not compiled with LZW support.
*/
diff --git a/ThirdParty/freetype/include/freetype/ftmac.h b/ThirdParty/freetype/include/freetype/ftmac.h
index 92b9f3d..607af9b 100644
--- a/ThirdParty/freetype/include/freetype/ftmac.h
+++ b/ThirdParty/freetype/include/freetype/ftmac.h
@@ -4,7 +4,7 @@
*
* Additional Mac-specific API.
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2021 by
* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -29,7 +29,6 @@
#define FTMAC_H_
-#include <ft2build.h>
FT_BEGIN_HEADER
diff --git a/ThirdParty/freetype/include/freetype/ftmm.h b/ThirdParty/freetype/include/freetype/ftmm.h
index f2e16b6..32579e9 100644
--- a/ThirdParty/freetype/include/freetype/ftmm.h
+++ b/ThirdParty/freetype/include/freetype/ftmm.h
@@ -4,7 +4,7 @@
*
* FreeType Multiple Master font interface (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -20,8 +20,7 @@
#define FTMM_H_
-#include <ft2build.h>
-#include FT_TYPE1_TABLES_H
+#include <freetype/t1tables.h>
FT_BEGIN_HEADER
diff --git a/ThirdParty/freetype/include/freetype/ftmodapi.h b/ThirdParty/freetype/include/freetype/ftmodapi.h
index 88488bf..cb15423 100644
--- a/ThirdParty/freetype/include/freetype/ftmodapi.h
+++ b/ThirdParty/freetype/include/freetype/ftmodapi.h
@@ -4,7 +4,7 @@
*
* FreeType modules public interface (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -20,8 +20,7 @@
#define FTMODAPI_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
@@ -46,10 +45,12 @@ FT_BEGIN_HEADER
*
* @description:
* The definitions below are used to manage modules within FreeType.
- * Modules can be added, upgraded, and removed at runtime. Additionally,
- * some module properties can be controlled also.
+ * Internal and external modules can be added, upgraded, and removed at
+ * runtime. For example, an alternative renderer or proprietary font
+ * driver can be registered and prioritized. Additionally, some module
+ * properties can also be controlled.
*
- * Here is a list of possible values of the `module_name` field in the
+ * Here is a list of existing values of the `module_name` field in the
* @FT_Module_Class structure.
*
* ```
@@ -65,7 +66,7 @@ FT_BEGIN_HEADER
* psnames
* raster1
* sfnt
- * smooth, smooth-lcd, smooth-lcdv
+ * smooth
* truetype
* type1
* type42
@@ -87,6 +88,7 @@ FT_BEGIN_HEADER
* FT_Remove_Module
* FT_Add_Default_Modules
*
+ * FT_FACE_DRIVER_NAME
* FT_Property_Set
* FT_Property_Get
* FT_Set_Default_Properties
@@ -331,6 +333,26 @@ FT_BEGIN_HEADER
/**************************************************************************
*
+ * @macro:
+ * FT_FACE_DRIVER_NAME
+ *
+ * @description:
+ * A macro that retrieves the name of a font driver from a face object.
+ *
+ * @note:
+ * The font driver name is a valid `module_name` for @FT_Property_Set
+ * and @FT_Property_Get. This is not the same as @FT_Get_Font_Format.
+ *
+ * @since:
+ * 2.11
+ *
+ */
+#define FT_FACE_DRIVER_NAME( face ) \
+ ( ( *(FT_Module_Class**)( ( face )->driver ) )->module_name )
+
+
+ /**************************************************************************
+ *
* @function:
* FT_Property_Set
*
@@ -486,8 +508,7 @@ FT_BEGIN_HEADER
*
* ```
* FREETYPE_PROPERTIES=truetype:interpreter-version=35 \
- * cff:no-stem-darkening=1 \
- * autofitter:warping=1
+ * cff:no-stem-darkening=0
* ```
*
* @inout:
@@ -623,7 +644,7 @@ FT_BEGIN_HEADER
* it is bytecode interpreter's execution context, `TT_ExecContext`,
* which is declared in FreeType's internal header file `tttypes.h`.
*/
- typedef void
+ typedef FT_Error
(*FT_DebugHook_Func)( void* arg );
diff --git a/ThirdParty/freetype/include/freetype/ftmoderr.h b/ThirdParty/freetype/include/freetype/ftmoderr.h
index e169935..b417cd5 100644
--- a/ThirdParty/freetype/include/freetype/ftmoderr.h
+++ b/ThirdParty/freetype/include/freetype/ftmoderr.h
@@ -4,7 +4,7 @@
*
* FreeType module error offsets (specification).
*
- * Copyright (C) 2001-2019 by
+ * Copyright (C) 2001-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -94,7 +94,7 @@
* const char* mod_err_msg
* } ft_mod_errors[] =
*
- * #include FT_MODULE_ERRORS_H
+ * #include <freetype/ftmoderr.h>
* ```
*
*/
@@ -171,6 +171,7 @@
FT_MODERRDEF( Type42, 0x1400, "Type 42 module" )
FT_MODERRDEF( Winfonts, 0x1500, "Windows FON/FNT module" )
FT_MODERRDEF( GXvalid, 0x1600, "GX validation module" )
+ FT_MODERRDEF( Sdf, 0x1700, "Signed distance field raster module" )
#ifdef FT_MODERR_END_LIST
diff --git a/ThirdParty/freetype/include/freetype/ftotval.h b/ThirdParty/freetype/include/freetype/ftotval.h
index c034f48..00f9727 100644
--- a/ThirdParty/freetype/include/freetype/ftotval.h
+++ b/ThirdParty/freetype/include/freetype/ftotval.h
@@ -4,7 +4,7 @@
*
* FreeType API for validating OpenType tables (specification).
*
- * Copyright (C) 2004-2019 by
+ * Copyright (C) 2004-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -30,8 +30,7 @@
#ifndef FTOTVAL_H_
#define FTOTVAL_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
diff --git a/ThirdParty/freetype/include/freetype/ftoutln.h b/ThirdParty/freetype/include/freetype/ftoutln.h
index 75c3d01..6bb5f80 100644
--- a/ThirdParty/freetype/include/freetype/ftoutln.h
+++ b/ThirdParty/freetype/include/freetype/ftoutln.h
@@ -5,7 +5,7 @@
* Support for the FT_Outline type used to store glyph shapes of
* most scalable font formats (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -21,8 +21,7 @@
#define FTOUTLN_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
@@ -466,8 +465,6 @@ FT_BEGIN_HEADER
*
* @description:
* Render an outline within a bitmap using the current scan-convert.
- * This function uses an @FT_Raster_Params structure as an argument,
- * allowing advanced features like direct composition, translucency, etc.
*
* @input:
* library ::
@@ -485,17 +482,13 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success.
*
* @note:
- * You should know what you are doing and how @FT_Raster_Params works to
- * use this function.
- *
+ * This advanced function uses @FT_Raster_Params as an argument.
* The field `params.source` will be set to `outline` before the scan
* converter is called, which means that the value you give to it is
- * actually ignored.
- *
- * The gray-level rasterizer always uses 256 gray levels. If you want
- * less gray levels, you have to provide your own span callback. See the
- * @FT_RASTER_FLAG_DIRECT value of the `flags` field in the
- * @FT_Raster_Params structure for more details.
+ * actually ignored. Either `params.target` must point to preallocated
+ * bitmap, or @FT_RASTER_FLAG_DIRECT must be set in `params.flags`
+ * allowing FreeType rasterizer to be used for direct composition,
+ * translucency, etc. See @FT_Raster_Params for more details.
*/
FT_EXPORT( FT_Error )
FT_Outline_Render( FT_Library library,
diff --git a/ThirdParty/freetype/include/freetype/ftparams.h b/ThirdParty/freetype/include/freetype/ftparams.h
index c374ee2..04a3f44 100644
--- a/ThirdParty/freetype/include/freetype/ftparams.h
+++ b/ThirdParty/freetype/include/freetype/ftparams.h
@@ -4,7 +4,7 @@
*
* FreeType API for possible FT_Parameter tags (specification only).
*
- * Copyright (C) 2017-2019 by
+ * Copyright (C) 2017-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -19,8 +19,7 @@
#ifndef FTPARAMS_H_
#define FTPARAMS_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
diff --git a/ThirdParty/freetype/include/freetype/ftpfr.h b/ThirdParty/freetype/include/freetype/ftpfr.h
index b4eca76..fbdb14c 100644
--- a/ThirdParty/freetype/include/freetype/ftpfr.h
+++ b/ThirdParty/freetype/include/freetype/ftpfr.h
@@ -4,7 +4,7 @@
*
* FreeType API for accessing PFR-specific data (specification only).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -19,8 +19,7 @@
#ifndef FTPFR_H_
#define FTPFR_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
diff --git a/ThirdParty/freetype/include/freetype/ftrender.h b/ThirdParty/freetype/include/freetype/ftrender.h
index a01c774..48d489d 100644
--- a/ThirdParty/freetype/include/freetype/ftrender.h
+++ b/ThirdParty/freetype/include/freetype/ftrender.h
@@ -4,7 +4,7 @@
*
* FreeType renderer modules public interface (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -20,9 +20,8 @@
#define FTRENDER_H_
-#include <ft2build.h>
-#include FT_MODULE_H
-#include FT_GLYPH_H
+#include <freetype/ftmodapi.h>
+#include <freetype/ftglyph.h>
FT_BEGIN_HEADER
diff --git a/ThirdParty/freetype/include/freetype/ftsizes.h b/ThirdParty/freetype/include/freetype/ftsizes.h
index 6c63cef..2236639 100644
--- a/ThirdParty/freetype/include/freetype/ftsizes.h
+++ b/ThirdParty/freetype/include/freetype/ftsizes.h
@@ -4,7 +4,7 @@
*
* FreeType size objects management (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -29,8 +29,7 @@
#define FTSIZES_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
diff --git a/ThirdParty/freetype/include/freetype/ftsnames.h b/ThirdParty/freetype/include/freetype/ftsnames.h
index 4d43602..c7f6581 100644
--- a/ThirdParty/freetype/include/freetype/ftsnames.h
+++ b/ThirdParty/freetype/include/freetype/ftsnames.h
@@ -7,7 +7,7 @@
*
* This is _not_ used to retrieve glyph names!
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -23,9 +23,8 @@
#define FTSNAMES_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_PARAMETER_TAGS_H
+#include <freetype/freetype.h>
+#include <freetype/ftparams.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
diff --git a/ThirdParty/freetype/include/freetype/ftstroke.h b/ThirdParty/freetype/include/freetype/ftstroke.h
index 01a9c18..88b2a8a 100644
--- a/ThirdParty/freetype/include/freetype/ftstroke.h
+++ b/ThirdParty/freetype/include/freetype/ftstroke.h
@@ -4,7 +4,7 @@
*
* FreeType path stroker (specification).
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -19,9 +19,8 @@
#ifndef FTSTROKE_H_
#define FTSTROKE_H_
-#include <ft2build.h>
-#include FT_OUTLINE_H
-#include FT_GLYPH_H
+#include <freetype/ftoutln.h>
+#include <freetype/ftglyph.h>
FT_BEGIN_HEADER
@@ -44,7 +43,7 @@ FT_BEGIN_HEADER
* borders of the stroke.
*
* This can be useful to generate 'bordered' glyph, i.e., glyphs
- * displayed with a coloured (and anti-aliased) border around their
+ * displayed with a colored (and anti-aliased) border around their
* shape.
*
* @order:
@@ -114,22 +113,19 @@ FT_BEGIN_HEADER
* FT_STROKER_LINEJOIN_MITER_FIXED ::
* Used to render mitered line joins, with fixed bevels if the miter
* limit is exceeded. The outer edges of the strokes for the two
- * segments are extended until they meet at an angle. If the segments
- * meet at too sharp an angle (such that the miter would extend from
- * the intersection of the segments a distance greater than the product
- * of the miter limit value and the border radius), then a bevel join
- * (see above) is used instead. This prevents long spikes being
- * created. `FT_STROKER_LINEJOIN_MITER_FIXED` generates a miter line
- * join as used in PostScript and PDF.
+ * segments are extended until they meet at an angle. A bevel join
+ * (see above) is used if the segments meet at too sharp an angle and
+ * the outer edges meet beyond a distance corresponding to the meter
+ * limit. This prevents long spikes being created.
+ * `FT_STROKER_LINEJOIN_MITER_FIXED` generates a miter line join as
+ * used in PostScript and PDF.
*
* FT_STROKER_LINEJOIN_MITER_VARIABLE ::
* FT_STROKER_LINEJOIN_MITER ::
* Used to render mitered line joins, with variable bevels if the miter
- * limit is exceeded. The intersection of the strokes is clipped at a
- * line perpendicular to the bisector of the angle between the strokes,
- * at the distance from the intersection of the segments equal to the
- * product of the miter limit value and the border radius. This
- * prevents long spikes being created.
+ * limit is exceeded. The intersection of the strokes is clipped
+ * perpendicularly to the bisector, at a distance corresponding to
+ * the miter limit. This prevents long spikes being created.
* `FT_STROKER_LINEJOIN_MITER_VARIABLE` generates a mitered line join
* as used in XPS. `FT_STROKER_LINEJOIN_MITER` is an alias for
* `FT_STROKER_LINEJOIN_MITER_VARIABLE`, retained for backward
@@ -296,12 +292,17 @@ FT_BEGIN_HEADER
* The line join style.
*
* miter_limit ::
- * The miter limit for the `FT_STROKER_LINEJOIN_MITER_FIXED` and
- * `FT_STROKER_LINEJOIN_MITER_VARIABLE` line join styles, expressed as
- * 16.16 fixed-point value.
+ * The maximum reciprocal sine of half-angle at the miter join,
+ * expressed as 16.16 fixed point value.
*
* @note:
- * The radius is expressed in the same units as the outline coordinates.
+ * The `radius` is expressed in the same units as the outline
+ * coordinates.
+ *
+ * The `miter_limit` multiplied by the `radius` gives the maximum size
+ * of a miter spike, at which it is clipped for
+ * @FT_STROKER_LINEJOIN_MITER_VARIABLE or replaced with a bevel join for
+ * @FT_STROKER_LINEJOIN_MITER_FIXED.
*
* This function calls @FT_Stroker_Rewind automatically.
*/
diff --git a/ThirdParty/freetype/include/freetype/ftsynth.h b/ThirdParty/freetype/include/freetype/ftsynth.h
index 8754f97..861dcb5 100644
--- a/ThirdParty/freetype/include/freetype/ftsynth.h
+++ b/ThirdParty/freetype/include/freetype/ftsynth.h
@@ -5,7 +5,7 @@
* FreeType synthesizing code for emboldening and slanting
* (specification).
*
- * Copyright (C) 2000-2019 by
+ * Copyright (C) 2000-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -45,8 +45,7 @@
#define FTSYNTH_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
diff --git a/ThirdParty/freetype/include/freetype/ftsystem.h b/ThirdParty/freetype/include/freetype/ftsystem.h
index 889a6ba..e5abb85 100644
--- a/ThirdParty/freetype/include/freetype/ftsystem.h
+++ b/ThirdParty/freetype/include/freetype/ftsystem.h
@@ -4,7 +4,7 @@
*
* FreeType low-level system interface definition (specification).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -20,7 +20,6 @@
#define FTSYSTEM_H_
-#include <ft2build.h>
FT_BEGIN_HEADER
diff --git a/ThirdParty/freetype/include/freetype/fttrigon.h b/ThirdParty/freetype/include/freetype/fttrigon.h
index 37e1412..dbe7b0d 100644
--- a/ThirdParty/freetype/include/freetype/fttrigon.h
+++ b/ThirdParty/freetype/include/freetype/fttrigon.h
@@ -4,7 +4,7 @@
*
* FreeType trigonometric functions (specification).
*
- * Copyright (C) 2001-2019 by
+ * Copyright (C) 2001-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -19,7 +19,7 @@
#ifndef FTTRIGON_H_
#define FTTRIGON_H_
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
diff --git a/ThirdParty/freetype/include/freetype/fttypes.h b/ThirdParty/freetype/include/freetype/fttypes.h
index 1057150..d5ca1c4 100644
--- a/ThirdParty/freetype/include/freetype/fttypes.h
+++ b/ThirdParty/freetype/include/freetype/fttypes.h
@@ -4,7 +4,7 @@
*
* FreeType simple types definitions (specification only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -22,8 +22,8 @@
#include <ft2build.h>
#include FT_CONFIG_CONFIG_H
-#include FT_SYSTEM_H
-#include FT_IMAGE_H
+#include <freetype/ftsystem.h>
+#include <freetype/ftimage.h>
#include <stddef.h>
diff --git a/ThirdParty/freetype/include/freetype/ftwinfnt.h b/ThirdParty/freetype/include/freetype/ftwinfnt.h
index 3437913..b1ef3b6 100644
--- a/ThirdParty/freetype/include/freetype/ftwinfnt.h
+++ b/ThirdParty/freetype/include/freetype/ftwinfnt.h
@@ -4,7 +4,7 @@
*
* FreeType API for accessing Windows fnt-specific data.
*
- * Copyright (C) 2003-2019 by
+ * Copyright (C) 2003-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -19,8 +19,7 @@
#ifndef FTWINFNT_H_
#define FTWINFNT_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
@@ -58,7 +57,7 @@ FT_BEGIN_HEADER
* @description:
* A list of valid values for the `charset` byte in @FT_WinFNT_HeaderRec.
* Exact mapping tables for the various 'cpXXXX' encodings (except for
- * 'cp1361') can be found at 'ftp://ftp.unicode.org/Public' in the
+ * 'cp1361') can be found at 'ftp://ftp.unicode.org/Public/' in the
* `MAPPINGS/VENDORS/MICSFT/WINDOWS` subdirectory. 'cp1361' is roughly a
* superset of `MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT`.
*
diff --git a/ThirdParty/freetype/include/freetype/internal/autohint.h b/ThirdParty/freetype/include/freetype/internal/autohint.h
deleted file mode 100644
index f64c28b..0000000
--- a/ThirdParty/freetype/include/freetype/internal/autohint.h
+++ /dev/null
@@ -1,232 +0,0 @@
-/****************************************************************************
- *
- * autohint.h
- *
- * High-level 'autohint' module-specific interface (specification).
- *
- * Copyright (C) 1996-2019 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 auto-hinter is used to load and automatically hint glyphs if a
- * format-specific hinter isn't available.
- *
- */
-
-
-#ifndef AUTOHINT_H_
-#define AUTOHINT_H_
-
-
- /**************************************************************************
- *
- * A small technical note regarding automatic hinting in order to clarify
- * this module interface.
- *
- * An automatic hinter might compute two kinds of data for a given face:
- *
- * - global hints: Usually some metrics that describe global properties
- * of the face. It is computed by scanning more or less
- * aggressively the glyphs in the face, and thus can be
- * very slow to compute (even if the size of global hints
- * is really small).
- *
- * - glyph hints: These describe some important features of the glyph
- * outline, as well as how to align them. They are
- * generally much faster to compute than global hints.
- *
- * The current FreeType auto-hinter does a pretty good job while performing
- * fast computations for both global and glyph hints. However, we might be
- * interested in introducing more complex and powerful algorithms in the
- * future, like the one described in the John D. Hobby paper, which
- * unfortunately requires a lot more horsepower.
- *
- * Because a sufficiently sophisticated font management system would
- * typically implement an LRU cache of opened face objects to reduce memory
- * usage, it is a good idea to be able to avoid recomputing global hints
- * every time the same face is re-opened.
- *
- * We thus provide the ability to cache global hints outside of the face
- * object, in order to speed up font re-opening time. Of course, this
- * feature is purely optional, so most client programs won't even notice
- * it.
- *
- * I initially thought that it would be a good idea to cache the glyph
- * hints too. However, my general idea now is that if you really need to
- * cache these too, you are simply in need of a new font format, where all
- * this information could be stored within the font file and decoded on the
- * fly.
- *
- */
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-
-FT_BEGIN_HEADER
-
-
- typedef struct FT_AutoHinterRec_ *FT_AutoHinter;
-
-
- /**************************************************************************
- *
- * @functype:
- * FT_AutoHinter_GlobalGetFunc
- *
- * @description:
- * Retrieve the global hints computed for a given face object. The
- * resulting data is dissociated from the face and will survive a call to
- * FT_Done_Face(). It must be discarded through the API
- * FT_AutoHinter_GlobalDoneFunc().
- *
- * @input:
- * hinter ::
- * A handle to the source auto-hinter.
- *
- * face ::
- * A handle to the source face object.
- *
- * @output:
- * global_hints ::
- * A typeless pointer to the global hints.
- *
- * global_len ::
- * The size in bytes of the global hints.
- */
- typedef void
- (*FT_AutoHinter_GlobalGetFunc)( FT_AutoHinter hinter,
- FT_Face face,
- void** global_hints,
- long* global_len );
-
-
- /**************************************************************************
- *
- * @functype:
- * FT_AutoHinter_GlobalDoneFunc
- *
- * @description:
- * Discard the global hints retrieved through
- * FT_AutoHinter_GlobalGetFunc(). This is the only way these hints are
- * freed from memory.
- *
- * @input:
- * hinter ::
- * A handle to the auto-hinter module.
- *
- * global ::
- * A pointer to retrieved global hints to discard.
- */
- typedef void
- (*FT_AutoHinter_GlobalDoneFunc)( FT_AutoHinter hinter,
- void* global );
-
-
- /**************************************************************************
- *
- * @functype:
- * FT_AutoHinter_GlobalResetFunc
- *
- * @description:
- * This function is used to recompute the global metrics in a given font.
- * This is useful when global font data changes (e.g. Multiple Masters
- * fonts where blend coordinates change).
- *
- * @input:
- * hinter ::
- * A handle to the source auto-hinter.
- *
- * face ::
- * A handle to the face.
- */
- typedef void
- (*FT_AutoHinter_GlobalResetFunc)( FT_AutoHinter hinter,
- FT_Face face );
-
-
- /**************************************************************************
- *
- * @functype:
- * FT_AutoHinter_GlyphLoadFunc
- *
- * @description:
- * This function is used to load, scale, and automatically hint a glyph
- * from a given face.
- *
- * @input:
- * face ::
- * A handle to the face.
- *
- * glyph_index ::
- * The glyph index.
- *
- * load_flags ::
- * The load flags.
- *
- * @note:
- * This function is capable of loading composite glyphs by hinting each
- * sub-glyph independently (which improves quality).
- *
- * It will call the font driver with @FT_Load_Glyph, with
- * @FT_LOAD_NO_SCALE set.
- */
- typedef FT_Error
- (*FT_AutoHinter_GlyphLoadFunc)( FT_AutoHinter hinter,
- FT_GlyphSlot slot,
- FT_Size size,
- FT_UInt glyph_index,
- FT_Int32 load_flags );
-
-
- /**************************************************************************
- *
- * @struct:
- * FT_AutoHinter_InterfaceRec
- *
- * @description:
- * The auto-hinter module's interface.
- */
- typedef struct FT_AutoHinter_InterfaceRec_
- {
- FT_AutoHinter_GlobalResetFunc reset_face;
- FT_AutoHinter_GlobalGetFunc get_global_hints;
- FT_AutoHinter_GlobalDoneFunc done_global_hints;
- FT_AutoHinter_GlyphLoadFunc load_glyph;
-
- } FT_AutoHinter_InterfaceRec, *FT_AutoHinter_Interface;
-
-
-#define FT_DEFINE_AUTOHINTER_INTERFACE( \
- class_, \
- reset_face_, \
- get_global_hints_, \
- done_global_hints_, \
- load_glyph_ ) \
- FT_CALLBACK_TABLE_DEF \
- const FT_AutoHinter_InterfaceRec class_ = \
- { \
- reset_face_, \
- get_global_hints_, \
- done_global_hints_, \
- load_glyph_ \
- };
-
-
-FT_END_HEADER
-
-#endif /* AUTOHINT_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/cffotypes.h b/ThirdParty/freetype/include/freetype/internal/cffotypes.h
deleted file mode 100644
index b26893e..0000000
--- a/ThirdParty/freetype/include/freetype/internal/cffotypes.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/****************************************************************************
- *
- * cffotypes.h
- *
- * Basic OpenType/CFF object type definitions (specification).
- *
- * Copyright (C) 2017-2019 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 CFFOTYPES_H_
-#define CFFOTYPES_H_
-
-#include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_CFF_TYPES_H
-#include FT_INTERNAL_TRUETYPE_TYPES_H
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
-#include FT_INTERNAL_POSTSCRIPT_HINTS_H
-
-
-FT_BEGIN_HEADER
-
-
- typedef TT_Face CFF_Face;
-
-
- /**************************************************************************
- *
- * @type:
- * CFF_Size
- *
- * @description:
- * A handle to an OpenType size object.
- */
- typedef struct CFF_SizeRec_
- {
- FT_SizeRec root;
- FT_ULong strike_index; /* 0xFFFFFFFF to indicate invalid */
-
- } CFF_SizeRec, *CFF_Size;
-
-
- /**************************************************************************
- *
- * @type:
- * CFF_GlyphSlot
- *
- * @description:
- * A handle to an OpenType glyph slot object.
- */
- typedef struct CFF_GlyphSlotRec_
- {
- FT_GlyphSlotRec root;
-
- FT_Bool hint;
- FT_Bool scaled;
-
- FT_Fixed x_scale;
- FT_Fixed y_scale;
-
- } CFF_GlyphSlotRec, *CFF_GlyphSlot;
-
-
- /**************************************************************************
- *
- * @type:
- * CFF_Internal
- *
- * @description:
- * The interface to the 'internal' field of `FT_Size`.
- */
- typedef struct CFF_InternalRec_
- {
- PSH_Globals topfont;
- PSH_Globals subfonts[CFF_MAX_CID_FONTS];
-
- } CFF_InternalRec, *CFF_Internal;
-
-
- /**************************************************************************
- *
- * Subglyph transformation record.
- */
- typedef struct CFF_Transform_
- {
- FT_Fixed xx, xy; /* transformation matrix coefficients */
- FT_Fixed yx, yy;
- FT_F26Dot6 ox, oy; /* offsets */
-
- } CFF_Transform;
-
-
-FT_END_HEADER
-
-
-#endif /* CFFOTYPES_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/cfftypes.h b/ThirdParty/freetype/include/freetype/internal/cfftypes.h
deleted file mode 100644
index 2fc905e..0000000
--- a/ThirdParty/freetype/include/freetype/internal/cfftypes.h
+++ /dev/null
@@ -1,417 +0,0 @@
-/****************************************************************************
- *
- * cfftypes.h
- *
- * Basic OpenType/CFF type definitions and interface (specification
- * only).
- *
- * Copyright (C) 1996-2019 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 CFFTYPES_H_
-#define CFFTYPES_H_
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_TYPE1_TABLES_H
-#include FT_INTERNAL_SERVICE_H
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
-#include FT_INTERNAL_POSTSCRIPT_HINTS_H
-#include FT_INTERNAL_TYPE1_TYPES_H
-
-
-FT_BEGIN_HEADER
-
-
- /**************************************************************************
- *
- * @struct:
- * CFF_IndexRec
- *
- * @description:
- * A structure used to model a CFF Index table.
- *
- * @fields:
- * stream ::
- * The source input stream.
- *
- * start ::
- * The position of the first index byte in the input stream.
- *
- * count ::
- * The number of elements in the index.
- *
- * off_size ::
- * The size in bytes of object offsets in index.
- *
- * data_offset ::
- * The position of first data byte in the index's bytes.
- *
- * data_size ::
- * The size of the data table in this index.
- *
- * offsets ::
- * A table of element offsets in the index. Must be loaded explicitly.
- *
- * bytes ::
- * If the index is loaded in memory, its bytes.
- */
- typedef struct CFF_IndexRec_
- {
- FT_Stream stream;
- FT_ULong start;
- FT_UInt hdr_size;
- FT_UInt count;
- FT_Byte off_size;
- FT_ULong data_offset;
- FT_ULong data_size;
-
- FT_ULong* offsets;
- FT_Byte* bytes;
-
- } CFF_IndexRec, *CFF_Index;
-
-
- typedef struct CFF_EncodingRec_
- {
- FT_UInt format;
- FT_ULong offset;
-
- FT_UInt count;
- FT_UShort sids [256]; /* avoid dynamic allocations */
- FT_UShort codes[256];
-
- } CFF_EncodingRec, *CFF_Encoding;
-
-
- typedef struct CFF_CharsetRec_
- {
-
- FT_UInt format;
- FT_ULong offset;
-
- FT_UShort* sids;
- FT_UShort* cids; /* the inverse mapping of `sids'; only needed */
- /* for CID-keyed fonts */
- FT_UInt max_cid;
- FT_UInt num_glyphs;
-
- } CFF_CharsetRec, *CFF_Charset;
-
-
- /* cf. similar fields in file `ttgxvar.h' from the `truetype' module */
-
- typedef struct CFF_VarData_
- {
-#if 0
- FT_UInt itemCount; /* not used; always zero */
- FT_UInt shortDeltaCount; /* not used; always zero */
-#endif
-
- FT_UInt regionIdxCount; /* number of region indexes */
- FT_UInt* regionIndices; /* array of `regionIdxCount' indices; */
- /* these index `varRegionList' */
- } CFF_VarData;
-
-
- /* contribution of one axis to a region */
- typedef struct CFF_AxisCoords_
- {
- FT_Fixed startCoord;
- FT_Fixed peakCoord; /* zero peak means no effect (factor = 1) */
- FT_Fixed endCoord;
-
- } CFF_AxisCoords;
-
-
- typedef struct CFF_VarRegion_
- {
- CFF_AxisCoords* axisList; /* array of axisCount records */
-
- } CFF_VarRegion;
-
-
- typedef struct CFF_VStoreRec_
- {
- FT_UInt dataCount;
- CFF_VarData* varData; /* array of dataCount records */
- /* vsindex indexes this array */
- FT_UShort axisCount;
- FT_UInt regionCount; /* total number of regions defined */
- CFF_VarRegion* varRegionList;
-
- } CFF_VStoreRec, *CFF_VStore;
-
-
- /* forward reference */
- typedef struct CFF_FontRec_* CFF_Font;
-
-
- /* This object manages one cached blend vector. */
- /* */
- /* There is a BlendRec for Private DICT parsing in each subfont */
- /* and a BlendRec for charstrings in CF2_Font instance data. */
- /* A cached BV may be used across DICTs or Charstrings if inputs */
- /* have not changed. */
- /* */
- /* `usedBV' is reset at the start of each parse or charstring. */
- /* vsindex cannot be changed after a BV is used. */
- /* */
- /* Note: NDV is long (32/64 bit), while BV is 16.16 (FT_Int32). */
- typedef struct CFF_BlendRec_
- {
- FT_Bool builtBV; /* blendV has been built */
- FT_Bool usedBV; /* blendV has been used */
- CFF_Font font; /* top level font struct */
- FT_UInt lastVsindex; /* last vsindex used */
- FT_UInt lenNDV; /* normDV length (aka numAxes) */
- FT_Fixed* lastNDV; /* last NDV used */
- FT_UInt lenBV; /* BlendV length (aka numMasters) */
- FT_Int32* BV; /* current blendV (per DICT/glyph) */
-
- } CFF_BlendRec, *CFF_Blend;
-
-
- typedef struct CFF_FontRecDictRec_
- {
- FT_UInt version;
- FT_UInt notice;
- FT_UInt copyright;
- FT_UInt full_name;
- FT_UInt family_name;
- FT_UInt weight;
- FT_Bool is_fixed_pitch;
- FT_Fixed italic_angle;
- FT_Fixed underline_position;
- FT_Fixed underline_thickness;
- FT_Int paint_type;
- FT_Int charstring_type;
- FT_Matrix font_matrix;
- FT_Bool has_font_matrix;
- FT_ULong units_per_em; /* temporarily used as scaling value also */
- FT_Vector font_offset;
- FT_ULong unique_id;
- FT_BBox font_bbox;
- FT_Pos stroke_width;
- FT_ULong charset_offset;
- FT_ULong encoding_offset;
- FT_ULong charstrings_offset;
- FT_ULong private_offset;
- FT_ULong private_size;
- FT_Long synthetic_base;
- FT_UInt embedded_postscript;
-
- /* these should only be used for the top-level font dictionary */
- FT_UInt cid_registry;
- FT_UInt cid_ordering;
- FT_Long cid_supplement;
-
- FT_Long cid_font_version;
- FT_Long cid_font_revision;
- FT_Long cid_font_type;
- FT_ULong cid_count;
- FT_ULong cid_uid_base;
- FT_ULong cid_fd_array_offset;
- FT_ULong cid_fd_select_offset;
- FT_UInt cid_font_name;
-
- /* the next fields come from the data of the deprecated */
- /* `MultipleMaster' operator; they are needed to parse the (also */
- /* deprecated) `blend' operator in Type 2 charstrings */
- FT_UShort num_designs;
- FT_UShort num_axes;
-
- /* fields for CFF2 */
- FT_ULong vstore_offset;
- FT_UInt maxstack;
-
- } CFF_FontRecDictRec, *CFF_FontRecDict;
-
-
- /* forward reference */
- typedef struct CFF_SubFontRec_* CFF_SubFont;
-
-
- typedef struct CFF_PrivateRec_
- {
- FT_Byte num_blue_values;
- FT_Byte num_other_blues;
- FT_Byte num_family_blues;
- FT_Byte num_family_other_blues;
-
- FT_Pos blue_values[14];
- FT_Pos other_blues[10];
- FT_Pos family_blues[14];
- FT_Pos family_other_blues[10];
-
- FT_Fixed blue_scale;
- FT_Pos blue_shift;
- FT_Pos blue_fuzz;
- FT_Pos standard_width;
- FT_Pos standard_height;
-
- FT_Byte num_snap_widths;
- FT_Byte num_snap_heights;
- FT_Pos snap_widths[13];
- FT_Pos snap_heights[13];
- FT_Bool force_bold;
- FT_Fixed force_bold_threshold;
- FT_Int lenIV;
- FT_Int language_group;
- FT_Fixed expansion_factor;
- FT_Long initial_random_seed;
- FT_ULong local_subrs_offset;
- FT_Pos default_width;
- FT_Pos nominal_width;
-
- /* fields for CFF2 */
- FT_UInt vsindex;
- CFF_SubFont subfont;
-
- } CFF_PrivateRec, *CFF_Private;
-
-
- typedef struct CFF_FDSelectRec_
- {
- FT_Byte format;
- FT_UInt range_count;
-
- /* that's the table, taken from the file `as is' */
- FT_Byte* data;
- FT_UInt data_size;
-
- /* small cache for format 3 only */
- FT_UInt cache_first;
- FT_UInt cache_count;
- FT_Byte cache_fd;
-
- } CFF_FDSelectRec, *CFF_FDSelect;
-
-
- /* A SubFont packs a font dict and a private dict together. They are */
- /* needed to support CID-keyed CFF fonts. */
- typedef struct CFF_SubFontRec_
- {
- CFF_FontRecDictRec font_dict;
- CFF_PrivateRec private_dict;
-
- /* fields for CFF2 */
- CFF_BlendRec blend; /* current blend vector */
- FT_UInt lenNDV; /* current length NDV or zero */
- FT_Fixed* NDV; /* ptr to current NDV or NULL */
-
- /* `blend_stack' is a writable buffer to hold blend results. */
- /* This buffer is to the side of the normal cff parser stack; */
- /* `cff_parse_blend' and `cff_blend_doBlend' push blend results here. */
- /* The normal stack then points to these values instead of the DICT */
- /* because all other operators in Private DICT clear the stack. */
- /* `blend_stack' could be cleared at each operator other than blend. */
- /* Blended values are stored as 5-byte fixed point values. */
-
- FT_Byte* blend_stack; /* base of stack allocation */
- FT_Byte* blend_top; /* first empty slot */
- FT_UInt blend_used; /* number of bytes in use */
- FT_UInt blend_alloc; /* number of bytes allocated */
-
- CFF_IndexRec local_subrs_index;
- FT_Byte** local_subrs; /* array of pointers */
- /* into Local Subrs INDEX data */
-
- FT_UInt32 random;
-
- } CFF_SubFontRec;
-
-
-#define CFF_MAX_CID_FONTS 256
-
-
- typedef struct CFF_FontRec_
- {
- FT_Library library;
- FT_Stream stream;
- FT_Memory memory; /* TODO: take this from stream->memory? */
- FT_ULong base_offset; /* offset to start of CFF */
- FT_UInt num_faces;
- FT_UInt num_glyphs;
-
- FT_Byte version_major;
- FT_Byte version_minor;
- FT_Byte header_size;
-
- FT_UInt top_dict_length; /* cff2 only */
-
- FT_Bool cff2;
-
- CFF_IndexRec name_index;
- CFF_IndexRec top_dict_index;
- CFF_IndexRec global_subrs_index;
-
- CFF_EncodingRec encoding;
- CFF_CharsetRec charset;
-
- CFF_IndexRec charstrings_index;
- CFF_IndexRec font_dict_index;
- CFF_IndexRec private_index;
- CFF_IndexRec local_subrs_index;
-
- FT_String* font_name;
-
- /* array of pointers into Global Subrs INDEX data */
- FT_Byte** global_subrs;
-
- /* array of pointers into String INDEX data stored at string_pool */
- FT_UInt num_strings;
- FT_Byte** strings;
- FT_Byte* string_pool;
- FT_ULong string_pool_size;
-
- CFF_SubFontRec top_font;
- FT_UInt num_subfonts;
- CFF_SubFont subfonts[CFF_MAX_CID_FONTS];
-
- CFF_FDSelectRec fd_select;
-
- /* interface to PostScript hinter */
- PSHinter_Service pshinter;
-
- /* interface to Postscript Names service */
- FT_Service_PsCMaps psnames;
-
- /* interface to CFFLoad service */
- const void* cffload;
-
- /* since version 2.3.0 */
- PS_FontInfoRec* font_info; /* font info dictionary */
-
- /* since version 2.3.6 */
- FT_String* registry;
- FT_String* ordering;
-
- /* since version 2.4.12 */
- FT_Generic cf2_instance;
-
- /* since version 2.7.1 */
- CFF_VStoreRec vstore; /* parsed vstore structure */
-
- /* since version 2.9 */
- PS_FontExtraRec* font_extra;
-
- } CFF_FontRec;
-
-
-FT_END_HEADER
-
-#endif /* CFFTYPES_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/ftcalc.h b/ThirdParty/freetype/include/freetype/internal/ftcalc.h
deleted file mode 100644
index 2986ec3..0000000
--- a/ThirdParty/freetype/include/freetype/internal/ftcalc.h
+++ /dev/null
@@ -1,510 +0,0 @@
-/****************************************************************************
- *
- * ftcalc.h
- *
- * Arithmetic computations (specification).
- *
- * Copyright (C) 1996-2019 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 FTCALC_H_
-#define FTCALC_H_
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-
-FT_BEGIN_HEADER
-
-
- /**************************************************************************
- *
- * FT_MulDiv() and FT_MulFix() are declared in freetype.h.
- *
- */
-
-#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER
- /* Provide assembler fragments for performance-critical functions. */
- /* These must be defined `static __inline__' with GCC. */
-
-#if defined( __CC_ARM ) || defined( __ARMCC__ ) /* RVCT */
-
-#define FT_MULFIX_ASSEMBLER FT_MulFix_arm
-
- /* documentation is in freetype.h */
-
- static __inline FT_Int32
- FT_MulFix_arm( FT_Int32 a,
- FT_Int32 b )
- {
- FT_Int32 t, t2;
-
-
- __asm
- {
- smull t2, t, b, a /* (lo=t2,hi=t) = a*b */
- mov a, t, asr #31 /* a = (hi >> 31) */
- add a, a, #0x8000 /* a += 0x8000 */
- adds t2, t2, a /* t2 += a */
- adc t, t, #0 /* t += carry */
- mov a, t2, lsr #16 /* a = t2 >> 16 */
- orr a, a, t, lsl #16 /* a |= t << 16 */
- }
- return a;
- }
-
-#endif /* __CC_ARM || __ARMCC__ */
-
-
-#ifdef __GNUC__
-
-#if defined( __arm__ ) && \
- ( !defined( __thumb__ ) || defined( __thumb2__ ) ) && \
- !( defined( __CC_ARM ) || defined( __ARMCC__ ) )
-
-#define FT_MULFIX_ASSEMBLER FT_MulFix_arm
-
- /* documentation is in freetype.h */
-
- static __inline__ FT_Int32
- FT_MulFix_arm( FT_Int32 a,
- FT_Int32 b )
- {
- FT_Int32 t, t2;
-
-
- __asm__ __volatile__ (
- "smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */
- "mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */
-#if defined( __clang__ ) && defined( __thumb2__ )
- "add.w %0, %0, #0x8000\n\t" /* %0 += 0x8000 */
-#else
- "add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */
-#endif
- "adds %1, %1, %0\n\t" /* %1 += %0 */
- "adc %2, %2, #0\n\t" /* %2 += carry */
- "mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */
- "orr %0, %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */
- : "=r"(a), "=&r"(t2), "=&r"(t)
- : "r"(a), "r"(b)
- : "cc" );
- return a;
- }
-
-#endif /* __arm__ && */
- /* ( __thumb2__ || !__thumb__ ) && */
- /* !( __CC_ARM || __ARMCC__ ) */
-
-
-#if defined( __i386__ )
-
-#define FT_MULFIX_ASSEMBLER FT_MulFix_i386
-
- /* documentation is in freetype.h */
-
- static __inline__ FT_Int32
- FT_MulFix_i386( FT_Int32 a,
- FT_Int32 b )
- {
- FT_Int32 result;
-
-
- __asm__ __volatile__ (
- "imul %%edx\n"
- "movl %%edx, %%ecx\n"
- "sarl $31, %%ecx\n"
- "addl $0x8000, %%ecx\n"
- "addl %%ecx, %%eax\n"
- "adcl $0, %%edx\n"
- "shrl $16, %%eax\n"
- "shll $16, %%edx\n"
- "addl %%edx, %%eax\n"
- : "=a"(result), "=d"(b)
- : "a"(a), "d"(b)
- : "%ecx", "cc" );
- return result;
- }
-
-#endif /* i386 */
-
-#endif /* __GNUC__ */
-
-
-#ifdef _MSC_VER /* Visual C++ */
-
-#ifdef _M_IX86
-
-#define FT_MULFIX_ASSEMBLER FT_MulFix_i386
-
- /* documentation is in freetype.h */
-
- static __inline FT_Int32
- FT_MulFix_i386( FT_Int32 a,
- FT_Int32 b )
- {
- FT_Int32 result;
-
- __asm
- {
- mov eax, a
- mov edx, b
- imul edx
- mov ecx, edx
- sar ecx, 31
- add ecx, 8000h
- add eax, ecx
- adc edx, 0
- shr eax, 16
- shl edx, 16
- add eax, edx
- mov result, eax
- }
- return result;
- }
-
-#endif /* _M_IX86 */
-
-#endif /* _MSC_VER */
-
-
-#if defined( __GNUC__ ) && defined( __x86_64__ )
-
-#define FT_MULFIX_ASSEMBLER FT_MulFix_x86_64
-
- static __inline__ FT_Int32
- FT_MulFix_x86_64( FT_Int32 a,
- FT_Int32 b )
- {
- /* Temporarily disable the warning that C90 doesn't support */
- /* `long long'. */
-#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 6 )
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wlong-long"
-#endif
-
-#if 1
- /* Technically not an assembly fragment, but GCC does a really good */
- /* job at inlining it and generating good machine code for it. */
- long long ret, tmp;
-
-
- ret = (long long)a * b;
- tmp = ret >> 63;
- ret += 0x8000 + tmp;
-
- return (FT_Int32)( ret >> 16 );
-#else
-
- /* For some reason, GCC 4.6 on Ubuntu 12.04 generates invalid machine */
- /* code from the lines below. The main issue is that `wide_a' is not */
- /* properly initialized by sign-extending `a'. Instead, the generated */
- /* machine code assumes that the register that contains `a' on input */
- /* can be used directly as a 64-bit value, which is wrong most of the */
- /* time. */
- long long wide_a = (long long)a;
- long long wide_b = (long long)b;
- long long result;
-
-
- __asm__ __volatile__ (
- "imul %2, %1\n"
- "mov %1, %0\n"
- "sar $63, %0\n"
- "lea 0x8000(%1, %0), %0\n"
- "sar $16, %0\n"
- : "=&r"(result), "=&r"(wide_a)
- : "r"(wide_b)
- : "cc" );
-
- return (FT_Int32)result;
-#endif
-
-#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 6 )
-#pragma GCC diagnostic pop
-#endif
- }
-
-#endif /* __GNUC__ && __x86_64__ */
-
-#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */
-
-
-#ifdef FT_CONFIG_OPTION_INLINE_MULFIX
-#ifdef FT_MULFIX_ASSEMBLER
-#define FT_MulFix( a, b ) FT_MULFIX_ASSEMBLER( (FT_Int32)(a), (FT_Int32)(b) )
-#endif
-#endif
-
-
- /**************************************************************************
- *
- * @function:
- * FT_MulDiv_No_Round
- *
- * @description:
- * A very simple function used to perform the computation '(a*b)/c'
- * (without rounding) with maximum accuracy (it uses a 64-bit
- * intermediate integer whenever necessary).
- *
- * This function isn't necessarily as fast as some processor-specific
- * operations, but is at least completely portable.
- *
- * @input:
- * a ::
- * The first multiplier.
- * b ::
- * The second multiplier.
- * c ::
- * The divisor.
- *
- * @return:
- * The result of '(a*b)/c'. This function never traps when trying to
- * divide by zero; it simply returns 'MaxInt' or 'MinInt' depending on
- * the signs of 'a' and 'b'.
- */
- FT_BASE( FT_Long )
- FT_MulDiv_No_Round( FT_Long a,
- FT_Long b,
- FT_Long c );
-
-
- /*
- * A variant of FT_Matrix_Multiply which scales its result afterwards. The
- * idea is that both `a' and `b' are scaled by factors of 10 so that the
- * values are as precise as possible to get a correct result during the
- * 64bit multiplication. Let `sa' and `sb' be the scaling factors of `a'
- * and `b', respectively, then the scaling factor of the result is `sa*sb'.
- */
- FT_BASE( void )
- FT_Matrix_Multiply_Scaled( const FT_Matrix* a,
- FT_Matrix *b,
- FT_Long scaling );
-
-
- /*
- * Check a matrix. If the transformation would lead to extreme shear or
- * extreme scaling, for example, return 0. If everything is OK, return 1.
- *
- * Based on geometric considerations we use the following inequality to
- * identify a degenerate matrix.
- *
- * 50 * abs(xx*yy - xy*yx) < xx^2 + xy^2 + yx^2 + yy^2
- *
- * Value 50 is heuristic.
- */
- FT_BASE( FT_Bool )
- FT_Matrix_Check( const FT_Matrix* matrix );
-
-
- /*
- * A variant of FT_Vector_Transform. See comments for
- * FT_Matrix_Multiply_Scaled.
- */
- FT_BASE( void )
- FT_Vector_Transform_Scaled( FT_Vector* vector,
- const FT_Matrix* matrix,
- FT_Long scaling );
-
-
- /*
- * This function normalizes a vector and returns its original length. The
- * normalized vector is a 16.16 fixed-point unit vector with length close
- * to 0x10000. The accuracy of the returned length is limited to 16 bits
- * also. The function utilizes quick inverse square root approximation
- * without divisions and square roots relying on Newton's iterations
- * instead.
- */
- FT_BASE( FT_UInt32 )
- FT_Vector_NormLen( FT_Vector* vector );
-
-
- /*
- * Return -1, 0, or +1, depending on the orientation of a given corner. We
- * use the Cartesian coordinate system, with positive vertical values going
- * upwards. The function returns +1 if the corner turns to the left, -1 to
- * the right, and 0 for undecidable cases.
- */
- FT_BASE( FT_Int )
- ft_corner_orientation( FT_Pos in_x,
- FT_Pos in_y,
- FT_Pos out_x,
- FT_Pos out_y );
-
-
- /*
- * Return TRUE if a corner is flat or nearly flat. This is equivalent to
- * saying that the corner point is close to its neighbors, or inside an
- * ellipse defined by the neighbor focal points to be more precise.
- */
- FT_BASE( FT_Int )
- ft_corner_is_flat( FT_Pos in_x,
- FT_Pos in_y,
- FT_Pos out_x,
- FT_Pos out_y );
-
-
- /*
- * Return the most significant bit index.
- */
-
-#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER
-
-#if defined( __GNUC__ ) && \
- ( __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 4 ) )
-
-#if FT_SIZEOF_INT == 4
-
-#define FT_MSB( x ) ( 31 - __builtin_clz( x ) )
-
-#elif FT_SIZEOF_LONG == 4
-
-#define FT_MSB( x ) ( 31 - __builtin_clzl( x ) )
-
-#endif /* __GNUC__ */
-
-
-#elif defined( _MSC_VER ) && ( _MSC_VER >= 1400 )
-
-#if FT_SIZEOF_INT == 4
-
-#include <intrin.h>
-
- static __inline FT_Int32
- FT_MSB_i386( FT_UInt32 x )
- {
- unsigned long where;
-
-
- /* not available in older VC versions */
- _BitScanReverse( &where, x );
-
- return (FT_Int32)where;
- }
-
-#define FT_MSB( x ) ( FT_MSB_i386( x ) )
-
-#endif
-
-#endif /* _MSC_VER */
-
-
-#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */
-
-#ifndef FT_MSB
-
- FT_BASE( FT_Int )
- FT_MSB( FT_UInt32 z );
-
-#endif
-
-
- /*
- * Return sqrt(x*x+y*y), which is the same as `FT_Vector_Length' but uses
- * two fixed-point arguments instead.
- */
- FT_BASE( FT_Fixed )
- FT_Hypot( FT_Fixed x,
- FT_Fixed y );
-
-
-#if 0
-
- /**************************************************************************
- *
- * @function:
- * FT_SqrtFixed
- *
- * @description:
- * Computes the square root of a 16.16 fixed-point value.
- *
- * @input:
- * x ::
- * The value to compute the root for.
- *
- * @return:
- * The result of 'sqrt(x)'.
- *
- * @note:
- * This function is not very fast.
- */
- FT_BASE( FT_Int32 )
- FT_SqrtFixed( FT_Int32 x );
-
-#endif /* 0 */
-
-
-#define INT_TO_F26DOT6( x ) ( (FT_Long)(x) * 64 ) /* << 6 */
-#define INT_TO_F2DOT14( x ) ( (FT_Long)(x) * 16384 ) /* << 14 */
-#define INT_TO_FIXED( x ) ( (FT_Long)(x) * 65536 ) /* << 16 */
-#define F2DOT14_TO_FIXED( x ) ( (FT_Long)(x) * 4 ) /* << 2 */
-#define FIXED_TO_INT( x ) ( FT_RoundFix( x ) >> 16 )
-
-#define ROUND_F26DOT6( x ) ( x >= 0 ? ( ( (x) + 32 ) & -64 ) \
- : ( -( ( 32 - (x) ) & -64 ) ) )
-
- /*
- * The following macros have two purposes.
- *
- * - Tag places where overflow is expected and harmless.
- *
- * - Avoid run-time sanitizer errors.
- *
- * Use with care!
- */
-#define ADD_INT( a, b ) \
- (FT_Int)( (FT_UInt)(a) + (FT_UInt)(b) )
-#define SUB_INT( a, b ) \
- (FT_Int)( (FT_UInt)(a) - (FT_UInt)(b) )
-#define MUL_INT( a, b ) \
- (FT_Int)( (FT_UInt)(a) * (FT_UInt)(b) )
-#define NEG_INT( a ) \
- (FT_Int)( (FT_UInt)0 - (FT_UInt)(a) )
-
-#define ADD_LONG( a, b ) \
- (FT_Long)( (FT_ULong)(a) + (FT_ULong)(b) )
-#define SUB_LONG( a, b ) \
- (FT_Long)( (FT_ULong)(a) - (FT_ULong)(b) )
-#define MUL_LONG( a, b ) \
- (FT_Long)( (FT_ULong)(a) * (FT_ULong)(b) )
-#define NEG_LONG( a ) \
- (FT_Long)( (FT_ULong)0 - (FT_ULong)(a) )
-
-#define ADD_INT32( a, b ) \
- (FT_Int32)( (FT_UInt32)(a) + (FT_UInt32)(b) )
-#define SUB_INT32( a, b ) \
- (FT_Int32)( (FT_UInt32)(a) - (FT_UInt32)(b) )
-#define MUL_INT32( a, b ) \
- (FT_Int32)( (FT_UInt32)(a) * (FT_UInt32)(b) )
-#define NEG_INT32( a ) \
- (FT_Int32)( (FT_UInt32)0 - (FT_UInt32)(a) )
-
-#ifdef FT_LONG64
-
-#define ADD_INT64( a, b ) \
- (FT_Int64)( (FT_UInt64)(a) + (FT_UInt64)(b) )
-#define SUB_INT64( a, b ) \
- (FT_Int64)( (FT_UInt64)(a) - (FT_UInt64)(b) )
-#define MUL_INT64( a, b ) \
- (FT_Int64)( (FT_UInt64)(a) * (FT_UInt64)(b) )
-#define NEG_INT64( a ) \
- (FT_Int64)( (FT_UInt64)0 - (FT_UInt64)(a) )
-
-#endif /* FT_LONG64 */
-
-
-FT_END_HEADER
-
-#endif /* FTCALC_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/ftdebug.h b/ThirdParty/freetype/include/freetype/internal/ftdebug.h
deleted file mode 100644
index 54a9673..0000000
--- a/ThirdParty/freetype/include/freetype/internal/ftdebug.h
+++ /dev/null
@@ -1,283 +0,0 @@
-/****************************************************************************
- *
- * ftdebug.h
- *
- * Debugging and logging component (specification).
- *
- * Copyright (C) 1996-2019 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.
- *
- *
- * IMPORTANT: A description of FreeType's debugging support can be
- * found in 'docs/DEBUG.TXT'. Read it if you need to use or
- * understand this code.
- *
- */
-
-
-#ifndef FTDEBUG_H_
-#define FTDEBUG_H_
-
-
-#include <ft2build.h>
-#include FT_CONFIG_CONFIG_H
-#include FT_FREETYPE_H
-
-
-FT_BEGIN_HEADER
-
-
- /* force the definition of FT_DEBUG_LEVEL_ERROR if FT_DEBUG_LEVEL_TRACE */
- /* is already defined; this simplifies the following #ifdefs */
- /* */
-#ifdef FT_DEBUG_LEVEL_TRACE
-#undef FT_DEBUG_LEVEL_ERROR
-#define FT_DEBUG_LEVEL_ERROR
-#endif
-
-
- /**************************************************************************
- *
- * Define the trace enums as well as the trace levels array when they are
- * needed.
- *
- */
-
-#ifdef FT_DEBUG_LEVEL_TRACE
-
-#define FT_TRACE_DEF( x ) trace_ ## x ,
-
- /* defining the enumeration */
- typedef enum FT_Trace_
- {
-#include FT_INTERNAL_TRACE_H
- trace_count
-
- } FT_Trace;
-
-
- /* a pointer to the array of trace levels, */
- /* provided by `src/base/ftdebug.c' */
- extern int* ft_trace_levels;
-
-#undef FT_TRACE_DEF
-
-#endif /* FT_DEBUG_LEVEL_TRACE */
-
-
- /**************************************************************************
- *
- * Define the FT_TRACE macro
- *
- * IMPORTANT!
- *
- * Each component must define the macro FT_COMPONENT to a valid FT_Trace
- * value before using any TRACE macro.
- *
- */
-
-#ifdef FT_DEBUG_LEVEL_TRACE
-
- /* we need two macros here to make cpp expand `FT_COMPONENT' */
-#define FT_TRACE_COMP( x ) FT_TRACE_COMP_( x )
-#define FT_TRACE_COMP_( x ) trace_ ## x
-
-#define FT_TRACE( level, varformat ) \
- do \
- { \
- if ( ft_trace_levels[FT_TRACE_COMP( FT_COMPONENT )] >= level ) \
- FT_Message varformat; \
- } while ( 0 )
-
-#else /* !FT_DEBUG_LEVEL_TRACE */
-
-#define FT_TRACE( level, varformat ) do { } while ( 0 ) /* nothing */
-
-#endif /* !FT_DEBUG_LEVEL_TRACE */
-
-
- /**************************************************************************
- *
- * @function:
- * FT_Trace_Get_Count
- *
- * @description:
- * Return the number of available trace components.
- *
- * @return:
- * The number of trace components. 0 if FreeType 2 is not built with
- * FT_DEBUG_LEVEL_TRACE definition.
- *
- * @note:
- * This function may be useful if you want to access elements of the
- * internal trace levels array by an index.
- */
- FT_BASE( FT_Int )
- FT_Trace_Get_Count( void );
-
-
- /**************************************************************************
- *
- * @function:
- * FT_Trace_Get_Name
- *
- * @description:
- * Return the name of a trace component.
- *
- * @input:
- * The index of the trace component.
- *
- * @return:
- * The name of the trace component. This is a statically allocated
- * C~string, so do not free it after use. `NULL` if FreeType is not
- * built with FT_DEBUG_LEVEL_TRACE definition.
- *
- * @note:
- * Use @FT_Trace_Get_Count to get the number of available trace
- * components.
- */
- FT_BASE( const char* )
- FT_Trace_Get_Name( FT_Int idx );
-
-
- /**************************************************************************
- *
- * @function:
- * FT_Trace_Disable
- *
- * @description:
- * Switch off tracing temporarily. It can be activated again with
- * @FT_Trace_Enable.
- */
- FT_BASE( void )
- FT_Trace_Disable( void );
-
-
- /**************************************************************************
- *
- * @function:
- * FT_Trace_Enable
- *
- * @description:
- * Activate tracing. Use it after tracing has been switched off with
- * @FT_Trace_Disable.
- */
- FT_BASE( void )
- FT_Trace_Enable( void );
-
-
- /**************************************************************************
- *
- * You need two opening and closing parentheses!
- *
- * Example: FT_TRACE0(( "Value is %i", foo ))
- *
- * Output of the FT_TRACEX macros is sent to stderr.
- *
- */
-
-#define FT_TRACE0( varformat ) FT_TRACE( 0, varformat )
-#define FT_TRACE1( varformat ) FT_TRACE( 1, varformat )
-#define FT_TRACE2( varformat ) FT_TRACE( 2, varformat )
-#define FT_TRACE3( varformat ) FT_TRACE( 3, varformat )
-#define FT_TRACE4( varformat ) FT_TRACE( 4, varformat )
-#define FT_TRACE5( varformat ) FT_TRACE( 5, varformat )
-#define FT_TRACE6( varformat ) FT_TRACE( 6, varformat )
-#define FT_TRACE7( varformat ) FT_TRACE( 7, varformat )
-
-
- /**************************************************************************
- *
- * Define the FT_ERROR macro.
- *
- * Output of this macro is sent to stderr.
- *
- */
-
-#ifdef FT_DEBUG_LEVEL_ERROR
-
-#define FT_ERROR( varformat ) FT_Message varformat
-
-#else /* !FT_DEBUG_LEVEL_ERROR */
-
-#define FT_ERROR( varformat ) do { } while ( 0 ) /* nothing */
-
-#endif /* !FT_DEBUG_LEVEL_ERROR */
-
-
- /**************************************************************************
- *
- * Define the FT_ASSERT and FT_THROW macros. The call to `FT_Throw` makes
- * it possible to easily set a breakpoint at this function.
- *
- */
-
-#ifdef FT_DEBUG_LEVEL_ERROR
-
-#define FT_ASSERT( condition ) \
- do \
- { \
- if ( !( condition ) ) \
- FT_Panic( "assertion failed on line %d of file %s\n", \
- __LINE__, __FILE__ ); \
- } while ( 0 )
-
-#define FT_THROW( e ) \
- ( FT_Throw( FT_ERR_CAT( FT_ERR_PREFIX, e ), \
- __LINE__, \
- __FILE__ ) | \
- FT_ERR_CAT( FT_ERR_PREFIX, e ) )
-
-#else /* !FT_DEBUG_LEVEL_ERROR */
-
-#define FT_ASSERT( condition ) do { } while ( 0 )
-
-#define FT_THROW( e ) FT_ERR_CAT( FT_ERR_PREFIX, e )
-
-#endif /* !FT_DEBUG_LEVEL_ERROR */
-
-
- /**************************************************************************
- *
- * Define `FT_Message` and `FT_Panic` when needed.
- *
- */
-
-#ifdef FT_DEBUG_LEVEL_ERROR
-
-#include "stdio.h" /* for vfprintf() */
-
- /* print a message */
- FT_BASE( void )
- FT_Message( const char* fmt,
- ... );
-
- /* print a message and exit */
- FT_BASE( void )
- FT_Panic( const char* fmt,
- ... );
-
- /* report file name and line number of an error */
- FT_BASE( int )
- FT_Throw( FT_Error error,
- int line,
- const char* file );
-
-#endif /* FT_DEBUG_LEVEL_ERROR */
-
-
- FT_BASE( void )
- ft_debug_init( void );
-
-FT_END_HEADER
-
-#endif /* FTDEBUG_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/ftdrv.h b/ThirdParty/freetype/include/freetype/internal/ftdrv.h
deleted file mode 100644
index 09e846e..0000000
--- a/ThirdParty/freetype/include/freetype/internal/ftdrv.h
+++ /dev/null
@@ -1,288 +0,0 @@
-/****************************************************************************
- *
- * ftdrv.h
- *
- * FreeType internal font driver interface (specification).
- *
- * Copyright (C) 1996-2019 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 FTDRV_H_
-#define FTDRV_H_
-
-
-#include <ft2build.h>
-#include FT_MODULE_H
-
-
-FT_BEGIN_HEADER
-
-
- typedef FT_Error
- (*FT_Face_InitFunc)( FT_Stream stream,
- FT_Face face,
- FT_Int typeface_index,
- FT_Int num_params,
- FT_Parameter* parameters );
-
- typedef void
- (*FT_Face_DoneFunc)( FT_Face face );
-
-
- typedef FT_Error
- (*FT_Size_InitFunc)( FT_Size size );
-
- typedef void
- (*FT_Size_DoneFunc)( FT_Size size );
-
-
- typedef FT_Error
- (*FT_Slot_InitFunc)( FT_GlyphSlot slot );
-
- typedef void
- (*FT_Slot_DoneFunc)( FT_GlyphSlot slot );
-
-
- typedef FT_Error
- (*FT_Size_RequestFunc)( FT_Size size,
- FT_Size_Request req );
-
- typedef FT_Error
- (*FT_Size_SelectFunc)( FT_Size size,
- FT_ULong size_index );
-
- typedef FT_Error
- (*FT_Slot_LoadFunc)( FT_GlyphSlot slot,
- FT_Size size,
- FT_UInt glyph_index,
- FT_Int32 load_flags );
-
-
- typedef FT_Error
- (*FT_Face_GetKerningFunc)( FT_Face face,
- FT_UInt left_glyph,
- FT_UInt right_glyph,
- FT_Vector* kerning );
-
-
- typedef FT_Error
- (*FT_Face_AttachFunc)( FT_Face face,
- FT_Stream stream );
-
-
- typedef FT_Error
- (*FT_Face_GetAdvancesFunc)( FT_Face face,
- FT_UInt first,
- FT_UInt count,
- FT_Int32 flags,
- FT_Fixed* advances );
-
-
- /**************************************************************************
- *
- * @struct:
- * FT_Driver_ClassRec
- *
- * @description:
- * The font driver class. This structure mostly contains pointers to
- * driver methods.
- *
- * @fields:
- * root ::
- * The parent module.
- *
- * face_object_size ::
- * The size of a face object in bytes.
- *
- * size_object_size ::
- * The size of a size object in bytes.
- *
- * slot_object_size ::
- * The size of a glyph object in bytes.
- *
- * init_face ::
- * The format-specific face constructor.
- *
- * done_face ::
- * The format-specific face destructor.
- *
- * init_size ::
- * The format-specific size constructor.
- *
- * done_size ::
- * The format-specific size destructor.
- *
- * init_slot ::
- * The format-specific slot constructor.
- *
- * done_slot ::
- * The format-specific slot destructor.
- *
- *
- * load_glyph ::
- * A function handle to load a glyph to a slot. This field is
- * mandatory!
- *
- * get_kerning ::
- * A function handle to return the unscaled kerning for a given pair of
- * glyphs. Can be set to 0 if the format doesn't support kerning.
- *
- * attach_file ::
- * This function handle is used to read additional data for a face from
- * another file/stream. For example, this can be used to add data from
- * AFM or PFM files on a Type 1 face, or a CIDMap on a CID-keyed face.
- *
- * get_advances ::
- * A function handle used to return advance widths of 'count' glyphs
- * (in font units), starting at 'first'. The 'vertical' flag must be
- * set to get vertical advance heights. The 'advances' buffer is
- * caller-allocated. The idea of this function is to be able to
- * perform device-independent text layout without loading a single
- * glyph image.
- *
- * request_size ::
- * A handle to a function used to request the new character size. Can
- * be set to 0 if the scaling done in the base layer suffices.
- *
- * select_size ::
- * A handle to a function used to select a new fixed size. It is used
- * only if @FT_FACE_FLAG_FIXED_SIZES is set. Can be set to 0 if the
- * scaling done in the base layer suffices.
- * @note:
- * Most function pointers, with the exception of `load_glyph`, can be set
- * to 0 to indicate a default behaviour.
- */
- typedef struct FT_Driver_ClassRec_
- {
- FT_Module_Class root;
-
- FT_Long face_object_size;
- FT_Long size_object_size;
- FT_Long slot_object_size;
-
- FT_Face_InitFunc init_face;
- FT_Face_DoneFunc done_face;
-
- FT_Size_InitFunc init_size;
- FT_Size_DoneFunc done_size;
-
- FT_Slot_InitFunc init_slot;
- FT_Slot_DoneFunc done_slot;
-
- FT_Slot_LoadFunc load_glyph;
-
- FT_Face_GetKerningFunc get_kerning;
- FT_Face_AttachFunc attach_file;
- FT_Face_GetAdvancesFunc get_advances;
-
- /* since version 2.2 */
- FT_Size_RequestFunc request_size;
- FT_Size_SelectFunc select_size;
-
- } FT_Driver_ClassRec, *FT_Driver_Class;
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_DECLARE_DRIVER
- *
- * @description:
- * Used to create a forward declaration of an FT_Driver_ClassRec struct
- * instance.
- *
- * @macro:
- * FT_DEFINE_DRIVER
- *
- * @description:
- * Used to initialize an instance of FT_Driver_ClassRec struct.
- *
- * `ftinit.c` (ft_create_default_module_classes) already contains a
- * mechanism to call these functions for the default modules described in
- * `ftmodule.h`.
- *
- * The struct will be allocated in the global scope (or the scope where
- * the macro is used).
- */
-#define FT_DECLARE_DRIVER( class_ ) \
- FT_CALLBACK_TABLE \
- const FT_Driver_ClassRec class_;
-
-#define FT_DEFINE_DRIVER( \
- class_, \
- flags_, \
- size_, \
- name_, \
- version_, \
- requires_, \
- interface_, \
- init_, \
- done_, \
- get_interface_, \
- face_object_size_, \
- size_object_size_, \
- slot_object_size_, \
- init_face_, \
- done_face_, \
- init_size_, \
- done_size_, \
- init_slot_, \
- done_slot_, \
- load_glyph_, \
- get_kerning_, \
- attach_file_, \
- get_advances_, \
- request_size_, \
- select_size_ ) \
- FT_CALLBACK_TABLE_DEF \
- const FT_Driver_ClassRec class_ = \
- { \
- FT_DEFINE_ROOT_MODULE( flags_, \
- size_, \
- name_, \
- version_, \
- requires_, \
- interface_, \
- init_, \
- done_, \
- get_interface_ ) \
- \
- face_object_size_, \
- size_object_size_, \
- slot_object_size_, \
- \
- init_face_, \
- done_face_, \
- \
- init_size_, \
- done_size_, \
- \
- init_slot_, \
- done_slot_, \
- \
- load_glyph_, \
- \
- get_kerning_, \
- attach_file_, \
- get_advances_, \
- \
- request_size_, \
- select_size_ \
- };
-
-
-FT_END_HEADER
-
-#endif /* FTDRV_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/ftgloadr.h b/ThirdParty/freetype/include/freetype/internal/ftgloadr.h
deleted file mode 100644
index 770871d..0000000
--- a/ThirdParty/freetype/include/freetype/internal/ftgloadr.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/****************************************************************************
- *
- * ftgloadr.h
- *
- * The FreeType glyph loader (specification).
- *
- * Copyright (C) 2002-2019 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 FTGLOADR_H_
-#define FTGLOADR_H_
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-
-FT_BEGIN_HEADER
-
-
- /**************************************************************************
- *
- * @struct:
- * FT_GlyphLoader
- *
- * @description:
- * The glyph loader is an internal object used to load several glyphs
- * together (for example, in the case of composites).
- */
- typedef struct FT_SubGlyphRec_
- {
- FT_Int index;
- FT_UShort flags;
- FT_Int arg1;
- FT_Int arg2;
- FT_Matrix transform;
-
- } FT_SubGlyphRec;
-
-
- typedef struct FT_GlyphLoadRec_
- {
- FT_Outline outline; /* outline */
- FT_Vector* extra_points; /* extra points table */
- FT_Vector* extra_points2; /* second extra points table */
- FT_UInt num_subglyphs; /* number of subglyphs */
- FT_SubGlyph subglyphs; /* subglyphs */
-
- } FT_GlyphLoadRec, *FT_GlyphLoad;
-
-
- typedef struct FT_GlyphLoaderRec_
- {
- FT_Memory memory;
- FT_UInt max_points;
- FT_UInt max_contours;
- FT_UInt max_subglyphs;
- FT_Bool use_extra;
-
- FT_GlyphLoadRec base;
- FT_GlyphLoadRec current;
-
- void* other; /* for possible future extension? */
-
- } FT_GlyphLoaderRec, *FT_GlyphLoader;
-
-
- /* create new empty glyph loader */
- FT_BASE( FT_Error )
- FT_GlyphLoader_New( FT_Memory memory,
- FT_GlyphLoader *aloader );
-
- /* add an extra points table to a glyph loader */
- FT_BASE( FT_Error )
- FT_GlyphLoader_CreateExtra( FT_GlyphLoader loader );
-
- /* destroy a glyph loader */
- FT_BASE( void )
- FT_GlyphLoader_Done( FT_GlyphLoader loader );
-
- /* reset a glyph loader (frees everything int it) */
- FT_BASE( void )
- FT_GlyphLoader_Reset( FT_GlyphLoader loader );
-
- /* rewind a glyph loader */
- FT_BASE( void )
- FT_GlyphLoader_Rewind( FT_GlyphLoader loader );
-
- /* check that there is enough space to add `n_points' and `n_contours' */
- /* to the glyph loader */
- FT_BASE( FT_Error )
- FT_GlyphLoader_CheckPoints( FT_GlyphLoader loader,
- FT_UInt n_points,
- FT_UInt n_contours );
-
-
-#define FT_GLYPHLOADER_CHECK_P( _loader, _count ) \
- ( (_count) == 0 || \
- ( (FT_UInt)(_loader)->base.outline.n_points + \
- (FT_UInt)(_loader)->current.outline.n_points + \
- (FT_UInt)(_count) ) <= (_loader)->max_points )
-
-#define FT_GLYPHLOADER_CHECK_C( _loader, _count ) \
- ( (_count) == 0 || \
- ( (FT_UInt)(_loader)->base.outline.n_contours + \
- (FT_UInt)(_loader)->current.outline.n_contours + \
- (FT_UInt)(_count) ) <= (_loader)->max_contours )
-
-#define FT_GLYPHLOADER_CHECK_POINTS( _loader, _points, _contours ) \
- ( ( FT_GLYPHLOADER_CHECK_P( _loader, _points ) && \
- FT_GLYPHLOADER_CHECK_C( _loader, _contours ) ) \
- ? 0 \
- : FT_GlyphLoader_CheckPoints( (_loader), \
- (FT_UInt)(_points), \
- (FT_UInt)(_contours) ) )
-
-
- /* check that there is enough space to add `n_subs' sub-glyphs to */
- /* a glyph loader */
- FT_BASE( FT_Error )
- FT_GlyphLoader_CheckSubGlyphs( FT_GlyphLoader loader,
- FT_UInt n_subs );
-
- /* prepare a glyph loader, i.e. empty the current glyph */
- FT_BASE( void )
- FT_GlyphLoader_Prepare( FT_GlyphLoader loader );
-
- /* add the current glyph to the base glyph */
- FT_BASE( void )
- FT_GlyphLoader_Add( FT_GlyphLoader loader );
-
- /* */
-
-
-FT_END_HEADER
-
-#endif /* FTGLOADR_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/fthash.h b/ThirdParty/freetype/include/freetype/internal/fthash.h
deleted file mode 100644
index 2491880..0000000
--- a/ThirdParty/freetype/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/ThirdParty/freetype/include/freetype/internal/ftmemory.h b/ThirdParty/freetype/include/freetype/internal/ftmemory.h
deleted file mode 100644
index 78bd3bc..0000000
--- a/ThirdParty/freetype/include/freetype/internal/ftmemory.h
+++ /dev/null
@@ -1,392 +0,0 @@
-/****************************************************************************
- *
- * ftmemory.h
- *
- * The FreeType memory management macros (specification).
- *
- * Copyright (C) 1996-2019 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 FTMEMORY_H_
-#define FTMEMORY_H_
-
-
-#include <ft2build.h>
-#include FT_CONFIG_CONFIG_H
-#include FT_TYPES_H
-
-
-FT_BEGIN_HEADER
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_SET_ERROR
- *
- * @description:
- * This macro is used to set an implicit 'error' variable to a given
- * expression's value (usually a function call), and convert it to a
- * boolean which is set whenever the value is != 0.
- */
-#undef FT_SET_ERROR
-#define FT_SET_ERROR( expression ) \
- ( ( error = (expression) ) != 0 )
-
-
-
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /**** ****/
- /**** ****/
- /**** M E M O R Y ****/
- /**** ****/
- /**** ****/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
-
-
- /*
- * C++ refuses to handle statements like p = (void*)anything, with `p' a
- * typed pointer. Since we don't have a `typeof' operator in standard C++,
- * we have to use a template to emulate it.
- */
-
-#ifdef __cplusplus
-
-extern "C++"
-{
- template <typename T> inline T*
- cplusplus_typeof( T*,
- void *v )
- {
- return static_cast <T*> ( v );
- }
-}
-
-#define FT_ASSIGNP( p, val ) (p) = cplusplus_typeof( (p), (val) )
-
-#else
-
-#define FT_ASSIGNP( p, val ) (p) = (val)
-
-#endif
-
-
-
-#ifdef FT_DEBUG_MEMORY
-
- FT_BASE( const char* ) _ft_debug_file;
- FT_BASE( long ) _ft_debug_lineno;
-
-#define FT_DEBUG_INNER( exp ) ( _ft_debug_file = __FILE__, \
- _ft_debug_lineno = __LINE__, \
- (exp) )
-
-#define FT_ASSIGNP_INNER( p, exp ) ( _ft_debug_file = __FILE__, \
- _ft_debug_lineno = __LINE__, \
- FT_ASSIGNP( p, exp ) )
-
-#else /* !FT_DEBUG_MEMORY */
-
-#define FT_DEBUG_INNER( exp ) (exp)
-#define FT_ASSIGNP_INNER( p, exp ) FT_ASSIGNP( p, exp )
-
-#endif /* !FT_DEBUG_MEMORY */
-
-
- /*
- * The allocation functions return a pointer, and the error code is written
- * to through the `p_error' parameter.
- */
-
- /* The `q' variants of the functions below (`q' for `quick') don't fill */
- /* the allocated or reallocated memory with zero bytes. */
-
- FT_BASE( FT_Pointer )
- ft_mem_alloc( FT_Memory memory,
- FT_Long size,
- FT_Error *p_error );
-
- FT_BASE( FT_Pointer )
- ft_mem_qalloc( FT_Memory memory,
- FT_Long size,
- FT_Error *p_error );
-
- FT_BASE( FT_Pointer )
- ft_mem_realloc( FT_Memory memory,
- FT_Long item_size,
- FT_Long cur_count,
- FT_Long new_count,
- void* block,
- FT_Error *p_error );
-
- FT_BASE( FT_Pointer )
- ft_mem_qrealloc( FT_Memory memory,
- FT_Long item_size,
- FT_Long cur_count,
- FT_Long new_count,
- void* block,
- FT_Error *p_error );
-
- FT_BASE( void )
- ft_mem_free( FT_Memory memory,
- const void* P );
-
-
- /* The `Q' variants of the macros below (`Q' for `quick') don't fill */
- /* the allocated or reallocated memory with zero bytes. */
-
-#define FT_MEM_ALLOC( ptr, size ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_alloc( memory, \
- (FT_Long)(size), \
- &error ) )
-
-#define FT_MEM_FREE( ptr ) \
- FT_BEGIN_STMNT \
- ft_mem_free( memory, (ptr) ); \
- (ptr) = NULL; \
- FT_END_STMNT
-
-#define FT_MEM_NEW( ptr ) \
- FT_MEM_ALLOC( ptr, sizeof ( *(ptr) ) )
-
-#define FT_MEM_REALLOC( ptr, cursz, newsz ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, \
- 1, \
- (FT_Long)(cursz), \
- (FT_Long)(newsz), \
- (ptr), \
- &error ) )
-
-#define FT_MEM_QALLOC( ptr, size ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_qalloc( memory, \
- (FT_Long)(size), \
- &error ) )
-
-#define FT_MEM_QNEW( ptr ) \
- FT_MEM_QALLOC( ptr, sizeof ( *(ptr) ) )
-
-#define FT_MEM_QREALLOC( ptr, cursz, newsz ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, \
- 1, \
- (FT_Long)(cursz), \
- (FT_Long)(newsz), \
- (ptr), \
- &error ) )
-
-#define FT_MEM_ALLOC_MULT( ptr, count, item_size ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, \
- (FT_Long)(item_size), \
- 0, \
- (FT_Long)(count), \
- NULL, \
- &error ) )
-
-#define FT_MEM_REALLOC_MULT( ptr, oldcnt, newcnt, itmsz ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, \
- (FT_Long)(itmsz), \
- (FT_Long)(oldcnt), \
- (FT_Long)(newcnt), \
- (ptr), \
- &error ) )
-
-#define FT_MEM_QALLOC_MULT( ptr, count, item_size ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, \
- (FT_Long)(item_size), \
- 0, \
- (FT_Long)(count), \
- NULL, \
- &error ) )
-
-#define FT_MEM_QREALLOC_MULT( ptr, oldcnt, newcnt, itmsz ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, \
- (FT_Long)(itmsz), \
- (FT_Long)(oldcnt), \
- (FT_Long)(newcnt), \
- (ptr), \
- &error ) )
-
-
-#define FT_MEM_SET_ERROR( cond ) ( (cond), error != 0 )
-
-
-#define FT_MEM_SET( dest, byte, count ) \
- ft_memset( dest, byte, (FT_Offset)(count) )
-
-#define FT_MEM_COPY( dest, source, count ) \
- ft_memcpy( dest, source, (FT_Offset)(count) )
-
-#define FT_MEM_MOVE( dest, source, count ) \
- ft_memmove( dest, source, (FT_Offset)(count) )
-
-
-#define FT_MEM_ZERO( dest, count ) FT_MEM_SET( dest, 0, count )
-
-#define FT_ZERO( p ) FT_MEM_ZERO( p, sizeof ( *(p) ) )
-
-
-#define FT_ARRAY_ZERO( dest, count ) \
- FT_MEM_ZERO( dest, \
- (FT_Offset)(count) * sizeof ( *(dest) ) )
-
-#define FT_ARRAY_COPY( dest, source, count ) \
- FT_MEM_COPY( dest, \
- source, \
- (FT_Offset)(count) * sizeof ( *(dest) ) )
-
-#define FT_ARRAY_MOVE( dest, source, count ) \
- FT_MEM_MOVE( dest, \
- source, \
- (FT_Offset)(count) * sizeof ( *(dest) ) )
-
-
- /*
- * Return the maximum number of addressable elements in an array. We limit
- * ourselves to INT_MAX, rather than UINT_MAX, to avoid any problems.
- */
-#define FT_ARRAY_MAX( ptr ) ( FT_INT_MAX / sizeof ( *(ptr) ) )
-
-#define FT_ARRAY_CHECK( ptr, count ) ( (count) <= FT_ARRAY_MAX( ptr ) )
-
-
- /**************************************************************************
- *
- * The following functions macros expect that their pointer argument is
- * _typed_ in order to automatically compute array element sizes.
- */
-
-#define FT_MEM_NEW_ARRAY( ptr, count ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, \
- sizeof ( *(ptr) ), \
- 0, \
- (FT_Long)(count), \
- NULL, \
- &error ) )
-
-#define FT_MEM_RENEW_ARRAY( ptr, cursz, newsz ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, \
- sizeof ( *(ptr) ), \
- (FT_Long)(cursz), \
- (FT_Long)(newsz), \
- (ptr), \
- &error ) )
-
-#define FT_MEM_QNEW_ARRAY( ptr, count ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, \
- sizeof ( *(ptr) ), \
- 0, \
- (FT_Long)(count), \
- NULL, \
- &error ) )
-
-#define FT_MEM_QRENEW_ARRAY( ptr, cursz, newsz ) \
- FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, \
- sizeof ( *(ptr) ), \
- (FT_Long)(cursz), \
- (FT_Long)(newsz), \
- (ptr), \
- &error ) )
-
-#define FT_ALLOC( ptr, size ) \
- FT_MEM_SET_ERROR( FT_MEM_ALLOC( ptr, size ) )
-
-#define FT_REALLOC( ptr, cursz, newsz ) \
- FT_MEM_SET_ERROR( FT_MEM_REALLOC( ptr, cursz, newsz ) )
-
-#define FT_ALLOC_MULT( ptr, count, item_size ) \
- FT_MEM_SET_ERROR( FT_MEM_ALLOC_MULT( ptr, count, item_size ) )
-
-#define FT_REALLOC_MULT( ptr, oldcnt, newcnt, itmsz ) \
- FT_MEM_SET_ERROR( FT_MEM_REALLOC_MULT( ptr, oldcnt, \
- newcnt, itmsz ) )
-
-#define FT_QALLOC( ptr, size ) \
- FT_MEM_SET_ERROR( FT_MEM_QALLOC( ptr, size ) )
-
-#define FT_QREALLOC( ptr, cursz, newsz ) \
- FT_MEM_SET_ERROR( FT_MEM_QREALLOC( ptr, cursz, newsz ) )
-
-#define FT_QALLOC_MULT( ptr, count, item_size ) \
- FT_MEM_SET_ERROR( FT_MEM_QALLOC_MULT( ptr, count, item_size ) )
-
-#define FT_QREALLOC_MULT( ptr, oldcnt, newcnt, itmsz ) \
- FT_MEM_SET_ERROR( FT_MEM_QREALLOC_MULT( ptr, oldcnt, \
- newcnt, itmsz ) )
-
-#define FT_FREE( ptr ) FT_MEM_FREE( ptr )
-
-#define FT_NEW( ptr ) FT_MEM_SET_ERROR( FT_MEM_NEW( ptr ) )
-
-#define FT_NEW_ARRAY( ptr, count ) \
- FT_MEM_SET_ERROR( FT_MEM_NEW_ARRAY( ptr, count ) )
-
-#define FT_RENEW_ARRAY( ptr, curcnt, newcnt ) \
- FT_MEM_SET_ERROR( FT_MEM_RENEW_ARRAY( ptr, curcnt, newcnt ) )
-
-#define FT_QNEW( ptr ) \
- FT_MEM_SET_ERROR( FT_MEM_QNEW( ptr ) )
-
-#define FT_QNEW_ARRAY( ptr, count ) \
- FT_MEM_SET_ERROR( FT_MEM_NEW_ARRAY( ptr, count ) )
-
-#define FT_QRENEW_ARRAY( ptr, curcnt, newcnt ) \
- FT_MEM_SET_ERROR( FT_MEM_RENEW_ARRAY( ptr, curcnt, newcnt ) )
-
-
- FT_BASE( FT_Pointer )
- ft_mem_strdup( FT_Memory memory,
- const char* str,
- FT_Error *p_error );
-
- FT_BASE( FT_Pointer )
- ft_mem_dup( FT_Memory memory,
- const void* address,
- FT_ULong size,
- FT_Error *p_error );
-
-
-#define FT_MEM_STRDUP( dst, str ) \
- (dst) = (char*)ft_mem_strdup( memory, (const char*)(str), &error )
-
-#define FT_STRDUP( dst, str ) \
- FT_MEM_SET_ERROR( FT_MEM_STRDUP( dst, str ) )
-
-#define FT_MEM_DUP( dst, address, size ) \
- (dst) = ft_mem_dup( memory, (address), (FT_ULong)(size), &error )
-
-#define FT_DUP( dst, address, size ) \
- FT_MEM_SET_ERROR( FT_MEM_DUP( dst, address, size ) )
-
-
- /* Return >= 1 if a truncation occurs. */
- /* Return 0 if the source string fits the buffer. */
- /* This is *not* the same as strlcpy(). */
- FT_BASE( FT_Int )
- ft_mem_strcpyn( char* dst,
- const char* src,
- FT_ULong size );
-
-#define FT_STRCPYN( dst, src, size ) \
- ft_mem_strcpyn( (char*)dst, (const char*)(src), (FT_ULong)(size) )
-
- /* */
-
-
-FT_END_HEADER
-
-#endif /* FTMEMORY_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/ftobjs.h b/ThirdParty/freetype/include/freetype/internal/ftobjs.h
deleted file mode 100644
index f3a41b3..0000000
--- a/ThirdParty/freetype/include/freetype/internal/ftobjs.h
+++ /dev/null
@@ -1,1236 +0,0 @@
-/****************************************************************************
- *
- * ftobjs.h
- *
- * The FreeType private base classes (specification).
- *
- * Copyright (C) 1996-2019 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 the definition of all internal FreeType classes.
- *
- */
-
-
-#ifndef FTOBJS_H_
-#define FTOBJS_H_
-
-#include <ft2build.h>
-#include FT_RENDER_H
-#include FT_SIZES_H
-#include FT_LCD_FILTER_H
-#include FT_INTERNAL_MEMORY_H
-#include FT_INTERNAL_GLYPH_LOADER_H
-#include FT_INTERNAL_DRIVER_H
-#include FT_INTERNAL_AUTOHINT_H
-#include FT_INTERNAL_SERVICE_H
-#include FT_INTERNAL_CALC_H
-
-#ifdef FT_CONFIG_OPTION_INCREMENTAL
-#include FT_INCREMENTAL_H
-#endif
-
-
-FT_BEGIN_HEADER
-
-
- /**************************************************************************
- *
- * Some generic definitions.
- */
-#ifndef TRUE
-#define TRUE 1
-#endif
-
-#ifndef FALSE
-#define FALSE 0
-#endif
-
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-
- /**************************************************************************
- *
- * The min and max functions missing in C. As usual, be careful not to
- * write things like FT_MIN( a++, b++ ) to avoid side effects.
- */
-#define FT_MIN( a, b ) ( (a) < (b) ? (a) : (b) )
-#define FT_MAX( a, b ) ( (a) > (b) ? (a) : (b) )
-
-#define FT_ABS( a ) ( (a) < 0 ? -(a) : (a) )
-
- /*
- * Approximate sqrt(x*x+y*y) using the `alpha max plus beta min' algorithm.
- * We use alpha = 1, beta = 3/8, giving us results with a largest error
- * less than 7% compared to the exact value.
- */
-#define FT_HYPOT( x, y ) \
- ( x = FT_ABS( x ), \
- y = FT_ABS( y ), \
- x > y ? x + ( 3 * y >> 3 ) \
- : y + ( 3 * x >> 3 ) )
-
- /* we use FT_TYPEOF to suppress signedness compilation warnings */
-#define FT_PAD_FLOOR( x, n ) ( (x) & ~FT_TYPEOF( x )( (n) - 1 ) )
-#define FT_PAD_ROUND( x, n ) FT_PAD_FLOOR( (x) + (n) / 2, n )
-#define FT_PAD_CEIL( x, n ) FT_PAD_FLOOR( (x) + (n) - 1, n )
-
-#define FT_PIX_FLOOR( x ) ( (x) & ~FT_TYPEOF( x )63 )
-#define FT_PIX_ROUND( x ) FT_PIX_FLOOR( (x) + 32 )
-#define FT_PIX_CEIL( x ) FT_PIX_FLOOR( (x) + 63 )
-
- /* specialized versions (for signed values) */
- /* that don't produce run-time errors due to integer overflow */
-#define FT_PAD_ROUND_LONG( x, n ) FT_PAD_FLOOR( ADD_LONG( (x), (n) / 2 ), \
- n )
-#define FT_PAD_CEIL_LONG( x, n ) FT_PAD_FLOOR( ADD_LONG( (x), (n) - 1 ), \
- n )
-#define FT_PIX_ROUND_LONG( x ) FT_PIX_FLOOR( ADD_LONG( (x), 32 ) )
-#define FT_PIX_CEIL_LONG( x ) FT_PIX_FLOOR( ADD_LONG( (x), 63 ) )
-
-#define FT_PAD_ROUND_INT32( x, n ) FT_PAD_FLOOR( ADD_INT32( (x), (n) / 2 ), \
- n )
-#define FT_PAD_CEIL_INT32( x, n ) FT_PAD_FLOOR( ADD_INT32( (x), (n) - 1 ), \
- n )
-#define FT_PIX_ROUND_INT32( x ) FT_PIX_FLOOR( ADD_INT32( (x), 32 ) )
-#define FT_PIX_CEIL_INT32( x ) FT_PIX_FLOOR( ADD_INT32( (x), 63 ) )
-
-
- /*
- * character classification functions -- since these are used to parse font
- * files, we must not use those in <ctypes.h> which are locale-dependent
- */
-#define ft_isdigit( x ) ( ( (unsigned)(x) - '0' ) < 10U )
-
-#define ft_isxdigit( x ) ( ( (unsigned)(x) - '0' ) < 10U || \
- ( (unsigned)(x) - 'a' ) < 6U || \
- ( (unsigned)(x) - 'A' ) < 6U )
-
- /* the next two macros assume ASCII representation */
-#define ft_isupper( x ) ( ( (unsigned)(x) - 'A' ) < 26U )
-#define ft_islower( x ) ( ( (unsigned)(x) - 'a' ) < 26U )
-
-#define ft_isalpha( x ) ( ft_isupper( x ) || ft_islower( x ) )
-#define ft_isalnum( x ) ( ft_isdigit( x ) || ft_isalpha( x ) )
-
-
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /**** ****/
- /**** ****/
- /**** C H A R M A P S ****/
- /**** ****/
- /**** ****/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
-
- /* handle to internal charmap object */
- typedef struct FT_CMapRec_* FT_CMap;
-
- /* handle to charmap class structure */
- typedef const struct FT_CMap_ClassRec_* FT_CMap_Class;
-
- /* internal charmap object structure */
- typedef struct FT_CMapRec_
- {
- FT_CharMapRec charmap;
- FT_CMap_Class clazz;
-
- } FT_CMapRec;
-
- /* typecast any pointer to a charmap handle */
-#define FT_CMAP( x ) ( (FT_CMap)( x ) )
-
- /* obvious macros */
-#define FT_CMAP_PLATFORM_ID( x ) FT_CMAP( x )->charmap.platform_id
-#define FT_CMAP_ENCODING_ID( x ) FT_CMAP( x )->charmap.encoding_id
-#define FT_CMAP_ENCODING( x ) FT_CMAP( x )->charmap.encoding
-#define FT_CMAP_FACE( x ) FT_CMAP( x )->charmap.face
-
-
- /* class method definitions */
- typedef FT_Error
- (*FT_CMap_InitFunc)( FT_CMap cmap,
- FT_Pointer init_data );
-
- typedef void
- (*FT_CMap_DoneFunc)( FT_CMap cmap );
-
- typedef FT_UInt
- (*FT_CMap_CharIndexFunc)( FT_CMap cmap,
- FT_UInt32 char_code );
-
- typedef FT_UInt
- (*FT_CMap_CharNextFunc)( FT_CMap cmap,
- FT_UInt32 *achar_code );
-
- typedef FT_UInt
- (*FT_CMap_CharVarIndexFunc)( FT_CMap cmap,
- FT_CMap unicode_cmap,
- FT_UInt32 char_code,
- FT_UInt32 variant_selector );
-
- typedef FT_Int
- (*FT_CMap_CharVarIsDefaultFunc)( FT_CMap cmap,
- FT_UInt32 char_code,
- FT_UInt32 variant_selector );
-
- typedef FT_UInt32 *
- (*FT_CMap_VariantListFunc)( FT_CMap cmap,
- FT_Memory mem );
-
- typedef FT_UInt32 *
- (*FT_CMap_CharVariantListFunc)( FT_CMap cmap,
- FT_Memory mem,
- FT_UInt32 char_code );
-
- typedef FT_UInt32 *
- (*FT_CMap_VariantCharListFunc)( FT_CMap cmap,
- FT_Memory mem,
- FT_UInt32 variant_selector );
-
-
- typedef struct FT_CMap_ClassRec_
- {
- FT_ULong size;
-
- FT_CMap_InitFunc init;
- FT_CMap_DoneFunc done;
- FT_CMap_CharIndexFunc char_index;
- FT_CMap_CharNextFunc char_next;
-
- /* Subsequent entries are special ones for format 14 -- the variant */
- /* selector subtable which behaves like no other */
-
- FT_CMap_CharVarIndexFunc char_var_index;
- FT_CMap_CharVarIsDefaultFunc char_var_default;
- FT_CMap_VariantListFunc variant_list;
- FT_CMap_CharVariantListFunc charvariant_list;
- FT_CMap_VariantCharListFunc variantchar_list;
-
- } FT_CMap_ClassRec;
-
-
-#define FT_DECLARE_CMAP_CLASS( class_ ) \
- FT_CALLBACK_TABLE const FT_CMap_ClassRec class_;
-
-#define FT_DEFINE_CMAP_CLASS( \
- class_, \
- size_, \
- init_, \
- done_, \
- char_index_, \
- char_next_, \
- char_var_index_, \
- char_var_default_, \
- variant_list_, \
- charvariant_list_, \
- variantchar_list_ ) \
- FT_CALLBACK_TABLE_DEF \
- const FT_CMap_ClassRec class_ = \
- { \
- size_, \
- init_, \
- done_, \
- char_index_, \
- char_next_, \
- char_var_index_, \
- char_var_default_, \
- variant_list_, \
- charvariant_list_, \
- variantchar_list_ \
- };
-
-
- /* create a new charmap and add it to charmap->face */
- FT_BASE( FT_Error )
- FT_CMap_New( FT_CMap_Class clazz,
- FT_Pointer init_data,
- FT_CharMap charmap,
- FT_CMap *acmap );
-
- /* destroy a charmap and remove it from face's list */
- FT_BASE( void )
- FT_CMap_Done( FT_CMap cmap );
-
-
- /* add LCD padding to CBox */
- FT_BASE( void )
- ft_lcd_padding( FT_BBox* cbox,
- FT_GlyphSlot slot,
- FT_Render_Mode mode );
-
-#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
-
- typedef void (*FT_Bitmap_LcdFilterFunc)( FT_Bitmap* bitmap,
- FT_Render_Mode render_mode,
- FT_Byte* weights );
-
-
- /* This is the default LCD filter, an in-place, 5-tap FIR filter. */
- FT_BASE( void )
- ft_lcd_filter_fir( FT_Bitmap* bitmap,
- FT_Render_Mode mode,
- FT_LcdFiveTapFilter weights );
-
-#endif /* FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
-
- /**************************************************************************
- *
- * @struct:
- * FT_Face_InternalRec
- *
- * @description:
- * This structure contains the internal fields of each FT_Face object.
- * These fields may change between different releases of FreeType.
- *
- * @fields:
- * max_points ::
- * The maximum number of points used to store the vectorial outline of
- * any glyph in this face. If this value cannot be known in advance,
- * or if the face isn't scalable, this should be set to 0. Only
- * relevant for scalable formats.
- *
- * max_contours ::
- * The maximum number of contours used to store the vectorial outline
- * of any glyph in this face. If this value cannot be known in
- * advance, or if the face isn't scalable, this should be set to 0.
- * Only relevant for scalable formats.
- *
- * transform_matrix ::
- * A 2x2 matrix of 16.16 coefficients used to transform glyph outlines
- * after they are loaded from the font. Only used by the convenience
- * functions.
- *
- * transform_delta ::
- * A translation vector used to transform glyph outlines after they are
- * loaded from the font. Only used by the convenience functions.
- *
- * transform_flags ::
- * Some flags used to classify the transform. Only used by the
- * convenience functions.
- *
- * services ::
- * A cache for frequently used services. It should be only accessed
- * with the macro `FT_FACE_LOOKUP_SERVICE`.
- *
- * incremental_interface ::
- * If non-null, the interface through which glyph data and metrics are
- * loaded incrementally for faces that do not provide all of this data
- * when first opened. This field exists only if
- * @FT_CONFIG_OPTION_INCREMENTAL is defined.
- *
- * no_stem_darkening ::
- * Overrides the module-level default, see @stem-darkening[cff], for
- * example. FALSE and TRUE toggle stem darkening on and off,
- * respectively, value~-1 means to use the module/driver default.
- *
- * random_seed ::
- * If positive, override the seed value for the CFF 'random' operator.
- * Value~0 means to use the font's value. Value~-1 means to use the
- * CFF driver's default.
- *
- * lcd_weights ::
- * lcd_filter_func ::
- * These fields specify the LCD filtering weights and callback function
- * for ClearType-style subpixel rendering.
- *
- * refcount ::
- * A counter initialized to~1 at the time an @FT_Face structure is
- * created. @FT_Reference_Face increments this counter, and
- * @FT_Done_Face only destroys a face if the counter is~1, otherwise it
- * simply decrements it.
- */
- typedef struct FT_Face_InternalRec_
- {
- FT_Matrix transform_matrix;
- FT_Vector transform_delta;
- FT_Int transform_flags;
-
- FT_ServiceCacheRec services;
-
-#ifdef FT_CONFIG_OPTION_INCREMENTAL
- FT_Incremental_InterfaceRec* incremental_interface;
-#endif
-
- FT_Char no_stem_darkening;
- FT_Int32 random_seed;
-
-#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
- FT_LcdFiveTapFilter lcd_weights; /* filter weights, if any */
- FT_Bitmap_LcdFilterFunc lcd_filter_func; /* filtering callback */
-#endif
-
- FT_Int refcount;
-
- } FT_Face_InternalRec;
-
-
- /**************************************************************************
- *
- * @struct:
- * FT_Slot_InternalRec
- *
- * @description:
- * This structure contains the internal fields of each FT_GlyphSlot
- * object. These fields may change between different releases of
- * FreeType.
- *
- * @fields:
- * loader ::
- * The glyph loader object used to load outlines into the glyph slot.
- *
- * flags ::
- * Possible values are zero or FT_GLYPH_OWN_BITMAP. The latter
- * indicates that the FT_GlyphSlot structure owns the bitmap buffer.
- *
- * glyph_transformed ::
- * Boolean. Set to TRUE when the loaded glyph must be transformed
- * through a specific font transformation. This is _not_ the same as
- * the face transform set through FT_Set_Transform().
- *
- * glyph_matrix ::
- * The 2x2 matrix corresponding to the glyph transformation, if
- * necessary.
- *
- * glyph_delta ::
- * The 2d translation vector corresponding to the glyph transformation,
- * if necessary.
- *
- * glyph_hints ::
- * Format-specific glyph hints management.
- *
- * load_flags ::
- * The load flags passed as an argument to @FT_Load_Glyph while
- * initializing the glyph slot.
- */
-
-#define FT_GLYPH_OWN_BITMAP 0x1U
-
- typedef struct FT_Slot_InternalRec_
- {
- FT_GlyphLoader loader;
- FT_UInt flags;
- FT_Bool glyph_transformed;
- FT_Matrix glyph_matrix;
- FT_Vector glyph_delta;
- void* glyph_hints;
-
- FT_Int32 load_flags;
-
- } FT_GlyphSlot_InternalRec;
-
-
- /**************************************************************************
- *
- * @struct:
- * FT_Size_InternalRec
- *
- * @description:
- * This structure contains the internal fields of each FT_Size object.
- *
- * @fields:
- * module_data ::
- * Data specific to a driver module.
- *
- * autohint_mode ::
- * The used auto-hinting mode.
- *
- * autohint_metrics ::
- * Metrics used by the auto-hinter.
- *
- */
-
- typedef struct FT_Size_InternalRec_
- {
- void* module_data;
-
- FT_Render_Mode autohint_mode;
- FT_Size_Metrics autohint_metrics;
-
- } FT_Size_InternalRec;
-
-
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /**** ****/
- /**** ****/
- /**** M O D U L E S ****/
- /**** ****/
- /**** ****/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
-
-
- /**************************************************************************
- *
- * @struct:
- * FT_ModuleRec
- *
- * @description:
- * A module object instance.
- *
- * @fields:
- * clazz ::
- * A pointer to the module's class.
- *
- * library ::
- * A handle to the parent library object.
- *
- * memory ::
- * A handle to the memory manager.
- */
- typedef struct FT_ModuleRec_
- {
- FT_Module_Class* clazz;
- FT_Library library;
- FT_Memory memory;
-
- } FT_ModuleRec;
-
-
- /* typecast an object to an FT_Module */
-#define FT_MODULE( x ) ( (FT_Module)(x) )
-
-#define FT_MODULE_CLASS( x ) FT_MODULE( x )->clazz
-#define FT_MODULE_LIBRARY( x ) FT_MODULE( x )->library
-#define FT_MODULE_MEMORY( x ) FT_MODULE( x )->memory
-
-
-#define FT_MODULE_IS_DRIVER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
- FT_MODULE_FONT_DRIVER )
-
-#define FT_MODULE_IS_RENDERER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
- FT_MODULE_RENDERER )
-
-#define FT_MODULE_IS_HINTER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
- FT_MODULE_HINTER )
-
-#define FT_MODULE_IS_STYLER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
- FT_MODULE_STYLER )
-
-#define FT_DRIVER_IS_SCALABLE( x ) ( FT_MODULE_CLASS( x )->module_flags & \
- FT_MODULE_DRIVER_SCALABLE )
-
-#define FT_DRIVER_USES_OUTLINES( x ) !( FT_MODULE_CLASS( x )->module_flags & \
- FT_MODULE_DRIVER_NO_OUTLINES )
-
-#define FT_DRIVER_HAS_HINTER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
- FT_MODULE_DRIVER_HAS_HINTER )
-
-#define FT_DRIVER_HINTS_LIGHTLY( x ) ( FT_MODULE_CLASS( x )->module_flags & \
- FT_MODULE_DRIVER_HINTS_LIGHTLY )
-
-
- /**************************************************************************
- *
- * @function:
- * FT_Get_Module_Interface
- *
- * @description:
- * Finds a module and returns its specific interface as a typeless
- * pointer.
- *
- * @input:
- * library ::
- * A handle to the library object.
- *
- * module_name ::
- * The module's name (as an ASCII string).
- *
- * @return:
- * A module-specific interface if available, 0 otherwise.
- *
- * @note:
- * You should better be familiar with FreeType internals to know which
- * module to look for, and what its interface is :-)
- */
- FT_BASE( const void* )
- FT_Get_Module_Interface( FT_Library library,
- const char* mod_name );
-
- FT_BASE( FT_Pointer )
- ft_module_get_service( FT_Module module,
- const char* service_id,
- FT_Bool global );
-
-#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
- FT_BASE( FT_Error )
- ft_property_string_set( FT_Library library,
- const FT_String* module_name,
- const FT_String* property_name,
- FT_String* value );
-#endif
-
- /* */
-
-
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /**** ****/
- /**** ****/
- /**** F A C E, S I Z E & G L Y P H S L O T O B J E C T S ****/
- /**** ****/
- /**** ****/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
-
- /* a few macros used to perform easy typecasts with minimal brain damage */
-
-#define FT_FACE( x ) ( (FT_Face)(x) )
-#define FT_SIZE( x ) ( (FT_Size)(x) )
-#define FT_SLOT( x ) ( (FT_GlyphSlot)(x) )
-
-#define FT_FACE_DRIVER( x ) FT_FACE( x )->driver
-#define FT_FACE_LIBRARY( x ) FT_FACE_DRIVER( x )->root.library
-#define FT_FACE_MEMORY( x ) FT_FACE( x )->memory
-#define FT_FACE_STREAM( x ) FT_FACE( x )->stream
-
-#define FT_SIZE_FACE( x ) FT_SIZE( x )->face
-#define FT_SLOT_FACE( x ) FT_SLOT( x )->face
-
-#define FT_FACE_SLOT( x ) FT_FACE( x )->glyph
-#define FT_FACE_SIZE( x ) FT_FACE( x )->size
-
-
- /**************************************************************************
- *
- * @function:
- * FT_New_GlyphSlot
- *
- * @description:
- * It is sometimes useful to have more than one glyph slot for a given
- * face object. This function is used to create additional slots. All
- * of them are automatically discarded when the face is destroyed.
- *
- * @input:
- * face ::
- * A handle to a parent face object.
- *
- * @output:
- * aslot ::
- * A handle to a new glyph slot object.
- *
- * @return:
- * FreeType error code. 0 means success.
- */
- FT_BASE( FT_Error )
- FT_New_GlyphSlot( FT_Face face,
- FT_GlyphSlot *aslot );
-
-
- /**************************************************************************
- *
- * @function:
- * FT_Done_GlyphSlot
- *
- * @description:
- * Destroys a given glyph slot. Remember however that all slots are
- * automatically destroyed with its parent. Using this function is not
- * always mandatory.
- *
- * @input:
- * slot ::
- * A handle to a target glyph slot.
- */
- FT_BASE( void )
- FT_Done_GlyphSlot( FT_GlyphSlot slot );
-
- /* */
-
-#define FT_REQUEST_WIDTH( req ) \
- ( (req)->horiResolution \
- ? ( (req)->width * (FT_Pos)(req)->horiResolution + 36 ) / 72 \
- : (req)->width )
-
-#define FT_REQUEST_HEIGHT( req ) \
- ( (req)->vertResolution \
- ? ( (req)->height * (FT_Pos)(req)->vertResolution + 36 ) / 72 \
- : (req)->height )
-
-
- /* Set the metrics according to a bitmap strike. */
- FT_BASE( void )
- FT_Select_Metrics( FT_Face face,
- FT_ULong strike_index );
-
-
- /* Set the metrics according to a size request. */
- FT_BASE( void )
- FT_Request_Metrics( FT_Face face,
- FT_Size_Request req );
-
-
- /* Match a size request against `available_sizes'. */
- FT_BASE( FT_Error )
- FT_Match_Size( FT_Face face,
- FT_Size_Request req,
- FT_Bool ignore_width,
- FT_ULong* size_index );
-
-
- /* Use the horizontal metrics to synthesize the vertical metrics. */
- /* If `advance' is zero, it is also synthesized. */
- FT_BASE( void )
- ft_synthesize_vertical_metrics( FT_Glyph_Metrics* metrics,
- FT_Pos advance );
-
-
- /* Free the bitmap of a given glyphslot when needed (i.e., only when it */
- /* was allocated with ft_glyphslot_alloc_bitmap). */
- FT_BASE( void )
- ft_glyphslot_free_bitmap( FT_GlyphSlot slot );
-
-
- /* Preset bitmap metrics of an outline glyphslot prior to rendering */
- /* and check whether the truncated bbox is too large for rendering. */
- FT_BASE( FT_Bool )
- ft_glyphslot_preset_bitmap( FT_GlyphSlot slot,
- FT_Render_Mode mode,
- const FT_Vector* origin );
-
- /* Allocate a new bitmap buffer in a glyph slot. */
- FT_BASE( FT_Error )
- ft_glyphslot_alloc_bitmap( FT_GlyphSlot slot,
- FT_ULong size );
-
-
- /* Set the bitmap buffer in a glyph slot to a given pointer. The buffer */
- /* will not be freed by a later call to ft_glyphslot_free_bitmap. */
- FT_BASE( void )
- ft_glyphslot_set_bitmap( FT_GlyphSlot slot,
- FT_Byte* buffer );
-
-
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /**** ****/
- /**** ****/
- /**** R E N D E R E R S ****/
- /**** ****/
- /**** ****/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
-
-
-#define FT_RENDERER( x ) ( (FT_Renderer)(x) )
-#define FT_GLYPH( x ) ( (FT_Glyph)(x) )
-#define FT_BITMAP_GLYPH( x ) ( (FT_BitmapGlyph)(x) )
-#define FT_OUTLINE_GLYPH( x ) ( (FT_OutlineGlyph)(x) )
-
-
- typedef struct FT_RendererRec_
- {
- FT_ModuleRec root;
- FT_Renderer_Class* clazz;
- FT_Glyph_Format glyph_format;
- FT_Glyph_Class glyph_class;
-
- FT_Raster raster;
- FT_Raster_Render_Func raster_render;
- FT_Renderer_RenderFunc render;
-
- } FT_RendererRec;
-
-
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /**** ****/
- /**** ****/
- /**** F O N T D R I V E R S ****/
- /**** ****/
- /**** ****/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
-
-
- /* typecast a module into a driver easily */
-#define FT_DRIVER( x ) ( (FT_Driver)(x) )
-
- /* typecast a module as a driver, and get its driver class */
-#define FT_DRIVER_CLASS( x ) FT_DRIVER( x )->clazz
-
-
- /**************************************************************************
- *
- * @struct:
- * FT_DriverRec
- *
- * @description:
- * The root font driver class. A font driver is responsible for managing
- * and loading font files of a given format.
- *
- * @fields:
- * root ::
- * Contains the fields of the root module class.
- *
- * clazz ::
- * A pointer to the font driver's class. Note that this is NOT
- * root.clazz. 'class' wasn't used as it is a reserved word in C++.
- *
- * faces_list ::
- * The list of faces currently opened by this driver.
- *
- * glyph_loader ::
- * Unused. Used to be glyph loader for all faces managed by this
- * driver.
- */
- typedef struct FT_DriverRec_
- {
- FT_ModuleRec root;
- FT_Driver_Class clazz;
- FT_ListRec faces_list;
- FT_GlyphLoader glyph_loader;
-
- } FT_DriverRec;
-
-
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /**** ****/
- /**** ****/
- /**** L I B R A R I E S ****/
- /**** ****/
- /**** ****/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
-
-
- /**************************************************************************
- *
- * @struct:
- * FT_LibraryRec
- *
- * @description:
- * The FreeType library class. This is the root of all FreeType data.
- * Use FT_New_Library() to create a library object, and FT_Done_Library()
- * to discard it and all child objects.
- *
- * @fields:
- * memory ::
- * The library's memory object. Manages memory allocation.
- *
- * version_major ::
- * The major version number of the library.
- *
- * version_minor ::
- * The minor version number of the library.
- *
- * version_patch ::
- * The current patch level of the library.
- *
- * num_modules ::
- * The number of modules currently registered within this library.
- * This is set to 0 for new libraries. New modules are added through
- * the FT_Add_Module() API function.
- *
- * modules ::
- * A table used to store handles to the currently registered
- * modules. Note that each font driver contains a list of its opened
- * faces.
- *
- * renderers ::
- * The list of renderers currently registered within the library.
- *
- * cur_renderer ::
- * The current outline renderer. This is a shortcut used to avoid
- * parsing the list on each call to FT_Outline_Render(). It is a
- * handle to the current renderer for the FT_GLYPH_FORMAT_OUTLINE
- * format.
- *
- * auto_hinter ::
- * The auto-hinter module interface.
- *
- * debug_hooks ::
- * An array of four function pointers that allow debuggers to hook into
- * a font format's interpreter. Currently, only the TrueType bytecode
- * debugger uses this.
- *
- * lcd_weights ::
- * The LCD filter weights for ClearType-style subpixel rendering.
- *
- * lcd_filter_func ::
- * The LCD filtering callback function for for ClearType-style subpixel
- * rendering.
- *
- * lcd_geometry ::
- * This array specifies LCD subpixel geometry and controls Harmony LCD
- * rendering technique, alternative to ClearType.
- *
- * pic_container ::
- * Contains global structs and tables, instead of defining them
- * globally.
- *
- * refcount ::
- * A counter initialized to~1 at the time an @FT_Library structure is
- * created. @FT_Reference_Library increments this counter, and
- * @FT_Done_Library only destroys a library if the counter is~1,
- * otherwise it simply decrements it.
- */
- typedef struct FT_LibraryRec_
- {
- FT_Memory memory; /* library's memory manager */
-
- FT_Int version_major;
- FT_Int version_minor;
- FT_Int version_patch;
-
- FT_UInt num_modules;
- FT_Module modules[FT_MAX_MODULES]; /* module objects */
-
- FT_ListRec renderers; /* list of renderers */
- FT_Renderer cur_renderer; /* current outline renderer */
- FT_Module auto_hinter;
-
- FT_DebugHook_Func debug_hooks[4];
-
-#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
- FT_LcdFiveTapFilter lcd_weights; /* filter weights, if any */
- FT_Bitmap_LcdFilterFunc lcd_filter_func; /* filtering callback */
-#else
- FT_Vector lcd_geometry[3]; /* RGB subpixel positions */
-#endif
-
- FT_Int refcount;
-
- } FT_LibraryRec;
-
-
- FT_BASE( FT_Renderer )
- FT_Lookup_Renderer( FT_Library library,
- FT_Glyph_Format format,
- FT_ListNode* node );
-
- FT_BASE( FT_Error )
- FT_Render_Glyph_Internal( FT_Library library,
- FT_GlyphSlot slot,
- FT_Render_Mode render_mode );
-
- typedef const char*
- (*FT_Face_GetPostscriptNameFunc)( FT_Face face );
-
- typedef FT_Error
- (*FT_Face_GetGlyphNameFunc)( FT_Face face,
- FT_UInt glyph_index,
- FT_Pointer buffer,
- FT_UInt buffer_max );
-
- typedef FT_UInt
- (*FT_Face_GetGlyphNameIndexFunc)( FT_Face face,
- FT_String* glyph_name );
-
-
-#ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM
-
- /**************************************************************************
- *
- * @function:
- * FT_New_Memory
- *
- * @description:
- * Creates a new memory object.
- *
- * @return:
- * A pointer to the new memory object. 0 in case of error.
- */
- FT_BASE( FT_Memory )
- FT_New_Memory( void );
-
-
- /**************************************************************************
- *
- * @function:
- * FT_Done_Memory
- *
- * @description:
- * Discards memory manager.
- *
- * @input:
- * memory ::
- * A handle to the memory manager.
- */
- FT_BASE( void )
- FT_Done_Memory( FT_Memory memory );
-
-#endif /* !FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM */
-
-
- /* Define default raster's interface. The default raster is located in */
- /* `src/base/ftraster.c'. */
- /* */
- /* Client applications can register new rasters through the */
- /* FT_Set_Raster() API. */
-
-#ifndef FT_NO_DEFAULT_RASTER
- FT_EXPORT_VAR( FT_Raster_Funcs ) ft_default_raster;
-#endif
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_DEFINE_OUTLINE_FUNCS
- *
- * @description:
- * Used to initialize an instance of FT_Outline_Funcs struct. The struct
- * will be allocated in the global scope (or the scope where the macro is
- * used).
- */
-#define FT_DEFINE_OUTLINE_FUNCS( \
- class_, \
- move_to_, \
- line_to_, \
- conic_to_, \
- cubic_to_, \
- shift_, \
- delta_ ) \
- static const FT_Outline_Funcs class_ = \
- { \
- move_to_, \
- line_to_, \
- conic_to_, \
- cubic_to_, \
- shift_, \
- delta_ \
- };
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_DEFINE_RASTER_FUNCS
- *
- * @description:
- * Used to initialize an instance of FT_Raster_Funcs struct. The struct
- * will be allocated in the global scope (or the scope where the macro is
- * used).
- */
-#define FT_DEFINE_RASTER_FUNCS( \
- class_, \
- glyph_format_, \
- raster_new_, \
- raster_reset_, \
- raster_set_mode_, \
- raster_render_, \
- raster_done_ ) \
- const FT_Raster_Funcs class_ = \
- { \
- glyph_format_, \
- raster_new_, \
- raster_reset_, \
- raster_set_mode_, \
- raster_render_, \
- raster_done_ \
- };
-
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_DEFINE_GLYPH
- *
- * @description:
- * The struct will be allocated in the global scope (or the scope where
- * the macro is used).
- */
-#define FT_DEFINE_GLYPH( \
- class_, \
- size_, \
- format_, \
- init_, \
- done_, \
- copy_, \
- transform_, \
- bbox_, \
- prepare_ ) \
- FT_CALLBACK_TABLE_DEF \
- const FT_Glyph_Class class_ = \
- { \
- size_, \
- format_, \
- init_, \
- done_, \
- copy_, \
- transform_, \
- bbox_, \
- prepare_ \
- };
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_DECLARE_RENDERER
- *
- * @description:
- * Used to create a forward declaration of a FT_Renderer_Class struct
- * instance.
- *
- * @macro:
- * FT_DEFINE_RENDERER
- *
- * @description:
- * Used to initialize an instance of FT_Renderer_Class struct.
- *
- * The struct will be allocated in the global scope (or the scope where
- * the macro is used).
- */
-#define FT_DECLARE_RENDERER( class_ ) \
- FT_EXPORT_VAR( const FT_Renderer_Class ) class_;
-
-#define FT_DEFINE_RENDERER( \
- class_, \
- flags_, \
- size_, \
- name_, \
- version_, \
- requires_, \
- interface_, \
- init_, \
- done_, \
- get_interface_, \
- glyph_format_, \
- render_glyph_, \
- transform_glyph_, \
- get_glyph_cbox_, \
- set_mode_, \
- raster_class_ ) \
- FT_CALLBACK_TABLE_DEF \
- const FT_Renderer_Class class_ = \
- { \
- FT_DEFINE_ROOT_MODULE( flags_, \
- size_, \
- name_, \
- version_, \
- requires_, \
- interface_, \
- init_, \
- done_, \
- get_interface_ ) \
- glyph_format_, \
- \
- render_glyph_, \
- transform_glyph_, \
- get_glyph_cbox_, \
- set_mode_, \
- \
- raster_class_ \
- };
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_DECLARE_MODULE
- *
- * @description:
- * Used to create a forward declaration of a FT_Module_Class struct
- * instance.
- *
- * @macro:
- * FT_DEFINE_MODULE
- *
- * @description:
- * Used to initialize an instance of an FT_Module_Class struct.
- *
- * The struct will be allocated in the global scope (or the scope where
- * the macro is used).
- *
- * @macro:
- * FT_DEFINE_ROOT_MODULE
- *
- * @description:
- * Used to initialize an instance of an FT_Module_Class struct inside
- * another struct that contains it or in a function that initializes that
- * containing struct.
- */
-#define FT_DECLARE_MODULE( class_ ) \
- FT_CALLBACK_TABLE \
- const FT_Module_Class class_;
-
-#define FT_DEFINE_ROOT_MODULE( \
- flags_, \
- size_, \
- name_, \
- version_, \
- requires_, \
- interface_, \
- init_, \
- done_, \
- get_interface_ ) \
- { \
- flags_, \
- size_, \
- \
- name_, \
- version_, \
- requires_, \
- \
- interface_, \
- \
- init_, \
- done_, \
- get_interface_, \
- },
-
-#define FT_DEFINE_MODULE( \
- class_, \
- flags_, \
- size_, \
- name_, \
- version_, \
- requires_, \
- interface_, \
- init_, \
- done_, \
- get_interface_ ) \
- FT_CALLBACK_TABLE_DEF \
- const FT_Module_Class class_ = \
- { \
- flags_, \
- size_, \
- \
- name_, \
- version_, \
- requires_, \
- \
- interface_, \
- \
- init_, \
- done_, \
- get_interface_, \
- };
-
-
-FT_END_HEADER
-
-#endif /* FTOBJS_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/ftpsprop.h b/ThirdParty/freetype/include/freetype/internal/ftpsprop.h
deleted file mode 100644
index 574837f..0000000
--- a/ThirdParty/freetype/include/freetype/internal/ftpsprop.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/****************************************************************************
- *
- * ftpsprop.h
- *
- * Get and set properties of PostScript drivers (specification).
- *
- * Copyright (C) 2017-2019 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/ThirdParty/freetype/include/freetype/internal/ftrfork.h b/ThirdParty/freetype/include/freetype/internal/ftrfork.h
deleted file mode 100644
index 75b3e53..0000000
--- a/ThirdParty/freetype/include/freetype/internal/ftrfork.h
+++ /dev/null
@@ -1,246 +0,0 @@
-/****************************************************************************
- *
- * ftrfork.h
- *
- * Embedded resource forks accessor (specification).
- *
- * Copyright (C) 2004-2019 by
- * Masatake YAMATO and Redhat K.K.
- *
- * 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.
- *
- */
-
-/****************************************************************************
- * Development of the code in this file is support of
- * Information-technology Promotion Agency, Japan.
- */
-
-
-#ifndef FTRFORK_H_
-#define FTRFORK_H_
-
-
-#include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
-
-
-FT_BEGIN_HEADER
-
-
- /* Number of guessing rules supported in `FT_Raccess_Guess'. */
- /* Don't forget to increment the number if you add a new guessing rule. */
-#define FT_RACCESS_N_RULES 9
-
-
- /* A structure to describe a reference in a resource by its resource ID */
- /* and internal offset. The `POST' resource expects to be concatenated */
- /* by the order of resource IDs instead of its appearance in the file. */
-
- typedef struct FT_RFork_Ref_
- {
- FT_Short res_id;
- FT_Long offset;
-
- } FT_RFork_Ref;
-
-
-#ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
- typedef FT_Error
- (*ft_raccess_guess_func)( FT_Library library,
- FT_Stream stream,
- char *base_file_name,
- char **result_file_name,
- FT_Long *result_offset );
-
- typedef enum FT_RFork_Rule_ {
- FT_RFork_Rule_invalid = -2,
- FT_RFork_Rule_uknown, /* -1 */
- FT_RFork_Rule_apple_double,
- FT_RFork_Rule_apple_single,
- FT_RFork_Rule_darwin_ufs_export,
- FT_RFork_Rule_darwin_newvfs,
- FT_RFork_Rule_darwin_hfsplus,
- FT_RFork_Rule_vfat,
- FT_RFork_Rule_linux_cap,
- FT_RFork_Rule_linux_double,
- FT_RFork_Rule_linux_netatalk
- } FT_RFork_Rule;
-
- /* For fast translation between rule index and rule type,
- * the macros FT_RFORK_xxx should be kept consistent with the
- * raccess_guess_funcs table
- */
- typedef struct ft_raccess_guess_rec_ {
- ft_raccess_guess_func func;
- FT_RFork_Rule type;
- } ft_raccess_guess_rec;
-
-
-#define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type ) \
- static const type name[] = {
-#define CONST_FT_RFORK_RULE_ARRAY_ENTRY( func_suffix, type_suffix ) \
- { raccess_guess_ ## func_suffix, \
- FT_RFork_Rule_ ## type_suffix },
- /* this array is a storage, thus a final `;' is needed */
-#define CONST_FT_RFORK_RULE_ARRAY_END };
-
-#endif /* FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK */
-
-
- /**************************************************************************
- *
- * @function:
- * FT_Raccess_Guess
- *
- * @description:
- * Guess a file name and offset where the actual resource fork is stored.
- * The macro FT_RACCESS_N_RULES holds the number of guessing rules; the
- * guessed result for the Nth rule is represented as a triplet: a new
- * file name (new_names[N]), a file offset (offsets[N]), and an error
- * code (errors[N]).
- *
- * @input:
- * library ::
- * A FreeType library instance.
- *
- * stream ::
- * A file stream containing the resource fork.
- *
- * base_name ::
- * The (base) file name of the resource fork used for some guessing
- * rules.
- *
- * @output:
- * new_names ::
- * An array of guessed file names in which the resource forks may
- * exist. If 'new_names[N]' is `NULL`, the guessed file name is equal
- * to `base_name`.
- *
- * offsets ::
- * An array of guessed file offsets. 'offsets[N]' holds the file
- * offset of the possible start of the resource fork in file
- * 'new_names[N]'.
- *
- * errors ::
- * An array of FreeType error codes. 'errors[N]' is the error code of
- * Nth guessing rule function. If 'errors[N]' is not FT_Err_Ok,
- * 'new_names[N]' and 'offsets[N]' are meaningless.
- */
- FT_BASE( void )
- FT_Raccess_Guess( FT_Library library,
- FT_Stream stream,
- char* base_name,
- char** new_names,
- FT_Long* offsets,
- FT_Error* errors );
-
-
- /**************************************************************************
- *
- * @function:
- * FT_Raccess_Get_HeaderInfo
- *
- * @description:
- * Get the information from the header of resource fork. The information
- * includes the file offset where the resource map starts, and the file
- * offset where the resource data starts. `FT_Raccess_Get_DataOffsets`
- * requires these two data.
- *
- * @input:
- * library ::
- * A FreeType library instance.
- *
- * stream ::
- * A file stream containing the resource fork.
- *
- * rfork_offset ::
- * The file offset where the resource fork starts.
- *
- * @output:
- * map_offset ::
- * The file offset where the resource map starts.
- *
- * rdata_pos ::
- * The file offset where the resource data starts.
- *
- * @return:
- * FreeType error code. FT_Err_Ok means success.
- */
- FT_BASE( FT_Error )
- FT_Raccess_Get_HeaderInfo( FT_Library library,
- FT_Stream stream,
- FT_Long rfork_offset,
- FT_Long *map_offset,
- FT_Long *rdata_pos );
-
-
- /**************************************************************************
- *
- * @function:
- * FT_Raccess_Get_DataOffsets
- *
- * @description:
- * Get the data offsets for a tag in a resource fork. Offsets are stored
- * in an array because, in some cases, resources in a resource fork have
- * the same tag.
- *
- * @input:
- * library ::
- * A FreeType library instance.
- *
- * stream ::
- * A file stream containing the resource fork.
- *
- * map_offset ::
- * The file offset where the resource map starts.
- *
- * rdata_pos ::
- * The file offset where the resource data starts.
- *
- * tag ::
- * The resource tag.
- *
- * sort_by_res_id ::
- * A Boolean to sort the fragmented resource by their ids. The
- * fragmented resources for 'POST' resource should be sorted to restore
- * Type1 font properly. For 'sfnt' resources, sorting may induce a
- * different order of the faces in comparison to that by QuickDraw API.
- *
- * @output:
- * offsets ::
- * The stream offsets for the resource data specified by 'tag'. This
- * array is allocated by the function, so you have to call @ft_mem_free
- * after use.
- *
- * count ::
- * The length of offsets array.
- *
- * @return:
- * FreeType error code. FT_Err_Ok means success.
- *
- * @note:
- * Normally you should use `FT_Raccess_Get_HeaderInfo` to get the value
- * for `map_offset` and `rdata_pos`.
- */
- FT_BASE( FT_Error )
- FT_Raccess_Get_DataOffsets( FT_Library library,
- FT_Stream stream,
- FT_Long map_offset,
- FT_Long rdata_pos,
- FT_Long tag,
- FT_Bool sort_by_res_id,
- FT_Long **offsets,
- FT_Long *count );
-
-
-FT_END_HEADER
-
-#endif /* FTRFORK_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/ftserv.h b/ThirdParty/freetype/include/freetype/internal/ftserv.h
deleted file mode 100644
index 8836cf3..0000000
--- a/ThirdParty/freetype/include/freetype/internal/ftserv.h
+++ /dev/null
@@ -1,521 +0,0 @@
-/****************************************************************************
- *
- * ftserv.h
- *
- * The FreeType services (specification only).
- *
- * Copyright (C) 2003-2019 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.
- *
- */
-
- /**************************************************************************
- *
- * Each module can export one or more 'services'. Each service is
- * identified by a constant string and modeled by a pointer; the latter
- * generally corresponds to a structure containing function pointers.
- *
- * Note that a service's data cannot be a mere function pointer because in
- * C it is possible that function pointers might be implemented differently
- * than data pointers (e.g. 48 bits instead of 32).
- *
- */
-
-
-#ifndef FTSERV_H_
-#define FTSERV_H_
-
-
-FT_BEGIN_HEADER
-
- /**************************************************************************
- *
- * @macro:
- * FT_FACE_FIND_SERVICE
- *
- * @description:
- * This macro is used to look up a service from a face's driver module.
- *
- * @input:
- * face ::
- * The source face handle.
- *
- * id ::
- * A string describing the service as defined in the service's header
- * files (e.g. FT_SERVICE_ID_MULTI_MASTERS which expands to
- * 'multi-masters'). It is automatically prefixed with
- * `FT_SERVICE_ID_`.
- *
- * @output:
- * ptr ::
- * A variable that receives the service pointer. Will be `NULL` if not
- * found.
- */
-#ifdef __cplusplus
-
-#define FT_FACE_FIND_SERVICE( face, ptr, id ) \
- FT_BEGIN_STMNT \
- FT_Module module = FT_MODULE( FT_FACE( face )->driver ); \
- FT_Pointer _tmp_ = NULL; \
- FT_Pointer* _pptr_ = (FT_Pointer*)&(ptr); \
- \
- \
- if ( module->clazz->get_interface ) \
- _tmp_ = module->clazz->get_interface( module, FT_SERVICE_ID_ ## id ); \
- *_pptr_ = _tmp_; \
- FT_END_STMNT
-
-#else /* !C++ */
-
-#define FT_FACE_FIND_SERVICE( face, ptr, id ) \
- FT_BEGIN_STMNT \
- FT_Module module = FT_MODULE( FT_FACE( face )->driver ); \
- FT_Pointer _tmp_ = NULL; \
- \
- if ( module->clazz->get_interface ) \
- _tmp_ = module->clazz->get_interface( module, FT_SERVICE_ID_ ## id ); \
- ptr = _tmp_; \
- FT_END_STMNT
-
-#endif /* !C++ */
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_FACE_FIND_GLOBAL_SERVICE
- *
- * @description:
- * This macro is used to look up a service from all modules.
- *
- * @input:
- * face ::
- * The source face handle.
- *
- * id ::
- * A string describing the service as defined in the service's header
- * files (e.g. FT_SERVICE_ID_MULTI_MASTERS which expands to
- * 'multi-masters'). It is automatically prefixed with
- * `FT_SERVICE_ID_`.
- *
- * @output:
- * ptr ::
- * A variable that receives the service pointer. Will be `NULL` if not
- * found.
- */
-#ifdef __cplusplus
-
-#define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id ) \
- FT_BEGIN_STMNT \
- FT_Module module = FT_MODULE( FT_FACE( face )->driver ); \
- FT_Pointer _tmp_; \
- FT_Pointer* _pptr_ = (FT_Pointer*)&(ptr); \
- \
- \
- _tmp_ = ft_module_get_service( module, FT_SERVICE_ID_ ## id, 1 ); \
- *_pptr_ = _tmp_; \
- FT_END_STMNT
-
-#else /* !C++ */
-
-#define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id ) \
- FT_BEGIN_STMNT \
- FT_Module module = FT_MODULE( FT_FACE( face )->driver ); \
- FT_Pointer _tmp_; \
- \
- \
- _tmp_ = ft_module_get_service( module, FT_SERVICE_ID_ ## id, 1 ); \
- ptr = _tmp_; \
- FT_END_STMNT
-
-#endif /* !C++ */
-
-
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** S E R V I C E D E S C R I P T O R S *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
-
- /*
- * The following structure is used to _describe_ a given service to the
- * library. This is useful to build simple static service lists.
- */
- typedef struct FT_ServiceDescRec_
- {
- const char* serv_id; /* service name */
- const void* serv_data; /* service pointer/data */
-
- } FT_ServiceDescRec;
-
- typedef const FT_ServiceDescRec* FT_ServiceDesc;
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_DEFINE_SERVICEDESCREC1
- * FT_DEFINE_SERVICEDESCREC2
- * FT_DEFINE_SERVICEDESCREC3
- * FT_DEFINE_SERVICEDESCREC4
- * FT_DEFINE_SERVICEDESCREC5
- * FT_DEFINE_SERVICEDESCREC6
- * FT_DEFINE_SERVICEDESCREC7
- * FT_DEFINE_SERVICEDESCREC8
- * FT_DEFINE_SERVICEDESCREC9
- * FT_DEFINE_SERVICEDESCREC10
- *
- * @description:
- * Used to initialize an array of FT_ServiceDescRec structures.
- *
- * The array will be allocated in the global scope (or the scope where
- * the macro is used).
- */
-#define FT_DEFINE_SERVICEDESCREC1( class_, \
- serv_id_1, serv_data_1 ) \
- static const FT_ServiceDescRec class_[] = \
- { \
- { serv_id_1, serv_data_1 }, \
- { NULL, NULL } \
- };
-
-#define FT_DEFINE_SERVICEDESCREC2( class_, \
- serv_id_1, serv_data_1, \
- serv_id_2, serv_data_2 ) \
- static const FT_ServiceDescRec class_[] = \
- { \
- { serv_id_1, serv_data_1 }, \
- { serv_id_2, serv_data_2 }, \
- { NULL, NULL } \
- };
-
-#define FT_DEFINE_SERVICEDESCREC3( class_, \
- serv_id_1, serv_data_1, \
- serv_id_2, serv_data_2, \
- serv_id_3, serv_data_3 ) \
- static const FT_ServiceDescRec class_[] = \
- { \
- { serv_id_1, serv_data_1 }, \
- { serv_id_2, serv_data_2 }, \
- { serv_id_3, serv_data_3 }, \
- { NULL, NULL } \
- };
-
-#define FT_DEFINE_SERVICEDESCREC4( class_, \
- serv_id_1, serv_data_1, \
- serv_id_2, serv_data_2, \
- serv_id_3, serv_data_3, \
- serv_id_4, serv_data_4 ) \
- static const FT_ServiceDescRec class_[] = \
- { \
- { serv_id_1, serv_data_1 }, \
- { serv_id_2, serv_data_2 }, \
- { serv_id_3, serv_data_3 }, \
- { serv_id_4, serv_data_4 }, \
- { NULL, NULL } \
- };
-
-#define FT_DEFINE_SERVICEDESCREC5( class_, \
- serv_id_1, serv_data_1, \
- serv_id_2, serv_data_2, \
- serv_id_3, serv_data_3, \
- serv_id_4, serv_data_4, \
- serv_id_5, serv_data_5 ) \
- static const FT_ServiceDescRec class_[] = \
- { \
- { serv_id_1, serv_data_1 }, \
- { serv_id_2, serv_data_2 }, \
- { serv_id_3, serv_data_3 }, \
- { serv_id_4, serv_data_4 }, \
- { serv_id_5, serv_data_5 }, \
- { NULL, NULL } \
- };
-
-#define FT_DEFINE_SERVICEDESCREC6( class_, \
- serv_id_1, serv_data_1, \
- serv_id_2, serv_data_2, \
- serv_id_3, serv_data_3, \
- serv_id_4, serv_data_4, \
- serv_id_5, serv_data_5, \
- serv_id_6, serv_data_6 ) \
- static const FT_ServiceDescRec class_[] = \
- { \
- { serv_id_1, serv_data_1 }, \
- { serv_id_2, serv_data_2 }, \
- { serv_id_3, serv_data_3 }, \
- { serv_id_4, serv_data_4 }, \
- { serv_id_5, serv_data_5 }, \
- { serv_id_6, serv_data_6 }, \
- { NULL, NULL } \
- };
-
-#define FT_DEFINE_SERVICEDESCREC7( class_, \
- serv_id_1, serv_data_1, \
- serv_id_2, serv_data_2, \
- serv_id_3, serv_data_3, \
- serv_id_4, serv_data_4, \
- serv_id_5, serv_data_5, \
- serv_id_6, serv_data_6, \
- serv_id_7, serv_data_7 ) \
- static const FT_ServiceDescRec class_[] = \
- { \
- { serv_id_1, serv_data_1 }, \
- { serv_id_2, serv_data_2 }, \
- { serv_id_3, serv_data_3 }, \
- { serv_id_4, serv_data_4 }, \
- { serv_id_5, serv_data_5 }, \
- { serv_id_6, serv_data_6 }, \
- { serv_id_7, serv_data_7 }, \
- { NULL, NULL } \
- };
-
-#define FT_DEFINE_SERVICEDESCREC8( class_, \
- serv_id_1, serv_data_1, \
- serv_id_2, serv_data_2, \
- serv_id_3, serv_data_3, \
- serv_id_4, serv_data_4, \
- serv_id_5, serv_data_5, \
- serv_id_6, serv_data_6, \
- serv_id_7, serv_data_7, \
- serv_id_8, serv_data_8 ) \
- static const FT_ServiceDescRec class_[] = \
- { \
- { serv_id_1, serv_data_1 }, \
- { serv_id_2, serv_data_2 }, \
- { serv_id_3, serv_data_3 }, \
- { serv_id_4, serv_data_4 }, \
- { serv_id_5, serv_data_5 }, \
- { serv_id_6, serv_data_6 }, \
- { serv_id_7, serv_data_7 }, \
- { serv_id_8, serv_data_8 }, \
- { NULL, NULL } \
- };
-
-#define FT_DEFINE_SERVICEDESCREC9( class_, \
- serv_id_1, serv_data_1, \
- serv_id_2, serv_data_2, \
- serv_id_3, serv_data_3, \
- serv_id_4, serv_data_4, \
- serv_id_5, serv_data_5, \
- serv_id_6, serv_data_6, \
- serv_id_7, serv_data_7, \
- serv_id_8, serv_data_8, \
- serv_id_9, serv_data_9 ) \
- static const FT_ServiceDescRec class_[] = \
- { \
- { serv_id_1, serv_data_1 }, \
- { serv_id_2, serv_data_2 }, \
- { serv_id_3, serv_data_3 }, \
- { serv_id_4, serv_data_4 }, \
- { serv_id_5, serv_data_5 }, \
- { serv_id_6, serv_data_6 }, \
- { serv_id_7, serv_data_7 }, \
- { serv_id_8, serv_data_8 }, \
- { serv_id_9, serv_data_9 }, \
- { NULL, NULL } \
- };
-
-#define FT_DEFINE_SERVICEDESCREC10( class_, \
- serv_id_1, serv_data_1, \
- serv_id_2, serv_data_2, \
- serv_id_3, serv_data_3, \
- serv_id_4, serv_data_4, \
- serv_id_5, serv_data_5, \
- serv_id_6, serv_data_6, \
- serv_id_7, serv_data_7, \
- serv_id_8, serv_data_8, \
- serv_id_9, serv_data_9, \
- serv_id_10, serv_data_10 ) \
- static const FT_ServiceDescRec class_[] = \
- { \
- { serv_id_1, serv_data_1 }, \
- { serv_id_2, serv_data_2 }, \
- { serv_id_3, serv_data_3 }, \
- { serv_id_4, serv_data_4 }, \
- { serv_id_5, serv_data_5 }, \
- { serv_id_6, serv_data_6 }, \
- { serv_id_7, serv_data_7 }, \
- { serv_id_8, serv_data_8 }, \
- { serv_id_9, serv_data_9 }, \
- { serv_id_10, serv_data_10 }, \
- { NULL, NULL } \
- };
-
-
- /*
- * Parse a list of FT_ServiceDescRec descriptors and look for a specific
- * service by ID. Note that the last element in the array must be { NULL,
- * NULL }, and that the function should return NULL if the service isn't
- * available.
- *
- * This function can be used by modules to implement their `get_service'
- * method.
- */
- FT_BASE( FT_Pointer )
- ft_service_list_lookup( FT_ServiceDesc service_descriptors,
- const char* service_id );
-
-
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** S E R V I C E S C A C H E *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
-
- /*
- * This structure is used to store a cache for several frequently used
- * services. It is the type of `face->internal->services'. You should
- * only use FT_FACE_LOOKUP_SERVICE to access it.
- *
- * All fields should have the type FT_Pointer to relax compilation
- * dependencies. We assume the developer isn't completely stupid.
- *
- * Each field must be named `service_XXXX' where `XXX' corresponds to the
- * correct FT_SERVICE_ID_XXXX macro. See the definition of
- * FT_FACE_LOOKUP_SERVICE below how this is implemented.
- *
- */
- typedef struct FT_ServiceCacheRec_
- {
- FT_Pointer service_POSTSCRIPT_FONT_NAME;
- FT_Pointer service_MULTI_MASTERS;
- FT_Pointer service_METRICS_VARIATIONS;
- FT_Pointer service_GLYPH_DICT;
- FT_Pointer service_PFR_METRICS;
- FT_Pointer service_WINFNT;
-
- } FT_ServiceCacheRec, *FT_ServiceCache;
-
-
- /*
- * A magic number used within the services cache.
- */
-
- /* ensure that value `1' has the same width as a pointer */
-#define FT_SERVICE_UNAVAILABLE ((FT_Pointer)~(FT_PtrDist)1)
-
-
- /**************************************************************************
- *
- * @macro:
- * FT_FACE_LOOKUP_SERVICE
- *
- * @description:
- * This macro is used to look up a service from a face's driver module
- * using its cache.
- *
- * @input:
- * face ::
- * The source face handle containing the cache.
- *
- * field ::
- * The field name in the cache.
- *
- * id ::
- * The service ID.
- *
- * @output:
- * ptr ::
- * A variable receiving the service data. `NULL` if not available.
- */
-#ifdef __cplusplus
-
-#define FT_FACE_LOOKUP_SERVICE( face, ptr, id ) \
- FT_BEGIN_STMNT \
- FT_Pointer svc; \
- FT_Pointer* Pptr = (FT_Pointer*)&(ptr); \
- \
- \
- svc = FT_FACE( face )->internal->services. service_ ## id; \
- if ( svc == FT_SERVICE_UNAVAILABLE ) \
- svc = NULL; \
- else if ( svc == NULL ) \
- { \
- FT_FACE_FIND_SERVICE( face, svc, id ); \
- \
- FT_FACE( face )->internal->services. service_ ## id = \
- (FT_Pointer)( svc != NULL ? svc \
- : FT_SERVICE_UNAVAILABLE ); \
- } \
- *Pptr = svc; \
- FT_END_STMNT
-
-#else /* !C++ */
-
-#define FT_FACE_LOOKUP_SERVICE( face, ptr, id ) \
- FT_BEGIN_STMNT \
- FT_Pointer svc; \
- \
- \
- svc = FT_FACE( face )->internal->services. service_ ## id; \
- if ( svc == FT_SERVICE_UNAVAILABLE ) \
- svc = NULL; \
- else if ( svc == NULL ) \
- { \
- FT_FACE_FIND_SERVICE( face, svc, id ); \
- \
- FT_FACE( face )->internal->services. service_ ## id = \
- (FT_Pointer)( svc != NULL ? svc \
- : FT_SERVICE_UNAVAILABLE ); \
- } \
- ptr = svc; \
- FT_END_STMNT
-
-#endif /* !C++ */
-
- /*
- * A macro used to define new service structure types.
- */
-
-#define FT_DEFINE_SERVICE( name ) \
- typedef struct FT_Service_ ## name ## Rec_ \
- FT_Service_ ## name ## Rec ; \
- typedef struct FT_Service_ ## name ## Rec_ \
- const * FT_Service_ ## name ; \
- struct FT_Service_ ## name ## Rec_
-
- /* */
-
- /*
- * The header files containing the services.
- */
-
-#define FT_SERVICE_BDF_H <freetype/internal/services/svbdf.h>
-#define FT_SERVICE_CFF_TABLE_LOAD_H <freetype/internal/services/svcfftl.h>
-#define FT_SERVICE_CID_H <freetype/internal/services/svcid.h>
-#define FT_SERVICE_FONT_FORMAT_H <freetype/internal/services/svfntfmt.h>
-#define FT_SERVICE_GLYPH_DICT_H <freetype/internal/services/svgldict.h>
-#define FT_SERVICE_GX_VALIDATE_H <freetype/internal/services/svgxval.h>
-#define FT_SERVICE_KERNING_H <freetype/internal/services/svkern.h>
-#define FT_SERVICE_METRICS_VARIATIONS_H <freetype/internal/services/svmetric.h>
-#define FT_SERVICE_MULTIPLE_MASTERS_H <freetype/internal/services/svmm.h>
-#define FT_SERVICE_OPENTYPE_VALIDATE_H <freetype/internal/services/svotval.h>
-#define FT_SERVICE_PFR_H <freetype/internal/services/svpfr.h>
-#define FT_SERVICE_POSTSCRIPT_CMAPS_H <freetype/internal/services/svpscmap.h>
-#define FT_SERVICE_POSTSCRIPT_INFO_H <freetype/internal/services/svpsinfo.h>
-#define FT_SERVICE_POSTSCRIPT_NAME_H <freetype/internal/services/svpostnm.h>
-#define FT_SERVICE_PROPERTIES_H <freetype/internal/services/svprop.h>
-#define FT_SERVICE_SFNT_H <freetype/internal/services/svsfnt.h>
-#define FT_SERVICE_TRUETYPE_ENGINE_H <freetype/internal/services/svtteng.h>
-#define FT_SERVICE_TRUETYPE_GLYF_H <freetype/internal/services/svttglyf.h>
-#define FT_SERVICE_TT_CMAP_H <freetype/internal/services/svttcmap.h>
-#define FT_SERVICE_WINFNT_H <freetype/internal/services/svwinfnt.h>
-
- /* */
-
-FT_END_HEADER
-
-#endif /* FTSERV_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/ftstream.h b/ThirdParty/freetype/include/freetype/internal/ftstream.h
deleted file mode 100644
index e4dca0b..0000000
--- a/ThirdParty/freetype/include/freetype/internal/ftstream.h
+++ /dev/null
@@ -1,561 +0,0 @@
-/****************************************************************************
- *
- * ftstream.h
- *
- * Stream handling (specification).
- *
- * Copyright (C) 1996-2019 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 FTSTREAM_H_
-#define FTSTREAM_H_
-
-
-#include <ft2build.h>
-#include FT_SYSTEM_H
-#include FT_INTERNAL_OBJECTS_H
-
-
-FT_BEGIN_HEADER
-
-
- /* format of an 8-bit frame_op value: */
- /* */
- /* bit 76543210 */
- /* xxxxxxes */
- /* */
- /* s is set to 1 if the value is signed. */
- /* e is set to 1 if the value is little-endian. */
- /* xxx is a command. */
-
-#define FT_FRAME_OP_SHIFT 2
-#define FT_FRAME_OP_SIGNED 1
-#define FT_FRAME_OP_LITTLE 2
-#define FT_FRAME_OP_COMMAND( x ) ( x >> FT_FRAME_OP_SHIFT )
-
-#define FT_MAKE_FRAME_OP( command, little, sign ) \
- ( ( command << FT_FRAME_OP_SHIFT ) | ( little << 1 ) | sign )
-
-#define FT_FRAME_OP_END 0
-#define FT_FRAME_OP_START 1 /* start a new frame */
-#define FT_FRAME_OP_BYTE 2 /* read 1-byte value */
-#define FT_FRAME_OP_SHORT 3 /* read 2-byte value */
-#define FT_FRAME_OP_LONG 4 /* read 4-byte value */
-#define FT_FRAME_OP_OFF3 5 /* read 3-byte value */
-#define FT_FRAME_OP_BYTES 6 /* read a bytes sequence */
-
-
- typedef enum FT_Frame_Op_
- {
- ft_frame_end = 0,
- ft_frame_start = FT_MAKE_FRAME_OP( FT_FRAME_OP_START, 0, 0 ),
-
- ft_frame_byte = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTE, 0, 0 ),
- ft_frame_schar = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTE, 0, 1 ),
-
- ft_frame_ushort_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 0, 0 ),
- ft_frame_short_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 0, 1 ),
- ft_frame_ushort_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 1, 0 ),
- ft_frame_short_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 1, 1 ),
-
- ft_frame_ulong_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 0, 0 ),
- ft_frame_long_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 0, 1 ),
- ft_frame_ulong_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 1, 0 ),
- ft_frame_long_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 1, 1 ),
-
- ft_frame_uoff3_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 0, 0 ),
- ft_frame_off3_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 0, 1 ),
- ft_frame_uoff3_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 1, 0 ),
- ft_frame_off3_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 1, 1 ),
-
- ft_frame_bytes = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTES, 0, 0 ),
- ft_frame_skip = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTES, 0, 1 )
-
- } FT_Frame_Op;
-
-
- typedef struct FT_Frame_Field_
- {
- FT_Byte value;
- FT_Byte size;
- FT_UShort offset;
-
- } FT_Frame_Field;
-
-
- /* Construct an FT_Frame_Field out of a structure type and a field name. */
- /* The structure type must be set in the FT_STRUCTURE macro before */
- /* calling the FT_FRAME_START() macro. */
- /* */
-#define FT_FIELD_SIZE( f ) \
- (FT_Byte)sizeof ( ((FT_STRUCTURE*)0)->f )
-
-#define FT_FIELD_SIZE_DELTA( f ) \
- (FT_Byte)sizeof ( ((FT_STRUCTURE*)0)->f[0] )
-
-#define FT_FIELD_OFFSET( f ) \
- (FT_UShort)( offsetof( FT_STRUCTURE, f ) )
-
-#define FT_FRAME_FIELD( frame_op, field ) \
- { \
- frame_op, \
- FT_FIELD_SIZE( field ), \
- FT_FIELD_OFFSET( field ) \
- }
-
-#define FT_MAKE_EMPTY_FIELD( frame_op ) { frame_op, 0, 0 }
-
-#define FT_FRAME_START( size ) { ft_frame_start, 0, size }
-#define FT_FRAME_END { ft_frame_end, 0, 0 }
-
-#define FT_FRAME_LONG( f ) FT_FRAME_FIELD( ft_frame_long_be, f )
-#define FT_FRAME_ULONG( f ) FT_FRAME_FIELD( ft_frame_ulong_be, f )
-#define FT_FRAME_SHORT( f ) FT_FRAME_FIELD( ft_frame_short_be, f )
-#define FT_FRAME_USHORT( f ) FT_FRAME_FIELD( ft_frame_ushort_be, f )
-#define FT_FRAME_OFF3( f ) FT_FRAME_FIELD( ft_frame_off3_be, f )
-#define FT_FRAME_UOFF3( f ) FT_FRAME_FIELD( ft_frame_uoff3_be, f )
-#define FT_FRAME_BYTE( f ) FT_FRAME_FIELD( ft_frame_byte, f )
-#define FT_FRAME_CHAR( f ) FT_FRAME_FIELD( ft_frame_schar, f )
-
-#define FT_FRAME_LONG_LE( f ) FT_FRAME_FIELD( ft_frame_long_le, f )
-#define FT_FRAME_ULONG_LE( f ) FT_FRAME_FIELD( ft_frame_ulong_le, f )
-#define FT_FRAME_SHORT_LE( f ) FT_FRAME_FIELD( ft_frame_short_le, f )
-#define FT_FRAME_USHORT_LE( f ) FT_FRAME_FIELD( ft_frame_ushort_le, f )
-#define FT_FRAME_OFF3_LE( f ) FT_FRAME_FIELD( ft_frame_off3_le, f )
-#define FT_FRAME_UOFF3_LE( f ) FT_FRAME_FIELD( ft_frame_uoff3_le, f )
-
-#define FT_FRAME_SKIP_LONG { ft_frame_long_be, 0, 0 }
-#define FT_FRAME_SKIP_SHORT { ft_frame_short_be, 0, 0 }
-#define FT_FRAME_SKIP_BYTE { ft_frame_byte, 0, 0 }
-
-#define FT_FRAME_BYTES( field, count ) \
- { \
- ft_frame_bytes, \
- count, \
- FT_FIELD_OFFSET( field ) \
- }
-
-#define FT_FRAME_SKIP_BYTES( count ) { ft_frame_skip, count, 0 }
-
-
- /**************************************************************************
- *
- * Integer extraction macros -- the 'buffer' parameter must ALWAYS be of
- * type 'char*' or equivalent (1-byte elements).
- */
-
-#define FT_BYTE_( p, i ) ( ((const FT_Byte*)(p))[(i)] )
-
-#define FT_INT16( x ) ( (FT_Int16)(x) )
-#define FT_UINT16( x ) ( (FT_UInt16)(x) )
-#define FT_INT32( x ) ( (FT_Int32)(x) )
-#define FT_UINT32( x ) ( (FT_UInt32)(x) )
-
-
-#define FT_BYTE_U16( p, i, s ) ( FT_UINT16( FT_BYTE_( p, i ) ) << (s) )
-#define FT_BYTE_U32( p, i, s ) ( FT_UINT32( FT_BYTE_( p, i ) ) << (s) )
-
-
- /*
- * `FT_PEEK_XXX' are generic macros to get data from a buffer position. No
- * safety checks are performed.
- */
-#define FT_PEEK_SHORT( p ) FT_INT16( FT_BYTE_U16( p, 0, 8 ) | \
- FT_BYTE_U16( p, 1, 0 ) )
-
-#define FT_PEEK_USHORT( p ) FT_UINT16( FT_BYTE_U16( p, 0, 8 ) | \
- FT_BYTE_U16( p, 1, 0 ) )
-
-#define FT_PEEK_LONG( p ) FT_INT32( FT_BYTE_U32( p, 0, 24 ) | \
- FT_BYTE_U32( p, 1, 16 ) | \
- FT_BYTE_U32( p, 2, 8 ) | \
- FT_BYTE_U32( p, 3, 0 ) )
-
-#define FT_PEEK_ULONG( p ) FT_UINT32( FT_BYTE_U32( p, 0, 24 ) | \
- FT_BYTE_U32( p, 1, 16 ) | \
- FT_BYTE_U32( p, 2, 8 ) | \
- FT_BYTE_U32( p, 3, 0 ) )
-
-#define FT_PEEK_OFF3( p ) FT_INT32( FT_BYTE_U32( p, 0, 16 ) | \
- FT_BYTE_U32( p, 1, 8 ) | \
- FT_BYTE_U32( p, 2, 0 ) )
-
-#define FT_PEEK_UOFF3( p ) FT_UINT32( FT_BYTE_U32( p, 0, 16 ) | \
- FT_BYTE_U32( p, 1, 8 ) | \
- FT_BYTE_U32( p, 2, 0 ) )
-
-#define FT_PEEK_SHORT_LE( p ) FT_INT16( FT_BYTE_U16( p, 1, 8 ) | \
- FT_BYTE_U16( p, 0, 0 ) )
-
-#define FT_PEEK_USHORT_LE( p ) FT_UINT16( FT_BYTE_U16( p, 1, 8 ) | \
- FT_BYTE_U16( p, 0, 0 ) )
-
-#define FT_PEEK_LONG_LE( p ) FT_INT32( FT_BYTE_U32( p, 3, 24 ) | \
- FT_BYTE_U32( p, 2, 16 ) | \
- FT_BYTE_U32( p, 1, 8 ) | \
- FT_BYTE_U32( p, 0, 0 ) )
-
-#define FT_PEEK_ULONG_LE( p ) FT_UINT32( FT_BYTE_U32( p, 3, 24 ) | \
- FT_BYTE_U32( p, 2, 16 ) | \
- FT_BYTE_U32( p, 1, 8 ) | \
- FT_BYTE_U32( p, 0, 0 ) )
-
-#define FT_PEEK_OFF3_LE( p ) FT_INT32( FT_BYTE_U32( p, 2, 16 ) | \
- FT_BYTE_U32( p, 1, 8 ) | \
- FT_BYTE_U32( p, 0, 0 ) )
-
-#define FT_PEEK_UOFF3_LE( p ) FT_UINT32( FT_BYTE_U32( p, 2, 16 ) | \
- FT_BYTE_U32( p, 1, 8 ) | \
- FT_BYTE_U32( p, 0, 0 ) )
-
- /*
- * `FT_NEXT_XXX' are generic macros to get data from a buffer position
- * which is then increased appropriately. No safety checks are performed.
- */
-#define FT_NEXT_CHAR( buffer ) \
- ( (signed char)*buffer++ )
-
-#define FT_NEXT_BYTE( buffer ) \
- ( (unsigned char)*buffer++ )
-
-#define FT_NEXT_SHORT( buffer ) \
- ( (short)( buffer += 2, FT_PEEK_SHORT( buffer - 2 ) ) )
-
-#define FT_NEXT_USHORT( buffer ) \
- ( (unsigned short)( buffer += 2, FT_PEEK_USHORT( buffer - 2 ) ) )
-
-#define FT_NEXT_OFF3( buffer ) \
- ( (long)( buffer += 3, FT_PEEK_OFF3( buffer - 3 ) ) )
-
-#define FT_NEXT_UOFF3( buffer ) \
- ( (unsigned long)( buffer += 3, FT_PEEK_UOFF3( buffer - 3 ) ) )
-
-#define FT_NEXT_LONG( buffer ) \
- ( (long)( buffer += 4, FT_PEEK_LONG( buffer - 4 ) ) )
-
-#define FT_NEXT_ULONG( buffer ) \
- ( (unsigned long)( buffer += 4, FT_PEEK_ULONG( buffer - 4 ) ) )
-
-
-#define FT_NEXT_SHORT_LE( buffer ) \
- ( (short)( buffer += 2, FT_PEEK_SHORT_LE( buffer - 2 ) ) )
-
-#define FT_NEXT_USHORT_LE( buffer ) \
- ( (unsigned short)( buffer += 2, FT_PEEK_USHORT_LE( buffer - 2 ) ) )
-
-#define FT_NEXT_OFF3_LE( buffer ) \
- ( (long)( buffer += 3, FT_PEEK_OFF3_LE( buffer - 3 ) ) )
-
-#define FT_NEXT_UOFF3_LE( buffer ) \
- ( (unsigned long)( buffer += 3, FT_PEEK_UOFF3_LE( buffer - 3 ) ) )
-
-#define FT_NEXT_LONG_LE( buffer ) \
- ( (long)( buffer += 4, FT_PEEK_LONG_LE( buffer - 4 ) ) )
-
-#define FT_NEXT_ULONG_LE( buffer ) \
- ( (unsigned long)( buffer += 4, FT_PEEK_ULONG_LE( buffer - 4 ) ) )
-
-
- /**************************************************************************
- *
- * The `FT_GET_XXX` macros use an implicit 'stream' variable.
- *
- * Note that a call to `FT_STREAM_SEEK` or `FT_STREAM_POS` has **no**
- * effect on `FT_GET_XXX`! They operate on `stream->pos`, while
- * `FT_GET_XXX` use `stream->cursor`.
- */
-#if 0
-#define FT_GET_MACRO( type ) FT_NEXT_ ## type ( stream->cursor )
-
-#define FT_GET_CHAR() FT_GET_MACRO( CHAR )
-#define FT_GET_BYTE() FT_GET_MACRO( BYTE )
-#define FT_GET_SHORT() FT_GET_MACRO( SHORT )
-#define FT_GET_USHORT() FT_GET_MACRO( USHORT )
-#define FT_GET_OFF3() FT_GET_MACRO( OFF3 )
-#define FT_GET_UOFF3() FT_GET_MACRO( UOFF3 )
-#define FT_GET_LONG() FT_GET_MACRO( LONG )
-#define FT_GET_ULONG() FT_GET_MACRO( ULONG )
-#define FT_GET_TAG4() FT_GET_MACRO( ULONG )
-
-#define FT_GET_SHORT_LE() FT_GET_MACRO( SHORT_LE )
-#define FT_GET_USHORT_LE() FT_GET_MACRO( USHORT_LE )
-#define FT_GET_LONG_LE() FT_GET_MACRO( LONG_LE )
-#define FT_GET_ULONG_LE() FT_GET_MACRO( ULONG_LE )
-
-#else
-#define FT_GET_MACRO( func, type ) ( (type)func( stream ) )
-
-#define FT_GET_CHAR() FT_GET_MACRO( FT_Stream_GetChar, FT_Char )
-#define FT_GET_BYTE() FT_GET_MACRO( FT_Stream_GetChar, FT_Byte )
-#define FT_GET_SHORT() FT_GET_MACRO( FT_Stream_GetUShort, FT_Short )
-#define FT_GET_USHORT() FT_GET_MACRO( FT_Stream_GetUShort, FT_UShort )
-#define FT_GET_OFF3() FT_GET_MACRO( FT_Stream_GetUOffset, FT_Long )
-#define FT_GET_UOFF3() FT_GET_MACRO( FT_Stream_GetUOffset, FT_ULong )
-#define FT_GET_LONG() FT_GET_MACRO( FT_Stream_GetULong, FT_Long )
-#define FT_GET_ULONG() FT_GET_MACRO( FT_Stream_GetULong, FT_ULong )
-#define FT_GET_TAG4() FT_GET_MACRO( FT_Stream_GetULong, FT_ULong )
-
-#define FT_GET_SHORT_LE() FT_GET_MACRO( FT_Stream_GetUShortLE, FT_Short )
-#define FT_GET_USHORT_LE() FT_GET_MACRO( FT_Stream_GetUShortLE, FT_UShort )
-#define FT_GET_LONG_LE() FT_GET_MACRO( FT_Stream_GetULongLE, FT_Long )
-#define FT_GET_ULONG_LE() FT_GET_MACRO( FT_Stream_GetULongLE, FT_ULong )
-#endif
-
-
-#define FT_READ_MACRO( func, type, var ) \
- ( var = (type)func( stream, &error ), \
- error != FT_Err_Ok )
-
- /*
- * The `FT_READ_XXX' macros use implicit `stream' and `error' variables.
- *
- * `FT_READ_XXX' can be controlled with `FT_STREAM_SEEK' and
- * `FT_STREAM_POS'. They use the full machinery to check whether a read is
- * valid.
- */
-#define FT_READ_BYTE( var ) FT_READ_MACRO( FT_Stream_ReadChar, FT_Byte, var )
-#define FT_READ_CHAR( var ) FT_READ_MACRO( FT_Stream_ReadChar, FT_Char, var )
-#define FT_READ_SHORT( var ) FT_READ_MACRO( FT_Stream_ReadUShort, FT_Short, var )
-#define FT_READ_USHORT( var ) FT_READ_MACRO( FT_Stream_ReadUShort, FT_UShort, var )
-#define FT_READ_OFF3( var ) FT_READ_MACRO( FT_Stream_ReadUOffset, FT_Long, var )
-#define FT_READ_UOFF3( var ) FT_READ_MACRO( FT_Stream_ReadUOffset, FT_ULong, var )
-#define FT_READ_LONG( var ) FT_READ_MACRO( FT_Stream_ReadULong, FT_Long, var )
-#define FT_READ_ULONG( var ) FT_READ_MACRO( FT_Stream_ReadULong, FT_ULong, var )
-
-#define FT_READ_SHORT_LE( var ) FT_READ_MACRO( FT_Stream_ReadUShortLE, FT_Short, var )
-#define FT_READ_USHORT_LE( var ) FT_READ_MACRO( FT_Stream_ReadUShortLE, FT_UShort, var )
-#define FT_READ_LONG_LE( var ) FT_READ_MACRO( FT_Stream_ReadULongLE, FT_Long, var )
-#define FT_READ_ULONG_LE( var ) FT_READ_MACRO( FT_Stream_ReadULongLE, FT_ULong, var )
-
-
-#ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM
-
- /* initialize a stream for reading a regular system stream */
- FT_BASE( FT_Error )
- FT_Stream_Open( FT_Stream stream,
- const char* filepathname );
-
-#endif /* FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM */
-
-
- /* create a new (input) stream from an FT_Open_Args structure */
- FT_BASE( FT_Error )
- FT_Stream_New( FT_Library library,
- const FT_Open_Args* args,
- FT_Stream *astream );
-
- /* free a stream */
- FT_BASE( void )
- FT_Stream_Free( FT_Stream stream,
- FT_Int external );
-
- /* initialize a stream for reading in-memory data */
- FT_BASE( void )
- FT_Stream_OpenMemory( FT_Stream stream,
- const FT_Byte* base,
- FT_ULong size );
-
- /* close a stream (does not destroy the stream structure) */
- FT_BASE( void )
- FT_Stream_Close( FT_Stream stream );
-
-
- /* seek within a stream. position is relative to start of stream */
- FT_BASE( FT_Error )
- FT_Stream_Seek( FT_Stream stream,
- FT_ULong pos );
-
- /* skip bytes in a stream */
- FT_BASE( FT_Error )
- FT_Stream_Skip( FT_Stream stream,
- FT_Long distance );
-
- /* return current stream position */
- FT_BASE( FT_ULong )
- FT_Stream_Pos( FT_Stream stream );
-
- /* read bytes from a stream into a user-allocated buffer, returns an */
- /* error if not all bytes could be read. */
- FT_BASE( FT_Error )
- FT_Stream_Read( FT_Stream stream,
- FT_Byte* buffer,
- FT_ULong count );
-
- /* read bytes from a stream at a given position */
- FT_BASE( FT_Error )
- FT_Stream_ReadAt( FT_Stream stream,
- FT_ULong pos,
- FT_Byte* buffer,
- FT_ULong count );
-
- /* try to read bytes at the end of a stream; return number of bytes */
- /* really available */
- FT_BASE( FT_ULong )
- FT_Stream_TryRead( FT_Stream stream,
- FT_Byte* buffer,
- FT_ULong count );
-
- /* Enter a frame of `count' consecutive bytes in a stream. Returns an */
- /* error if the frame could not be read/accessed. The caller can use */
- /* the `FT_Stream_GetXXX' functions to retrieve frame data without */
- /* error checks. */
- /* */
- /* You must _always_ call `FT_Stream_ExitFrame' once you have entered */
- /* a stream frame! */
- /* */
- /* Nested frames are not permitted. */
- /* */
- FT_BASE( FT_Error )
- FT_Stream_EnterFrame( FT_Stream stream,
- FT_ULong count );
-
- /* exit a stream frame */
- FT_BASE( void )
- FT_Stream_ExitFrame( FT_Stream stream );
-
-
- /* Extract a stream frame. If the stream is disk-based, a heap block */
- /* is allocated and the frame bytes are read into it. If the stream */
- /* is memory-based, this function simply sets a pointer to the data. */
- /* */
- /* Useful to optimize access to memory-based streams transparently. */
- /* */
- /* `FT_Stream_GetXXX' functions can't be used. */
- /* */
- /* An extracted frame must be `freed' with a call to the function */
- /* `FT_Stream_ReleaseFrame'. */
- /* */
- FT_BASE( FT_Error )
- FT_Stream_ExtractFrame( FT_Stream stream,
- FT_ULong count,
- FT_Byte** pbytes );
-
- /* release an extract frame (see `FT_Stream_ExtractFrame') */
- FT_BASE( void )
- FT_Stream_ReleaseFrame( FT_Stream stream,
- FT_Byte** pbytes );
-
-
- /* read a byte from an entered frame */
- FT_BASE( FT_Char )
- FT_Stream_GetChar( FT_Stream stream );
-
- /* read a 16-bit big-endian unsigned integer from an entered frame */
- FT_BASE( FT_UShort )
- FT_Stream_GetUShort( FT_Stream stream );
-
- /* read a 24-bit big-endian unsigned integer from an entered frame */
- FT_BASE( FT_ULong )
- FT_Stream_GetUOffset( FT_Stream stream );
-
- /* read a 32-bit big-endian unsigned integer from an entered frame */
- FT_BASE( FT_ULong )
- FT_Stream_GetULong( FT_Stream stream );
-
- /* read a 16-bit little-endian unsigned integer from an entered frame */
- FT_BASE( FT_UShort )
- FT_Stream_GetUShortLE( FT_Stream stream );
-
- /* read a 32-bit little-endian unsigned integer from an entered frame */
- FT_BASE( FT_ULong )
- FT_Stream_GetULongLE( FT_Stream stream );
-
-
- /* read a byte from a stream */
- FT_BASE( FT_Char )
- FT_Stream_ReadChar( FT_Stream stream,
- FT_Error* error );
-
- /* read a 16-bit big-endian unsigned integer from a stream */
- FT_BASE( FT_UShort )
- FT_Stream_ReadUShort( FT_Stream stream,
- FT_Error* error );
-
- /* read a 24-bit big-endian unsigned integer from a stream */
- FT_BASE( FT_ULong )
- FT_Stream_ReadUOffset( FT_Stream stream,
- FT_Error* error );
-
- /* read a 32-bit big-endian integer from a stream */
- FT_BASE( FT_ULong )
- FT_Stream_ReadULong( FT_Stream stream,
- FT_Error* error );
-
- /* read a 16-bit little-endian unsigned integer from a stream */
- FT_BASE( FT_UShort )
- FT_Stream_ReadUShortLE( FT_Stream stream,
- FT_Error* error );
-
- /* read a 32-bit little-endian unsigned integer from a stream */
- FT_BASE( FT_ULong )
- FT_Stream_ReadULongLE( FT_Stream stream,
- FT_Error* error );
-
- /* Read a structure from a stream. The structure must be described */
- /* by an array of FT_Frame_Field records. */
- FT_BASE( FT_Error )
- FT_Stream_ReadFields( FT_Stream stream,
- const FT_Frame_Field* fields,
- void* structure );
-
-
-#define FT_STREAM_POS() \
- FT_Stream_Pos( stream )
-
-#define FT_STREAM_SEEK( position ) \
- FT_SET_ERROR( FT_Stream_Seek( stream, \
- (FT_ULong)(position) ) )
-
-#define FT_STREAM_SKIP( distance ) \
- FT_SET_ERROR( FT_Stream_Skip( stream, \
- (FT_Long)(distance) ) )
-
-#define FT_STREAM_READ( buffer, count ) \
- FT_SET_ERROR( FT_Stream_Read( stream, \
- (FT_Byte*)(buffer), \
- (FT_ULong)(count) ) )
-
-#define FT_STREAM_READ_AT( position, buffer, count ) \
- FT_SET_ERROR( FT_Stream_ReadAt( stream, \
- (FT_ULong)(position), \
- (FT_Byte*)(buffer), \
- (FT_ULong)(count) ) )
-
-#define FT_STREAM_READ_FIELDS( fields, object ) \
- FT_SET_ERROR( FT_Stream_ReadFields( stream, fields, object ) )
-
-
-#define FT_FRAME_ENTER( size ) \
- FT_SET_ERROR( \
- FT_DEBUG_INNER( FT_Stream_EnterFrame( stream, \
- (FT_ULong)(size) ) ) )
-
-#define FT_FRAME_EXIT() \
- FT_DEBUG_INNER( FT_Stream_ExitFrame( stream ) )
-
-#define FT_FRAME_EXTRACT( size, bytes ) \
- FT_SET_ERROR( \
- FT_DEBUG_INNER( FT_Stream_ExtractFrame( stream, \
- (FT_ULong)(size), \
- (FT_Byte**)&(bytes) ) ) )
-
-#define FT_FRAME_RELEASE( bytes ) \
- FT_DEBUG_INNER( FT_Stream_ReleaseFrame( stream, \
- (FT_Byte**)&(bytes) ) )
-
-
-FT_END_HEADER
-
-#endif /* FTSTREAM_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/fttrace.h b/ThirdParty/freetype/include/freetype/internal/fttrace.h
deleted file mode 100644
index 8089bab..0000000
--- a/ThirdParty/freetype/include/freetype/internal/fttrace.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/****************************************************************************
- *
- * fttrace.h
- *
- * Tracing handling (specification only).
- *
- * Copyright (C) 2002-2019 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.
- *
- */
-
-
- /* definitions of trace levels for FreeType 2 */
-
- /* the first level must always be `trace_any' */
-FT_TRACE_DEF( any )
-
- /* base components */
-FT_TRACE_DEF( calc ) /* calculations (ftcalc.c) */
-FT_TRACE_DEF( gloader ) /* glyph loader (ftgloadr.c) */
-FT_TRACE_DEF( glyph ) /* glyph management (ftglyph.c) */
-FT_TRACE_DEF( memory ) /* memory manager (ftobjs.c) */
-FT_TRACE_DEF( init ) /* initialization (ftinit.c) */
-FT_TRACE_DEF( io ) /* i/o interface (ftsystem.c) */
-FT_TRACE_DEF( list ) /* list management (ftlist.c) */
-FT_TRACE_DEF( objs ) /* base objects (ftobjs.c) */
-FT_TRACE_DEF( outline ) /* outline management (ftoutln.c) */
-FT_TRACE_DEF( stream ) /* stream manager (ftstream.c) */
-
-FT_TRACE_DEF( bitmap ) /* bitmap manipulation (ftbitmap.c) */
-FT_TRACE_DEF( checksum ) /* bitmap checksum (ftobjs.c) */
-FT_TRACE_DEF( mm ) /* MM interface (ftmm.c) */
-FT_TRACE_DEF( psprops ) /* PS driver properties (ftpsprop.c) */
-FT_TRACE_DEF( raccess ) /* resource fork accessor (ftrfork.c) */
-FT_TRACE_DEF( raster ) /* monochrome rasterizer (ftraster.c) */
-FT_TRACE_DEF( smooth ) /* anti-aliasing raster (ftgrays.c) */
-FT_TRACE_DEF( synth ) /* bold/slant synthesizer (ftsynth.c) */
-
- /* Cache sub-system */
-FT_TRACE_DEF( cache ) /* cache sub-system (ftcache.c, etc.) */
-
- /* SFNT driver components */
-FT_TRACE_DEF( sfdriver ) /* SFNT font driver (sfdriver.c) */
-FT_TRACE_DEF( sfobjs ) /* SFNT object handler (sfobjs.c) */
-FT_TRACE_DEF( ttbdf ) /* TrueType embedded BDF (ttbdf.c) */
-FT_TRACE_DEF( ttcmap ) /* charmap handler (ttcmap.c) */
-FT_TRACE_DEF( ttcolr ) /* glyph layer table (ttcolr.c) */
-FT_TRACE_DEF( ttcpal ) /* color palette table (ttcpal.c) */
-FT_TRACE_DEF( ttkern ) /* kerning handler (ttkern.c) */
-FT_TRACE_DEF( ttload ) /* basic TrueType tables (ttload.c) */
-FT_TRACE_DEF( ttmtx ) /* metrics-related tables (ttmtx.c) */
-FT_TRACE_DEF( ttpost ) /* PS table processing (ttpost.c) */
-FT_TRACE_DEF( ttsbit ) /* TrueType sbit handling (ttsbit.c) */
-
- /* TrueType driver components */
-FT_TRACE_DEF( ttdriver ) /* TT font driver (ttdriver.c) */
-FT_TRACE_DEF( ttgload ) /* TT glyph loader (ttgload.c) */
-FT_TRACE_DEF( ttgxvar ) /* TrueType GX var handler (ttgxvar.c) */
-FT_TRACE_DEF( ttinterp ) /* bytecode interpreter (ttinterp.c) */
-FT_TRACE_DEF( ttobjs ) /* TT objects manager (ttobjs.c) */
-FT_TRACE_DEF( ttpload ) /* TT data/program loader (ttpload.c) */
-
- /* Type 1 driver components */
-FT_TRACE_DEF( t1afm )
-FT_TRACE_DEF( t1driver )
-FT_TRACE_DEF( t1gload )
-FT_TRACE_DEF( t1load )
-FT_TRACE_DEF( t1objs )
-FT_TRACE_DEF( t1parse )
-
- /* PostScript helper module `psaux' */
-FT_TRACE_DEF( cffdecode )
-FT_TRACE_DEF( psconv )
-FT_TRACE_DEF( psobjs )
-FT_TRACE_DEF( t1decode )
-
- /* PostScript hinting module `pshinter' */
-FT_TRACE_DEF( pshalgo )
-FT_TRACE_DEF( pshrec )
-
- /* Type 2 driver components */
-FT_TRACE_DEF( cffdriver )
-FT_TRACE_DEF( cffgload )
-FT_TRACE_DEF( cffload )
-FT_TRACE_DEF( cffobjs )
-FT_TRACE_DEF( cffparse )
-
-FT_TRACE_DEF( cf2blues )
-FT_TRACE_DEF( cf2hints )
-FT_TRACE_DEF( cf2interp )
-
- /* Type 42 driver component */
-FT_TRACE_DEF( t42 )
-
- /* CID driver components */
-FT_TRACE_DEF( ciddriver )
-FT_TRACE_DEF( cidgload )
-FT_TRACE_DEF( cidload )
-FT_TRACE_DEF( cidobjs )
-FT_TRACE_DEF( cidparse )
-
- /* Windows font component */
-FT_TRACE_DEF( winfnt )
-
- /* PCF font components */
-FT_TRACE_DEF( pcfdriver )
-FT_TRACE_DEF( pcfread )
-
- /* BDF font components */
-FT_TRACE_DEF( bdfdriver )
-FT_TRACE_DEF( bdflib )
-
- /* PFR font component */
-FT_TRACE_DEF( pfr )
-
- /* OpenType validation components */
-FT_TRACE_DEF( otvcommon )
-FT_TRACE_DEF( otvbase )
-FT_TRACE_DEF( otvgdef )
-FT_TRACE_DEF( otvgpos )
-FT_TRACE_DEF( otvgsub )
-FT_TRACE_DEF( otvjstf )
-FT_TRACE_DEF( otvmath )
-FT_TRACE_DEF( otvmodule )
-
- /* TrueTypeGX/AAT validation components */
-FT_TRACE_DEF( gxvbsln )
-FT_TRACE_DEF( gxvcommon )
-FT_TRACE_DEF( gxvfeat )
-FT_TRACE_DEF( gxvjust )
-FT_TRACE_DEF( gxvkern )
-FT_TRACE_DEF( gxvmodule )
-FT_TRACE_DEF( gxvmort )
-FT_TRACE_DEF( gxvmorx )
-FT_TRACE_DEF( gxvlcar )
-FT_TRACE_DEF( gxvopbd )
-FT_TRACE_DEF( gxvprop )
-FT_TRACE_DEF( gxvtrak )
-
- /* autofit components */
-FT_TRACE_DEF( afcjk )
-FT_TRACE_DEF( afglobal )
-FT_TRACE_DEF( afhints )
-FT_TRACE_DEF( afmodule )
-FT_TRACE_DEF( aflatin )
-FT_TRACE_DEF( aflatin2 )
-FT_TRACE_DEF( afshaper )
-FT_TRACE_DEF( afwarp )
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/ftvalid.h b/ThirdParty/freetype/include/freetype/internal/ftvalid.h
deleted file mode 100644
index 38aa06c..0000000
--- a/ThirdParty/freetype/include/freetype/internal/ftvalid.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/****************************************************************************
- *
- * ftvalid.h
- *
- * FreeType validation support (specification).
- *
- * Copyright (C) 2004-2019 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 FTVALID_H_
-#define FTVALID_H_
-
-#include <ft2build.h>
-#include FT_CONFIG_STANDARD_LIBRARY_H /* for ft_setjmp and ft_longjmp */
-
-
-FT_BEGIN_HEADER
-
-
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /**** ****/
- /**** ****/
- /**** V A L I D A T I O N ****/
- /**** ****/
- /**** ****/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
-
- /* handle to a validation object */
- typedef struct FT_ValidatorRec_ volatile* FT_Validator;
-
-
- /**************************************************************************
- *
- * There are three distinct validation levels defined here:
- *
- * FT_VALIDATE_DEFAULT ::
- * A table that passes this validation level can be used reliably by
- * FreeType. It generally means that all offsets have been checked to
- * prevent out-of-bound reads, that array counts are correct, etc.
- *
- * FT_VALIDATE_TIGHT ::
- * A table that passes this validation level can be used reliably and
- * doesn't contain invalid data. For example, a charmap table that
- * returns invalid glyph indices will not pass, even though it can be
- * used with FreeType in default mode (the library will simply return an
- * error later when trying to load the glyph).
- *
- * It also checks that fields which must be a multiple of 2, 4, or 8,
- * don't have incorrect values, etc.
- *
- * FT_VALIDATE_PARANOID ::
- * Only for font debugging. Checks that a table follows the
- * specification by 100%. Very few fonts will be able to pass this level
- * anyway but it can be useful for certain tools like font
- * editors/converters.
- */
- typedef enum FT_ValidationLevel_
- {
- FT_VALIDATE_DEFAULT = 0,
- FT_VALIDATE_TIGHT,
- FT_VALIDATE_PARANOID
-
- } FT_ValidationLevel;
-
-
-#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */
- /* We disable the warning `structure was padded due to */
- /* __declspec(align())' in order to compile cleanly with */
- /* the maximum level of warnings. */
-#pragma warning( push )
-#pragma warning( disable : 4324 )
-#endif /* _MSC_VER */
-
- /* validator structure */
- typedef struct FT_ValidatorRec_
- {
- ft_jmp_buf jump_buffer; /* used for exception handling */
-
- const FT_Byte* base; /* address of table in memory */
- const FT_Byte* limit; /* `base' + sizeof(table) in memory */
- FT_ValidationLevel level; /* validation level */
- FT_Error error; /* error returned. 0 means success */
-
- } FT_ValidatorRec;
-
-#if defined( _MSC_VER )
-#pragma warning( pop )
-#endif
-
-#define FT_VALIDATOR( x ) ( (FT_Validator)( x ) )
-
-
- FT_BASE( void )
- ft_validator_init( FT_Validator valid,
- const FT_Byte* base,
- const FT_Byte* limit,
- FT_ValidationLevel level );
-
- /* Do not use this. It's broken and will cause your validator to crash */
- /* if you run it on an invalid font. */
- FT_BASE( FT_Int )
- ft_validator_run( FT_Validator valid );
-
- /* Sets the error field in a validator, then calls `longjmp' to return */
- /* to high-level caller. Using `setjmp/longjmp' avoids many stupid */
- /* error checks within the validation routines. */
- /* */
- FT_BASE( void )
- ft_validator_error( FT_Validator valid,
- FT_Error error );
-
-
- /* Calls ft_validate_error. Assumes that the `valid' local variable */
- /* holds a pointer to the current validator object. */
- /* */
-#define FT_INVALID( _error ) FT_INVALID_( _error )
-#define FT_INVALID_( _error ) \
- ft_validator_error( valid, FT_THROW( _error ) )
-
- /* called when a broken table is detected */
-#define FT_INVALID_TOO_SHORT \
- FT_INVALID( Invalid_Table )
-
- /* called when an invalid offset is detected */
-#define FT_INVALID_OFFSET \
- FT_INVALID( Invalid_Offset )
-
- /* called when an invalid format/value is detected */
-#define FT_INVALID_FORMAT \
- FT_INVALID( Invalid_Table )
-
- /* called when an invalid glyph index is detected */
-#define FT_INVALID_GLYPH_ID \
- FT_INVALID( Invalid_Glyph_Index )
-
- /* called when an invalid field value is detected */
-#define FT_INVALID_DATA \
- FT_INVALID( Invalid_Table )
-
-
-FT_END_HEADER
-
-#endif /* FTVALID_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/internal.h b/ThirdParty/freetype/include/freetype/internal/internal.h
deleted file mode 100644
index 173d8ad..0000000
--- a/ThirdParty/freetype/include/freetype/internal/internal.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
- *
- * internal.h
- *
- * Internal header files (specification only).
- *
- * Copyright (C) 1996-2019 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 is automatically included by `ft2build.h`. Do not include it
- * manually!
- *
- */
-
-
-#define FT_INTERNAL_OBJECTS_H <freetype/internal/ftobjs.h>
-#define FT_INTERNAL_STREAM_H <freetype/internal/ftstream.h>
-#define FT_INTERNAL_MEMORY_H <freetype/internal/ftmemory.h>
-#define FT_INTERNAL_DEBUG_H <freetype/internal/ftdebug.h>
-#define FT_INTERNAL_CALC_H <freetype/internal/ftcalc.h>
-#define FT_INTERNAL_HASH_H <freetype/internal/fthash.h>
-#define FT_INTERNAL_DRIVER_H <freetype/internal/ftdrv.h>
-#define FT_INTERNAL_TRACE_H <freetype/internal/fttrace.h>
-#define FT_INTERNAL_GLYPH_LOADER_H <freetype/internal/ftgloadr.h>
-#define FT_INTERNAL_SFNT_H <freetype/internal/sfnt.h>
-#define FT_INTERNAL_SERVICE_H <freetype/internal/ftserv.h>
-#define FT_INTERNAL_RFORK_H <freetype/internal/ftrfork.h>
-#define FT_INTERNAL_VALIDATE_H <freetype/internal/ftvalid.h>
-
-#define FT_INTERNAL_TRUETYPE_TYPES_H <freetype/internal/tttypes.h>
-#define FT_INTERNAL_TYPE1_TYPES_H <freetype/internal/t1types.h>
-
-#define FT_INTERNAL_POSTSCRIPT_AUX_H <freetype/internal/psaux.h>
-#define FT_INTERNAL_POSTSCRIPT_HINTS_H <freetype/internal/pshints.h>
-#define FT_INTERNAL_POSTSCRIPT_PROPS_H <freetype/internal/ftpsprop.h>
-
-#define FT_INTERNAL_AUTOHINT_H <freetype/internal/autohint.h>
-
-#define FT_INTERNAL_CFF_TYPES_H <freetype/internal/cfftypes.h>
-#define FT_INTERNAL_CFF_OBJECTS_TYPES_H <freetype/internal/cffotypes.h>
-
-
-#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */
-
- /* We disable the warning `conditional expression is constant' here */
- /* in order to compile cleanly with the maximum level of warnings. */
- /* In particular, the warning complains about stuff like `while(0)' */
- /* which is very useful in macro definitions. There is no benefit */
- /* in having it enabled. */
-#pragma warning( disable : 4127 )
-
-#endif /* _MSC_VER */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/psaux.h b/ThirdParty/freetype/include/freetype/internal/psaux.h
deleted file mode 100644
index 3ab01c3..0000000
--- a/ThirdParty/freetype/include/freetype/internal/psaux.h
+++ /dev/null
@@ -1,1439 +0,0 @@
-/****************************************************************************
- *
- * psaux.h
- *
- * Auxiliary functions and data structures related to PostScript fonts
- * (specification).
- *
- * Copyright (C) 1996-2019 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 PSAUX_H_
-#define PSAUX_H_
-
-
-#include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_TYPE1_TYPES_H
-#include FT_INTERNAL_HASH_H
-#include FT_INTERNAL_TRUETYPE_TYPES_H
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
-#include FT_INTERNAL_CFF_TYPES_H
-#include FT_INTERNAL_CFF_OBJECTS_TYPES_H
-
-
-
-FT_BEGIN_HEADER
-
-
- /**************************************************************************
- *
- * PostScript modules driver class.
- */
- typedef struct PS_DriverRec_
- {
- FT_DriverRec root;
-
- FT_UInt hinting_engine;
- FT_Bool no_stem_darkening;
- FT_Int darken_params[8];
- FT_Int32 random_seed;
-
- } PS_DriverRec, *PS_Driver;
-
-
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** T1_TABLE *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
-
-
- typedef struct PS_TableRec_* PS_Table;
- typedef const struct PS_Table_FuncsRec_* PS_Table_Funcs;
-
-
- /**************************************************************************
- *
- * @struct:
- * PS_Table_FuncsRec
- *
- * @description:
- * A set of function pointers to manage PS_Table objects.
- *
- * @fields:
- * table_init ::
- * Used to initialize a table.
- *
- * table_done ::
- * Finalizes resp. destroy a given table.
- *
- * table_add ::
- * Adds a new object to a table.
- *
- * table_release ::
- * Releases table data, then finalizes it.
- */
- typedef struct PS_Table_FuncsRec_
- {
- FT_Error
- (*init)( PS_Table table,
- FT_Int count,
- FT_Memory memory );
-
- void
- (*done)( PS_Table table );
-
- FT_Error
- (*add)( PS_Table table,
- FT_Int idx,
- void* object,
- FT_UInt length );
-
- void
- (*release)( PS_Table table );
-
- } PS_Table_FuncsRec;
-
-
- /**************************************************************************
- *
- * @struct:
- * PS_TableRec
- *
- * @description:
- * A PS_Table is a simple object used to store an array of objects in a
- * single memory block.
- *
- * @fields:
- * block ::
- * The address in memory of the growheap's block. This can change
- * between two object adds, due to reallocation.
- *
- * cursor ::
- * The current top of the grow heap within its block.
- *
- * capacity ::
- * The current size of the heap block. Increments by 1kByte chunks.
- *
- * init ::
- * Set to 0xDEADBEEF if 'elements' and 'lengths' have been allocated.
- *
- * max_elems ::
- * The maximum number of elements in table.
- *
- * num_elems ::
- * The current number of elements in table.
- *
- * elements ::
- * A table of element addresses within the block.
- *
- * lengths ::
- * A table of element sizes within the block.
- *
- * memory ::
- * The object used for memory operations (alloc/realloc).
- *
- * funcs ::
- * A table of method pointers for this object.
- */
- typedef struct PS_TableRec_
- {
- FT_Byte* block; /* current memory block */
- FT_Offset cursor; /* current cursor in memory block */
- FT_Offset capacity; /* current size of memory block */
- FT_ULong init;
-
- FT_Int max_elems;
- FT_Int num_elems;
- FT_Byte** elements; /* addresses of table elements */
- FT_UInt* lengths; /* lengths of table elements */
-
- FT_Memory memory;
- PS_Table_FuncsRec funcs;
-
- } PS_TableRec;
-
-
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** T1 FIELDS & TOKENS *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
-
- typedef struct PS_ParserRec_* PS_Parser;
-
- typedef struct T1_TokenRec_* T1_Token;
-
- typedef struct T1_FieldRec_* T1_Field;
-
-
- /* simple enumeration type used to identify token types */
- typedef enum T1_TokenType_
- {
- T1_TOKEN_TYPE_NONE = 0,
- T1_TOKEN_TYPE_ANY,
- T1_TOKEN_TYPE_STRING,
- T1_TOKEN_TYPE_ARRAY,
- T1_TOKEN_TYPE_KEY, /* aka `name' */
-
- /* do not remove */
- T1_TOKEN_TYPE_MAX
-
- } T1_TokenType;
-
-
- /* a simple structure used to identify tokens */
- typedef struct T1_TokenRec_
- {
- FT_Byte* start; /* first character of token in input stream */
- FT_Byte* limit; /* first character after the token */
- T1_TokenType type; /* type of token */
-
- } T1_TokenRec;
-
-
- /* enumeration type used to identify object fields */
- typedef enum T1_FieldType_
- {
- T1_FIELD_TYPE_NONE = 0,
- T1_FIELD_TYPE_BOOL,
- T1_FIELD_TYPE_INTEGER,
- T1_FIELD_TYPE_FIXED,
- T1_FIELD_TYPE_FIXED_1000,
- T1_FIELD_TYPE_STRING,
- T1_FIELD_TYPE_KEY,
- T1_FIELD_TYPE_BBOX,
- T1_FIELD_TYPE_MM_BBOX,
- T1_FIELD_TYPE_INTEGER_ARRAY,
- T1_FIELD_TYPE_FIXED_ARRAY,
- T1_FIELD_TYPE_CALLBACK,
-
- /* do not remove */
- T1_FIELD_TYPE_MAX
-
- } T1_FieldType;
-
-
- typedef enum T1_FieldLocation_
- {
- T1_FIELD_LOCATION_CID_INFO,
- T1_FIELD_LOCATION_FONT_DICT,
- T1_FIELD_LOCATION_FONT_EXTRA,
- T1_FIELD_LOCATION_FONT_INFO,
- T1_FIELD_LOCATION_PRIVATE,
- T1_FIELD_LOCATION_BBOX,
- T1_FIELD_LOCATION_LOADER,
- T1_FIELD_LOCATION_FACE,
- T1_FIELD_LOCATION_BLEND,
-
- /* do not remove */
- T1_FIELD_LOCATION_MAX
-
- } T1_FieldLocation;
-
-
- typedef void
- (*T1_Field_ParseFunc)( FT_Face face,
- FT_Pointer parser );
-
-
- /* structure type used to model object fields */
- typedef struct T1_FieldRec_
- {
- const char* ident; /* field identifier */
- T1_FieldLocation location;
- T1_FieldType type; /* type of field */
- T1_Field_ParseFunc reader;
- FT_UInt offset; /* offset of field in object */
- FT_Byte size; /* size of field in bytes */
- FT_UInt array_max; /* maximum number of elements for */
- /* array */
- FT_UInt count_offset; /* offset of element count for */
- /* arrays; must not be zero if in */
- /* use -- in other words, a */
- /* `num_FOO' element must not */
- /* start the used structure if we */
- /* parse a `FOO' array */
- FT_UInt dict; /* where we expect it */
- } T1_FieldRec;
-
-#define T1_FIELD_DICT_FONTDICT ( 1 << 0 ) /* also FontInfo and FDArray */
-#define T1_FIELD_DICT_PRIVATE ( 1 << 1 )
-
-
-
-#define T1_NEW_SIMPLE_FIELD( _ident, _type, _fname, _dict ) \
- { \
- _ident, T1CODE, _type, \
- 0, \
- FT_FIELD_OFFSET( _fname ), \
- FT_FIELD_SIZE( _fname ), \
- 0, 0, \
- _dict \
- },
-
-#define T1_NEW_CALLBACK_FIELD( _ident, _reader, _dict ) \
- { \
- _ident, T1CODE, T1_FIELD_TYPE_CALLBACK, \
- (T1_Field_ParseFunc)_reader, \
- 0, 0, \
- 0, 0, \
- _dict \
- },
-
-#define T1_NEW_TABLE_FIELD( _ident, _type, _fname, _max, _dict ) \
- { \
- _ident, T1CODE, _type, \
- 0, \
- FT_FIELD_OFFSET( _fname ), \
- FT_FIELD_SIZE_DELTA( _fname ), \
- _max, \
- FT_FIELD_OFFSET( num_ ## _fname ), \
- _dict \
- },
-
-#define T1_NEW_TABLE_FIELD2( _ident, _type, _fname, _max, _dict ) \
- { \
- _ident, T1CODE, _type, \
- 0, \
- FT_FIELD_OFFSET( _fname ), \
- FT_FIELD_SIZE_DELTA( _fname ), \
- _max, 0, \
- _dict \
- },
-
-
-#define T1_FIELD_BOOL( _ident, _fname, _dict ) \
- T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_BOOL, _fname, _dict )
-
-#define T1_FIELD_NUM( _ident, _fname, _dict ) \
- T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_INTEGER, _fname, _dict )
-
-#define T1_FIELD_FIXED( _ident, _fname, _dict ) \
- T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_FIXED, _fname, _dict )
-
-#define T1_FIELD_FIXED_1000( _ident, _fname, _dict ) \
- T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_FIXED_1000, _fname, \
- _dict )
-
-#define T1_FIELD_STRING( _ident, _fname, _dict ) \
- T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_STRING, _fname, _dict )
-
-#define T1_FIELD_KEY( _ident, _fname, _dict ) \
- T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_KEY, _fname, _dict )
-
-#define T1_FIELD_BBOX( _ident, _fname, _dict ) \
- T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_BBOX, _fname, _dict )
-
-
-#define T1_FIELD_NUM_TABLE( _ident, _fname, _fmax, _dict ) \
- T1_NEW_TABLE_FIELD( _ident, T1_FIELD_TYPE_INTEGER_ARRAY, \
- _fname, _fmax, _dict )
-
-#define T1_FIELD_FIXED_TABLE( _ident, _fname, _fmax, _dict ) \
- T1_NEW_TABLE_FIELD( _ident, T1_FIELD_TYPE_FIXED_ARRAY, \
- _fname, _fmax, _dict )
-
-#define T1_FIELD_NUM_TABLE2( _ident, _fname, _fmax, _dict ) \
- T1_NEW_TABLE_FIELD2( _ident, T1_FIELD_TYPE_INTEGER_ARRAY, \
- _fname, _fmax, _dict )
-
-#define T1_FIELD_FIXED_TABLE2( _ident, _fname, _fmax, _dict ) \
- T1_NEW_TABLE_FIELD2( _ident, T1_FIELD_TYPE_FIXED_ARRAY, \
- _fname, _fmax, _dict )
-
-#define T1_FIELD_CALLBACK( _ident, _name, _dict ) \
- T1_NEW_CALLBACK_FIELD( _ident, _name, _dict )
-
-
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** T1 PARSER *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
-
- typedef const struct PS_Parser_FuncsRec_* PS_Parser_Funcs;
-
- typedef struct PS_Parser_FuncsRec_
- {
- void
- (*init)( PS_Parser parser,
- FT_Byte* base,
- FT_Byte* limit,
- FT_Memory memory );
-
- void
- (*done)( PS_Parser parser );
-
- void
- (*skip_spaces)( PS_Parser parser );
- void
- (*skip_PS_token)( PS_Parser parser );
-
- FT_Long
- (*to_int)( PS_Parser parser );
- FT_Fixed
- (*to_fixed)( PS_Parser parser,
- FT_Int power_ten );
-
- FT_Error
- (*to_bytes)( PS_Parser parser,
- FT_Byte* bytes,
- FT_Offset max_bytes,
- FT_ULong* pnum_bytes,
- FT_Bool delimiters );
-
- FT_Int
- (*to_coord_array)( PS_Parser parser,
- FT_Int max_coords,
- FT_Short* coords );
- FT_Int
- (*to_fixed_array)( PS_Parser parser,
- FT_Int max_values,
- FT_Fixed* values,
- FT_Int power_ten );
-
- void
- (*to_token)( PS_Parser parser,
- T1_Token token );
- void
- (*to_token_array)( PS_Parser parser,
- T1_Token tokens,
- FT_UInt max_tokens,
- FT_Int* pnum_tokens );
-
- FT_Error
- (*load_field)( PS_Parser parser,
- const T1_Field field,
- void** objects,
- FT_UInt max_objects,
- FT_ULong* pflags );
-
- FT_Error
- (*load_field_table)( PS_Parser parser,
- const T1_Field field,
- void** objects,
- FT_UInt max_objects,
- FT_ULong* pflags );
-
- } PS_Parser_FuncsRec;
-
-
- /**************************************************************************
- *
- * @struct:
- * PS_ParserRec
- *
- * @description:
- * A PS_Parser is an object used to parse a Type 1 font very quickly.
- *
- * @fields:
- * cursor ::
- * The current position in the text.
- *
- * base ::
- * Start of the processed text.
- *
- * limit ::
- * End of the processed text.
- *
- * error ::
- * The last error returned.
- *
- * memory ::
- * The object used for memory operations (alloc/realloc).
- *
- * funcs ::
- * A table of functions for the parser.
- */
- typedef struct PS_ParserRec_
- {
- FT_Byte* cursor;
- FT_Byte* base;
- FT_Byte* limit;
- FT_Error error;
- FT_Memory memory;
-
- PS_Parser_FuncsRec funcs;
-
- } PS_ParserRec;
-
-
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** PS BUILDER *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
-
-
- typedef struct PS_Builder_ PS_Builder;
- typedef const struct PS_Builder_FuncsRec_* PS_Builder_Funcs;
-
- typedef struct PS_Builder_FuncsRec_
- {
- void
- (*init)( PS_Builder* ps_builder,
- void* builder,
- FT_Bool is_t1 );
-
- void
- (*done)( PS_Builder* builder );
-
- } PS_Builder_FuncsRec;
-
-
- /**************************************************************************
- *
- * @struct:
- * PS_Builder
- *
- * @description:
- * A structure used during glyph loading to store its outline.
- *
- * @fields:
- * memory ::
- * The current memory object.
- *
- * face ::
- * The current face object.
- *
- * glyph ::
- * The current glyph slot.
- *
- * loader ::
- * XXX
- *
- * base ::
- * The base glyph outline.
- *
- * current ::
- * The current glyph outline.
- *
- * pos_x ::
- * The horizontal translation (if composite glyph).
- *
- * pos_y ::
- * The vertical translation (if composite glyph).
- *
- * left_bearing ::
- * The left side bearing point.
- *
- * advance ::
- * The horizontal advance vector.
- *
- * bbox ::
- * Unused.
- *
- * path_begun ::
- * A flag which indicates that a new path has begun.
- *
- * load_points ::
- * If this flag is not set, no points are loaded.
- *
- * no_recurse ::
- * Set but not used.
- *
- * metrics_only ::
- * A boolean indicating that we only want to compute the metrics of a
- * given glyph, not load all of its points.
- *
- * is_t1 ::
- * Set if current font type is Type 1.
- *
- * funcs ::
- * An array of function pointers for the builder.
- */
- struct PS_Builder_
- {
- FT_Memory memory;
- FT_Face face;
- CFF_GlyphSlot glyph;
- FT_GlyphLoader loader;
- FT_Outline* base;
- FT_Outline* current;
-
- FT_Pos* pos_x;
- FT_Pos* pos_y;
-
- FT_Vector* left_bearing;
- FT_Vector* advance;
-
- FT_BBox* bbox; /* bounding box */
- FT_Bool path_begun;
- FT_Bool load_points;
- FT_Bool no_recurse;
-
- FT_Bool metrics_only;
- FT_Bool is_t1;
-
- PS_Builder_FuncsRec funcs;
-
- };
-
-
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** PS DECODER *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
-
-#define PS_MAX_OPERANDS 48
-#define PS_MAX_SUBRS_CALLS 16 /* maximum subroutine nesting; */
- /* only 10 are allowed but there exist */
- /* fonts like `HiraKakuProN-W3.ttf' */
- /* (Hiragino Kaku Gothic ProN W3; */
- /* 8.2d6e1; 2014-12-19) that exceed */
- /* this limit */
-
- /* execution context charstring zone */
-
- typedef struct PS_Decoder_Zone_
- {
- FT_Byte* base;
- FT_Byte* limit;
- FT_Byte* cursor;
-
- } PS_Decoder_Zone;
-
-
- typedef FT_Error
- (*CFF_Decoder_Get_Glyph_Callback)( TT_Face face,
- FT_UInt glyph_index,
- FT_Byte** pointer,
- FT_ULong* length );
-
- typedef void
- (*CFF_Decoder_Free_Glyph_Callback)( TT_Face face,
- FT_Byte** pointer,
- FT_ULong length );
-
-
- typedef struct PS_Decoder_
- {
- PS_Builder builder;
-
- FT_Fixed stack[PS_MAX_OPERANDS + 1];
- FT_Fixed* top;
-
- PS_Decoder_Zone zones[PS_MAX_SUBRS_CALLS + 1];
- PS_Decoder_Zone* zone;
-
- FT_Int flex_state;
- FT_Int num_flex_vectors;
- FT_Vector flex_vectors[7];
-
- CFF_Font cff;
- CFF_SubFont current_subfont; /* for current glyph_index */
- FT_Generic* cf2_instance;
-
- FT_Pos* glyph_width;
- FT_Bool width_only;
- FT_Int num_hints;
-
- FT_UInt num_locals;
- FT_UInt num_globals;
-
- FT_Int locals_bias;
- FT_Int globals_bias;
-
- FT_Byte** locals;
- FT_Byte** globals;
-
- FT_Byte** glyph_names; /* for pure CFF fonts only */
- FT_UInt num_glyphs; /* number of glyphs in font */
-
- FT_Render_Mode hint_mode;
-
- FT_Bool seac;
-
- CFF_Decoder_Get_Glyph_Callback get_glyph_callback;
- CFF_Decoder_Free_Glyph_Callback free_glyph_callback;
-
- /* Type 1 stuff */
- FT_Service_PsCMaps psnames; /* for seac */
-
- FT_Int lenIV; /* internal for sub routine calls */
- FT_UInt* locals_len; /* array of subrs length (optional) */
- FT_Hash locals_hash; /* used if `num_subrs' was massaged */
-
- FT_Matrix font_matrix;
- FT_Vector font_offset;
-
- PS_Blend blend; /* for multiple master support */
-
- FT_Long* buildchar;
- FT_UInt len_buildchar;
-
- } PS_Decoder;
-
-
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** T1 BUILDER *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
-
-
- typedef struct T1_BuilderRec_* T1_Builder;
-
-
- typedef FT_Error
- (*T1_Builder_Check_Points_Func)( T1_Builder builder,
- FT_Int count );
-
- typedef void
- (*T1_Builder_Add_Point_Func)( T1_Builder builder,
- FT_Pos x,
- FT_Pos y,
- FT_Byte flag );
-
- typedef FT_Error
- (*T1_Builder_Add_Point1_Func)( T1_Builder builder,
- FT_Pos x,
- FT_Pos y );
-
- typedef FT_Error
- (*T1_Builder_Add_Contour_Func)( T1_Builder builder );
-
- typedef FT_Error
- (*T1_Builder_Start_Point_Func)( T1_Builder builder,
- FT_Pos x,
- FT_Pos y );
-
- typedef void
- (*T1_Builder_Close_Contour_Func)( T1_Builder builder );
-
-
- typedef const struct T1_Builder_FuncsRec_* T1_Builder_Funcs;
-
- typedef struct T1_Builder_FuncsRec_
- {
- void
- (*init)( T1_Builder builder,
- FT_Face face,
- FT_Size size,
- FT_GlyphSlot slot,
- FT_Bool hinting );
-
- void
- (*done)( T1_Builder builder );
-
- T1_Builder_Check_Points_Func check_points;
- T1_Builder_Add_Point_Func add_point;
- T1_Builder_Add_Point1_Func add_point1;
- T1_Builder_Add_Contour_Func add_contour;
- T1_Builder_Start_Point_Func start_point;
- T1_Builder_Close_Contour_Func close_contour;
-
- } T1_Builder_FuncsRec;
-
-
- /* an enumeration type to handle charstring parsing states */
- typedef enum T1_ParseState_
- {
- T1_Parse_Start,
- T1_Parse_Have_Width,
- T1_Parse_Have_Moveto,
- T1_Parse_Have_Path
-
- } T1_ParseState;
-
-
- /**************************************************************************
- *
- * @struct:
- * T1_BuilderRec
- *
- * @description:
- * A structure used during glyph loading to store its outline.
- *
- * @fields:
- * memory ::
- * The current memory object.
- *
- * face ::
- * The current face object.
- *
- * glyph ::
- * The current glyph slot.
- *
- * loader ::
- * XXX
- *
- * base ::
- * The base glyph outline.
- *
- * current ::
- * The current glyph outline.
- *
- * max_points ::
- * maximum points in builder outline
- *
- * max_contours ::
- * Maximum number of contours in builder outline.
- *
- * pos_x ::
- * The horizontal translation (if composite glyph).
- *
- * pos_y ::
- * The vertical translation (if composite glyph).
- *
- * left_bearing ::
- * The left side bearing point.
- *
- * advance ::
- * The horizontal advance vector.
- *
- * bbox ::
- * Unused.
- *
- * parse_state ::
- * An enumeration which controls the charstring parsing state.
- *
- * load_points ::
- * If this flag is not set, no points are loaded.
- *
- * no_recurse ::
- * Set but not used.
- *
- * metrics_only ::
- * A boolean indicating that we only want to compute the metrics of a
- * given glyph, not load all of its points.
- *
- * funcs ::
- * An array of function pointers for the builder.
- */
- typedef struct T1_BuilderRec_
- {
- FT_Memory memory;
- FT_Face face;
- FT_GlyphSlot glyph;
- FT_GlyphLoader loader;
- FT_Outline* base;
- FT_Outline* current;
-
- FT_Pos pos_x;
- FT_Pos pos_y;
-
- FT_Vector left_bearing;
- FT_Vector advance;
-
- FT_BBox bbox; /* bounding box */
- T1_ParseState parse_state;
- FT_Bool load_points;
- FT_Bool no_recurse;
-
- FT_Bool metrics_only;
-
- void* hints_funcs; /* hinter-specific */
- void* hints_globals; /* hinter-specific */
-
- T1_Builder_FuncsRec funcs;
-
- } T1_BuilderRec;
-
-
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** T1 DECODER *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
-
-#if 0
-
- /**************************************************************************
- *
- * T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine
- * calls during glyph loading.
- */
-#define T1_MAX_SUBRS_CALLS 8
-
-
- /**************************************************************************
- *
- * T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity. A
- * minimum of 16 is required.
- */
-#define T1_MAX_CHARSTRINGS_OPERANDS 32
-
-#endif /* 0 */
-
-
- typedef struct T1_Decoder_ZoneRec_
- {
- FT_Byte* cursor;
- FT_Byte* base;
- FT_Byte* limit;
-
- } T1_Decoder_ZoneRec, *T1_Decoder_Zone;
-
-
- typedef struct T1_DecoderRec_* T1_Decoder;
- typedef const struct T1_Decoder_FuncsRec_* T1_Decoder_Funcs;
-
-
- typedef FT_Error
- (*T1_Decoder_Callback)( T1_Decoder decoder,
- FT_UInt glyph_index );
-
-
- typedef struct T1_Decoder_FuncsRec_
- {
- FT_Error
- (*init)( T1_Decoder decoder,
- FT_Face face,
- FT_Size size,
- FT_GlyphSlot slot,
- FT_Byte** glyph_names,
- PS_Blend blend,
- FT_Bool hinting,
- FT_Render_Mode hint_mode,
- T1_Decoder_Callback callback );
-
- void
- (*done)( T1_Decoder decoder );
-
-#ifdef T1_CONFIG_OPTION_OLD_ENGINE
- FT_Error
- (*parse_charstrings_old)( T1_Decoder decoder,
- FT_Byte* base,
- FT_UInt len );
-#else
- FT_Error
- (*parse_metrics)( T1_Decoder decoder,
- FT_Byte* base,
- FT_UInt len );
-#endif
-
- FT_Error
- (*parse_charstrings)( PS_Decoder* decoder,
- FT_Byte* charstring_base,
- FT_ULong charstring_len );
-
-
- } T1_Decoder_FuncsRec;
-
-
- typedef struct T1_DecoderRec_
- {
- T1_BuilderRec builder;
-
- FT_Long stack[T1_MAX_CHARSTRINGS_OPERANDS];
- FT_Long* top;
-
- T1_Decoder_ZoneRec zones[T1_MAX_SUBRS_CALLS + 1];
- T1_Decoder_Zone zone;
-
- FT_Service_PsCMaps psnames; /* for seac */
- FT_UInt num_glyphs;
- FT_Byte** glyph_names;
-
- FT_Int lenIV; /* internal for sub routine calls */
- FT_Int num_subrs;
- FT_Byte** subrs;
- FT_UInt* subrs_len; /* array of subrs length (optional) */
- FT_Hash subrs_hash; /* used if `num_subrs' was massaged */
-
- FT_Matrix font_matrix;
- FT_Vector font_offset;
-
- FT_Int flex_state;
- FT_Int num_flex_vectors;
- FT_Vector flex_vectors[7];
-
- PS_Blend blend; /* for multiple master support */
-
- FT_Render_Mode hint_mode;
-
- T1_Decoder_Callback parse_callback;
- T1_Decoder_FuncsRec funcs;
-
- FT_Long* buildchar;
- FT_UInt len_buildchar;
-
- FT_Bool seac;
-
- FT_Generic cf2_instance;
-
- } T1_DecoderRec;
-
-
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** CFF BUILDER *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
-
-
- typedef struct CFF_Builder_ CFF_Builder;
-
-
- typedef FT_Error
- (*CFF_Builder_Check_Points_Func)( CFF_Builder* builder,
- FT_Int count );
-
- typedef void
- (*CFF_Builder_Add_Point_Func)( CFF_Builder* builder,
- FT_Pos x,
- FT_Pos y,
- FT_Byte flag );
- typedef FT_Error
- (*CFF_Builder_Add_Point1_Func)( CFF_Builder* builder,
- FT_Pos x,
- FT_Pos y );
- typedef FT_Error
- (*CFF_Builder_Start_Point_Func)( CFF_Builder* builder,
- FT_Pos x,
- FT_Pos y );
- typedef void
- (*CFF_Builder_Close_Contour_Func)( CFF_Builder* builder );
-
- typedef FT_Error
- (*CFF_Builder_Add_Contour_Func)( CFF_Builder* builder );
-
- typedef const struct CFF_Builder_FuncsRec_* CFF_Builder_Funcs;
-
- typedef struct CFF_Builder_FuncsRec_
- {
- void
- (*init)( CFF_Builder* builder,
- TT_Face face,
- CFF_Size size,
- CFF_GlyphSlot glyph,
- FT_Bool hinting );
-
- void
- (*done)( CFF_Builder* builder );
-
- CFF_Builder_Check_Points_Func check_points;
- CFF_Builder_Add_Point_Func add_point;
- CFF_Builder_Add_Point1_Func add_point1;
- CFF_Builder_Add_Contour_Func add_contour;
- CFF_Builder_Start_Point_Func start_point;
- CFF_Builder_Close_Contour_Func close_contour;
-
- } CFF_Builder_FuncsRec;
-
-
- /**************************************************************************
- *
- * @struct:
- * CFF_Builder
- *
- * @description:
- * A structure used during glyph loading to store its outline.
- *
- * @fields:
- * memory ::
- * The current memory object.
- *
- * face ::
- * The current face object.
- *
- * glyph ::
- * The current glyph slot.
- *
- * loader ::
- * The current glyph loader.
- *
- * base ::
- * The base glyph outline.
- *
- * current ::
- * The current glyph outline.
- *
- * pos_x ::
- * The horizontal translation (if composite glyph).
- *
- * pos_y ::
- * The vertical translation (if composite glyph).
- *
- * left_bearing ::
- * The left side bearing point.
- *
- * advance ::
- * The horizontal advance vector.
- *
- * bbox ::
- * Unused.
- *
- * path_begun ::
- * A flag which indicates that a new path has begun.
- *
- * load_points ::
- * If this flag is not set, no points are loaded.
- *
- * no_recurse ::
- * Set but not used.
- *
- * metrics_only ::
- * A boolean indicating that we only want to compute the metrics of a
- * given glyph, not load all of its points.
- *
- * hints_funcs ::
- * Auxiliary pointer for hinting.
- *
- * hints_globals ::
- * Auxiliary pointer for hinting.
- *
- * funcs ::
- * A table of method pointers for this object.
- */
- struct CFF_Builder_
- {
- FT_Memory memory;
- TT_Face face;
- CFF_GlyphSlot glyph;
- FT_GlyphLoader loader;
- FT_Outline* base;
- FT_Outline* current;
-
- FT_Pos pos_x;
- FT_Pos pos_y;
-
- FT_Vector left_bearing;
- FT_Vector advance;
-
- FT_BBox bbox; /* bounding box */
-
- FT_Bool path_begun;
- FT_Bool load_points;
- FT_Bool no_recurse;
-
- FT_Bool metrics_only;
-
- void* hints_funcs; /* hinter-specific */
- void* hints_globals; /* hinter-specific */
-
- CFF_Builder_FuncsRec funcs;
- };
-
-
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** CFF DECODER *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
-
-
-#define CFF_MAX_OPERANDS 48
-#define CFF_MAX_SUBRS_CALLS 16 /* maximum subroutine nesting; */
- /* only 10 are allowed but there exist */
- /* fonts like `HiraKakuProN-W3.ttf' */
- /* (Hiragino Kaku Gothic ProN W3; */
- /* 8.2d6e1; 2014-12-19) that exceed */
- /* this limit */
-#define CFF_MAX_TRANS_ELEMENTS 32
-
- /* execution context charstring zone */
-
- typedef struct CFF_Decoder_Zone_
- {
- FT_Byte* base;
- FT_Byte* limit;
- FT_Byte* cursor;
-
- } CFF_Decoder_Zone;
-
-
- typedef struct CFF_Decoder_
- {
- CFF_Builder builder;
- CFF_Font cff;
-
- FT_Fixed stack[CFF_MAX_OPERANDS + 1];
- FT_Fixed* top;
-
- CFF_Decoder_Zone zones[CFF_MAX_SUBRS_CALLS + 1];
- CFF_Decoder_Zone* zone;
-
- FT_Int flex_state;
- FT_Int num_flex_vectors;
- FT_Vector flex_vectors[7];
-
- FT_Pos glyph_width;
- FT_Pos nominal_width;
-
- FT_Bool read_width;
- FT_Bool width_only;
- FT_Int num_hints;
- FT_Fixed buildchar[CFF_MAX_TRANS_ELEMENTS];
-
- FT_UInt num_locals;
- FT_UInt num_globals;
-
- FT_Int locals_bias;
- FT_Int globals_bias;
-
- FT_Byte** locals;
- FT_Byte** globals;
-
- FT_Byte** glyph_names; /* for pure CFF fonts only */
- FT_UInt num_glyphs; /* number of glyphs in font */
-
- FT_Render_Mode hint_mode;
-
- FT_Bool seac;
-
- CFF_SubFont current_subfont; /* for current glyph_index */
-
- CFF_Decoder_Get_Glyph_Callback get_glyph_callback;
- CFF_Decoder_Free_Glyph_Callback free_glyph_callback;
-
- } CFF_Decoder;
-
-
- typedef const struct CFF_Decoder_FuncsRec_* CFF_Decoder_Funcs;
-
- typedef struct CFF_Decoder_FuncsRec_
- {
- void
- (*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_Error
- (*prepare)( CFF_Decoder* decoder,
- CFF_Size size,
- FT_UInt glyph_index );
-
-#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
- FT_Error
- (*parse_charstrings_old)( CFF_Decoder* decoder,
- FT_Byte* charstring_base,
- FT_ULong charstring_len,
- FT_Bool in_dict );
-#endif
-
- FT_Error
- (*parse_charstrings)( PS_Decoder* decoder,
- FT_Byte* charstring_base,
- FT_ULong charstring_len );
-
- } CFF_Decoder_FuncsRec;
-
-
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** AFM PARSER *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
-
- typedef struct AFM_ParserRec_* AFM_Parser;
-
- typedef struct AFM_Parser_FuncsRec_
- {
- FT_Error
- (*init)( AFM_Parser parser,
- FT_Memory memory,
- FT_Byte* base,
- FT_Byte* limit );
-
- void
- (*done)( AFM_Parser parser );
-
- FT_Error
- (*parse)( AFM_Parser parser );
-
- } AFM_Parser_FuncsRec;
-
-
- typedef struct AFM_StreamRec_* AFM_Stream;
-
-
- /**************************************************************************
- *
- * @struct:
- * AFM_ParserRec
- *
- * @description:
- * An AFM_Parser is a parser for the AFM files.
- *
- * @fields:
- * memory ::
- * The object used for memory operations (alloc and realloc).
- *
- * stream ::
- * This is an opaque object.
- *
- * FontInfo ::
- * The result will be stored here.
- *
- * get_index ::
- * A user provided function to get a glyph index by its name.
- */
- typedef struct AFM_ParserRec_
- {
- FT_Memory memory;
- AFM_Stream stream;
-
- AFM_FontInfo FontInfo;
-
- FT_Int
- (*get_index)( const char* name,
- FT_Offset len,
- void* user_data );
-
- void* user_data;
-
- } AFM_ParserRec;
-
-
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** TYPE1 CHARMAPS *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
-
- typedef const struct T1_CMap_ClassesRec_* T1_CMap_Classes;
-
- typedef struct T1_CMap_ClassesRec_
- {
- FT_CMap_Class standard;
- FT_CMap_Class expert;
- FT_CMap_Class custom;
- FT_CMap_Class unicode;
-
- } T1_CMap_ClassesRec;
-
-
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** PSAux Module Interface *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
-
- typedef struct PSAux_ServiceRec_
- {
- /* don't use `PS_Table_Funcs' and friends to avoid compiler warnings */
- const PS_Table_FuncsRec* ps_table_funcs;
- const PS_Parser_FuncsRec* ps_parser_funcs;
- const T1_Builder_FuncsRec* t1_builder_funcs;
- const T1_Decoder_FuncsRec* t1_decoder_funcs;
-
- void
- (*t1_decrypt)( FT_Byte* buffer,
- FT_Offset length,
- FT_UShort seed );
-
- FT_UInt32
- (*cff_random)( FT_UInt32 r );
-
- void
- (*ps_decoder_init)( PS_Decoder* ps_decoder,
- void* decoder,
- FT_Bool is_t1 );
-
- void
- (*t1_make_subfont)( FT_Face face,
- PS_Private priv,
- CFF_SubFont subfont );
-
- T1_CMap_Classes t1_cmap_classes;
-
- /* fields after this comment line were added after version 2.1.10 */
- const AFM_Parser_FuncsRec* afm_parser_funcs;
-
- const CFF_Decoder_FuncsRec* cff_decoder_funcs;
-
- } PSAux_ServiceRec, *PSAux_Service;
-
- /* backward compatible type definition */
- typedef PSAux_ServiceRec PSAux_Interface;
-
-
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** Some convenience functions *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
-
-#define IS_PS_NEWLINE( ch ) \
- ( (ch) == '\r' || \
- (ch) == '\n' )
-
-#define IS_PS_SPACE( ch ) \
- ( (ch) == ' ' || \
- IS_PS_NEWLINE( ch ) || \
- (ch) == '\t' || \
- (ch) == '\f' || \
- (ch) == '\0' )
-
-#define IS_PS_SPECIAL( ch ) \
- ( (ch) == '/' || \
- (ch) == '(' || (ch) == ')' || \
- (ch) == '<' || (ch) == '>' || \
- (ch) == '[' || (ch) == ']' || \
- (ch) == '{' || (ch) == '}' || \
- (ch) == '%' )
-
-#define IS_PS_DELIM( ch ) \
- ( IS_PS_SPACE( ch ) || \
- IS_PS_SPECIAL( ch ) )
-
-#define IS_PS_DIGIT( ch ) \
- ( (ch) >= '0' && (ch) <= '9' )
-
-#define IS_PS_XDIGIT( ch ) \
- ( IS_PS_DIGIT( ch ) || \
- ( (ch) >= 'A' && (ch) <= 'F' ) || \
- ( (ch) >= 'a' && (ch) <= 'f' ) )
-
-#define IS_PS_BASE85( ch ) \
- ( (ch) >= '!' && (ch) <= 'u' )
-
-#define IS_PS_TOKEN( cur, limit, token ) \
- ( (char)(cur)[0] == (token)[0] && \
- ( (cur) + sizeof ( (token) ) == (limit) || \
- ( (cur) + sizeof( (token) ) < (limit) && \
- IS_PS_DELIM( (cur)[sizeof ( (token) ) - 1] ) ) ) && \
- ft_strncmp( (char*)(cur), (token), sizeof ( (token) ) - 1 ) == 0 )
-
-
-FT_END_HEADER
-
-#endif /* PSAUX_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/pshints.h b/ThirdParty/freetype/include/freetype/internal/pshints.h
deleted file mode 100644
index 699acea..0000000
--- a/ThirdParty/freetype/include/freetype/internal/pshints.h
+++ /dev/null
@@ -1,700 +0,0 @@
-/****************************************************************************
- *
- * pshints.h
- *
- * Interface to Postscript-specific (Type 1 and Type 2) hints
- * recorders (specification only). These are used to support native
- * T1/T2 hints in the 'type1', 'cid', and 'cff' font drivers.
- *
- * Copyright (C) 2001-2019 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 PSHINTS_H_
-#define PSHINTS_H_
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_TYPE1_TABLES_H
-
-
-FT_BEGIN_HEADER
-
-
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** INTERNAL REPRESENTATION OF GLOBALS *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
-
- typedef struct PSH_GlobalsRec_* PSH_Globals;
-
- typedef FT_Error
- (*PSH_Globals_NewFunc)( FT_Memory memory,
- T1_Private* private_dict,
- PSH_Globals* aglobals );
-
- typedef void
- (*PSH_Globals_SetScaleFunc)( PSH_Globals globals,
- FT_Fixed x_scale,
- FT_Fixed y_scale,
- FT_Fixed x_delta,
- FT_Fixed y_delta );
-
- typedef void
- (*PSH_Globals_DestroyFunc)( PSH_Globals globals );
-
-
- typedef struct PSH_Globals_FuncsRec_
- {
- PSH_Globals_NewFunc create;
- PSH_Globals_SetScaleFunc set_scale;
- PSH_Globals_DestroyFunc destroy;
-
- } PSH_Globals_FuncsRec, *PSH_Globals_Funcs;
-
-
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** PUBLIC TYPE 1 HINTS RECORDER *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
-
- /**************************************************************************
- *
- * @type:
- * T1_Hints
- *
- * @description:
- * This is a handle to an opaque structure used to record glyph hints
- * from a Type 1 character glyph character string.
- *
- * The methods used to operate on this object are defined by the
- * @T1_Hints_FuncsRec structure. Recording glyph hints is normally
- * achieved through the following scheme:
- *
- * - Open a new hint recording session by calling the 'open' method.
- * This rewinds the recorder and prepare it for new input.
- *
- * - For each hint found in the glyph charstring, call the corresponding
- * method ('stem', 'stem3', or 'reset'). Note that these functions do
- * not return an error code.
- *
- * - Close the recording session by calling the 'close' method. It
- * returns an error code if the hints were invalid or something strange
- * happened (e.g., memory shortage).
- *
- * The hints accumulated in the object can later be used by the
- * PostScript hinter.
- *
- */
- typedef struct T1_HintsRec_* T1_Hints;
-
-
- /**************************************************************************
- *
- * @type:
- * T1_Hints_Funcs
- *
- * @description:
- * A pointer to the @T1_Hints_FuncsRec structure that defines the API of
- * a given @T1_Hints object.
- *
- */
- typedef const struct T1_Hints_FuncsRec_* T1_Hints_Funcs;
-
-
- /**************************************************************************
- *
- * @functype:
- * T1_Hints_OpenFunc
- *
- * @description:
- * A method of the @T1_Hints class used to prepare it for a new Type 1
- * hints recording session.
- *
- * @input:
- * hints ::
- * A handle to the Type 1 hints recorder.
- *
- * @note:
- * You should always call the @T1_Hints_CloseFunc method in order to
- * close an opened recording session.
- *
- */
- typedef void
- (*T1_Hints_OpenFunc)( T1_Hints hints );
-
-
- /**************************************************************************
- *
- * @functype:
- * T1_Hints_SetStemFunc
- *
- * @description:
- * A method of the @T1_Hints class used to record a new horizontal or
- * vertical stem. This corresponds to the Type 1 'hstem' and 'vstem'
- * operators.
- *
- * @input:
- * hints ::
- * A handle to the Type 1 hints recorder.
- *
- * dimension ::
- * 0 for horizontal stems (hstem), 1 for vertical ones (vstem).
- *
- * coords ::
- * Array of 2 coordinates in 16.16 format, used as (position,length)
- * stem descriptor.
- *
- * @note:
- * Use vertical coordinates (y) for horizontal stems (dim=0). Use
- * horizontal coordinates (x) for vertical stems (dim=1).
- *
- * 'coords[0]' is the absolute stem position (lowest coordinate);
- * 'coords[1]' is the length.
- *
- * The length can be negative, in which case it must be either -20 or
- * -21. It is interpreted as a 'ghost' stem, according to the Type 1
- * specification.
- *
- * If the length is -21 (corresponding to a bottom ghost stem), then the
- * real stem position is 'coords[0]+coords[1]'.
- *
- */
- typedef void
- (*T1_Hints_SetStemFunc)( T1_Hints hints,
- FT_UInt dimension,
- FT_Fixed* coords );
-
-
- /**************************************************************************
- *
- * @functype:
- * T1_Hints_SetStem3Func
- *
- * @description:
- * A method of the @T1_Hints class used to record three
- * counter-controlled horizontal or vertical stems at once.
- *
- * @input:
- * hints ::
- * A handle to the Type 1 hints recorder.
- *
- * dimension ::
- * 0 for horizontal stems, 1 for vertical ones.
- *
- * coords ::
- * An array of 6 values in 16.16 format, holding 3 (position,length)
- * pairs for the counter-controlled stems.
- *
- * @note:
- * Use vertical coordinates (y) for horizontal stems (dim=0). Use
- * horizontal coordinates (x) for vertical stems (dim=1).
- *
- * The lengths cannot be negative (ghost stems are never
- * counter-controlled).
- *
- */
- typedef void
- (*T1_Hints_SetStem3Func)( T1_Hints hints,
- FT_UInt dimension,
- FT_Fixed* coords );
-
-
- /**************************************************************************
- *
- * @functype:
- * T1_Hints_ResetFunc
- *
- * @description:
- * A method of the @T1_Hints class used to reset the stems hints in a
- * recording session.
- *
- * @input:
- * hints ::
- * A handle to the Type 1 hints recorder.
- *
- * end_point ::
- * The index of the last point in the input glyph in which the
- * previously defined hints apply.
- *
- */
- typedef void
- (*T1_Hints_ResetFunc)( T1_Hints hints,
- FT_UInt end_point );
-
-
- /**************************************************************************
- *
- * @functype:
- * T1_Hints_CloseFunc
- *
- * @description:
- * A method of the @T1_Hints class used to close a hint recording
- * session.
- *
- * @input:
- * hints ::
- * A handle to the Type 1 hints recorder.
- *
- * end_point ::
- * The index of the last point in the input glyph.
- *
- * @return:
- * FreeType error code. 0 means success.
- *
- * @note:
- * The error code is set to indicate that an error occurred during the
- * recording session.
- *
- */
- typedef FT_Error
- (*T1_Hints_CloseFunc)( T1_Hints hints,
- FT_UInt end_point );
-
-
- /**************************************************************************
- *
- * @functype:
- * T1_Hints_ApplyFunc
- *
- * @description:
- * A method of the @T1_Hints class used to apply hints to the
- * corresponding glyph outline. Must be called once all hints have been
- * recorded.
- *
- * @input:
- * hints ::
- * A handle to the Type 1 hints recorder.
- *
- * outline ::
- * A pointer to the target outline descriptor.
- *
- * globals ::
- * The hinter globals for this font.
- *
- * hint_mode ::
- * Hinting information.
- *
- * @return:
- * FreeType error code. 0 means success.
- *
- * @note:
- * On input, all points within the outline are in font coordinates. On
- * output, they are in 1/64th of pixels.
- *
- * The scaling transformation is taken from the 'globals' object which
- * must correspond to the same font as the glyph.
- *
- */
- typedef FT_Error
- (*T1_Hints_ApplyFunc)( T1_Hints hints,
- FT_Outline* outline,
- PSH_Globals globals,
- FT_Render_Mode hint_mode );
-
-
- /**************************************************************************
- *
- * @struct:
- * T1_Hints_FuncsRec
- *
- * @description:
- * The structure used to provide the API to @T1_Hints objects.
- *
- * @fields:
- * hints ::
- * A handle to the T1 Hints recorder.
- *
- * open ::
- * The function to open a recording session.
- *
- * close ::
- * The function to close a recording session.
- *
- * stem ::
- * The function to set a simple stem.
- *
- * stem3 ::
- * The function to set counter-controlled stems.
- *
- * reset ::
- * The function to reset stem hints.
- *
- * apply ::
- * The function to apply the hints to the corresponding glyph outline.
- *
- */
- typedef struct T1_Hints_FuncsRec_
- {
- T1_Hints hints;
- T1_Hints_OpenFunc open;
- T1_Hints_CloseFunc close;
- T1_Hints_SetStemFunc stem;
- T1_Hints_SetStem3Func stem3;
- T1_Hints_ResetFunc reset;
- T1_Hints_ApplyFunc apply;
-
- } T1_Hints_FuncsRec;
-
-
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** PUBLIC TYPE 2 HINTS RECORDER *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
-
- /**************************************************************************
- *
- * @type:
- * T2_Hints
- *
- * @description:
- * This is a handle to an opaque structure used to record glyph hints
- * from a Type 2 character glyph character string.
- *
- * The methods used to operate on this object are defined by the
- * @T2_Hints_FuncsRec structure. Recording glyph hints is normally
- * achieved through the following scheme:
- *
- * - Open a new hint recording session by calling the 'open' method.
- * This rewinds the recorder and prepare it for new input.
- *
- * - For each hint found in the glyph charstring, call the corresponding
- * method ('stems', 'hintmask', 'counters'). Note that these functions
- * do not return an error code.
- *
- * - Close the recording session by calling the 'close' method. It
- * returns an error code if the hints were invalid or something strange
- * happened (e.g., memory shortage).
- *
- * The hints accumulated in the object can later be used by the
- * Postscript hinter.
- *
- */
- typedef struct T2_HintsRec_* T2_Hints;
-
-
- /**************************************************************************
- *
- * @type:
- * T2_Hints_Funcs
- *
- * @description:
- * A pointer to the @T2_Hints_FuncsRec structure that defines the API of
- * a given @T2_Hints object.
- *
- */
- typedef const struct T2_Hints_FuncsRec_* T2_Hints_Funcs;
-
-
- /**************************************************************************
- *
- * @functype:
- * T2_Hints_OpenFunc
- *
- * @description:
- * A method of the @T2_Hints class used to prepare it for a new Type 2
- * hints recording session.
- *
- * @input:
- * hints ::
- * A handle to the Type 2 hints recorder.
- *
- * @note:
- * You should always call the @T2_Hints_CloseFunc method in order to
- * close an opened recording session.
- *
- */
- typedef void
- (*T2_Hints_OpenFunc)( T2_Hints hints );
-
-
- /**************************************************************************
- *
- * @functype:
- * T2_Hints_StemsFunc
- *
- * @description:
- * A method of the @T2_Hints class used to set the table of stems in
- * either the vertical or horizontal dimension. Equivalent to the
- * 'hstem', 'vstem', 'hstemhm', and 'vstemhm' Type 2 operators.
- *
- * @input:
- * hints ::
- * A handle to the Type 2 hints recorder.
- *
- * dimension ::
- * 0 for horizontal stems (hstem), 1 for vertical ones (vstem).
- *
- * count ::
- * The number of stems.
- *
- * coords ::
- * An array of 'count' (position,length) pairs in 16.16 format.
- *
- * @note:
- * Use vertical coordinates (y) for horizontal stems (dim=0). Use
- * horizontal coordinates (x) for vertical stems (dim=1).
- *
- * There are '2*count' elements in the 'coords' array. Each even element
- * is an absolute position in font units, each odd element is a length in
- * font units.
- *
- * A length can be negative, in which case it must be either -20 or -21.
- * It is interpreted as a 'ghost' stem, according to the Type 1
- * specification.
- *
- */
- typedef void
- (*T2_Hints_StemsFunc)( T2_Hints hints,
- FT_UInt dimension,
- FT_Int count,
- FT_Fixed* coordinates );
-
-
- /**************************************************************************
- *
- * @functype:
- * T2_Hints_MaskFunc
- *
- * @description:
- * A method of the @T2_Hints class used to set a given hintmask (this
- * corresponds to the 'hintmask' Type 2 operator).
- *
- * @input:
- * hints ::
- * A handle to the Type 2 hints recorder.
- *
- * end_point ::
- * The glyph index of the last point to which the previously defined or
- * activated hints apply.
- *
- * bit_count ::
- * The number of bits in the hint mask.
- *
- * bytes ::
- * An array of bytes modelling the hint mask.
- *
- * @note:
- * If the hintmask starts the charstring (before any glyph point
- * definition), the value of `end_point` should be 0.
- *
- * `bit_count` is the number of meaningful bits in the 'bytes' array; it
- * must be equal to the total number of hints defined so far (i.e.,
- * horizontal+verticals).
- *
- * The 'bytes' array can come directly from the Type 2 charstring and
- * respects the same format.
- *
- */
- typedef void
- (*T2_Hints_MaskFunc)( T2_Hints hints,
- FT_UInt end_point,
- FT_UInt bit_count,
- const FT_Byte* bytes );
-
-
- /**************************************************************************
- *
- * @functype:
- * T2_Hints_CounterFunc
- *
- * @description:
- * A method of the @T2_Hints class used to set a given counter mask (this
- * corresponds to the 'hintmask' Type 2 operator).
- *
- * @input:
- * hints ::
- * A handle to the Type 2 hints recorder.
- *
- * end_point ::
- * A glyph index of the last point to which the previously defined or
- * active hints apply.
- *
- * bit_count ::
- * The number of bits in the hint mask.
- *
- * bytes ::
- * An array of bytes modelling the hint mask.
- *
- * @note:
- * If the hintmask starts the charstring (before any glyph point
- * definition), the value of `end_point` should be 0.
- *
- * `bit_count` is the number of meaningful bits in the 'bytes' array; it
- * must be equal to the total number of hints defined so far (i.e.,
- * horizontal+verticals).
- *
- * The 'bytes' array can come directly from the Type 2 charstring and
- * respects the same format.
- *
- */
- typedef void
- (*T2_Hints_CounterFunc)( T2_Hints hints,
- FT_UInt bit_count,
- const FT_Byte* bytes );
-
-
- /**************************************************************************
- *
- * @functype:
- * T2_Hints_CloseFunc
- *
- * @description:
- * A method of the @T2_Hints class used to close a hint recording
- * session.
- *
- * @input:
- * hints ::
- * A handle to the Type 2 hints recorder.
- *
- * end_point ::
- * The index of the last point in the input glyph.
- *
- * @return:
- * FreeType error code. 0 means success.
- *
- * @note:
- * The error code is set to indicate that an error occurred during the
- * recording session.
- *
- */
- typedef FT_Error
- (*T2_Hints_CloseFunc)( T2_Hints hints,
- FT_UInt end_point );
-
-
- /**************************************************************************
- *
- * @functype:
- * T2_Hints_ApplyFunc
- *
- * @description:
- * A method of the @T2_Hints class used to apply hints to the
- * corresponding glyph outline. Must be called after the 'close' method.
- *
- * @input:
- * hints ::
- * A handle to the Type 2 hints recorder.
- *
- * outline ::
- * A pointer to the target outline descriptor.
- *
- * globals ::
- * The hinter globals for this font.
- *
- * hint_mode ::
- * Hinting information.
- *
- * @return:
- * FreeType error code. 0 means success.
- *
- * @note:
- * On input, all points within the outline are in font coordinates. On
- * output, they are in 1/64th of pixels.
- *
- * The scaling transformation is taken from the 'globals' object which
- * must correspond to the same font than the glyph.
- *
- */
- typedef FT_Error
- (*T2_Hints_ApplyFunc)( T2_Hints hints,
- FT_Outline* outline,
- PSH_Globals globals,
- FT_Render_Mode hint_mode );
-
-
- /**************************************************************************
- *
- * @struct:
- * T2_Hints_FuncsRec
- *
- * @description:
- * The structure used to provide the API to @T2_Hints objects.
- *
- * @fields:
- * hints ::
- * A handle to the T2 hints recorder object.
- *
- * open ::
- * The function to open a recording session.
- *
- * close ::
- * The function to close a recording session.
- *
- * stems ::
- * The function to set the dimension's stems table.
- *
- * hintmask ::
- * The function to set hint masks.
- *
- * counter ::
- * The function to set counter masks.
- *
- * apply ::
- * The function to apply the hints on the corresponding glyph outline.
- *
- */
- typedef struct T2_Hints_FuncsRec_
- {
- T2_Hints hints;
- T2_Hints_OpenFunc open;
- T2_Hints_CloseFunc close;
- T2_Hints_StemsFunc stems;
- T2_Hints_MaskFunc hintmask;
- T2_Hints_CounterFunc counter;
- T2_Hints_ApplyFunc apply;
-
- } T2_Hints_FuncsRec;
-
-
- /* */
-
-
- typedef struct PSHinter_Interface_
- {
- PSH_Globals_Funcs (*get_globals_funcs)( FT_Module module );
- T1_Hints_Funcs (*get_t1_funcs) ( FT_Module module );
- T2_Hints_Funcs (*get_t2_funcs) ( FT_Module module );
-
- } PSHinter_Interface;
-
- typedef PSHinter_Interface* PSHinter_Service;
-
-
-#define FT_DEFINE_PSHINTER_INTERFACE( \
- class_, \
- get_globals_funcs_, \
- get_t1_funcs_, \
- get_t2_funcs_ ) \
- static const PSHinter_Interface class_ = \
- { \
- get_globals_funcs_, \
- get_t1_funcs_, \
- get_t2_funcs_ \
- };
-
-
-FT_END_HEADER
-
-#endif /* PSHINTS_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/services/svbdf.h b/ThirdParty/freetype/include/freetype/internal/services/svbdf.h
deleted file mode 100644
index e4786ed..0000000
--- a/ThirdParty/freetype/include/freetype/internal/services/svbdf.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
- *
- * svbdf.h
- *
- * The FreeType BDF services (specification).
- *
- * Copyright (C) 2003-2019 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 SVBDF_H_
-#define SVBDF_H_
-
-#include FT_BDF_H
-#include FT_INTERNAL_SERVICE_H
-
-
-FT_BEGIN_HEADER
-
-
-#define FT_SERVICE_ID_BDF "bdf"
-
- typedef FT_Error
- (*FT_BDF_GetCharsetIdFunc)( FT_Face face,
- const char* *acharset_encoding,
- const char* *acharset_registry );
-
- typedef FT_Error
- (*FT_BDF_GetPropertyFunc)( FT_Face face,
- const char* prop_name,
- BDF_PropertyRec *aproperty );
-
-
- FT_DEFINE_SERVICE( BDF )
- {
- FT_BDF_GetCharsetIdFunc get_charset_id;
- FT_BDF_GetPropertyFunc get_property;
- };
-
-
-#define FT_DEFINE_SERVICE_BDFRec( class_, \
- get_charset_id_, \
- get_property_ ) \
- static const FT_Service_BDFRec class_ = \
- { \
- get_charset_id_, get_property_ \
- };
-
- /* */
-
-
-FT_END_HEADER
-
-
-#endif /* SVBDF_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/services/svcfftl.h b/ThirdParty/freetype/include/freetype/internal/services/svcfftl.h
deleted file mode 100644
index 6c62173..0000000
--- a/ThirdParty/freetype/include/freetype/internal/services/svcfftl.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************************
- *
- * svcfftl.h
- *
- * The FreeType CFF tables loader service (specification).
- *
- * Copyright (C) 2017-2019 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;
- };
-
-
-#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_ \
- };
-
-
-FT_END_HEADER
-
-
-#endif
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/services/svcid.h b/ThirdParty/freetype/include/freetype/internal/services/svcid.h
deleted file mode 100644
index 555a5af..0000000
--- a/ThirdParty/freetype/include/freetype/internal/services/svcid.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************************
- *
- * svcid.h
- *
- * The FreeType CID font services (specification).
- *
- * Copyright (C) 2007-2019 by
- * Derek Clegg and Michael Toftdal.
- *
- * 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 SVCID_H_
-#define SVCID_H_
-
-#include FT_INTERNAL_SERVICE_H
-
-
-FT_BEGIN_HEADER
-
-
-#define FT_SERVICE_ID_CID "CID"
-
- typedef FT_Error
- (*FT_CID_GetRegistryOrderingSupplementFunc)( FT_Face face,
- const char* *registry,
- const char* *ordering,
- FT_Int *supplement );
- typedef FT_Error
- (*FT_CID_GetIsInternallyCIDKeyedFunc)( FT_Face face,
- FT_Bool *is_cid );
- typedef FT_Error
- (*FT_CID_GetCIDFromGlyphIndexFunc)( FT_Face face,
- FT_UInt glyph_index,
- FT_UInt *cid );
-
- FT_DEFINE_SERVICE( CID )
- {
- FT_CID_GetRegistryOrderingSupplementFunc get_ros;
- FT_CID_GetIsInternallyCIDKeyedFunc get_is_cid;
- FT_CID_GetCIDFromGlyphIndexFunc get_cid_from_glyph_index;
- };
-
-
-#define FT_DEFINE_SERVICE_CIDREC( class_, \
- get_ros_, \
- get_is_cid_, \
- get_cid_from_glyph_index_ ) \
- static const FT_Service_CIDRec class_ = \
- { \
- get_ros_, get_is_cid_, get_cid_from_glyph_index_ \
- };
-
- /* */
-
-
-FT_END_HEADER
-
-
-#endif /* SVCID_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/services/svfntfmt.h b/ThirdParty/freetype/include/freetype/internal/services/svfntfmt.h
deleted file mode 100644
index 6f4285e..0000000
--- a/ThirdParty/freetype/include/freetype/internal/services/svfntfmt.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
- *
- * svfntfmt.h
- *
- * The FreeType font format service (specification only).
- *
- * Copyright (C) 2003-2019 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 SVFNTFMT_H_
-#define SVFNTFMT_H_
-
-#include FT_INTERNAL_SERVICE_H
-
-
-FT_BEGIN_HEADER
-
-
- /*
- * A trivial service used to return the name of a face's font driver,
- * according to the XFree86 nomenclature. Note that the service data is a
- * simple constant string pointer.
- */
-
-#define FT_SERVICE_ID_FONT_FORMAT "font-format"
-
-#define FT_FONT_FORMAT_TRUETYPE "TrueType"
-#define FT_FONT_FORMAT_TYPE_1 "Type 1"
-#define FT_FONT_FORMAT_BDF "BDF"
-#define FT_FONT_FORMAT_PCF "PCF"
-#define FT_FONT_FORMAT_TYPE_42 "Type 42"
-#define FT_FONT_FORMAT_CID "CID Type 1"
-#define FT_FONT_FORMAT_CFF "CFF"
-#define FT_FONT_FORMAT_PFR "PFR"
-#define FT_FONT_FORMAT_WINFNT "Windows FNT"
-
- /* */
-
-
-FT_END_HEADER
-
-
-#endif /* SVFNTFMT_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/services/svgldict.h b/ThirdParty/freetype/include/freetype/internal/services/svgldict.h
deleted file mode 100644
index ca8edf0..0000000
--- a/ThirdParty/freetype/include/freetype/internal/services/svgldict.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/****************************************************************************
- *
- * svgldict.h
- *
- * The FreeType glyph dictionary services (specification).
- *
- * Copyright (C) 2003-2019 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 SVGLDICT_H_
-#define SVGLDICT_H_
-
-#include FT_INTERNAL_SERVICE_H
-
-
-FT_BEGIN_HEADER
-
-
- /*
- * A service used to retrieve glyph names, as well as to find the index of
- * a given glyph name in a font.
- *
- */
-
-#define FT_SERVICE_ID_GLYPH_DICT "glyph-dict"
-
-
- typedef FT_Error
- (*FT_GlyphDict_GetNameFunc)( FT_Face face,
- FT_UInt glyph_index,
- FT_Pointer buffer,
- FT_UInt buffer_max );
-
- typedef FT_UInt
- (*FT_GlyphDict_NameIndexFunc)( FT_Face face,
- FT_String* glyph_name );
-
-
- FT_DEFINE_SERVICE( GlyphDict )
- {
- FT_GlyphDict_GetNameFunc get_name;
- FT_GlyphDict_NameIndexFunc name_index; /* optional */
- };
-
-
-#define FT_DEFINE_SERVICE_GLYPHDICTREC( class_, \
- get_name_, \
- name_index_ ) \
- static const FT_Service_GlyphDictRec class_ = \
- { \
- get_name_, name_index_ \
- };
-
- /* */
-
-
-FT_END_HEADER
-
-
-#endif /* SVGLDICT_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/services/svgxval.h b/ThirdParty/freetype/include/freetype/internal/services/svgxval.h
deleted file mode 100644
index 0bb76f3..0000000
--- a/ThirdParty/freetype/include/freetype/internal/services/svgxval.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/****************************************************************************
- *
- * svgxval.h
- *
- * FreeType API for validating TrueTypeGX/AAT tables (specification).
- *
- * Copyright (C) 2004-2019 by
- * Masatake YAMATO, Red Hat K.K.,
- * 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.
- *
- */
-
-/****************************************************************************
- *
- * gxvalid is derived from both gxlayout module and otvalid module.
- * Development of gxlayout is supported by the Information-technology
- * Promotion Agency(IPA), Japan.
- *
- */
-
-
-#ifndef SVGXVAL_H_
-#define SVGXVAL_H_
-
-#include FT_GX_VALIDATE_H
-#include FT_INTERNAL_VALIDATE_H
-
-FT_BEGIN_HEADER
-
-
-#define FT_SERVICE_ID_GX_VALIDATE "truetypegx-validate"
-#define FT_SERVICE_ID_CLASSICKERN_VALIDATE "classickern-validate"
-
- typedef FT_Error
- (*gxv_validate_func)( FT_Face face,
- FT_UInt gx_flags,
- FT_Bytes tables[FT_VALIDATE_GX_LENGTH],
- FT_UInt table_length );
-
-
- typedef FT_Error
- (*ckern_validate_func)( FT_Face face,
- FT_UInt ckern_flags,
- FT_Bytes *ckern_table );
-
-
- FT_DEFINE_SERVICE( GXvalidate )
- {
- gxv_validate_func validate;
- };
-
- FT_DEFINE_SERVICE( CKERNvalidate )
- {
- ckern_validate_func validate;
- };
-
- /* */
-
-
-FT_END_HEADER
-
-
-#endif /* SVGXVAL_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/services/svkern.h b/ThirdParty/freetype/include/freetype/internal/services/svkern.h
deleted file mode 100644
index f992a32..0000000
--- a/ThirdParty/freetype/include/freetype/internal/services/svkern.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
- *
- * svkern.h
- *
- * The FreeType Kerning service (specification).
- *
- * Copyright (C) 2006-2019 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 SVKERN_H_
-#define SVKERN_H_
-
-#include FT_INTERNAL_SERVICE_H
-#include FT_TRUETYPE_TABLES_H
-
-
-FT_BEGIN_HEADER
-
-#define FT_SERVICE_ID_KERNING "kerning"
-
-
- typedef FT_Error
- (*FT_Kerning_TrackGetFunc)( FT_Face face,
- FT_Fixed point_size,
- FT_Int degree,
- FT_Fixed* akerning );
-
- FT_DEFINE_SERVICE( Kerning )
- {
- FT_Kerning_TrackGetFunc get_track;
- };
-
- /* */
-
-
-FT_END_HEADER
-
-
-#endif /* SVKERN_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/services/svmetric.h b/ThirdParty/freetype/include/freetype/internal/services/svmetric.h
deleted file mode 100644
index d688bc7..0000000
--- a/ThirdParty/freetype/include/freetype/internal/services/svmetric.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/****************************************************************************
- *
- * svmetric.h
- *
- * The FreeType services for metrics variations (specification).
- *
- * Copyright (C) 2016-2019 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;
- };
-
-
-#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_ \
- };
-
- /* */
-
-
-FT_END_HEADER
-
-#endif /* SVMETRIC_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/services/svmm.h b/ThirdParty/freetype/include/freetype/internal/services/svmm.h
deleted file mode 100644
index 3652f20..0000000
--- a/ThirdParty/freetype/include/freetype/internal/services/svmm.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/****************************************************************************
- *
- * svmm.h
- *
- * The FreeType Multiple Masters and GX var services (specification).
- *
- * Copyright (C) 2003-2019 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 );
-
- typedef FT_Error
- (*FT_Set_MM_WeightVector_Func)( FT_Face face,
- FT_UInt len,
- FT_Fixed* weight_vector );
-
- typedef FT_Error
- (*FT_Get_MM_WeightVector_Func)( FT_Face face,
- FT_UInt* len,
- FT_Fixed* weight_vector );
-
-
- 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;
- FT_Set_MM_WeightVector_Func set_mm_weightvector;
- FT_Get_MM_WeightVector_Func get_mm_weightvector;
-
- /* for internal use; only needed for code sharing between modules */
- FT_Get_Var_Blend_Func get_var_blend;
- FT_Done_Blend_Func done_blend;
- };
-
-
-#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_, \
- set_weightvector_, \
- get_weightvector_, \
- 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_, \
- set_weightvector_, \
- get_weightvector_, \
- get_var_blend_, \
- done_blend_ \
- };
-
- /* */
-
-
-FT_END_HEADER
-
-#endif /* SVMM_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/services/svotval.h b/ThirdParty/freetype/include/freetype/internal/services/svotval.h
deleted file mode 100644
index cab4c6e..0000000
--- a/ThirdParty/freetype/include/freetype/internal/services/svotval.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
- *
- * svotval.h
- *
- * The FreeType OpenType validation service (specification).
- *
- * Copyright (C) 2004-2019 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 SVOTVAL_H_
-#define SVOTVAL_H_
-
-#include FT_OPENTYPE_VALIDATE_H
-#include FT_INTERNAL_VALIDATE_H
-
-FT_BEGIN_HEADER
-
-
-#define FT_SERVICE_ID_OPENTYPE_VALIDATE "opentype-validate"
-
-
- typedef FT_Error
- (*otv_validate_func)( FT_Face volatile face,
- FT_UInt ot_flags,
- FT_Bytes *base,
- FT_Bytes *gdef,
- FT_Bytes *gpos,
- FT_Bytes *gsub,
- FT_Bytes *jstf );
-
-
- FT_DEFINE_SERVICE( OTvalidate )
- {
- otv_validate_func validate;
- };
-
- /* */
-
-
-FT_END_HEADER
-
-
-#endif /* SVOTVAL_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/services/svpfr.h b/ThirdParty/freetype/include/freetype/internal/services/svpfr.h
deleted file mode 100644
index fd01d61..0000000
--- a/ThirdParty/freetype/include/freetype/internal/services/svpfr.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
- *
- * svpfr.h
- *
- * Internal PFR service functions (specification).
- *
- * Copyright (C) 2003-2019 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 SVPFR_H_
-#define SVPFR_H_
-
-#include FT_PFR_H
-#include FT_INTERNAL_SERVICE_H
-
-
-FT_BEGIN_HEADER
-
-
-#define FT_SERVICE_ID_PFR_METRICS "pfr-metrics"
-
-
- typedef FT_Error
- (*FT_PFR_GetMetricsFunc)( FT_Face face,
- FT_UInt *aoutline,
- FT_UInt *ametrics,
- FT_Fixed *ax_scale,
- FT_Fixed *ay_scale );
-
- typedef FT_Error
- (*FT_PFR_GetKerningFunc)( FT_Face face,
- FT_UInt left,
- FT_UInt right,
- FT_Vector *avector );
-
- typedef FT_Error
- (*FT_PFR_GetAdvanceFunc)( FT_Face face,
- FT_UInt gindex,
- FT_Pos *aadvance );
-
-
- FT_DEFINE_SERVICE( PfrMetrics )
- {
- FT_PFR_GetMetricsFunc get_metrics;
- FT_PFR_GetKerningFunc get_kerning;
- FT_PFR_GetAdvanceFunc get_advance;
-
- };
-
- /* */
-
-FT_END_HEADER
-
-#endif /* SVPFR_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/services/svpostnm.h b/ThirdParty/freetype/include/freetype/internal/services/svpostnm.h
deleted file mode 100644
index 18e3843..0000000
--- a/ThirdParty/freetype/include/freetype/internal/services/svpostnm.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************************
- *
- * svpostnm.h
- *
- * The FreeType PostScript name services (specification).
- *
- * Copyright (C) 2003-2019 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 SVPOSTNM_H_
-#define SVPOSTNM_H_
-
-#include FT_INTERNAL_SERVICE_H
-
-
-FT_BEGIN_HEADER
-
- /*
- * A trivial service used to retrieve the PostScript name of a given font
- * when available. The `get_name' field should never be `NULL`.
- *
- * The corresponding function can return `NULL` to indicate that the
- * PostScript name is not available.
- *
- * The name is owned by the face and will be destroyed with it.
- */
-
-#define FT_SERVICE_ID_POSTSCRIPT_FONT_NAME "postscript-font-name"
-
-
- typedef const char*
- (*FT_PsName_GetFunc)( FT_Face face );
-
-
- FT_DEFINE_SERVICE( PsFontName )
- {
- FT_PsName_GetFunc get_ps_font_name;
- };
-
-
-#define FT_DEFINE_SERVICE_PSFONTNAMEREC( class_, get_ps_font_name_ ) \
- static const FT_Service_PsFontNameRec class_ = \
- { \
- get_ps_font_name_ \
- };
-
- /* */
-
-
-FT_END_HEADER
-
-
-#endif /* SVPOSTNM_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/services/svprop.h b/ThirdParty/freetype/include/freetype/internal/services/svprop.h
deleted file mode 100644
index e48d015..0000000
--- a/ThirdParty/freetype/include/freetype/internal/services/svprop.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
- *
- * svprop.h
- *
- * The FreeType property service (specification).
- *
- * Copyright (C) 2012-2019 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 SVPROP_H_
-#define SVPROP_H_
-
-
-FT_BEGIN_HEADER
-
-
-#define FT_SERVICE_ID_PROPERTIES "properties"
-
-
- typedef FT_Error
- (*FT_Properties_SetFunc)( FT_Module module,
- const char* property_name,
- const void* value,
- FT_Bool value_is_string );
-
- typedef FT_Error
- (*FT_Properties_GetFunc)( FT_Module module,
- const char* property_name,
- void* value );
-
-
- FT_DEFINE_SERVICE( Properties )
- {
- FT_Properties_SetFunc set_property;
- FT_Properties_GetFunc get_property;
- };
-
-
-#define FT_DEFINE_SERVICE_PROPERTIESREC( class_, \
- set_property_, \
- get_property_ ) \
- static const FT_Service_PropertiesRec class_ = \
- { \
- set_property_, \
- get_property_ \
- };
-
- /* */
-
-
-FT_END_HEADER
-
-
-#endif /* SVPROP_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/services/svpscmap.h b/ThirdParty/freetype/include/freetype/internal/services/svpscmap.h
deleted file mode 100644
index dfac3ba..0000000
--- a/ThirdParty/freetype/include/freetype/internal/services/svpscmap.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/****************************************************************************
- *
- * svpscmap.h
- *
- * The FreeType PostScript charmap service (specification).
- *
- * Copyright (C) 2003-2019 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 SVPSCMAP_H_
-#define SVPSCMAP_H_
-
-#include FT_INTERNAL_OBJECTS_H
-
-
-FT_BEGIN_HEADER
-
-
-#define FT_SERVICE_ID_POSTSCRIPT_CMAPS "postscript-cmaps"
-
-
- /*
- * Adobe glyph name to unicode value.
- */
- typedef FT_UInt32
- (*PS_Unicode_ValueFunc)( const char* glyph_name );
-
- /*
- * Macintosh name id to glyph name. `NULL` if invalid index.
- */
- typedef const char*
- (*PS_Macintosh_NameFunc)( FT_UInt name_index );
-
- /*
- * Adobe standard string ID to glyph name. `NULL` if invalid index.
- */
- typedef const char*
- (*PS_Adobe_Std_StringsFunc)( FT_UInt string_index );
-
-
- /*
- * Simple unicode -> glyph index charmap built from font glyph names table.
- */
- typedef struct PS_UniMap_
- {
- FT_UInt32 unicode; /* bit 31 set: is glyph variant */
- FT_UInt glyph_index;
-
- } PS_UniMap;
-
-
- typedef struct PS_UnicodesRec_* PS_Unicodes;
-
- typedef struct PS_UnicodesRec_
- {
- FT_CMapRec cmap;
- FT_UInt num_maps;
- PS_UniMap* maps;
-
- } PS_UnicodesRec;
-
-
- /*
- * A function which returns a glyph name for a given index. Returns
- * `NULL` if invalid index.
- */
- typedef const char*
- (*PS_GetGlyphNameFunc)( FT_Pointer data,
- FT_UInt string_index );
-
- /*
- * A function used to release the glyph name returned by
- * PS_GetGlyphNameFunc, when needed
- */
- typedef void
- (*PS_FreeGlyphNameFunc)( FT_Pointer data,
- const char* name );
-
- typedef FT_Error
- (*PS_Unicodes_InitFunc)( FT_Memory memory,
- PS_Unicodes unicodes,
- FT_UInt num_glyphs,
- PS_GetGlyphNameFunc get_glyph_name,
- PS_FreeGlyphNameFunc free_glyph_name,
- FT_Pointer glyph_data );
-
- typedef FT_UInt
- (*PS_Unicodes_CharIndexFunc)( PS_Unicodes unicodes,
- FT_UInt32 unicode );
-
- typedef FT_UInt32
- (*PS_Unicodes_CharNextFunc)( PS_Unicodes unicodes,
- FT_UInt32 *unicode );
-
-
- FT_DEFINE_SERVICE( PsCMaps )
- {
- PS_Unicode_ValueFunc unicode_value;
-
- PS_Unicodes_InitFunc unicodes_init;
- PS_Unicodes_CharIndexFunc unicodes_char_index;
- PS_Unicodes_CharNextFunc unicodes_char_next;
-
- PS_Macintosh_NameFunc macintosh_name;
- PS_Adobe_Std_StringsFunc adobe_std_strings;
- const unsigned short* adobe_std_encoding;
- const unsigned short* adobe_expert_encoding;
- };
-
-
-#define FT_DEFINE_SERVICE_PSCMAPSREC( class_, \
- unicode_value_, \
- unicodes_init_, \
- unicodes_char_index_, \
- unicodes_char_next_, \
- macintosh_name_, \
- adobe_std_strings_, \
- adobe_std_encoding_, \
- adobe_expert_encoding_ ) \
- static const FT_Service_PsCMapsRec class_ = \
- { \
- unicode_value_, unicodes_init_, \
- unicodes_char_index_, unicodes_char_next_, macintosh_name_, \
- adobe_std_strings_, adobe_std_encoding_, adobe_expert_encoding_ \
- };
-
- /* */
-
-
-FT_END_HEADER
-
-
-#endif /* SVPSCMAP_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/services/svpsinfo.h b/ThirdParty/freetype/include/freetype/internal/services/svpsinfo.h
deleted file mode 100644
index fb4e0e3..0000000
--- a/ThirdParty/freetype/include/freetype/internal/services/svpsinfo.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/****************************************************************************
- *
- * svpsinfo.h
- *
- * The FreeType PostScript info service (specification).
- *
- * Copyright (C) 2003-2019 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 SVPSINFO_H_
-#define SVPSINFO_H_
-
-#include FT_INTERNAL_SERVICE_H
-#include FT_INTERNAL_TYPE1_TYPES_H
-
-
-FT_BEGIN_HEADER
-
-
-#define FT_SERVICE_ID_POSTSCRIPT_INFO "postscript-info"
-
-
- typedef FT_Error
- (*PS_GetFontInfoFunc)( FT_Face face,
- PS_FontInfoRec* afont_info );
-
- typedef FT_Error
- (*PS_GetFontExtraFunc)( FT_Face face,
- PS_FontExtraRec* afont_extra );
-
- typedef FT_Int
- (*PS_HasGlyphNamesFunc)( FT_Face face );
-
- typedef FT_Error
- (*PS_GetFontPrivateFunc)( FT_Face face,
- PS_PrivateRec* afont_private );
-
- typedef FT_Long
- (*PS_GetFontValueFunc)( FT_Face face,
- PS_Dict_Keys key,
- FT_UInt idx,
- void *value,
- FT_Long value_len );
-
-
- FT_DEFINE_SERVICE( PsInfo )
- {
- PS_GetFontInfoFunc ps_get_font_info;
- PS_GetFontExtraFunc ps_get_font_extra;
- PS_HasGlyphNamesFunc ps_has_glyph_names;
- PS_GetFontPrivateFunc ps_get_font_private;
- PS_GetFontValueFunc ps_get_font_value;
- };
-
-
-#define FT_DEFINE_SERVICE_PSINFOREC( class_, \
- get_font_info_, \
- ps_get_font_extra_, \
- has_glyph_names_, \
- get_font_private_, \
- get_font_value_ ) \
- static const FT_Service_PsInfoRec class_ = \
- { \
- get_font_info_, ps_get_font_extra_, has_glyph_names_, \
- get_font_private_, get_font_value_ \
- };
-
- /* */
-
-
-FT_END_HEADER
-
-
-#endif /* SVPSINFO_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/services/svsfnt.h b/ThirdParty/freetype/include/freetype/internal/services/svsfnt.h
deleted file mode 100644
index 464aa20..0000000
--- a/ThirdParty/freetype/include/freetype/internal/services/svsfnt.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************************
- *
- * svsfnt.h
- *
- * The FreeType SFNT table loading service (specification).
- *
- * Copyright (C) 2003-2019 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 SVSFNT_H_
-#define SVSFNT_H_
-
-#include FT_INTERNAL_SERVICE_H
-#include FT_TRUETYPE_TABLES_H
-
-
-FT_BEGIN_HEADER
-
-
- /*
- * SFNT table loading service.
- */
-
-#define FT_SERVICE_ID_SFNT_TABLE "sfnt-table"
-
-
- /*
- * Used to implement FT_Load_Sfnt_Table().
- */
- typedef FT_Error
- (*FT_SFNT_TableLoadFunc)( FT_Face face,
- FT_ULong tag,
- FT_Long offset,
- FT_Byte* buffer,
- FT_ULong* length );
-
- /*
- * Used to implement FT_Get_Sfnt_Table().
- */
- typedef void*
- (*FT_SFNT_TableGetFunc)( FT_Face face,
- FT_Sfnt_Tag tag );
-
-
- /*
- * Used to implement FT_Sfnt_Table_Info().
- */
- typedef FT_Error
- (*FT_SFNT_TableInfoFunc)( FT_Face face,
- FT_UInt idx,
- FT_ULong *tag,
- FT_ULong *offset,
- FT_ULong *length );
-
-
- FT_DEFINE_SERVICE( SFNT_Table )
- {
- FT_SFNT_TableLoadFunc load_table;
- FT_SFNT_TableGetFunc get_table;
- FT_SFNT_TableInfoFunc table_info;
- };
-
-
-#define FT_DEFINE_SERVICE_SFNT_TABLEREC( class_, load_, get_, info_ ) \
- static const FT_Service_SFNT_TableRec class_ = \
- { \
- load_, get_, info_ \
- };
-
- /* */
-
-
-FT_END_HEADER
-
-
-#endif /* SVSFNT_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/services/svttcmap.h b/ThirdParty/freetype/include/freetype/internal/services/svttcmap.h
deleted file mode 100644
index 0fcb813..0000000
--- a/ThirdParty/freetype/include/freetype/internal/services/svttcmap.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************************
- *
- * svttcmap.h
- *
- * The FreeType TrueType/sfnt cmap extra information service.
- *
- * Copyright (C) 2003-2019 by
- * Masatake YAMATO, Redhat K.K.,
- * 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.
- *
- */
-
-/* Development of this service is support of
- Information-technology Promotion Agency, Japan. */
-
-#ifndef SVTTCMAP_H_
-#define SVTTCMAP_H_
-
-#include FT_INTERNAL_SERVICE_H
-#include FT_TRUETYPE_TABLES_H
-
-
-FT_BEGIN_HEADER
-
-
-#define FT_SERVICE_ID_TT_CMAP "tt-cmaps"
-
-
- /**************************************************************************
- *
- * @struct:
- * TT_CMapInfo
- *
- * @description:
- * A structure used to store TrueType/sfnt specific cmap information
- * which is not covered by the generic @FT_CharMap structure. This
- * structure can be accessed with the @FT_Get_TT_CMap_Info function.
- *
- * @fields:
- * language ::
- * The language ID used in Mac fonts. Definitions of values are in
- * `ttnameid.h`.
- *
- * format ::
- * The cmap format. OpenType 1.6 defines the formats 0 (byte encoding
- * table), 2~(high-byte mapping through table), 4~(segment mapping to
- * delta values), 6~(trimmed table mapping), 8~(mixed 16-bit and 32-bit
- * coverage), 10~(trimmed array), 12~(segmented coverage), 13~(last
- * resort font), and 14 (Unicode Variation Sequences).
- */
- typedef struct TT_CMapInfo_
- {
- FT_ULong language;
- FT_Long format;
-
- } TT_CMapInfo;
-
-
- typedef FT_Error
- (*TT_CMap_Info_GetFunc)( FT_CharMap charmap,
- TT_CMapInfo *cmap_info );
-
-
- FT_DEFINE_SERVICE( TTCMaps )
- {
- TT_CMap_Info_GetFunc get_cmap_info;
- };
-
-
-#define FT_DEFINE_SERVICE_TTCMAPSREC( class_, get_cmap_info_ ) \
- static const FT_Service_TTCMapsRec class_ = \
- { \
- get_cmap_info_ \
- };
-
- /* */
-
-
-FT_END_HEADER
-
-#endif /* SVTTCMAP_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/services/svtteng.h b/ThirdParty/freetype/include/freetype/internal/services/svtteng.h
deleted file mode 100644
index a852f5c..0000000
--- a/ThirdParty/freetype/include/freetype/internal/services/svtteng.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
- *
- * svtteng.h
- *
- * The FreeType TrueType engine query service (specification).
- *
- * Copyright (C) 2006-2019 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 SVTTENG_H_
-#define SVTTENG_H_
-
-#include FT_INTERNAL_SERVICE_H
-#include FT_MODULE_H
-
-
-FT_BEGIN_HEADER
-
-
- /*
- * SFNT table loading service.
- */
-
-#define FT_SERVICE_ID_TRUETYPE_ENGINE "truetype-engine"
-
- /*
- * Used to implement FT_Get_TrueType_Engine_Type
- */
-
- FT_DEFINE_SERVICE( TrueTypeEngine )
- {
- FT_TrueTypeEngineType engine_type;
- };
-
- /* */
-
-
-FT_END_HEADER
-
-
-#endif /* SVTTENG_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/services/svttglyf.h b/ThirdParty/freetype/include/freetype/internal/services/svttglyf.h
deleted file mode 100644
index c879877..0000000
--- a/ThirdParty/freetype/include/freetype/internal/services/svttglyf.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/****************************************************************************
- *
- * svttglyf.h
- *
- * The FreeType TrueType glyph service.
- *
- * Copyright (C) 2007-2019 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.
- *
- */
-
-#ifndef SVTTGLYF_H_
-#define SVTTGLYF_H_
-
-#include FT_INTERNAL_SERVICE_H
-#include FT_TRUETYPE_TABLES_H
-
-
-FT_BEGIN_HEADER
-
-
-#define FT_SERVICE_ID_TT_GLYF "tt-glyf"
-
-
- typedef FT_ULong
- (*TT_Glyf_GetLocationFunc)( FT_Face face,
- FT_UInt gindex,
- FT_ULong *psize );
-
- FT_DEFINE_SERVICE( TTGlyf )
- {
- TT_Glyf_GetLocationFunc get_location;
- };
-
-
-#define FT_DEFINE_SERVICE_TTGLYFREC( class_, get_location_ ) \
- static const FT_Service_TTGlyfRec class_ = \
- { \
- get_location_ \
- };
-
- /* */
-
-
-FT_END_HEADER
-
-#endif /* SVTTGLYF_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/services/svwinfnt.h b/ThirdParty/freetype/include/freetype/internal/services/svwinfnt.h
deleted file mode 100644
index 38ee020..0000000
--- a/ThirdParty/freetype/include/freetype/internal/services/svwinfnt.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/****************************************************************************
- *
- * svwinfnt.h
- *
- * The FreeType Windows FNT/FONT service (specification).
- *
- * Copyright (C) 2003-2019 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 SVWINFNT_H_
-#define SVWINFNT_H_
-
-#include FT_INTERNAL_SERVICE_H
-#include FT_WINFONTS_H
-
-
-FT_BEGIN_HEADER
-
-
-#define FT_SERVICE_ID_WINFNT "winfonts"
-
- typedef FT_Error
- (*FT_WinFnt_GetHeaderFunc)( FT_Face face,
- FT_WinFNT_HeaderRec *aheader );
-
-
- FT_DEFINE_SERVICE( WinFnt )
- {
- FT_WinFnt_GetHeaderFunc get_header;
- };
-
- /* */
-
-
-FT_END_HEADER
-
-
-#endif /* SVWINFNT_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/sfnt.h b/ThirdParty/freetype/include/freetype/internal/sfnt.h
deleted file mode 100644
index 225f40d..0000000
--- a/ThirdParty/freetype/include/freetype/internal/sfnt.h
+++ /dev/null
@@ -1,875 +0,0 @@
-/****************************************************************************
- *
- * sfnt.h
- *
- * High-level 'sfnt' driver interface (specification).
- *
- * Copyright (C) 1996-2019 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 SFNT_H_
-#define SFNT_H_
-
-
-#include <ft2build.h>
-#include FT_INTERNAL_DRIVER_H
-#include FT_INTERNAL_TRUETYPE_TYPES_H
-
-
-FT_BEGIN_HEADER
-
-
- /**************************************************************************
- *
- * @functype:
- * TT_Init_Face_Func
- *
- * @description:
- * First part of the SFNT face object initialization. This finds the
- * face in a SFNT file or collection, and load its format tag in
- * face->format_tag.
- *
- * @input:
- * stream ::
- * The input stream.
- *
- * face ::
- * A handle to the target face object.
- *
- * face_index ::
- * The index of the TrueType font, if we are opening a collection, in
- * bits 0-15. The numbered instance index~+~1 of a GX (sub)font, if
- * applicable, in bits 16-30.
- *
- * num_params ::
- * The number of additional parameters.
- *
- * params ::
- * Optional additional parameters.
- *
- * @return:
- * FreeType error code. 0 means success.
- *
- * @note:
- * The stream cursor must be at the font file's origin.
- *
- * This function recognizes fonts embedded in a 'TrueType collection'.
- *
- * Once the format tag has been validated by the font driver, it should
- * then call the TT_Load_Face_Func() callback to read the rest of the
- * SFNT tables in the object.
- */
- typedef FT_Error
- (*TT_Init_Face_Func)( FT_Stream stream,
- TT_Face face,
- FT_Int face_index,
- FT_Int num_params,
- FT_Parameter* params );
-
-
- /**************************************************************************
- *
- * @functype:
- * TT_Load_Face_Func
- *
- * @description:
- * Second part of the SFNT face object initialization. This loads the
- * common SFNT tables (head, OS/2, maxp, metrics, etc.) in the face
- * object.
- *
- * @input:
- * stream ::
- * The input stream.
- *
- * face ::
- * A handle to the target face object.
- *
- * face_index ::
- * The index of the TrueType font, if we are opening a collection, in
- * bits 0-15. The numbered instance index~+~1 of a GX (sub)font, if
- * applicable, in bits 16-30.
- *
- * num_params ::
- * The number of additional parameters.
- *
- * params ::
- * Optional additional parameters.
- *
- * @return:
- * FreeType error code. 0 means success.
- *
- * @note:
- * This function must be called after TT_Init_Face_Func().
- */
- typedef FT_Error
- (*TT_Load_Face_Func)( FT_Stream stream,
- TT_Face face,
- FT_Int face_index,
- FT_Int num_params,
- FT_Parameter* params );
-
-
- /**************************************************************************
- *
- * @functype:
- * TT_Done_Face_Func
- *
- * @description:
- * A callback used to delete the common SFNT data from a face.
- *
- * @input:
- * face ::
- * A handle to the target face object.
- *
- * @note:
- * This function does NOT destroy the face object.
- */
- typedef void
- (*TT_Done_Face_Func)( TT_Face face );
-
-
- /**************************************************************************
- *
- * @functype:
- * TT_Load_Any_Func
- *
- * @description:
- * Load any font table into client memory.
- *
- * @input:
- * face ::
- * The face object to look for.
- *
- * tag ::
- * The tag of table to load. Use the value 0 if you want to access the
- * whole font file, else set this parameter to a valid TrueType table
- * tag that you can forge with the MAKE_TT_TAG macro.
- *
- * offset ::
- * The starting offset in the table (or the file if tag == 0).
- *
- * length ::
- * The address of the decision variable:
- *
- * If `length == NULL`: Loads the whole table. Returns an error if
- * 'offset' == 0!
- *
- * If `*length == 0`: Exits immediately; returning the length of the
- * given table or of the font file, depending on the value of 'tag'.
- *
- * If `*length != 0`: Loads the next 'length' bytes of table or font,
- * starting at offset 'offset' (in table or font too).
- *
- * @output:
- * buffer ::
- * The address of target buffer.
- *
- * @return:
- * TrueType error code. 0 means success.
- */
- typedef FT_Error
- (*TT_Load_Any_Func)( TT_Face face,
- FT_ULong tag,
- FT_Long offset,
- FT_Byte *buffer,
- FT_ULong* length );
-
-
- /**************************************************************************
- *
- * @functype:
- * TT_Find_SBit_Image_Func
- *
- * @description:
- * Check whether an embedded bitmap (an 'sbit') exists for a given glyph,
- * at a given strike.
- *
- * @input:
- * face ::
- * The target face object.
- *
- * glyph_index ::
- * The glyph index.
- *
- * strike_index ::
- * The current strike index.
- *
- * @output:
- * arange ::
- * The SBit range containing the glyph index.
- *
- * astrike ::
- * The SBit strike containing the glyph index.
- *
- * aglyph_offset ::
- * The offset of the glyph data in 'EBDT' table.
- *
- * @return:
- * FreeType error code. 0 means success. Returns
- * SFNT_Err_Invalid_Argument if no sbit exists for the requested glyph.
- */
- typedef FT_Error
- (*TT_Find_SBit_Image_Func)( TT_Face face,
- FT_UInt glyph_index,
- FT_ULong strike_index,
- TT_SBit_Range *arange,
- TT_SBit_Strike *astrike,
- FT_ULong *aglyph_offset );
-
-
- /**************************************************************************
- *
- * @functype:
- * TT_Load_SBit_Metrics_Func
- *
- * @description:
- * Get the big metrics for a given embedded bitmap.
- *
- * @input:
- * stream ::
- * The input stream.
- *
- * range ::
- * The SBit range containing the glyph.
- *
- * @output:
- * big_metrics ::
- * A big SBit metrics structure for the glyph.
- *
- * @return:
- * FreeType error code. 0 means success.
- *
- * @note:
- * The stream cursor must be positioned at the glyph's offset within the
- * 'EBDT' table before the call.
- *
- * If the image format uses variable metrics, the stream cursor is
- * positioned just after the metrics header in the 'EBDT' table on
- * function exit.
- */
- typedef FT_Error
- (*TT_Load_SBit_Metrics_Func)( FT_Stream stream,
- TT_SBit_Range range,
- TT_SBit_Metrics metrics );
-
-
- /**************************************************************************
- *
- * @functype:
- * TT_Load_SBit_Image_Func
- *
- * @description:
- * Load a given glyph sbit image from the font resource. This also
- * returns its metrics.
- *
- * @input:
- * face ::
- * The target face object.
- *
- * strike_index ::
- * The strike index.
- *
- * glyph_index ::
- * The current glyph index.
- *
- * load_flags ::
- * The current load flags.
- *
- * stream ::
- * The input stream.
- *
- * @output:
- * amap ::
- * The target pixmap.
- *
- * ametrics ::
- * A big sbit metrics structure for the glyph image.
- *
- * @return:
- * FreeType error code. 0 means success. Returns an error if no glyph
- * sbit exists for the index.
- *
- * @note:
- * The `map.buffer` field is always freed before the glyph is loaded.
- */
- typedef FT_Error
- (*TT_Load_SBit_Image_Func)( TT_Face face,
- FT_ULong strike_index,
- FT_UInt glyph_index,
- FT_UInt load_flags,
- FT_Stream stream,
- FT_Bitmap *amap,
- TT_SBit_MetricsRec *ametrics );
-
-
- /**************************************************************************
- *
- * @functype:
- * TT_Set_SBit_Strike_Func
- *
- * @description:
- * Select an sbit strike for a given size request.
- *
- * @input:
- * face ::
- * The target face object.
- *
- * req ::
- * The size request.
- *
- * @output:
- * astrike_index ::
- * The index of the sbit strike.
- *
- * @return:
- * FreeType error code. 0 means success. Returns an error if no sbit
- * strike exists for the selected ppem values.
- */
- typedef FT_Error
- (*TT_Set_SBit_Strike_Func)( TT_Face face,
- FT_Size_Request req,
- FT_ULong* astrike_index );
-
-
- /**************************************************************************
- *
- * @functype:
- * TT_Load_Strike_Metrics_Func
- *
- * @description:
- * Load the metrics of a given strike.
- *
- * @input:
- * face ::
- * The target face object.
- *
- * strike_index ::
- * The strike index.
- *
- * @output:
- * metrics ::
- * the metrics of the strike.
- *
- * @return:
- * FreeType error code. 0 means success. Returns an error if no such
- * sbit strike exists.
- */
- typedef FT_Error
- (*TT_Load_Strike_Metrics_Func)( TT_Face face,
- FT_ULong strike_index,
- FT_Size_Metrics* metrics );
-
-
- /**************************************************************************
- *
- * @functype:
- * TT_Get_PS_Name_Func
- *
- * @description:
- * Get the PostScript glyph name of a glyph.
- *
- * @input:
- * idx ::
- * The glyph index.
- *
- * PSname ::
- * The address of a string pointer. Will be `NULL` in case of error,
- * otherwise it is a pointer to the glyph name.
- *
- * You must not modify the returned string!
- *
- * @output:
- * FreeType error code. 0 means success.
- */
- typedef FT_Error
- (*TT_Get_PS_Name_Func)( TT_Face face,
- FT_UInt idx,
- FT_String** PSname );
-
-
- /**************************************************************************
- *
- * @functype:
- * TT_Load_Metrics_Func
- *
- * @description:
- * Load a metrics table, which is a table with a horizontal and a
- * vertical version.
- *
- * @input:
- * face ::
- * A handle to the target face object.
- *
- * stream ::
- * The input stream.
- *
- * vertical ::
- * A boolean flag. If set, load the vertical one.
- *
- * @return:
- * FreeType error code. 0 means success.
- */
- typedef FT_Error
- (*TT_Load_Metrics_Func)( TT_Face face,
- FT_Stream stream,
- FT_Bool vertical );
-
-
- /**************************************************************************
- *
- * @functype:
- * TT_Get_Metrics_Func
- *
- * @description:
- * Load the horizontal or vertical header in a face object.
- *
- * @input:
- * face ::
- * A handle to the target face object.
- *
- * vertical ::
- * A boolean flag. If set, load vertical metrics.
- *
- * gindex ::
- * The glyph index.
- *
- * @output:
- * abearing ::
- * The horizontal (or vertical) bearing. Set to zero in case of error.
- *
- * aadvance ::
- * The horizontal (or vertical) advance. Set to zero in case of error.
- */
- typedef void
- (*TT_Get_Metrics_Func)( TT_Face face,
- FT_Bool vertical,
- FT_UInt gindex,
- FT_Short* abearing,
- FT_UShort* aadvance );
-
-
- /**************************************************************************
- *
- * @functype:
- * TT_Set_Palette_Func
- *
- * @description:
- * Load the colors into `face->palette` for a given palette index.
- *
- * @input:
- * face ::
- * The target face object.
- *
- * idx ::
- * The palette index.
- *
- * @return:
- * FreeType error code. 0 means success.
- */
- typedef FT_Error
- (*TT_Set_Palette_Func)( TT_Face face,
- FT_UInt idx );
-
-
- /**************************************************************************
- *
- * @functype:
- * TT_Get_Colr_Layer_Func
- *
- * @description:
- * Iteratively get the color layer data of a given glyph index.
- *
- * @input:
- * face ::
- * The target face object.
- *
- * base_glyph ::
- * The glyph index the colored glyph layers are associated with.
- *
- * @inout:
- * iterator ::
- * An @FT_LayerIterator object. For the first call you should set
- * `iterator->p` to `NULL`. For all following calls, simply use the
- * same object again.
- *
- * @output:
- * aglyph_index ::
- * The glyph index of the current layer.
- *
- * acolor_index ::
- * The color index into the font face's color palette of the current
- * layer. The value 0xFFFF is special; it doesn't reference a palette
- * entry but indicates that the text foreground color should be used
- * instead (to be set up by the application outside of FreeType).
- *
- * @return:
- * Value~1 if everything is OK. If there are no more layers (or if there
- * are no layers at all), value~0 gets returned. In case of an error,
- * value~0 is returned also.
- */
- typedef FT_Bool
- (*TT_Get_Colr_Layer_Func)( TT_Face face,
- FT_UInt base_glyph,
- FT_UInt *aglyph_index,
- FT_UInt *acolor_index,
- FT_LayerIterator* iterator );
-
-
- /**************************************************************************
- *
- * @functype:
- * TT_Blend_Colr_Func
- *
- * @description:
- * Blend the bitmap in `new_glyph` into `base_glyph` using the color
- * specified by `color_index`. If `color_index` is 0xFFFF, use
- * `face->foreground_color` if `face->have_foreground_color` is set.
- * Otherwise check `face->palette_data.palette_flags`: If present and
- * @FT_PALETTE_FOR_DARK_BACKGROUND is set, use BGRA value 0xFFFFFFFF
- * (white opaque). Otherwise use BGRA value 0x000000FF (black opaque).
- *
- * @input:
- * face ::
- * The target face object.
- *
- * color_index ::
- * Color index from the COLR table.
- *
- * base_glyph ::
- * Slot for bitmap to be merged into. The underlying bitmap may get
- * reallocated.
- *
- * new_glyph ::
- * Slot to be incooperated into `base_glyph`.
- *
- * @return:
- * FreeType error code. 0 means success. Returns an error if
- * color_index is invalid or reallocation fails.
- */
- typedef FT_Error
- (*TT_Blend_Colr_Func)( TT_Face face,
- FT_UInt color_index,
- FT_GlyphSlot base_glyph,
- FT_GlyphSlot new_glyph );
-
-
- /**************************************************************************
- *
- * @functype:
- * TT_Get_Name_Func
- *
- * @description:
- * From the 'name' table, return a given ENGLISH name record in ASCII.
- *
- * @input:
- * face ::
- * A handle to the source face object.
- *
- * nameid ::
- * The name id of the name record to return.
- *
- * @inout:
- * name ::
- * The address of an allocated string pointer. `NULL` if no name is
- * present.
- *
- * @return:
- * FreeType error code. 0 means success.
- */
- typedef FT_Error
- (*TT_Get_Name_Func)( TT_Face face,
- FT_UShort nameid,
- FT_String** name );
-
-
- /**************************************************************************
- *
- * @functype:
- * TT_Get_Name_ID_Func
- *
- * @description:
- * Search whether an ENGLISH version for a given name ID is in the 'name'
- * table.
- *
- * @input:
- * face ::
- * A handle to the source face object.
- *
- * nameid ::
- * The name id of the name record to return.
- *
- * @output:
- * win ::
- * If non-negative, an index into the 'name' table with the
- * corresponding (3,1) or (3,0) Windows entry.
- *
- * apple ::
- * If non-negative, an index into the 'name' table with the
- * corresponding (1,0) Apple entry.
- *
- * @return:
- * 1 if there is either a win or apple entry (or both), 0 otheriwse.
- */
- typedef FT_Bool
- (*TT_Get_Name_ID_Func)( TT_Face face,
- FT_UShort nameid,
- FT_Int *win,
- FT_Int *apple );
-
-
- /**************************************************************************
- *
- * @functype:
- * TT_Load_Table_Func
- *
- * @description:
- * Load a given TrueType table.
- *
- * @input:
- * face ::
- * A handle to the target face object.
- *
- * stream ::
- * The input stream.
- *
- * @return:
- * FreeType error code. 0 means success.
- *
- * @note:
- * The function uses `face->goto_table` to seek the stream to the start
- * of the table, except while loading the font directory.
- */
- typedef FT_Error
- (*TT_Load_Table_Func)( TT_Face face,
- FT_Stream stream );
-
-
- /**************************************************************************
- *
- * @functype:
- * TT_Free_Table_Func
- *
- * @description:
- * Free a given TrueType table.
- *
- * @input:
- * face ::
- * A handle to the target face object.
- */
- typedef void
- (*TT_Free_Table_Func)( TT_Face face );
-
-
- /*
- * @functype:
- * TT_Face_GetKerningFunc
- *
- * @description:
- * Return the horizontal kerning value between two glyphs.
- *
- * @input:
- * face ::
- * A handle to the source face object.
- *
- * left_glyph ::
- * The left glyph index.
- *
- * right_glyph ::
- * The right glyph index.
- *
- * @return:
- * The kerning value in font units.
- */
- typedef FT_Int
- (*TT_Face_GetKerningFunc)( TT_Face face,
- FT_UInt left_glyph,
- FT_UInt right_glyph );
-
-
- /**************************************************************************
- *
- * @struct:
- * SFNT_Interface
- *
- * @description:
- * This structure holds pointers to the functions used to load and free
- * the basic tables that are required in a 'sfnt' font file.
- *
- * @fields:
- * Check the various xxx_Func() descriptions for details.
- */
- typedef struct SFNT_Interface_
- {
- TT_Loader_GotoTableFunc goto_table;
-
- TT_Init_Face_Func init_face;
- TT_Load_Face_Func load_face;
- TT_Done_Face_Func done_face;
- FT_Module_Requester get_interface;
-
- TT_Load_Any_Func load_any;
-
- /* these functions are called by `load_face' but they can also */
- /* be called from external modules, if there is a need to do so */
- TT_Load_Table_Func load_head;
- TT_Load_Metrics_Func load_hhea;
- TT_Load_Table_Func load_cmap;
- TT_Load_Table_Func load_maxp;
- TT_Load_Table_Func load_os2;
- TT_Load_Table_Func load_post;
-
- TT_Load_Table_Func load_name;
- TT_Free_Table_Func free_name;
-
- /* this field was called `load_kerning' up to version 2.1.10 */
- TT_Load_Table_Func load_kern;
-
- TT_Load_Table_Func load_gasp;
- TT_Load_Table_Func load_pclt;
-
- /* see `ttload.h'; this field was called `load_bitmap_header' up to */
- /* version 2.1.10 */
- TT_Load_Table_Func load_bhed;
-
- TT_Load_SBit_Image_Func load_sbit_image;
-
- /* see `ttpost.h' */
- TT_Get_PS_Name_Func get_psname;
- TT_Free_Table_Func free_psnames;
-
- /* starting here, the structure differs from version 2.1.7 */
-
- /* this field was introduced in version 2.1.8, named `get_psname' */
- TT_Face_GetKerningFunc get_kerning;
-
- /* new elements introduced after version 2.1.10 */
-
- /* load the font directory, i.e., the offset table and */
- /* the table directory */
- TT_Load_Table_Func load_font_dir;
- TT_Load_Metrics_Func load_hmtx;
-
- TT_Load_Table_Func load_eblc;
- TT_Free_Table_Func free_eblc;
-
- TT_Set_SBit_Strike_Func set_sbit_strike;
- TT_Load_Strike_Metrics_Func load_strike_metrics;
-
- TT_Load_Table_Func load_cpal;
- TT_Load_Table_Func load_colr;
- TT_Free_Table_Func free_cpal;
- TT_Free_Table_Func free_colr;
- TT_Set_Palette_Func set_palette;
- TT_Get_Colr_Layer_Func get_colr_layer;
- TT_Blend_Colr_Func colr_blend;
-
- TT_Get_Metrics_Func get_metrics;
-
- TT_Get_Name_Func get_name;
- TT_Get_Name_ID_Func get_name_id;
-
- } SFNT_Interface;
-
-
- /* transitional */
- typedef SFNT_Interface* SFNT_Service;
-
-
-#define FT_DEFINE_SFNT_INTERFACE( \
- class_, \
- goto_table_, \
- init_face_, \
- load_face_, \
- done_face_, \
- get_interface_, \
- load_any_, \
- load_head_, \
- load_hhea_, \
- load_cmap_, \
- load_maxp_, \
- load_os2_, \
- load_post_, \
- load_name_, \
- free_name_, \
- load_kern_, \
- load_gasp_, \
- load_pclt_, \
- load_bhed_, \
- load_sbit_image_, \
- get_psname_, \
- free_psnames_, \
- get_kerning_, \
- load_font_dir_, \
- load_hmtx_, \
- load_eblc_, \
- free_eblc_, \
- set_sbit_strike_, \
- load_strike_metrics_, \
- load_cpal_, \
- load_colr_, \
- free_cpal_, \
- free_colr_, \
- set_palette_, \
- get_colr_layer_, \
- colr_blend_, \
- get_metrics_, \
- get_name_, \
- get_name_id_ ) \
- static const SFNT_Interface class_ = \
- { \
- goto_table_, \
- init_face_, \
- load_face_, \
- done_face_, \
- get_interface_, \
- load_any_, \
- load_head_, \
- load_hhea_, \
- load_cmap_, \
- load_maxp_, \
- load_os2_, \
- load_post_, \
- load_name_, \
- free_name_, \
- load_kern_, \
- load_gasp_, \
- load_pclt_, \
- load_bhed_, \
- load_sbit_image_, \
- get_psname_, \
- free_psnames_, \
- get_kerning_, \
- load_font_dir_, \
- load_hmtx_, \
- load_eblc_, \
- free_eblc_, \
- set_sbit_strike_, \
- load_strike_metrics_, \
- load_cpal_, \
- load_colr_, \
- free_cpal_, \
- free_colr_, \
- set_palette_, \
- get_colr_layer_, \
- colr_blend_, \
- get_metrics_, \
- get_name_, \
- get_name_id_ \
- };
-
-
-FT_END_HEADER
-
-#endif /* SFNT_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/t1types.h b/ThirdParty/freetype/include/freetype/internal/t1types.h
deleted file mode 100644
index e197a1a..0000000
--- a/ThirdParty/freetype/include/freetype/internal/t1types.h
+++ /dev/null
@@ -1,260 +0,0 @@
-/****************************************************************************
- *
- * t1types.h
- *
- * Basic Type1/Type2 type definitions and interface (specification
- * only).
- *
- * Copyright (C) 1996-2019 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 T1TYPES_H_
-#define T1TYPES_H_
-
-
-#include <ft2build.h>
-#include FT_TYPE1_TABLES_H
-#include FT_INTERNAL_POSTSCRIPT_HINTS_H
-#include FT_INTERNAL_SERVICE_H
-#include FT_INTERNAL_HASH_H
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
-
-
-FT_BEGIN_HEADER
-
-
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /*** ***/
- /*** ***/
- /*** REQUIRED TYPE1/TYPE2 TABLES DEFINITIONS ***/
- /*** ***/
- /*** ***/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
-
-
- /**************************************************************************
- *
- * @struct:
- * T1_EncodingRec
- *
- * @description:
- * A structure modeling a custom encoding.
- *
- * @fields:
- * num_chars ::
- * The number of character codes in the encoding. Usually 256.
- *
- * code_first ::
- * The lowest valid character code in the encoding.
- *
- * code_last ::
- * The highest valid character code in the encoding + 1. When equal to
- * code_first there are no valid character codes.
- *
- * char_index ::
- * An array of corresponding glyph indices.
- *
- * char_name ::
- * An array of corresponding glyph names.
- */
- typedef struct T1_EncodingRecRec_
- {
- FT_Int num_chars;
- FT_Int code_first;
- FT_Int code_last;
-
- FT_UShort* char_index;
- FT_String** char_name;
-
- } T1_EncodingRec, *T1_Encoding;
-
-
- /* used to hold extra data of PS_FontInfoRec that
- * cannot be stored in the publicly defined structure.
- *
- * Note these can't be blended with multiple-masters.
- */
- typedef struct PS_FontExtraRec_
- {
- FT_UShort fs_type;
-
- } PS_FontExtraRec;
-
-
- typedef struct T1_FontRec_
- {
- PS_FontInfoRec font_info; /* font info dictionary */
- PS_FontExtraRec font_extra; /* font info extra fields */
- PS_PrivateRec private_dict; /* private dictionary */
- FT_String* font_name; /* top-level dictionary */
-
- T1_EncodingType encoding_type;
- T1_EncodingRec encoding;
-
- FT_Byte* subrs_block;
- FT_Byte* charstrings_block;
- FT_Byte* glyph_names_block;
-
- FT_Int num_subrs;
- FT_Byte** subrs;
- FT_UInt* subrs_len;
- FT_Hash subrs_hash;
-
- FT_Int num_glyphs;
- FT_String** glyph_names; /* array of glyph names */
- FT_Byte** charstrings; /* array of glyph charstrings */
- FT_UInt* charstrings_len;
-
- FT_Byte paint_type;
- FT_Byte font_type;
- FT_Matrix font_matrix;
- FT_Vector font_offset;
- FT_BBox font_bbox;
- FT_Long font_id;
-
- FT_Fixed stroke_width;
-
- } T1_FontRec, *T1_Font;
-
-
- typedef struct CID_SubrsRec_
- {
- FT_Int num_subrs;
- FT_Byte** code;
-
- } CID_SubrsRec, *CID_Subrs;
-
-
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /*** ***/
- /*** ***/
- /*** AFM FONT INFORMATION STRUCTURES ***/
- /*** ***/
- /*** ***/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
-
- typedef struct AFM_TrackKernRec_
- {
- FT_Int degree;
- FT_Fixed min_ptsize;
- FT_Fixed min_kern;
- FT_Fixed max_ptsize;
- FT_Fixed max_kern;
-
- } AFM_TrackKernRec, *AFM_TrackKern;
-
- typedef struct AFM_KernPairRec_
- {
- FT_UInt index1;
- FT_UInt index2;
- FT_Int x;
- FT_Int y;
-
- } AFM_KernPairRec, *AFM_KernPair;
-
- typedef struct AFM_FontInfoRec_
- {
- FT_Bool IsCIDFont;
- FT_BBox FontBBox;
- FT_Fixed Ascender;
- FT_Fixed Descender;
- AFM_TrackKern TrackKerns; /* free if non-NULL */
- FT_UInt NumTrackKern;
- AFM_KernPair KernPairs; /* free if non-NULL */
- FT_UInt NumKernPair;
-
- } AFM_FontInfoRec, *AFM_FontInfo;
-
-
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /*** ***/
- /*** ***/
- /*** ORIGINAL T1_FACE CLASS DEFINITION ***/
- /*** ***/
- /*** ***/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
-
-
- typedef struct T1_FaceRec_* T1_Face;
- typedef struct CID_FaceRec_* CID_Face;
-
-
- typedef struct T1_FaceRec_
- {
- FT_FaceRec root;
- T1_FontRec type1;
- const void* psnames;
- const void* psaux;
- const void* afm_data;
- FT_CharMapRec charmaprecs[2];
- FT_CharMap charmaps[2];
-
- /* support for Multiple Masters fonts */
- PS_Blend blend;
-
- /* undocumented, optional: indices of subroutines that express */
- /* the NormalizeDesignVector and the ConvertDesignVector procedure, */
- /* respectively, as Type 2 charstrings; -1 if keywords not present */
- FT_Int ndv_idx;
- FT_Int cdv_idx;
-
- /* undocumented, optional: has the same meaning as len_buildchar */
- /* for Type 2 fonts; manipulated by othersubrs 19, 24, and 25 */
- FT_UInt len_buildchar;
- FT_Long* buildchar;
-
- /* since version 2.1 - interface to PostScript hinter */
- const void* pshinter;
-
- } T1_FaceRec;
-
-
- typedef struct CID_FaceRec_
- {
- FT_FaceRec root;
- void* psnames;
- void* psaux;
- CID_FaceInfoRec cid;
- PS_FontExtraRec font_extra;
-#if 0
- void* afm_data;
-#endif
- CID_Subrs subrs;
-
- /* since version 2.1 - interface to PostScript hinter */
- void* pshinter;
-
- /* since version 2.1.8, but was originally positioned after `afm_data' */
- FT_Byte* binary_data; /* used if hex data has been converted */
- FT_Stream cid_stream;
-
- } CID_FaceRec;
-
-
-FT_END_HEADER
-
-#endif /* T1TYPES_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/internal/tttypes.h b/ThirdParty/freetype/include/freetype/internal/tttypes.h
deleted file mode 100644
index 5e9f40e..0000000
--- a/ThirdParty/freetype/include/freetype/internal/tttypes.h
+++ /dev/null
@@ -1,1854 +0,0 @@
-/****************************************************************************
- *
- * tttypes.h
- *
- * Basic SFNT/TrueType type definitions and interface (specification
- * only).
- *
- * Copyright (C) 1996-2019 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 TTTYPES_H_
-#define TTTYPES_H_
-
-
-#include <ft2build.h>
-#include FT_TRUETYPE_TABLES_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_COLOR_H
-
-#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
-#include FT_MULTIPLE_MASTERS_H
-#endif
-
-
-FT_BEGIN_HEADER
-
-
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /*** ***/
- /*** ***/
- /*** REQUIRED TRUETYPE/OPENTYPE TABLES DEFINITIONS ***/
- /*** ***/
- /*** ***/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
-
-
- /**************************************************************************
- *
- * @struct:
- * TTC_HeaderRec
- *
- * @description:
- * TrueType collection header. This table contains the offsets of the
- * font headers of each distinct TrueType face in the file.
- *
- * @fields:
- * tag ::
- * Must be 'ttc~' to indicate a TrueType collection.
- *
- * version ::
- * The version number.
- *
- * count ::
- * The number of faces in the collection. The specification says this
- * should be an unsigned long, but we use a signed long since we need
- * the value -1 for specific purposes.
- *
- * offsets ::
- * The offsets of the font headers, one per face.
- */
- typedef struct TTC_HeaderRec_
- {
- FT_ULong tag;
- FT_Fixed version;
- FT_Long count;
- FT_ULong* offsets;
-
- } TTC_HeaderRec;
-
-
- /**************************************************************************
- *
- * @struct:
- * SFNT_HeaderRec
- *
- * @description:
- * SFNT file format header.
- *
- * @fields:
- * format_tag ::
- * The font format tag.
- *
- * num_tables ::
- * The number of tables in file.
- *
- * search_range ::
- * Must be '16 * (max power of 2 <= num_tables)'.
- *
- * entry_selector ::
- * Must be log2 of 'search_range / 16'.
- *
- * range_shift ::
- * Must be 'num_tables * 16 - search_range'.
- */
- typedef struct SFNT_HeaderRec_
- {
- FT_ULong format_tag;
- FT_UShort num_tables;
- FT_UShort search_range;
- FT_UShort entry_selector;
- FT_UShort range_shift;
-
- FT_ULong offset; /* not in file */
-
- } SFNT_HeaderRec, *SFNT_Header;
-
-
- /**************************************************************************
- *
- * @struct:
- * TT_TableRec
- *
- * @description:
- * This structure describes a given table of a TrueType font.
- *
- * @fields:
- * Tag ::
- * A four-bytes tag describing the table.
- *
- * CheckSum ::
- * The table checksum. This value can be ignored.
- *
- * Offset ::
- * The offset of the table from the start of the TrueType font in its
- * resource.
- *
- * Length ::
- * The table length (in bytes).
- */
- typedef struct TT_TableRec_
- {
- FT_ULong Tag; /* table type */
- FT_ULong CheckSum; /* table checksum */
- FT_ULong Offset; /* table file offset */
- FT_ULong Length; /* table length */
-
- } TT_TableRec, *TT_Table;
-
-
- /**************************************************************************
- *
- * @struct:
- * WOFF_HeaderRec
- *
- * @description:
- * WOFF file format header.
- *
- * @fields:
- * See
- *
- * https://www.w3.org/TR/WOFF/#WOFFHeader
- */
- typedef struct WOFF_HeaderRec_
- {
- FT_ULong signature;
- FT_ULong flavor;
- FT_ULong length;
- FT_UShort num_tables;
- FT_UShort reserved;
- FT_ULong totalSfntSize;
- FT_UShort majorVersion;
- FT_UShort minorVersion;
- FT_ULong metaOffset;
- FT_ULong metaLength;
- FT_ULong metaOrigLength;
- FT_ULong privOffset;
- FT_ULong privLength;
-
- } WOFF_HeaderRec, *WOFF_Header;
-
-
- /**************************************************************************
- *
- * @struct:
- * WOFF_TableRec
- *
- * @description:
- * This structure describes a given table of a WOFF font.
- *
- * @fields:
- * Tag ::
- * A four-bytes tag describing the table.
- *
- * Offset ::
- * The offset of the table from the start of the WOFF font in its
- * resource.
- *
- * CompLength ::
- * Compressed table length (in bytes).
- *
- * OrigLength ::
- * Uncompressed table length (in bytes).
- *
- * CheckSum ::
- * The table checksum. This value can be ignored.
- *
- * OrigOffset ::
- * The uncompressed table file offset. This value gets computed while
- * constructing the (uncompressed) SFNT header. It is not contained in
- * the WOFF file.
- */
- typedef struct WOFF_TableRec_
- {
- FT_ULong Tag; /* table ID */
- FT_ULong Offset; /* table file offset */
- FT_ULong CompLength; /* compressed table length */
- FT_ULong OrigLength; /* uncompressed table length */
- FT_ULong CheckSum; /* uncompressed checksum */
-
- FT_ULong OrigOffset; /* uncompressed table file offset */
- /* (not in the WOFF file) */
- } WOFF_TableRec, *WOFF_Table;
-
-
- /**************************************************************************
- *
- * @struct:
- * TT_LongMetricsRec
- *
- * @description:
- * A structure modeling the long metrics of the 'hmtx' and 'vmtx'
- * TrueType tables. The values are expressed in font units.
- *
- * @fields:
- * advance ::
- * The advance width or height for the glyph.
- *
- * bearing ::
- * The left-side or top-side bearing for the glyph.
- */
- typedef struct TT_LongMetricsRec_
- {
- FT_UShort advance;
- FT_Short bearing;
-
- } TT_LongMetricsRec, *TT_LongMetrics;
-
-
- /**************************************************************************
- *
- * @type:
- * TT_ShortMetrics
- *
- * @description:
- * A simple type to model the short metrics of the 'hmtx' and 'vmtx'
- * tables.
- */
- typedef FT_Short TT_ShortMetrics;
-
-
- /**************************************************************************
- *
- * @struct:
- * TT_NameRec
- *
- * @description:
- * A structure modeling TrueType name records. Name records are used to
- * store important strings like family name, style name, copyright,
- * etc. in _localized_ versions (i.e., language, encoding, etc).
- *
- * @fields:
- * platformID ::
- * The ID of the name's encoding platform.
- *
- * encodingID ::
- * The platform-specific ID for the name's encoding.
- *
- * languageID ::
- * The platform-specific ID for the name's language.
- *
- * nameID ::
- * The ID specifying what kind of name this is.
- *
- * stringLength ::
- * The length of the string in bytes.
- *
- * stringOffset ::
- * The offset to the string in the 'name' table.
- *
- * string ::
- * A pointer to the string's bytes. Note that these are usually UTF-16
- * encoded characters.
- */
- typedef struct TT_NameRec_
- {
- FT_UShort platformID;
- FT_UShort encodingID;
- FT_UShort languageID;
- FT_UShort nameID;
- FT_UShort stringLength;
- FT_ULong stringOffset;
-
- /* this last field is not defined in the spec */
- /* but used by the FreeType engine */
-
- FT_Byte* string;
-
- } TT_NameRec, *TT_Name;
-
-
- /**************************************************************************
- *
- * @struct:
- * TT_LangTagRec
- *
- * @description:
- * A structure modeling language tag records in SFNT 'name' tables,
- * introduced in OpenType version 1.6.
- *
- * @fields:
- * stringLength ::
- * The length of the string in bytes.
- *
- * stringOffset ::
- * The offset to the string in the 'name' table.
- *
- * string ::
- * A pointer to the string's bytes. Note that these are UTF-16BE
- * encoded characters.
- */
- typedef struct TT_LangTagRec_
- {
- FT_UShort stringLength;
- FT_ULong stringOffset;
-
- /* this last field is not defined in the spec */
- /* but used by the FreeType engine */
-
- FT_Byte* string;
-
- } TT_LangTagRec, *TT_LangTag;
-
-
- /**************************************************************************
- *
- * @struct:
- * TT_NameTableRec
- *
- * @description:
- * A structure modeling the TrueType name table.
- *
- * @fields:
- * format ::
- * The format of the name table.
- *
- * numNameRecords ::
- * The number of names in table.
- *
- * storageOffset ::
- * The offset of the name table in the 'name' TrueType table.
- *
- * names ::
- * An array of name records.
- *
- * numLangTagRecords ::
- * The number of language tags in table.
- *
- * langTags ::
- * An array of language tag records.
- *
- * stream ::
- * The file's input stream.
- */
- typedef struct TT_NameTableRec_
- {
- FT_UShort format;
- FT_UInt numNameRecords;
- FT_UInt storageOffset;
- TT_NameRec* names;
- FT_UInt numLangTagRecords;
- TT_LangTagRec* langTags;
- FT_Stream stream;
-
- } TT_NameTableRec, *TT_NameTable;
-
-
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /*** ***/
- /*** ***/
- /*** OPTIONAL TRUETYPE/OPENTYPE TABLES DEFINITIONS ***/
- /*** ***/
- /*** ***/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
-
-
- /**************************************************************************
- *
- * @struct:
- * TT_GaspRangeRec
- *
- * @description:
- * A tiny structure used to model a gasp range according to the TrueType
- * specification.
- *
- * @fields:
- * maxPPEM ::
- * The maximum ppem value to which `gaspFlag` applies.
- *
- * gaspFlag ::
- * A flag describing the grid-fitting and anti-aliasing modes to be
- * used.
- */
- typedef struct TT_GaspRangeRec_
- {
- FT_UShort maxPPEM;
- FT_UShort gaspFlag;
-
- } TT_GaspRangeRec, *TT_GaspRange;
-
-
-#define TT_GASP_GRIDFIT 0x01
-#define TT_GASP_DOGRAY 0x02
-
-
- /**************************************************************************
- *
- * @struct:
- * TT_GaspRec
- *
- * @description:
- * A structure modeling the TrueType 'gasp' table used to specify
- * grid-fitting and anti-aliasing behaviour.
- *
- * @fields:
- * version ::
- * The version number.
- *
- * numRanges ::
- * The number of gasp ranges in table.
- *
- * gaspRanges ::
- * An array of gasp ranges.
- */
- typedef struct TT_Gasp_
- {
- FT_UShort version;
- FT_UShort numRanges;
- TT_GaspRange gaspRanges;
-
- } TT_GaspRec;
-
-
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /*** ***/
- /*** ***/
- /*** EMBEDDED BITMAPS SUPPORT ***/
- /*** ***/
- /*** ***/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
-
-
- /**************************************************************************
- *
- * @struct:
- * TT_SBit_MetricsRec
- *
- * @description:
- * A structure used to hold the big metrics of a given glyph bitmap in a
- * TrueType or OpenType font. These are usually found in the 'EBDT'
- * (Microsoft) or 'bloc' (Apple) table.
- *
- * @fields:
- * height ::
- * The glyph height in pixels.
- *
- * width ::
- * The glyph width in pixels.
- *
- * horiBearingX ::
- * The horizontal left bearing.
- *
- * horiBearingY ::
- * The horizontal top bearing.
- *
- * horiAdvance ::
- * The horizontal advance.
- *
- * vertBearingX ::
- * The vertical left bearing.
- *
- * vertBearingY ::
- * The vertical top bearing.
- *
- * vertAdvance ::
- * The vertical advance.
- */
- typedef struct TT_SBit_MetricsRec_
- {
- FT_UShort height;
- FT_UShort width;
-
- FT_Short horiBearingX;
- FT_Short horiBearingY;
- FT_UShort horiAdvance;
-
- FT_Short vertBearingX;
- FT_Short vertBearingY;
- FT_UShort vertAdvance;
-
- } TT_SBit_MetricsRec, *TT_SBit_Metrics;
-
-
- /**************************************************************************
- *
- * @struct:
- * TT_SBit_SmallMetricsRec
- *
- * @description:
- * A structure used to hold the small metrics of a given glyph bitmap in
- * a TrueType or OpenType font. These are usually found in the 'EBDT'
- * (Microsoft) or the 'bdat' (Apple) table.
- *
- * @fields:
- * height ::
- * The glyph height in pixels.
- *
- * width ::
- * The glyph width in pixels.
- *
- * bearingX ::
- * The left-side bearing.
- *
- * bearingY ::
- * The top-side bearing.
- *
- * advance ::
- * The advance width or height.
- */
- typedef struct TT_SBit_Small_Metrics_
- {
- FT_Byte height;
- FT_Byte width;
-
- FT_Char bearingX;
- FT_Char bearingY;
- FT_Byte advance;
-
- } TT_SBit_SmallMetricsRec, *TT_SBit_SmallMetrics;
-
-
- /**************************************************************************
- *
- * @struct:
- * TT_SBit_LineMetricsRec
- *
- * @description:
- * A structure used to describe the text line metrics of a given bitmap
- * strike, for either a horizontal or vertical layout.
- *
- * @fields:
- * ascender ::
- * The ascender in pixels.
- *
- * descender ::
- * The descender in pixels.
- *
- * max_width ::
- * The maximum glyph width in pixels.
- *
- * caret_slope_enumerator ::
- * Rise of the caret slope, typically set to 1 for non-italic fonts.
- *
- * caret_slope_denominator ::
- * Rise of the caret slope, typically set to 0 for non-italic fonts.
- *
- * caret_offset ::
- * Offset in pixels to move the caret for proper positioning.
- *
- * min_origin_SB ::
- * Minimum of horiBearingX (resp. vertBearingY).
- * min_advance_SB ::
- * Minimum of
- *
- * horizontal advance - ( horiBearingX + width )
- *
- * resp.
- *
- * vertical advance - ( vertBearingY + height )
- *
- * max_before_BL ::
- * Maximum of horiBearingY (resp. vertBearingY).
- *
- * min_after_BL ::
- * Minimum of
- *
- * horiBearingY - height
- *
- * resp.
- *
- * vertBearingX - width
- *
- * pads ::
- * Unused (to make the size of the record a multiple of 32 bits.
- */
- typedef struct TT_SBit_LineMetricsRec_
- {
- FT_Char ascender;
- FT_Char descender;
- FT_Byte max_width;
- FT_Char caret_slope_numerator;
- FT_Char caret_slope_denominator;
- FT_Char caret_offset;
- FT_Char min_origin_SB;
- FT_Char min_advance_SB;
- FT_Char max_before_BL;
- FT_Char min_after_BL;
- FT_Char pads[2];
-
- } TT_SBit_LineMetricsRec, *TT_SBit_LineMetrics;
-
-
- /**************************************************************************
- *
- * @struct:
- * TT_SBit_RangeRec
- *
- * @description:
- * A TrueType/OpenType subIndexTable as defined in the 'EBLC' (Microsoft)
- * or 'bloc' (Apple) tables.
- *
- * @fields:
- * first_glyph ::
- * The first glyph index in the range.
- *
- * last_glyph ::
- * The last glyph index in the range.
- *
- * index_format ::
- * The format of index table. Valid values are 1 to 5.
- *
- * image_format ::
- * The format of 'EBDT' image data.
- *
- * image_offset ::
- * The offset to image data in 'EBDT'.
- *
- * image_size ::
- * For index formats 2 and 5. This is the size in bytes of each glyph
- * bitmap.
- *
- * big_metrics ::
- * For index formats 2 and 5. This is the big metrics for each glyph
- * bitmap.
- *
- * num_glyphs ::
- * For index formats 4 and 5. This is the number of glyphs in the code
- * array.
- *
- * glyph_offsets ::
- * For index formats 1 and 3.
- *
- * glyph_codes ::
- * For index formats 4 and 5.
- *
- * table_offset ::
- * The offset of the index table in the 'EBLC' table. Only used during
- * strike loading.
- */
- typedef struct TT_SBit_RangeRec_
- {
- FT_UShort first_glyph;
- FT_UShort last_glyph;
-
- FT_UShort index_format;
- FT_UShort image_format;
- FT_ULong image_offset;
-
- FT_ULong image_size;
- TT_SBit_MetricsRec metrics;
- FT_ULong num_glyphs;
-
- FT_ULong* glyph_offsets;
- FT_UShort* glyph_codes;
-
- FT_ULong table_offset;
-
- } TT_SBit_RangeRec, *TT_SBit_Range;
-
-
- /**************************************************************************
- *
- * @struct:
- * TT_SBit_StrikeRec
- *
- * @description:
- * A structure used describe a given bitmap strike in the 'EBLC'
- * (Microsoft) or 'bloc' (Apple) tables.
- *
- * @fields:
- * num_index_ranges ::
- * The number of index ranges.
- *
- * index_ranges ::
- * An array of glyph index ranges.
- *
- * color_ref ::
- * Unused. `color_ref` is put in for future enhancements, but these
- * fields are already in use by other platforms (e.g. Newton). For
- * details, please see
- *
- * https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6bloc.html
- *
- * hori ::
- * The line metrics for horizontal layouts.
- *
- * vert ::
- * The line metrics for vertical layouts.
- *
- * start_glyph ::
- * The lowest glyph index for this strike.
- *
- * end_glyph ::
- * The highest glyph index for this strike.
- *
- * x_ppem ::
- * The number of horizontal pixels per EM.
- *
- * y_ppem ::
- * The number of vertical pixels per EM.
- *
- * bit_depth ::
- * The bit depth. Valid values are 1, 2, 4, and 8.
- *
- * flags ::
- * Is this a vertical or horizontal strike? For details, please see
- *
- * https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6bloc.html
- */
- typedef struct TT_SBit_StrikeRec_
- {
- FT_Int num_ranges;
- TT_SBit_Range sbit_ranges;
- FT_ULong ranges_offset;
-
- FT_ULong color_ref;
-
- TT_SBit_LineMetricsRec hori;
- TT_SBit_LineMetricsRec vert;
-
- FT_UShort start_glyph;
- FT_UShort end_glyph;
-
- FT_Byte x_ppem;
- FT_Byte y_ppem;
-
- FT_Byte bit_depth;
- FT_Char flags;
-
- } TT_SBit_StrikeRec, *TT_SBit_Strike;
-
-
- /**************************************************************************
- *
- * @struct:
- * TT_SBit_ComponentRec
- *
- * @description:
- * A simple structure to describe a compound sbit element.
- *
- * @fields:
- * glyph_code ::
- * The element's glyph index.
- *
- * x_offset ::
- * The element's left bearing.
- *
- * y_offset ::
- * The element's top bearing.
- */
- typedef struct TT_SBit_ComponentRec_
- {
- FT_UShort glyph_code;
- FT_Char x_offset;
- FT_Char y_offset;
-
- } TT_SBit_ComponentRec, *TT_SBit_Component;
-
-
- /**************************************************************************
- *
- * @struct:
- * TT_SBit_ScaleRec
- *
- * @description:
- * A structure used describe a given bitmap scaling table, as defined in
- * the 'EBSC' table.
- *
- * @fields:
- * hori ::
- * The horizontal line metrics.
- *
- * vert ::
- * The vertical line metrics.
- *
- * x_ppem ::
- * The number of horizontal pixels per EM.
- *
- * y_ppem ::
- * The number of vertical pixels per EM.
- *
- * x_ppem_substitute ::
- * Substitution x_ppem value.
- *
- * y_ppem_substitute ::
- * Substitution y_ppem value.
- */
- typedef struct TT_SBit_ScaleRec_
- {
- TT_SBit_LineMetricsRec hori;
- TT_SBit_LineMetricsRec vert;
-
- FT_Byte x_ppem;
- FT_Byte y_ppem;
-
- FT_Byte x_ppem_substitute;
- FT_Byte y_ppem_substitute;
-
- } TT_SBit_ScaleRec, *TT_SBit_Scale;
-
-
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /*** ***/
- /*** ***/
- /*** POSTSCRIPT GLYPH NAMES SUPPORT ***/
- /*** ***/
- /*** ***/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
-
-
- /**************************************************************************
- *
- * @struct:
- * TT_Post_20Rec
- *
- * @description:
- * Postscript names sub-table, format 2.0. Stores the PS name of each
- * glyph in the font face.
- *
- * @fields:
- * num_glyphs ::
- * The number of named glyphs in the table.
- *
- * num_names ::
- * The number of PS names stored in the table.
- *
- * glyph_indices ::
- * The indices of the glyphs in the names arrays.
- *
- * glyph_names ::
- * The PS names not in Mac Encoding.
- */
- typedef struct TT_Post_20Rec_
- {
- FT_UShort num_glyphs;
- FT_UShort num_names;
- FT_UShort* glyph_indices;
- FT_Char** glyph_names;
-
- } TT_Post_20Rec, *TT_Post_20;
-
-
- /**************************************************************************
- *
- * @struct:
- * TT_Post_25Rec
- *
- * @description:
- * Postscript names sub-table, format 2.5. Stores the PS name of each
- * glyph in the font face.
- *
- * @fields:
- * num_glyphs ::
- * The number of glyphs in the table.
- *
- * offsets ::
- * An array of signed offsets in a normal Mac Postscript name encoding.
- */
- typedef struct TT_Post_25_
- {
- FT_UShort num_glyphs;
- FT_Char* offsets;
-
- } TT_Post_25Rec, *TT_Post_25;
-
-
- /**************************************************************************
- *
- * @struct:
- * TT_Post_NamesRec
- *
- * @description:
- * Postscript names table, either format 2.0 or 2.5.
- *
- * @fields:
- * loaded ::
- * A flag to indicate whether the PS names are loaded.
- *
- * format_20 ::
- * The sub-table used for format 2.0.
- *
- * format_25 ::
- * The sub-table used for format 2.5.
- */
- typedef struct TT_Post_NamesRec_
- {
- FT_Bool loaded;
-
- union
- {
- TT_Post_20Rec format_20;
- TT_Post_25Rec format_25;
-
- } names;
-
- } TT_Post_NamesRec, *TT_Post_Names;
-
-
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /*** ***/
- /*** ***/
- /*** GX VARIATION TABLE SUPPORT ***/
- /*** ***/
- /*** ***/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
-
-
-#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
- typedef struct GX_BlendRec_ *GX_Blend;
-#endif
-
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /*** ***/
- /*** ***/
- /*** EMBEDDED BDF PROPERTIES TABLE SUPPORT ***/
- /*** ***/
- /*** ***/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
-
- /*
- * These types are used to support a `BDF ' table that isn't part of the
- * official TrueType specification. It is mainly used in SFNT-based bitmap
- * fonts that were generated from a set of BDF fonts.
- *
- * The format of the table is as follows.
- *
- * USHORT version `BDF ' table version number, should be 0x0001. USHORT
- * strikeCount Number of strikes (bitmap sizes) in this table. ULONG
- * stringTable Offset (from start of BDF table) to string
- * table.
- *
- * This is followed by an array of `strikeCount' descriptors, having the
- * following format.
- *
- * USHORT ppem Vertical pixels per EM for this strike. USHORT numItems
- * Number of items for this strike (properties and
- * atoms). Maximum is 255.
- *
- * This array in turn is followed by `strikeCount' value sets. Each `value
- * set' is an array of `numItems' items with the following format.
- *
- * ULONG item_name Offset in string table to item name.
- * USHORT item_type The item type. Possible values are
- * 0 => string (e.g., COMMENT)
- * 1 => atom (e.g., FONT or even SIZE)
- * 2 => int32
- * 3 => uint32
- * 0x10 => A flag to indicate a properties. This
- * is ORed with the above values.
- * ULONG item_value For strings => Offset into string table without
- * the corresponding double quotes.
- * For atoms => Offset into string table.
- * For integers => Direct value.
- *
- * All strings in the string table consist of bytes and are
- * zero-terminated.
- *
- */
-
-#ifdef TT_CONFIG_OPTION_BDF
-
- typedef struct TT_BDFRec_
- {
- FT_Byte* table;
- FT_Byte* table_end;
- FT_Byte* strings;
- FT_ULong strings_size;
- FT_UInt num_strikes;
- FT_Bool loaded;
-
- } TT_BDFRec, *TT_BDF;
-
-#endif /* TT_CONFIG_OPTION_BDF */
-
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /*** ***/
- /*** ***/
- /*** ORIGINAL TT_FACE CLASS DEFINITION ***/
- /*** ***/
- /*** ***/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
-
-
- /**************************************************************************
- *
- * This structure/class is defined here because it is common to the
- * following formats: TTF, OpenType-TT, and OpenType-CFF.
- *
- * Note, however, that the classes TT_Size and TT_GlyphSlot are not shared
- * between font drivers, and are thus defined in `ttobjs.h`.
- *
- */
-
-
- /**************************************************************************
- *
- * @type:
- * TT_Face
- *
- * @description:
- * A handle to a TrueType face/font object. A TT_Face encapsulates the
- * resolution and scaling independent parts of a TrueType font resource.
- *
- * @note:
- * The TT_Face structure is also used as a 'parent class' for the
- * OpenType-CFF class (T2_Face).
- */
- typedef struct TT_FaceRec_* TT_Face;
-
-
- /* a function type used for the truetype bytecode interpreter hooks */
- typedef FT_Error
- (*TT_Interpreter)( void* exec_context );
-
- /* forward declaration */
- typedef struct TT_LoaderRec_* TT_Loader;
-
-
- /**************************************************************************
- *
- * @functype:
- * TT_Loader_GotoTableFunc
- *
- * @description:
- * Seeks a stream to the start of a given TrueType table.
- *
- * @input:
- * face ::
- * A handle to the target face object.
- *
- * tag ::
- * A 4-byte tag used to name the table.
- *
- * stream ::
- * The input stream.
- *
- * @output:
- * length ::
- * The length of the table in bytes. Set to 0 if not needed.
- *
- * @return:
- * FreeType error code. 0 means success.
- *
- * @note:
- * The stream cursor must be at the font file's origin.
- */
- typedef FT_Error
- (*TT_Loader_GotoTableFunc)( TT_Face face,
- FT_ULong tag,
- FT_Stream stream,
- FT_ULong* length );
-
-
- /**************************************************************************
- *
- * @functype:
- * TT_Loader_StartGlyphFunc
- *
- * @description:
- * Seeks a stream to the start of a given glyph element, and opens a
- * frame for it.
- *
- * @input:
- * loader ::
- * The current TrueType glyph loader object.
- *
- * glyph index :: The index of the glyph to access.
- *
- * offset ::
- * The offset of the glyph according to the 'locations' table.
- *
- * byte_count ::
- * The size of the frame in bytes.
- *
- * @return:
- * FreeType error code. 0 means success.
- *
- * @note:
- * This function is normally equivalent to FT_STREAM_SEEK(offset)
- * followed by FT_FRAME_ENTER(byte_count) with the loader's stream, but
- * alternative formats (e.g. compressed ones) might use something
- * different.
- */
- typedef FT_Error
- (*TT_Loader_StartGlyphFunc)( TT_Loader loader,
- FT_UInt glyph_index,
- FT_ULong offset,
- FT_UInt byte_count );
-
-
- /**************************************************************************
- *
- * @functype:
- * TT_Loader_ReadGlyphFunc
- *
- * @description:
- * Reads one glyph element (its header, a simple glyph, or a composite)
- * from the loader's current stream frame.
- *
- * @input:
- * loader ::
- * The current TrueType glyph loader object.
- *
- * @return:
- * FreeType error code. 0 means success.
- */
- typedef FT_Error
- (*TT_Loader_ReadGlyphFunc)( TT_Loader loader );
-
-
- /**************************************************************************
- *
- * @functype:
- * TT_Loader_EndGlyphFunc
- *
- * @description:
- * Closes the current loader stream frame for the glyph.
- *
- * @input:
- * loader ::
- * The current TrueType glyph loader object.
- */
- typedef void
- (*TT_Loader_EndGlyphFunc)( TT_Loader loader );
-
-
- typedef enum TT_SbitTableType_
- {
- TT_SBIT_TABLE_TYPE_NONE = 0,
- TT_SBIT_TABLE_TYPE_EBLC, /* `EBLC' (Microsoft), */
- /* `bloc' (Apple) */
- TT_SBIT_TABLE_TYPE_CBLC, /* `CBLC' (Google) */
- TT_SBIT_TABLE_TYPE_SBIX, /* `sbix' (Apple) */
-
- /* do not remove */
- TT_SBIT_TABLE_TYPE_MAX
-
- } TT_SbitTableType;
-
-
- /* OpenType 1.8 brings new tables for variation font support; */
- /* to make the old MM and GX fonts still work we need to check */
- /* the presence (and validity) of the functionality provided */
- /* by those tables. The following flag macros are for the */
- /* field `variation_support'. */
- /* */
- /* Note that `fvar' gets checked immediately at font loading, */
- /* while the other features are only loaded if MM support is */
- /* actually requested. */
-
- /* FVAR */
-#define TT_FACE_FLAG_VAR_FVAR ( 1 << 0 )
-
- /* HVAR */
-#define TT_FACE_FLAG_VAR_HADVANCE ( 1 << 1 )
-#define TT_FACE_FLAG_VAR_LSB ( 1 << 2 )
-#define TT_FACE_FLAG_VAR_RSB ( 1 << 3 )
-
- /* VVAR */
-#define TT_FACE_FLAG_VAR_VADVANCE ( 1 << 4 )
-#define TT_FACE_FLAG_VAR_TSB ( 1 << 5 )
-#define TT_FACE_FLAG_VAR_BSB ( 1 << 6 )
-#define TT_FACE_FLAG_VAR_VORG ( 1 << 7 )
-
- /* MVAR */
-#define TT_FACE_FLAG_VAR_MVAR ( 1 << 8 )
-
-
- /**************************************************************************
- *
- * TrueType Face Type
- *
- * @struct:
- * TT_Face
- *
- * @description:
- * The TrueType face class. These objects model the resolution and
- * point-size independent data found in a TrueType font file.
- *
- * @fields:
- * root ::
- * The base FT_Face structure, managed by the base layer.
- *
- * ttc_header ::
- * The TrueType collection header, used when the file is a 'ttc' rather
- * than a 'ttf'. For ordinary font files, the field `ttc_header.count`
- * is set to 0.
- *
- * format_tag ::
- * The font format tag.
- *
- * num_tables ::
- * The number of TrueType tables in this font file.
- *
- * dir_tables ::
- * The directory of TrueType tables for this font file.
- *
- * header ::
- * The font's font header ('head' table). Read on font opening.
- *
- * horizontal ::
- * The font's horizontal header ('hhea' table). This field also
- * contains the associated horizontal metrics table ('hmtx').
- *
- * max_profile ::
- * The font's maximum profile table. Read on font opening. Note that
- * some maximum values cannot be taken directly from this table. We
- * thus define additional fields below to hold the computed maxima.
- *
- * vertical_info ::
- * A boolean which is set when the font file contains vertical metrics.
- * If not, the value of the 'vertical' field is undefined.
- *
- * vertical ::
- * The font's vertical header ('vhea' table). This field also contains
- * the associated vertical metrics table ('vmtx'), if found.
- * IMPORTANT: The contents of this field is undefined if the
- * `vertical_info` field is unset.
- *
- * num_names ::
- * The number of name records within this TrueType font.
- *
- * name_table ::
- * The table of name records ('name').
- *
- * os2 ::
- * The font's OS/2 table ('OS/2').
- *
- * postscript ::
- * The font's PostScript table ('post' table). The PostScript glyph
- * names are not loaded by the driver on face opening. See the
- * 'ttpost' module for more details.
- *
- * cmap_table ::
- * Address of the face's 'cmap' SFNT table in memory (it's an extracted
- * frame).
- *
- * cmap_size ::
- * The size in bytes of the `cmap_table` described above.
- *
- * goto_table ::
- * A function called by each TrueType table loader to position a
- * stream's cursor to the start of a given table according to its tag.
- * It defaults to TT_Goto_Face but can be different for strange formats
- * (e.g. Type 42).
- *
- * access_glyph_frame ::
- * A function used to access the frame of a given glyph within the
- * face's font file.
- *
- * forget_glyph_frame ::
- * A function used to forget the frame of a given glyph when all data
- * has been loaded.
- *
- * read_glyph_header ::
- * A function used to read a glyph header. It must be called between
- * an 'access' and 'forget'.
- *
- * read_simple_glyph ::
- * A function used to read a simple glyph. It must be called after the
- * header was read, and before the 'forget'.
- *
- * read_composite_glyph ::
- * A function used to read a composite glyph. It must be called after
- * the header was read, and before the 'forget'.
- *
- * sfnt ::
- * A pointer to the SFNT service.
- *
- * psnames ::
- * A pointer to the PostScript names service.
- *
- * mm ::
- * A pointer to the Multiple Masters service.
- *
- * var ::
- * A pointer to the Metrics Variations service.
- *
- * hdmx ::
- * The face's horizontal device metrics ('hdmx' table). This table is
- * optional in TrueType/OpenType fonts.
- *
- * gasp ::
- * The grid-fitting and scaling properties table ('gasp'). This table
- * is optional in TrueType/OpenType fonts.
- *
- * pclt ::
- * The 'pclt' SFNT table.
- *
- * num_sbit_scales ::
- * The number of sbit scales for this font.
- *
- * sbit_scales ::
- * Array of sbit scales embedded in this font. This table is optional
- * in a TrueType/OpenType font.
- *
- * postscript_names ::
- * A table used to store the Postscript names of the glyphs for this
- * font. See the file `ttconfig.h` for comments on the
- * TT_CONFIG_OPTION_POSTSCRIPT_NAMES option.
- *
- * palette_data ::
- * Some fields from the 'CPAL' table that are directly indexed.
- *
- * palette_index ::
- * The current palette index, as set by @FT_Palette_Select.
- *
- * palette ::
- * An array containing the current palette's colors.
- *
- * have_foreground_color ::
- * There was a call to @FT_Palette_Set_Foreground_Color.
- *
- * foreground_color ::
- * The current foreground color corresponding to 'CPAL' color index
- * 0xFFFF. Only valid if `have_foreground_color` is set.
- *
- * font_program_size ::
- * Size in bytecodes of the face's font program. 0 if none defined.
- * Ignored for Type 2 fonts.
- *
- * font_program ::
- * The face's font program (bytecode stream) executed at load time,
- * also used during glyph rendering. Comes from the 'fpgm' table.
- * Ignored for Type 2 font fonts.
- *
- * cvt_program_size ::
- * The size in bytecodes of the face's cvt program. Ignored for Type 2
- * fonts.
- *
- * cvt_program ::
- * The face's cvt program (bytecode stream) executed each time an
- * instance/size is changed/reset. Comes from the 'prep' table.
- * Ignored for Type 2 fonts.
- *
- * cvt_size ::
- * Size of the control value table (in entries). Ignored for Type 2
- * fonts.
- *
- * cvt ::
- * The face's original control value table. Coordinates are expressed
- * in unscaled font units. Comes from the 'cvt~' table. Ignored for
- * Type 2 fonts.
- *
- * interpreter ::
- * A pointer to the TrueType bytecode interpreters field is also used
- * to hook the debugger in 'ttdebug'.
- *
- * extra ::
- * Reserved for third-party font drivers.
- *
- * postscript_name ::
- * The PS name of the font. Used by the postscript name service.
- *
- * glyf_len ::
- * The length of the 'glyf' table. Needed for malformed 'loca' tables.
- *
- * glyf_offset ::
- * The file offset of the 'glyf' table.
- *
- * is_cff2 ::
- * Set if the font format is CFF2.
- *
- * doblend ::
- * A boolean which is set if the font should be blended (this is for GX
- * var).
- *
- * blend ::
- * Contains the data needed to control GX variation tables (rather like
- * Multiple Master data).
- *
- * variation_support ::
- * Flags that indicate which OpenType functionality related to font
- * variation support is present, valid, and usable. For example,
- * TT_FACE_FLAG_VAR_FVAR is only set if we have at least one design
- * axis.
- *
- * var_postscript_prefix ::
- * The PostScript name prefix needed for constructing a variation font
- * instance's PS name .
- *
- * var_postscript_prefix_len ::
- * The length of the `var_postscript_prefix` string.
- *
- * horz_metrics_size ::
- * The size of the 'hmtx' table.
- *
- * vert_metrics_size ::
- * The size of the 'vmtx' table.
- *
- * num_locations ::
- * The number of glyph locations in this TrueType file. This should be
- * identical to the number of glyphs. Ignored for Type 2 fonts.
- *
- * glyph_locations ::
- * An array of longs. These are offsets to glyph data within the
- * 'glyf' table. Ignored for Type 2 font faces.
- *
- * hdmx_table ::
- * A pointer to the 'hdmx' table.
- *
- * hdmx_table_size ::
- * The size of the 'hdmx' table.
- *
- * hdmx_record_count ::
- * The number of hdmx records.
- *
- * hdmx_record_size ::
- * The size of a single hdmx record.
- *
- * hdmx_record_sizes ::
- * An array holding the ppem sizes available in the 'hdmx' table.
- *
- * sbit_table ::
- * A pointer to the font's embedded bitmap location table.
- *
- * sbit_table_size ::
- * The size of `sbit_table`.
- *
- * sbit_table_type ::
- * The sbit table type (CBLC, sbix, etc.).
- *
- * sbit_num_strikes ::
- * The number of sbit strikes exposed by FreeType's API, omitting
- * invalid strikes.
- *
- * sbit_strike_map ::
- * A mapping between the strike indices exposed by the API and the
- * indices used in the font's sbit table.
- *
- * cpal ::
- * A pointer to data related to the 'CPAL' table. `NULL` if the table
- * is not available.
- *
- * colr ::
- * A pointer to data related to the 'COLR' table. `NULL` if the table
- * is not available.
- *
- * kern_table ::
- * A pointer to the 'kern' table.
- *
- * kern_table_size ::
- * The size of the 'kern' table.
- *
- * num_kern_tables ::
- * The number of supported kern subtables (up to 32; FreeType
- * recognizes only horizontal ones with format 0).
- *
- * kern_avail_bits ::
- * The availability status of kern subtables; if bit n is set, table n
- * is available.
- *
- * kern_order_bits ::
- * The sortedness status of kern subtables; if bit n is set, table n is
- * sorted.
- *
- * bdf ::
- * Data related to an SFNT font's 'bdf' table; see `tttypes.h`.
- *
- * horz_metrics_offset ::
- * The file offset of the 'hmtx' table.
- *
- * vert_metrics_offset ::
- * The file offset of the 'vmtx' table.
- *
- * sph_found_func_flags ::
- * Flags identifying special bytecode functions (used by the v38
- * implementation of the bytecode interpreter).
- *
- * sph_compatibility_mode ::
- * This flag is set if we are in ClearType backward compatibility mode
- * (used by the v38 implementation of the bytecode interpreter).
- *
- * ebdt_start ::
- * The file offset of the sbit data table (CBDT, bdat, etc.).
- *
- * ebdt_size ::
- * The size of the sbit data table.
- */
- typedef struct TT_FaceRec_
- {
- FT_FaceRec root;
-
- TTC_HeaderRec ttc_header;
-
- FT_ULong format_tag;
- FT_UShort num_tables;
- TT_Table dir_tables;
-
- TT_Header header; /* TrueType header table */
- TT_HoriHeader horizontal; /* TrueType horizontal header */
-
- TT_MaxProfile max_profile;
-
- FT_Bool vertical_info;
- TT_VertHeader vertical; /* TT Vertical header, if present */
-
- FT_UShort num_names; /* number of name records */
- TT_NameTableRec name_table; /* name table */
-
- TT_OS2 os2; /* TrueType OS/2 table */
- TT_Postscript postscript; /* TrueType Postscript table */
-
- FT_Byte* cmap_table; /* extracted `cmap' table */
- FT_ULong cmap_size;
-
- TT_Loader_GotoTableFunc goto_table;
-
- TT_Loader_StartGlyphFunc access_glyph_frame;
- TT_Loader_EndGlyphFunc forget_glyph_frame;
- TT_Loader_ReadGlyphFunc read_glyph_header;
- TT_Loader_ReadGlyphFunc read_simple_glyph;
- TT_Loader_ReadGlyphFunc read_composite_glyph;
-
- /* a typeless pointer to the SFNT_Interface table used to load */
- /* the basic TrueType tables in the face object */
- void* sfnt;
-
- /* a typeless pointer to the FT_Service_PsCMapsRec table used to */
- /* handle glyph names <-> unicode & Mac values */
- void* psnames;
-
-#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
- /* a typeless pointer to the FT_Service_MultiMasters table used to */
- /* handle variation fonts */
- void* mm;
-
- /* a typeless pointer to the FT_Service_MetricsVariationsRec table */
- /* used to handle the HVAR, VVAR, and MVAR OpenType tables */
- void* var;
-#endif
-
- /* a typeless pointer to the PostScript Aux service */
- void* psaux;
-
-
- /************************************************************************
- *
- * Optional TrueType/OpenType tables
- *
- */
-
- /* grid-fitting and scaling table */
- TT_GaspRec gasp; /* the `gasp' table */
-
- /* PCL 5 table */
- TT_PCLT pclt;
-
- /* embedded bitmaps support */
- FT_ULong num_sbit_scales;
- TT_SBit_Scale sbit_scales;
-
- /* postscript names table */
- TT_Post_NamesRec postscript_names;
-
- /* glyph colors */
- FT_Palette_Data palette_data; /* since 2.10 */
- FT_UShort palette_index;
- FT_Color* palette;
- FT_Bool have_foreground_color;
- FT_Color foreground_color;
-
-
- /************************************************************************
- *
- * TrueType-specific fields (ignored by the CFF driver)
- *
- */
-
- /* the font program, if any */
- FT_ULong font_program_size;
- FT_Byte* font_program;
-
- /* the cvt program, if any */
- FT_ULong cvt_program_size;
- FT_Byte* cvt_program;
-
- /* the original, unscaled, control value table */
- FT_ULong cvt_size;
- FT_Short* cvt;
-
- /* A pointer to the bytecode interpreter to use. This is also */
- /* used to hook the debugger for the `ttdebug' utility. */
- TT_Interpreter interpreter;
-
-
- /************************************************************************
- *
- * Other tables or fields. This is used by derivative formats like
- * OpenType.
- *
- */
-
- FT_Generic extra;
-
- const char* postscript_name;
-
- FT_ULong glyf_len;
- FT_ULong glyf_offset; /* since 2.7.1 */
-
- FT_Bool is_cff2; /* since 2.7.1 */
-
-#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
- FT_Bool doblend;
- GX_Blend blend;
-
- FT_UInt32 variation_support; /* since 2.7.1 */
-
- const char* var_postscript_prefix; /* since 2.7.2 */
- FT_UInt var_postscript_prefix_len; /* since 2.7.2 */
-
-#endif
-
- /* since version 2.2 */
-
- FT_ULong horz_metrics_size;
- FT_ULong vert_metrics_size;
-
- FT_ULong num_locations; /* in broken TTF, gid > 0xFFFF */
- FT_Byte* glyph_locations;
-
- FT_Byte* hdmx_table;
- FT_ULong hdmx_table_size;
- FT_UInt hdmx_record_count;
- FT_ULong hdmx_record_size;
- FT_Byte* hdmx_record_sizes;
-
- FT_Byte* sbit_table;
- FT_ULong sbit_table_size;
- TT_SbitTableType sbit_table_type;
- FT_UInt sbit_num_strikes;
- FT_UInt* sbit_strike_map;
-
- FT_Byte* kern_table;
- FT_ULong kern_table_size;
- FT_UInt num_kern_tables;
- FT_UInt32 kern_avail_bits;
- FT_UInt32 kern_order_bits;
-
-#ifdef TT_CONFIG_OPTION_BDF
- TT_BDFRec bdf;
-#endif /* TT_CONFIG_OPTION_BDF */
-
- /* since 2.3.0 */
- FT_ULong horz_metrics_offset;
- FT_ULong vert_metrics_offset;
-
-#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
- /* since 2.4.12 */
- FT_ULong sph_found_func_flags; /* special functions found */
- /* for this face */
- FT_Bool sph_compatibility_mode;
-#endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
-
-#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
- /* since 2.7 */
- FT_ULong ebdt_start; /* either `CBDT', `EBDT', or `bdat' */
- FT_ULong ebdt_size;
-#endif
-
- /* since 2.10 */
- void* cpal;
- void* colr;
-
- } TT_FaceRec;
-
-
- /**************************************************************************
- *
- * @struct:
- * TT_GlyphZoneRec
- *
- * @description:
- * A glyph zone is used to load, scale and hint glyph outline
- * coordinates.
- *
- * @fields:
- * memory ::
- * A handle to the memory manager.
- *
- * max_points ::
- * The maximum size in points of the zone.
- *
- * max_contours ::
- * Max size in links contours of the zone.
- *
- * n_points ::
- * The current number of points in the zone.
- *
- * n_contours ::
- * The current number of contours in the zone.
- *
- * org ::
- * The original glyph coordinates (font units/scaled).
- *
- * cur ::
- * The current glyph coordinates (scaled/hinted).
- *
- * tags ::
- * The point control tags.
- *
- * contours ::
- * The contours end points.
- *
- * first_point ::
- * Offset of the current subglyph's first point.
- */
- typedef struct TT_GlyphZoneRec_
- {
- FT_Memory memory;
- FT_UShort max_points;
- FT_Short max_contours;
- FT_UShort n_points; /* number of points in zone */
- FT_Short n_contours; /* number of contours */
-
- FT_Vector* org; /* original point coordinates */
- FT_Vector* cur; /* current point coordinates */
- FT_Vector* orus; /* original (unscaled) point coordinates */
-
- FT_Byte* tags; /* current touch flags */
- FT_UShort* contours; /* contour end points */
-
- FT_UShort first_point; /* offset of first (#0) point */
-
- } TT_GlyphZoneRec, *TT_GlyphZone;
-
-
- /* handle to execution context */
- typedef struct TT_ExecContextRec_* TT_ExecContext;
-
-
- /**************************************************************************
- *
- * @type:
- * TT_Size
- *
- * @description:
- * A handle to a TrueType size object.
- */
- typedef struct TT_SizeRec_* TT_Size;
-
-
- /* glyph loader structure */
- typedef struct TT_LoaderRec_
- {
- TT_Face face;
- TT_Size size;
- FT_GlyphSlot glyph;
- FT_GlyphLoader gloader;
-
- FT_ULong load_flags;
- FT_UInt glyph_index;
-
- FT_Stream stream;
- FT_Int byte_len;
-
- FT_Short n_contours;
- FT_BBox bbox;
- FT_Int left_bearing;
- FT_Int advance;
- FT_Int linear;
- FT_Bool linear_def;
- FT_Vector pp1;
- FT_Vector pp2;
-
- /* the zone where we load our glyphs */
- TT_GlyphZoneRec base;
- TT_GlyphZoneRec zone;
-
- TT_ExecContext exec;
- FT_Byte* instructions;
- FT_ULong ins_pos;
-
- /* for possible extensibility in other formats */
- void* other;
-
- /* since version 2.1.8 */
- FT_Int top_bearing;
- FT_Int vadvance;
- FT_Vector pp3;
- FT_Vector pp4;
-
- /* since version 2.2.1 */
- FT_Byte* cursor;
- FT_Byte* limit;
-
- /* since version 2.6.2 */
- FT_ListRec composites;
-
- } TT_LoaderRec;
-
-
-FT_END_HEADER
-
-#endif /* TTTYPES_H_ */
-
-
-/* END */
diff --git a/ThirdParty/freetype/include/freetype/t1tables.h b/ThirdParty/freetype/include/freetype/t1tables.h
index 645e645..546ec1c 100644
--- a/ThirdParty/freetype/include/freetype/t1tables.h
+++ b/ThirdParty/freetype/include/freetype/t1tables.h
@@ -5,7 +5,7 @@
* Basic Type 1/Type 2 tables definitions and interface (specification
* only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -21,8 +21,7 @@
#define T1TABLES_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
diff --git a/ThirdParty/freetype/include/freetype/ttnameid.h b/ThirdParty/freetype/include/freetype/ttnameid.h
index cc677de..72f9f76 100644
--- a/ThirdParty/freetype/include/freetype/ttnameid.h
+++ b/ThirdParty/freetype/include/freetype/ttnameid.h
@@ -4,7 +4,7 @@
*
* TrueType name ID definitions (specification only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -20,7 +20,6 @@
#define TTNAMEID_H_
-#include <ft2build.h>
FT_BEGIN_HEADER
diff --git a/ThirdParty/freetype/include/freetype/tttables.h b/ThirdParty/freetype/include/freetype/tttables.h
index d04f810..c33d990 100644
--- a/ThirdParty/freetype/include/freetype/tttables.h
+++ b/ThirdParty/freetype/include/freetype/tttables.h
@@ -5,7 +5,7 @@
* Basic SFNT/TrueType tables definitions and interface
* (specification only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -21,8 +21,7 @@
#define TTTABLES_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
diff --git a/ThirdParty/freetype/include/freetype/tttags.h b/ThirdParty/freetype/include/freetype/tttags.h
index bd0986e..47ccc6d 100644
--- a/ThirdParty/freetype/include/freetype/tttags.h
+++ b/ThirdParty/freetype/include/freetype/tttags.h
@@ -4,7 +4,7 @@
*
* Tags for TrueType and OpenType tables (specification only).
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -20,8 +20,7 @@
#define TTAGS_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
@@ -107,6 +106,7 @@ FT_BEGIN_HEADER
#define TTAG_vmtx FT_MAKE_TAG( 'v', 'm', 't', 'x' )
#define TTAG_VVAR FT_MAKE_TAG( 'V', 'V', 'A', 'R' )
#define TTAG_wOFF FT_MAKE_TAG( 'w', 'O', 'F', 'F' )
+#define TTAG_wOF2 FT_MAKE_TAG( 'w', 'O', 'F', '2' )
/* used by "Keyboard.dfont" on legacy Mac OS X */
#define TTAG_0xA5kbd FT_MAKE_TAG( 0xA5, 'k', 'b', 'd' )
diff --git a/ThirdParty/freetype/include/ft2build.h b/ThirdParty/freetype/include/ft2build.h
index e3f4887..62686b1 100644
--- a/ThirdParty/freetype/include/ft2build.h
+++ b/ThirdParty/freetype/include/ft2build.h
@@ -4,7 +4,7 @@
*
* FreeType 2 build and setup macros.
*
- * Copyright (C) 1996-2019 by
+ * Copyright (C) 1996-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -18,16 +18,14 @@
/**************************************************************************
*
- * This is the 'entry point' for FreeType header file inclusions. It is
- * the only header file which should be included directly; all other
- * FreeType header files should be accessed with macro names (after
- * including `ft2build.h`).
+ * This is the 'entry point' for FreeType header file inclusions, to be
+ * loaded before all other header files.
*
* A typical example is
*
* ```
* #include <ft2build.h>
- * #include FT_FREETYPE_H
+ * #include <freetype/freetype.h>
* ```
*
*/