update freetype to 2.10.4

This commit is contained in:
alexey.lysiuk 2020-10-22 09:41:01 +03:00
parent f7c205bc5d
commit ee51ecd18f
53 changed files with 724 additions and 864 deletions

View file

@ -1,11 +1,11 @@
/* ftconfig.h. Generated from ftconfig.in by configure. */
/* ftconfig.h. Generated from ftconfig.h.in by configure. */
/****************************************************************************
*
* ftconfig.in
* ftconfig.h.in
*
* UNIX-specific configuration file (specification only).
*
* Copyright (C) 1996-2019 by
* Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@ -40,37 +40,8 @@
#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.
*
*/
#define HAVE_UNISTD_H 1
#define HAVE_FCNTL_H 1
#define HAVE_STDINT_H 1
/* 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
/* #undef FT_USE_AUTOCONF_SIZEOF_TYPES */
#ifdef FT_USE_AUTOCONF_SIZEOF_TYPES
@ -80,523 +51,11 @@ FT_BEGIN_HEADER
#define FT_SIZEOF_INT SIZEOF_INT
#define FT_SIZEOF_LONG SIZEOF_LONG
#else /* !FT_USE_AUTOCONF_SIZEOF_TYPES */
/* Following cpp computation of the bit length of `int` and `long` */
/* is copied from default `include/freetype/config/ftconfig.h`. */
/* If any improvement is required for this file, it should be */
/* applied to the original header file for the builders that do */
/* not use configure script. */
/* 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
#endif /* !FT_USE_AUTOCONF_SIZEOF_TYPES */
/* `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 == 4
typedef signed int FT_Int32;
typedef unsigned int FT_UInt32;
#elif FT_SIZEOF_LONG == 4
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 >= 4
typedef int FT_Fast;
typedef unsigned int FT_UFast;
#elif FT_SIZEOF_LONG >= 4
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 == 8
/* `FT_LONG64` must be defined if a 64-bit type is available */
#define FT_LONG64
#define FT_INT64 long
#define FT_UINT64 unsigned long
/* we handle the LLP64 scheme separately for GCC and clang, */
/* suppressing the `long long` warning */
#elif ( FT_SIZEOF_LONG == 4 ) && \
defined( HAVE_LONG_LONG_INT ) && \
defined( __GNUC__ )
#pragma GCC diagnostic ignored "-Wlong-long"
#define FT_LONG64
#define FT_INT64 long long int
#define FT_UINT64 unsigned long long int
/**************************************************************************
*
* 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 == 8 */
#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
#endif /* FT_USE_AUTOCONF_SIZEOF_TYPES */
#include <freetype/config/integer-types.h>
#include <freetype/config/public-macros.h>
#include <freetype/config/mac-support.h>
#endif /* FTCONFIG_H_ */

View file

@ -4,7 +4,7 @@
*
* Build macros of the FreeType 2 library.
*
* Copyright (C) 1996-2019 by
* Copyright (C) 1996-2020 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_ */

View file

@ -13,8 +13,6 @@ FT_USE_MODULE( FT_Module_Class, autofit_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_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_Module_Class, psaux_module_class )
FT_USE_MODULE( FT_Module_Class, psnames_module_class )
/* EOF */

View file

@ -4,7 +4,7 @@
*
* User-selectable configuration macros (specification only).
*
* Copyright (C) 1996-2019 by
* Copyright (C) 1996-2020 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.
*
@ -121,10 +121,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 */
@ -292,6 +290,22 @@ FT_BEGIN_HEADER
/* #undef FT_CONFIG_OPTION_USE_HARFBUZZ */
/**************************************************************************
*
* 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.
*/
/* #undef FT_CONFIG_OPTION_USE_BROTLI */
/**************************************************************************
*
* Glyph Postscript Names handling
@ -526,7 +540,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,9 +885,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
#endif
/**************************************************************************

View file

@ -5,7 +5,7 @@
* ANSI-specific library and header configuration file (specification
* only).
*
* Copyright (C) 2002-2019 by
* Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View file

@ -0,0 +1,245 @@
/****************************************************************************
*
* config/integer-types.h
*
* FreeType integer types definitions.
*
* Copyright (C) 1996-2020 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_ */

View file

@ -0,0 +1,49 @@
/****************************************************************************
*
* config/mac-support.h
*
* Mac/OS X support configuration header.
*
* Copyright (C) 1996-2020 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_ */

View file

@ -0,0 +1,120 @@
/****************************************************************************
*
* config/public-macros.h
*
* Define a set of compiler macros used in public FreeType headers.
*
* Copyright (C) 2020 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_ */

View file

@ -4,7 +4,7 @@
*
* FreeType high-level API and common types (specification only).
*
* Copyright (C) 1996-2019 by
* Copyright (C) 1996-2020 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
@ -51,22 +42,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.
*
*/
@ -974,6 +958,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 +1226,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 +1240,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 +1254,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 +1269,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 +1288,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 +1303,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 +1318,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 +1344,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 +1359,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 +1381,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_IS_NAMED_INSTANCE( face ) \
( (face)->face_index & 0x7FFF0000L )
( !!( (face)->face_index & 0x7FFF0000L ) )
/**************************************************************************
@ -1412,7 +1399,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 +1416,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 +1430,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 +1447,7 @@ FT_BEGIN_HEADER
*
*/
#define FT_HAS_COLOR( face ) \
( (face)->face_flags & FT_FACE_FLAG_COLOR )
( !!( (face)->face_flags & FT_FACE_FLAG_COLOR ) )
/**************************************************************************
@ -2078,7 +2065,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.
@ -3187,6 +3175,12 @@ FT_BEGIN_HEADER
* 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
@ -3245,14 +3239,6 @@ FT_BEGIN_HEADER
* 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.
*
* 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
@ -4088,7 +4074,7 @@ FT_BEGIN_HEADER
* 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
* 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.
@ -4781,7 +4767,7 @@ FT_BEGIN_HEADER
*/
#define FREETYPE_MAJOR 2
#define FREETYPE_MINOR 10
#define FREETYPE_PATCH 1
#define FREETYPE_PATCH 4
/**************************************************************************

View file

@ -4,7 +4,7 @@
*
* Quick computation of advance widths (specification only).
*
* Copyright (C) 2008-2019 by
* Copyright (C) 2008-2020 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

View file

@ -4,7 +4,7 @@
*
* FreeType exact bbox computation (specification).
*
* Copyright (C) 1996-2019 by
* Copyright (C) 1996-2020 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!"

View file

@ -4,7 +4,7 @@
*
* FreeType API for accessing BDF-specific strings (specification).
*
* Copyright (C) 2002-2019 by
* Copyright (C) 2002-2020 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!"

View file

@ -4,7 +4,7 @@
*
* FreeType utility functions for bitmaps (specification).
*
* Copyright (C) 2004-2019 by
* Copyright (C) 2004-2020 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!"

View file

@ -4,7 +4,7 @@
*
* Bzip2-compressed stream support.
*
* Copyright (C) 2010-2019 by
* Copyright (C) 2010-2020 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.
*/

View file

@ -4,7 +4,7 @@
*
* FreeType Cache subsystem (specification).
*
* Copyright (C) 1996-2019 by
* Copyright (C) 1996-2020 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

View file

@ -4,7 +4,7 @@
*
* FreeType API for accessing CID font information (specification).
*
* Copyright (C) 2007-2019 by
* Copyright (C) 2007-2020 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!"

View file

@ -4,7 +4,7 @@
*
* FreeType's glyph color management (specification).
*
* Copyright (C) 2018-2019 by
* Copyright (C) 2018-2020 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
*/

View file

@ -4,7 +4,7 @@
*
* FreeType API for controlling driver modules (specification only).
*
* Copyright (C) 2017-2019 by
* Copyright (C) 2017-2020 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!"
@ -427,10 +426,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

View file

@ -4,7 +4,7 @@
*
* FreeType error codes (specification).
*
* Copyright (C) 2002-2019 by
* Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View file

@ -4,7 +4,7 @@
*
* FreeType error code handling (specification).
*
* Copyright (C) 1996-2019 by
* Copyright (C) 1996-2020 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

View file

@ -4,7 +4,7 @@
*
* Support functions for font formats.
*
* Copyright (C) 2002-2019 by
* Copyright (C) 2002-2020 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!"

View file

@ -4,7 +4,7 @@
*
* Access of TrueType's 'gasp' table (specification).
*
* Copyright (C) 2007-2019 by
* Copyright (C) 2007-2020 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!"

View file

@ -4,7 +4,7 @@
*
* FreeType convenience functions to handle glyphs (specification).
*
* Copyright (C) 1996-2019 by
* Copyright (C) 1996-2020 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!"

View file

@ -4,7 +4,7 @@
*
* FreeType API for validating TrueTypeGX/AAT tables (specification).
*
* Copyright (C) 2004-2019 by
* Copyright (C) 2004-2020 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!"

View file

@ -4,7 +4,7 @@
*
* Gzip-compressed stream support.
*
* Copyright (C) 2002-2019 by
* Copyright (C) 2002-2020 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.
*/

View file

@ -5,7 +5,7 @@
* FreeType glyph image formats and default raster interface
* (specification).
*
* Copyright (C) 1996-2019 by
* Copyright (C) 1996-2020 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
@ -401,6 +400,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 +438,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
@ -1004,20 +1011,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.
* 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 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.
* 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_
{

View file

@ -4,7 +4,7 @@
*
* FreeType incremental loading (specification).
*
* Copyright (C) 2002-2019 by
* Copyright (C) 2002-2020 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!"

View file

@ -5,7 +5,7 @@
* FreeType API for color filtering of subpixel bitmap glyphs
* (specification).
*
* Copyright (C) 2006-2019 by
* Copyright (C) 2006-2020 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
@ -177,7 +176,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 +195,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 +233,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.

View file

@ -4,7 +4,7 @@
*
* Generic list support for FreeType (specification).
*
* Copyright (C) 1996-2019 by
* Copyright (C) 1996-2020 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!"

View file

@ -4,7 +4,7 @@
*
* LZW-compressed stream support.
*
* Copyright (C) 2004-2019 by
* Copyright (C) 2004-2020 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.
*/

View file

@ -4,7 +4,7 @@
*
* Additional Mac-specific API.
*
* Copyright (C) 1996-2019 by
* Copyright (C) 1996-2020 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

View file

@ -4,7 +4,7 @@
*
* FreeType Multiple Master font interface (specification).
*
* Copyright (C) 1996-2019 by
* Copyright (C) 1996-2020 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

View file

@ -4,7 +4,7 @@
*
* FreeType modules public interface (specification).
*
* Copyright (C) 1996-2019 by
* Copyright (C) 1996-2020 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!"
@ -65,7 +64,7 @@ FT_BEGIN_HEADER
* psnames
* raster1
* sfnt
* smooth, smooth-lcd, smooth-lcdv
* smooth
* truetype
* type1
* type42
@ -486,7 +485,7 @@ FT_BEGIN_HEADER
*
* ```
* FREETYPE_PROPERTIES=truetype:interpreter-version=35 \
* cff:no-stem-darkening=1 \
* cff:no-stem-darkening=0 \
* autofitter:warping=1
* ```
*

View file

@ -4,7 +4,7 @@
*
* FreeType module error offsets (specification).
*
* Copyright (C) 2001-2019 by
* Copyright (C) 2001-2020 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>
* ```
*
*/

View file

@ -4,7 +4,7 @@
*
* FreeType API for validating OpenType tables (specification).
*
* Copyright (C) 2004-2019 by
* Copyright (C) 2004-2020 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!"

View file

@ -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-2020 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!"
@ -483,19 +482,13 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success.
*
* @note:
* This advanced function uses @FT_Raster_Params as an argument,
* allowing FreeType rasterizer to be used for direct composition,
* translucency, etc. You should know how to set up @FT_Raster_Params
* for this function to work.
*
* 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,

View file

@ -4,7 +4,7 @@
*
* FreeType API for possible FT_Parameter tags (specification only).
*
* Copyright (C) 2017-2019 by
* Copyright (C) 2017-2020 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!"

View file

@ -4,7 +4,7 @@
*
* FreeType API for accessing PFR-specific data (specification only).
*
* Copyright (C) 2002-2019 by
* Copyright (C) 2002-2020 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!"

View file

@ -4,7 +4,7 @@
*
* FreeType renderer modules public interface (specification).
*
* Copyright (C) 1996-2019 by
* Copyright (C) 1996-2020 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

View file

@ -4,7 +4,7 @@
*
* FreeType size objects management (specification).
*
* Copyright (C) 1996-2019 by
* Copyright (C) 1996-2020 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!"

View file

@ -7,7 +7,7 @@
*
* This is _not_ used to retrieve glyph names!
*
* Copyright (C) 1996-2019 by
* Copyright (C) 1996-2020 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!"

View file

@ -4,7 +4,7 @@
*
* FreeType path stroker (specification).
*
* Copyright (C) 2002-2019 by
* Copyright (C) 2002-2020 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.
*/

View file

@ -5,7 +5,7 @@
* FreeType synthesizing code for emboldening and slanting
* (specification).
*
* Copyright (C) 2000-2019 by
* Copyright (C) 2000-2020 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!"

View file

@ -4,7 +4,7 @@
*
* FreeType low-level system interface definition (specification).
*
* Copyright (C) 1996-2019 by
* Copyright (C) 1996-2020 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

View file

@ -4,7 +4,7 @@
*
* FreeType trigonometric functions (specification).
*
* Copyright (C) 2001-2019 by
* Copyright (C) 2001-2020 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!"

View file

@ -4,7 +4,7 @@
*
* FreeType simple types definitions (specification only).
*
* Copyright (C) 1996-2019 by
* Copyright (C) 1996-2020 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>

View file

@ -4,7 +4,7 @@
*
* FreeType API for accessing Windows fnt-specific data.
*
* Copyright (C) 2003-2019 by
* Copyright (C) 2003-2020 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!"

View file

@ -5,7 +5,7 @@
* Basic Type 1/Type 2 tables definitions and interface (specification
* only).
*
* Copyright (C) 1996-2019 by
* Copyright (C) 1996-2020 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!"

View file

@ -4,7 +4,7 @@
*
* TrueType name ID definitions (specification only).
*
* Copyright (C) 1996-2019 by
* Copyright (C) 1996-2020 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

View file

@ -5,7 +5,7 @@
* Basic SFNT/TrueType tables definitions and interface
* (specification only).
*
* Copyright (C) 1996-2019 by
* Copyright (C) 1996-2020 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!"

View file

@ -4,7 +4,7 @@
*
* Tags for TrueType and OpenType tables (specification only).
*
* Copyright (C) 1996-2019 by
* Copyright (C) 1996-2020 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' )

View file

@ -4,7 +4,7 @@
*
* FreeType 2 build and setup macros.
*
* Copyright (C) 1996-2019 by
* Copyright (C) 1996-2020 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>
* ```
*
*/

Binary file not shown.