Update bundled Freetype to 2.10.4

Removed everything, imported with help of import_from_tarball.sh script,
and then added a pre-generated builds/unix/ftconfig.h

This also amends 58f5695084 because it is
not a clean update, some old files are still there.

Also redo the fix for wasm like 30f4ca4e4f.

Fixes: QTBUG-82480
Pick-to: 6.2
Change-Id: I45ee3230299908ca0372e035636dd64b6c549a27
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
Liang Qi 2021-06-25 22:34:30 +02:00
parent d4015a21a4
commit cfa631e0fb
577 changed files with 7378 additions and 20572 deletions

View File

@ -1,4 +1,4 @@
FreeType 2.10.1
FreeType 2.10.4
===============
Homepage: https://www.freetype.org
@ -16,17 +16,20 @@
the file `docs/LICENSE.TXT' for the available licenses.
The FreeType 2 API reference is located in `docs/reference/site';
use the file `index.html' as the top entry point. Additional
documentation is available as a separate package from our sites. Go
to
use the file `index.html' as the top entry point. [Please note that
currently the search function for locally installed documentation
doesn't work due to cross-site scripting issues.]
Additional documentation is available as a separate package from our
sites. Go to
https://download.savannah.gnu.org/releases/freetype/
and download one of the following files.
freetype-doc-2.10.1.tar.xz
freetype-doc-2.10.1.tar.gz
ftdoc2101.zip
freetype-doc-2.10.4.tar.xz
freetype-doc-2.10.4.tar.gz
ftdoc2104.zip
To view the documentation online, go to
@ -64,6 +67,18 @@
a terse message that only says `it doesn't work'.
Patches
=======
Please submit patches to the `freetype-devel@nongnu.org' mailing
list -- and thank you in advance for your work on improving
FreeType!
Details on the process can be found here:
https://www.freetype.org/developer.html#patches
Enjoy!
@ -71,7 +86,7 @@
----------------------------------------------------------------------
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,

View File

@ -1,481 +1,63 @@
/* ftconfig.h. Generated from ftconfig.in by configure. */
/***************************************************************************/
/* */
/* ftconfig.in */
/* */
/* UNIX-specific configuration file (specification only). */
/* */
/* Copyright 1996-2004, 2006-2009, 2011, 2013, 2014 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. */
/* */
/***************************************************************************/
/* ftconfig.h. Generated from ftconfig.h.in by configure. */
/****************************************************************************
*
* ftconfig.h.in
*
* UNIX-specific configuration file (specification only).
*
* 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.
*
*/
/*************************************************************************/
/* */
/* This header file contains a number of macro definitions that are used */
/* by the rest of the engine. Most of the macros here are automatically */
/* determined at compile time, and you should not need to change it to */
/* port FreeType, except to compile the library with a non-ANSI */
/* compiler. */
/* */
/* Note however that if some specific modifications are needed, we */
/* advise you to place a modified copy in your build directory. */
/* */
/* The build directory is usually `builds/<system>', and contains */
/* system-specific files that are always included first when building */
/* the library. */
/* */
/*************************************************************************/
/**************************************************************************
*
* This header file contains a number of macro definitions that are used by
* the rest of the engine. Most of the macros here are automatically
* determined at compile time, and you should not need to change it to port
* FreeType, except to compile the library with a non-ANSI compiler.
*
* Note however that if some specific modifications are needed, we advise
* you to place a modified copy in your build directory.
*
* The build directory is usually `builds/<system>`, and contains
* system-specific files that are always included first when building the
* library.
*
*/
#ifndef __FTCONFIG_H__
#define __FTCONFIG_H__
#ifndef FTCONFIG_H_
#define FTCONFIG_H_
#include <ft2build.h>
#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
#define SIZEOF_INT 4
#define SIZEOF_LONG 4
#define SIZEOF_LONG 8
#define FT_SIZEOF_INT SIZEOF_INT
#define FT_SIZEOF_LONG SIZEOF_LONG
#else /* !FT_USE_AUTOCONF_SIZEOF_TYPES */
#endif /* FT_USE_AUTOCONF_SIZEOF_TYPES */
/* Following cpp computation of the bit length of int and long */
/* is copied from default include/config/ftconfig.h. */
/* If any improvement is required for this file, it should be */
/* applied to the original header file for the builders that */
/* does not use configure script. */
#include <freetype/config/integer-types.h>
#include <freetype/config/public-macros.h>
#include <freetype/config/mac-support.h>
/* 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 is a macro used to indicate 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
/*************************************************************************/
/* */
/* 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( _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 /* _MSC_VER */
#endif /* FT_SIZEOF_LONG == 8 */
#ifdef FT_LONG64
typedef FT_INT64 FT_Int64;
typedef FT_UINT64 FT_UInt64;
#endif
#define FT_BEGIN_STMNT do {
#define FT_END_STMNT } while ( 0 )
#define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT
#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
#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 */
#ifndef FT_EXPORT
#ifdef __cplusplus
#define FT_EXPORT( x ) extern "C" x
#else
#define FT_EXPORT( x ) extern x
#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. */
/* */
/* 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_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 /* __FTCONFIG_H__ */
#endif /* FTCONFIG_H_ */
/* END */

View File

@ -4,7 +4,7 @@
/* */
/* Unix-specific FreeType low-level system interface (body). */
/* */
/* 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, */
@ -19,11 +19,12 @@
#include <ft2build.h>
/* we use our special ftconfig.h file, not the standard one */
#include <ftconfig.h>
#include FT_INTERNAL_DEBUG_H
#include FT_SYSTEM_H
#include FT_ERRORS_H
#include FT_TYPES_H
#include FT_INTERNAL_STREAM_H
//#include FT_CONFIG_CONFIG_H
#include <freetype/internal/ftdebug.h>
#include <freetype/ftsystem.h>
#include <freetype/fterrors.h>
#include <freetype/fttypes.h>
#include <freetype/internal/ftstream.h>
/* memory-mapping includes and definitions */
#ifdef HAVE_UNISTD_H
@ -351,7 +352,7 @@
stream->read = 0;
FT_TRACE1(( "FT_Stream_Open:" ));
FT_TRACE1(( " opened `%s' (%d bytes) successfully\n",
FT_TRACE1(( " opened `%s' (%ld bytes) successfully\n",
filepathname, stream->size ));
return FT_Err_Ok;

View File

@ -1,3 +1,104 @@
CHANGES BETWEEN 2.10.3 and 2.10.4
I. IMPORTANT BUG FIXES
- A heap buffer overflow has been found in the handling of embedded
PNG bitmaps, introduced in FreeType version 2.6.
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-15999
If you use option FT_CONFIG_OPTION_USE_PNG you should upgrade
immediately.
======================================================================
CHANGES BETWEEN 2.10.2 and 2.10.3
I. IMPORTANT CHANGES
- New flag `FT_OUTLINE_OVERLAP'. If set, make the smooth rasterizer
do 4x4 oversampling to mitigate artifacts in pixels partially
covered by overlapping contours. Note that this at least
quadruples the rendering time.
If a glyph in a TrueType font has the `OVERLAP_SIMPLE' or
`OVERLAP_COMPOUND' bit set, FreeType automatically selects this
rendering mode.
II. MISCELLANEOUS
- Using the arcane method of including FreeType header files with
macros like `FT_FREETYPE_H' is no longer mandatory (but retained
as an optional feature for backward compatibility).
- Support for building the library with Meson. Building the demo
programs with Meson will follow in a forthcoming release.
- Minor improvements to the B/W rasterizer.
- Auto-hinter support for Medefaidrin script.
- Fix various memory leaks (mainly for CFF) and other issues that
might cause crashes in rare circumstances.
- Jam support has been removed.
- In `ftview', custom LCD filter values are now normalized and
balanced. Unorthodox filters are still available through the `-L'
command line option.
- The GUI demo programs can now be resized.
- Demo programs that accept command line option `-k' can now handle
function keys, too. The corresponding character codes start with
0xF1. As an example, the POSIX shell syntax (accepted by bash,
ksh, and zsh)
-k $'\xF3q'
emulates the pressing of function key `F3' followed by key `q'.
======================================================================
CHANGES BETWEEN 2.10.1 and 2.10.2
I. IMPORTANT CHANGES
- Support of WOFF2 fonts. This code contribution was Nikhil
Ramakrishnan's GSoC 2019 project.
II. MISCELLANEOUS
- Function `FT_Get_Var_Axis_Flags' returned random data for Type 1
MM fonts.
- Type 1 fonts with non-integer metrics are now supported by the new
(CFF) engine introduced in FreeType 2.9.
- Drop support for Python 2 in Freetype's API reference generator
`docwriter' (Python >= 3.5 is required for targets `make refdoc'
and `make refdoc-venv').
- Auto-hinter support for Hanifi Rohingya.
- Document the `FT2_KEEP_ALIVE' debugging environment variable.
- The Visual C++ (and Visual C) project files for Windows builds no
longer generate libraries that contain the FreeType version in its
filenames. Instead, a resource file gets used to make the
libraries contain the corresponding information.
- The next release will remove Jam build support.
- The `ftbench' demo program has a new test for testing the
`FT_Glyph_Stroke' functionality.
======================================================================
CHANGES BETWEEN 2.10.0 and 2.10.1
@ -209,7 +310,7 @@ CHANGES BETWEEN 2.9 and 2.9.1
use the `pkg-config' interface.
The `configure' script no longer installs `freetype-config' by
default. For backwards compatibility, a new configure option
default. For backward compatibility, a new configure option
`--enable-freetype-config' is provided that reverts this
decision.
@ -5198,7 +5299,7 @@ Extensions support:
------------------------------------------------------------------------
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,

View File

@ -139,7 +139,7 @@ IV. Overriding default configuration and module headers
----------------------------------------------------------------------
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,

View File

@ -11,20 +11,20 @@ located in the file `ftoption.h'. The macros are:
FT_DEBUG_LEVEL_ERROR
#define this macro if you want to compile the FT_ERROR macro calls
to print error messages during program execution. This will not
stop the program. Very useful to spot invalid fonts during
#define this macro if you want to compile the `FT_ERROR' macro
calls to print error messages during program execution. This does
not stop the program. Very useful to spot invalid fonts during
development and to code workarounds for them.
FT_DEBUG_LEVEL_TRACE
#define this macro if you want to compile both macros FT_ERROR and
FT_TRACE. This also includes the variants FT_TRACE0, FT_TRACE1,
FT_TRACE2, ..., FT_TRACE7.
#define this macro if you want to compile both macros `FT_ERROR'
and `FT_TRACE'. This also includes the variants `FT_TRACE0',
`FT_TRACE1', `FT_TRACE2', ..., `FT_TRACE7'.
The trace macros are used to send debugging messages when an
appropriate `debug level' is configured at runtime through the
FT2_DEBUG environment variable (more on this later).
`FT2_DEBUG' environment variable (more on this later).
FT_DEBUG_MEMORY
@ -32,16 +32,16 @@ located in the file `ftoption.h'. The macros are:
small but effective debugging memory manager that tracks all
allocations and frees that are performed within the font engine.
When the FT2_DEBUG_MEMORY environment variable is defined at
runtime, a call to FT_Done_FreeType will dump memory statistics,
including the list of leaked memory blocks with the source
locations where these were allocated. It is always a very good
idea to define this in development builds. This works with _any_
program linked to FreeType, but requires a big deal of memory (the
debugging memory manager never frees the blocks to the heap in
order to detect double frees).
When the `FT2_DEBUG_MEMORY' environment variable is defined at
runtime, a call to `FT_Done_FreeType' dumps memory statistics,
including the list of leaked memory blocks and optionally with the
source locations where these were allocated. It is always a very
good idea to define this in development builds. This works with
_any_ program linked to FreeType, but requires a big deal of
memory (the debugging memory manager never frees the blocks to the
heap in order to detect double frees).
When FT2_DEBUG_MEMORY isn't defined at runtime, the debugging
When `FT2_DEBUG_MEMORY' isn't defined at runtime, the debugging
memory manager is ignored, and performance is unaffected.
@ -55,10 +55,10 @@ debugging its code:
1. FT_ERROR(( ... ))
This macro is used to send debug messages that indicate relatively
serious errors (like broken font files), but will not stop the
serious errors (like broken font files) without stopping the
execution of the running program. Its code is compiled only when
either FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined in
`ftoption.h'.
either `FT_DEBUG_LEVEL_ERROR' or `FT_DEBUG_LEVEL_TRACE' are
defined in `ftoption.h'.
Note that you have to use a printf-like signature, but with double
parentheses, like in
@ -69,53 +69,53 @@ debugging its code:
2. FT_ASSERT( condition )
This macro is used to check strong assertions at runtime. If its
condition isn't TRUE, the program will abort with a panic message.
Its code is compiled when either FT_DEBUG_LEVEL_ERROR or
FT_DEBUG_LEVEL_TRACE are defined. You don't need double
parentheses here. For example
condition isn't TRUE, the program aborts with a panic message.
Its code is compiled when either `FT_DEBUG_LEVEL_ERROR' or
`FT_DEBUG_LEVEL_TRACE' are defined. You don't need double
parentheses here. Example:
FT_ASSERT( ptr != NULL );
3. FT_TRACE( level, (message...) )
The FT_TRACE macro is used to send general-purpose debugging
The `FT_TRACE' macro is used to send general-purpose debugging
messages during program execution. This macro uses an *implicit*
macro named FT_COMPONENT used to name the current FreeType
macro named `FT_COMPONENT', which names the current FreeType
component being run.
The developer should always define FT_COMPONENT as appropriate,
The developer should always define `FT_COMPONENT' as appropriate,
for example as in
#undef FT_COMPONENT
#define FT_COMPONENT io
The value of the FT_COMPONENT macro is one of the component
names defined in the internal file `internal/fttrace.h'. If you
modify FreeType source and insert new FT_COMPONENT macro, you must
register it in `fttrace.h'. If you insert or remove many trace
macros, you can check the undefined or the unused trace macro by
`src/tools/chktrcmp.py'.
The value of the `FT_COMPONENT' macro is one of the component
names defined in the internal file `internal/fttrace.h'. If you
modify the FreeType source code and insert a new `FT_COMPONENT'
macro, you must register it in `fttrace.h'. If you insert or
remove many trace macros, you can test for undefined or unused
trace macros with the script `src/tools/chktrcmp.py'.
Each such component is assigned a `debug level', ranging from 0 to
7, through the use of the FT2_DEBUG environment variable
(described below) when a program linked with FreeType starts.
Each such component is assigned a `debug level', ranging from
value 0 to 7, through the use of the `FT2_DEBUG' environment
variable (described below) when a program linked with FreeType
starts.
When FT_TRACE is called, its level is compared to the one of the
When `FT_TRACE' is called, its level is compared to the one of the
corresponding component. Messages with trace levels *higher* than
the corresponding component level are filtered and never printed.
the corresponding component level are filtered out and never
printed. This means that trace messages with level 0 are always
printed, those with level 2 are only printed when the component
level is *at least* 2, etc.
This means that trace messages with level 0 are always printed,
those with level 2 are only printed when the component level is
*at least* 2.
The second parameter to FT_TRACE must contain parentheses and
correspond to a printf-like call, as in
The second parameter to `FT_TRACE' must contain parentheses and
corresponds to a printf-like call, as in
FT_TRACE( 2, ( "your %s is not %s\n", "foo", "bar" ) )
The shortcut macros FT_TRACE0, FT_TRACE1, FT_TRACE2, ...,
FT_TRACE7 can be used with constant level indices, and are much
The shortcut macros `FT_TRACE0', `FT_TRACE1', `FT_TRACE2', ...,
`FT_TRACE7' can be used with constant level indices, and are much
cleaner to use, as in
FT_TRACE2(( "your %s is not %s\n", "foo", "bar" ));
@ -131,7 +131,7 @@ behaviour of FreeType at runtime.
FT2_DEBUG
This variable is only used when FreeType is built with
FT_DEBUG_LEVEL_TRACE defined. It contains a list of component
`FT_DEBUG_LEVEL_TRACE' defined. It contains a list of component
level definitions, following this format:
component1:level1 component2:level2 component3:level3 ...
@ -140,57 +140,70 @@ behaviour of FreeType at runtime.
in `fttrace.h'. `levelX' is the corresponding level to use at
runtime.
`any' is a special component name that will be interpreted as
`any/all components'. For example, the following definitions
`any' is a special component name that is interpreted as `any/all
components'. For example, the following definitions
set FT2_DEBUG=any:2 memory:5 io:4 (on Windows)
export FT2_DEBUG="any:2 memory:5 io:4" (on Linux with bash)
both stipulate that all components should have level 2, except for
the memory and io components which will be set to trace levels 5
the memory and io components, which are set to the trace levels 5
and 4, respectively.
FT2_DEBUG_MEMORY
This environment variable, when defined, tells FreeType to use a
debugging memory manager that will track leaking memory blocks as
well as other common errors like double frees. It is also capable
of reporting _where_ the leaking blocks were allocated, which
debugging memory manager that tracks leaking memory blocks as well
as other common errors like double frees. It is also capable of
reporting _where_ the leaking blocks were allocated, which
considerably saves time when debugging new additions to the
library.
This code is only compiled when FreeType is built with the
FT_DEBUG_MEMORY macro #defined in `ftoption.h' though, it will be
`FT_DEBUG_MEMORY' macro #defined in `ftoption.h' though, it is
ignored in other builds.
FT2_ALLOC_TOTAL_MAX
This variable is ignored if FT2_DEBUG_MEMORY is not defined. It
This variable is ignored if `FT2_DEBUG_MEMORY' is not defined. It
allows you to specify a maximum heap size for all memory
allocations performed by FreeType. This is very useful to test
the robustness of the font engine and programs that use it in
tight memory conditions.
If it is undefined, or if its value is not strictly positive, then
no allocation bounds are checked at runtime.
If it is undefined, or if its value is not strictly positive, no
allocation bounds are checked at runtime.
FT2_ALLOC_COUNT_MAX
This variable is ignored if FT2_DEBUG_MEMORY is not defined. It
This variable is ignored if `FT2_DEBUG_MEMORY' is not defined. It
allows you to specify a maximum number of memory allocations
performed by FreeType before returning the error
FT_Err_Out_Of_Memory. This is useful for debugging and testing
`FT_Err_Out_Of_Memory'. This is useful for debugging and testing
the engine's robustness.
If it is undefined, or if its value is not strictly positive, then
no allocation bounds are checked at runtime.
If it is undefined, or if its value is not strictly positive, no
allocation bounds are checked at runtime.
FT2_KEEP_ALIVE
This variable is ignored if `FT2_DEBUG_MEMORY' is not defined.
`Keep alive' means that freed blocks aren't released to the heap.
This is useful to detect double-frees or weird heap corruption,
reporting the source code location of the original allocation and
deallocation in case of a problem. It uses large amounts of
memory, however.
If it is undefined, or if its value is not strictly positive,
freed blocks are released at runtime.
------------------------------------------------------------------------
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

@ -27,7 +27,7 @@ Other bugs have been registered at the savannah bugzilla of FreeType.
------------------------------------------------------------------------
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,

View File

@ -4,7 +4,7 @@
*
* ANSI-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,
@ -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_ */

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

@ -25,8 +25,6 @@ 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 )
/* 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
/* #define 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.
*/
/* #define 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

@ -1,450 +0,0 @@
/***************************************************************************/
/* */
/* ftautoh.h */
/* */
/* FreeType API for controlling the auto-hinter (specification only). */
/* */
/* Copyright 2012-2015 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 __FTAUTOH_H__
#define __FTAUTOH_H__
#include <ft2build.h>
#include FT_FREETYPE_H
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
#error "Please fix the directory search order for header files"
#error "so that freetype.h of FreeType 2 is found first."
#endif
FT_BEGIN_HEADER
/**************************************************************************
*
* @section:
* auto_hinter
*
* @title:
* The auto-hinter
*
* @abstract:
* Controlling the auto-hinting module.
*
* @description:
* While FreeType's auto-hinter doesn't expose API functions by itself,
* it is possible to control its behaviour with @FT_Property_Set and
* @FT_Property_Get. The following lists the available properties
* together with the necessary macros and structures.
*
* Note that the auto-hinter's module name is `autofitter' for
* historical reasons.
*
*/
/**************************************************************************
*
* @property:
* glyph-to-script-map
*
* @description:
* *Experimental* *only*
*
* The auto-hinter provides various script modules to hint glyphs.
* Examples of supported scripts are Latin or CJK. Before a glyph is
* auto-hinted, the Unicode character map of the font gets examined, and
* the script is then determined based on Unicode character ranges, see
* below.
*
* OpenType fonts, however, often provide much more glyphs than
* character codes (small caps, superscripts, ligatures, swashes, etc.),
* to be controlled by so-called `features'. Handling OpenType features
* can be quite complicated and thus needs a separate library on top of
* FreeType.
*
* The mapping between glyph indices and scripts (in the auto-hinter
* sense, see the @FT_AUTOHINTER_SCRIPT_XXX values) is stored as an
* array with `num_glyphs' elements, as found in the font's @FT_Face
* structure. The `glyph-to-script-map' property returns a pointer to
* this array, which can be modified as needed. Note that the
* modification should happen before the first glyph gets processed by
* the auto-hinter so that the global analysis of the font shapes
* actually uses the modified mapping.
*
* The following example code demonstrates how to access it (omitting
* the error handling).
*
* {
* FT_Library library;
* FT_Face face;
* FT_Prop_GlyphToScriptMap prop;
*
*
* FT_Init_FreeType( &library );
* FT_New_Face( library, "foo.ttf", 0, &face );
*
* prop.face = face;
*
* FT_Property_Get( library, "autofitter",
* "glyph-to-script-map", &prop );
*
* // adjust `prop.map' as needed right here
*
* FT_Load_Glyph( face, ..., FT_LOAD_FORCE_AUTOHINT );
* }
*
*/
/**************************************************************************
*
* @enum:
* FT_AUTOHINTER_SCRIPT_XXX
*
* @description:
* *Experimental* *only*
*
* A list of constants used for the @glyph-to-script-map property to
* specify the script submodule the auto-hinter should use for hinting a
* particular glyph.
*
* @values:
* FT_AUTOHINTER_SCRIPT_NONE ::
* Don't auto-hint this glyph.
*
* FT_AUTOHINTER_SCRIPT_LATIN ::
* Apply the latin auto-hinter. For the auto-hinter, `latin' is a
* very broad term, including Cyrillic and Greek also since characters
* from those scripts share the same design constraints.
*
* By default, characters from the following Unicode ranges are
* assigned to this submodule.
*
* {
* U+0020 - U+007F // Basic Latin (no control characters)
* U+00A0 - U+00FF // Latin-1 Supplement (no control characters)
* U+0100 - U+017F // Latin Extended-A
* U+0180 - U+024F // Latin Extended-B
* U+0250 - U+02AF // IPA Extensions
* U+02B0 - U+02FF // Spacing Modifier Letters
* U+0300 - U+036F // Combining Diacritical Marks
* U+0370 - U+03FF // Greek and Coptic
* U+0400 - U+04FF // Cyrillic
* U+0500 - U+052F // Cyrillic Supplement
* U+1D00 - U+1D7F // Phonetic Extensions
* U+1D80 - U+1DBF // Phonetic Extensions Supplement
* U+1DC0 - U+1DFF // Combining Diacritical Marks Supplement
* U+1E00 - U+1EFF // Latin Extended Additional
* U+1F00 - U+1FFF // Greek Extended
* U+2000 - U+206F // General Punctuation
* U+2070 - U+209F // Superscripts and Subscripts
* U+20A0 - U+20CF // Currency Symbols
* U+2150 - U+218F // Number Forms
* U+2460 - U+24FF // Enclosed Alphanumerics
* U+2C60 - U+2C7F // Latin Extended-C
* U+2DE0 - U+2DFF // Cyrillic Extended-A
* U+2E00 - U+2E7F // Supplemental Punctuation
* U+A640 - U+A69F // Cyrillic Extended-B
* U+A720 - U+A7FF // Latin Extended-D
* U+FB00 - U+FB06 // Alphab. Present. Forms (Latin Ligatures)
* U+1D400 - U+1D7FF // Mathematical Alphanumeric Symbols
* U+1F100 - U+1F1FF // Enclosed Alphanumeric Supplement
* }
*
* FT_AUTOHINTER_SCRIPT_CJK ::
* Apply the CJK auto-hinter, covering Chinese, Japanese, Korean, old
* Vietnamese, and some other scripts.
*
* By default, characters from the following Unicode ranges are
* assigned to this submodule.
*
* {
* U+1100 - U+11FF // Hangul Jamo
* U+2E80 - U+2EFF // CJK Radicals Supplement
* U+2F00 - U+2FDF // Kangxi Radicals
* U+2FF0 - U+2FFF // Ideographic Description Characters
* U+3000 - U+303F // CJK Symbols and Punctuation
* U+3040 - U+309F // Hiragana
* U+30A0 - U+30FF // Katakana
* U+3100 - U+312F // Bopomofo
* U+3130 - U+318F // Hangul Compatibility Jamo
* U+3190 - U+319F // Kanbun
* U+31A0 - U+31BF // Bopomofo Extended
* U+31C0 - U+31EF // CJK Strokes
* U+31F0 - U+31FF // Katakana Phonetic Extensions
* U+3200 - U+32FF // Enclosed CJK Letters and Months
* U+3300 - U+33FF // CJK Compatibility
* U+3400 - U+4DBF // CJK Unified Ideographs Extension A
* U+4DC0 - U+4DFF // Yijing Hexagram Symbols
* U+4E00 - U+9FFF // CJK Unified Ideographs
* U+A960 - U+A97F // Hangul Jamo Extended-A
* U+AC00 - U+D7AF // Hangul Syllables
* U+D7B0 - U+D7FF // Hangul Jamo Extended-B
* U+F900 - U+FAFF // CJK Compatibility Ideographs
* U+FE10 - U+FE1F // Vertical forms
* U+FE30 - U+FE4F // CJK Compatibility Forms
* U+FF00 - U+FFEF // Halfwidth and Fullwidth Forms
* U+1B000 - U+1B0FF // Kana Supplement
* U+1D300 - U+1D35F // Tai Xuan Hing Symbols
* U+1F200 - U+1F2FF // Enclosed Ideographic Supplement
* U+20000 - U+2A6DF // CJK Unified Ideographs Extension B
* U+2A700 - U+2B73F // CJK Unified Ideographs Extension C
* U+2B740 - U+2B81F // CJK Unified Ideographs Extension D
* U+2F800 - U+2FA1F // CJK Compatibility Ideographs Supplement
* }
*
* FT_AUTOHINTER_SCRIPT_INDIC ::
* Apply the indic auto-hinter, covering all major scripts from the
* Indian sub-continent and some other related scripts like Thai, Lao,
* or Tibetan.
*
* By default, characters from the following Unicode ranges are
* assigned to this submodule.
*
* {
* U+0900 - U+0DFF // Indic Range
* U+0F00 - U+0FFF // Tibetan
* U+1900 - U+194F // Limbu
* U+1B80 - U+1BBF // Sundanese
* U+1C80 - U+1CDF // Meetei Mayak
* U+A800 - U+A82F // Syloti Nagri
* U+11800 - U+118DF // Sharada
* }
*
* Note that currently Indic support is rudimentary only, missing blue
* zone support.
*
*/
#define FT_AUTOHINTER_SCRIPT_NONE 0
#define FT_AUTOHINTER_SCRIPT_LATIN 1
#define FT_AUTOHINTER_SCRIPT_CJK 2
#define FT_AUTOHINTER_SCRIPT_INDIC 3
/**************************************************************************
*
* @struct:
* FT_Prop_GlyphToScriptMap
*
* @description:
* *Experimental* *only*
*
* The data exchange structure for the @glyph-to-script-map property.
*
*/
typedef struct FT_Prop_GlyphToScriptMap_
{
FT_Face face;
FT_UShort* map;
} FT_Prop_GlyphToScriptMap;
/**************************************************************************
*
* @property:
* fallback-script
*
* @description:
* *Experimental* *only*
*
* If no auto-hinter script module can be assigned to a glyph, a
* fallback script gets assigned to it (see also the
* @glyph-to-script-map property). By default, this is
* @FT_AUTOHINTER_SCRIPT_CJK. Using the `fallback-script' property,
* this fallback value can be changed.
*
* {
* FT_Library library;
* FT_UInt fallback_script = FT_AUTOHINTER_SCRIPT_NONE;
*
*
* FT_Init_FreeType( &library );
*
* FT_Property_Set( library, "autofitter",
* "fallback-script", &fallback_script );
* }
*
* @note:
* This property can be used with @FT_Property_Get also.
*
* It's important to use the right timing for changing this value: The
* creation of the glyph-to-script map that eventually uses the
* fallback script value gets triggered either by setting or reading a
* face-specific property like @glyph-to-script-map, or by auto-hinting
* any glyph from that face. In particular, if you have already created
* an @FT_Face structure but not loaded any glyph (using the
* auto-hinter), a change of the fallback script will affect this face.
*
*/
/**************************************************************************
*
* @property:
* default-script
*
* @description:
* *Experimental* *only*
*
* If FreeType gets compiled with FT_CONFIG_OPTION_USE_HARFBUZZ to make
* the HarfBuzz library access OpenType features for getting better
* glyph coverages, this property sets the (auto-fitter) script to be
* used for the default (OpenType) script data of a font's GSUB table.
* Features for the default script are intended for all scripts not
* explicitly handled in GSUB; an example is a `dlig' feature,
* containing the combination of the characters `T', `E', and `L' to
* form a `TEL' ligature.
*
* By default, this is @FT_AUTOHINTER_SCRIPT_LATIN. Using the
* `default-script' property, this default value can be changed.
*
* {
* FT_Library library;
* FT_UInt default_script = FT_AUTOHINTER_SCRIPT_NONE;
*
*
* FT_Init_FreeType( &library );
*
* FT_Property_Set( library, "autofitter",
* "default-script", &default_script );
* }
*
* @note:
* This property can be used with @FT_Property_Get also.
*
* It's important to use the right timing for changing this value: The
* creation of the glyph-to-script map that eventually uses the
* default script value gets triggered either by setting or reading a
* face-specific property like @glyph-to-script-map, or by auto-hinting
* any glyph from that face. In particular, if you have already created
* an @FT_Face structure but not loaded any glyph (using the
* auto-hinter), a change of the default script will affect this face.
*
*/
/**************************************************************************
*
* @property:
* increase-x-height
*
* @description:
* For ppem values in the range 6~<= ppem <= `increase-x-height', round
* up the font's x~height much more often than normally. If the value
* is set to~0, which is the default, this feature is switched off. Use
* this property to improve the legibility of small font sizes if
* necessary.
*
* {
* FT_Library library;
* FT_Face face;
* FT_Prop_IncreaseXHeight prop;
*
*
* FT_Init_FreeType( &library );
* FT_New_Face( library, "foo.ttf", 0, &face );
* FT_Set_Char_Size( face, 10 * 64, 0, 72, 0 );
*
* prop.face = face;
* prop.limit = 14;
*
* FT_Property_Set( library, "autofitter",
* "increase-x-height", &prop );
* }
*
* @note:
* This property can be used with @FT_Property_Get also.
*
* Set this value right after calling @FT_Set_Char_Size, but before
* loading any glyph (using the auto-hinter).
*
*/
/**************************************************************************
*
* @struct:
* FT_Prop_IncreaseXHeight
*
* @description:
* The data exchange structure for the @increase-x-height property.
*
*/
typedef struct FT_Prop_IncreaseXHeight_
{
FT_Face face;
FT_UInt limit;
} FT_Prop_IncreaseXHeight;
/**************************************************************************
*
* @property:
* warping
*
* @description:
* *Experimental* *only*
*
* If FreeType gets compiled with option AF_CONFIG_OPTION_USE_WARPER to
* activate the warp hinting code in the auto-hinter, this property
* switches warping on and off.
*
* Warping only works in `light' auto-hinting mode. The idea of the
* code is to slightly scale and shift a glyph along the non-hinted
* dimension (which is usually the horizontal axis) so that as much of
* its segments are aligned (more or less) to the grid. To find out a
* glyph's optimal scaling and shifting value, various parameter
* combinations are tried and scored.
*
* By default, warping is off. The example below shows how to switch on
* warping (omitting the error handling).
*
* {
* FT_Library library;
* FT_Bool warping = 1;
*
*
* FT_Init_FreeType( &library );
*
* FT_Property_Set( library, "autofitter",
* "warping", &warping );
* }
*
* @note:
* This property can be used with @FT_Property_Get also.
*
* 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 `light' hinting mode.
*
*/
/* */
FT_END_HEADER
#endif /* __FTAUTOH_H__ */
/* END */

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

@ -1,262 +0,0 @@
/***************************************************************************/
/* */
/* ftcffdrv.h */
/* */
/* FreeType API for controlling the CFF driver (specification only). */
/* */
/* Copyright 2013-2015 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 __FTCFFDRV_H__
#define __FTCFFDRV_H__
#include <ft2build.h>
#include FT_FREETYPE_H
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
#error "Please fix the directory search order for header files"
#error "so that freetype.h of FreeType 2 is found first."
#endif
FT_BEGIN_HEADER
/**************************************************************************
*
* @section:
* cff_driver
*
* @title:
* The CFF driver
*
* @abstract:
* Controlling the CFF driver module.
*
* @description:
* While FreeType's CFF driver doesn't expose API functions by itself,
* it is possible to control its behaviour with @FT_Property_Set and
* @FT_Property_Get. The list below gives the available properties
* together with the necessary macros and structures.
*
* The CFF driver's module name is `cff'.
*
* *Hinting* *and* *antialiasing* *principles* *of* *the* *new* *engine*
*
* The rasterizer is positioning horizontal features (e.g., ascender
* height & x-height, or crossbars) on the pixel grid and minimizing the
* amount of antialiasing applied to them, while placing vertical
* features (vertical stems) on the pixel grid without hinting, thus
* representing the stem position and weight accurately. Sometimes the
* vertical stems may be only partially black. In this context,
* `antialiasing' means that stems are not positioned exactly on pixel
* borders, causing a fuzzy appearance.
*
* There are two principles behind this approach.
*
* 1) No hinting in the horizontal direction: Unlike `superhinted'
* TrueType, which changes glyph widths to accommodate regular
* inter-glyph spacing, Adobe's approach is `faithful to the design' in
* representing both the glyph width and the inter-glyph spacing
* designed for the font. This makes the screen display as close as it
* can be to the result one would get with infinite resolution, while
* preserving what is considered the key characteristics of each glyph.
* Note that the distances between unhinted and grid-fitted positions at
* small sizes are comparable to kerning values and thus would be
* noticeable (and distracting) while reading if hinting were applied.
*
* One of the reasons to not hint horizontally is antialiasing for LCD
* screens: The pixel geometry of modern displays supplies three
* vertical sub-pixels as the eye moves horizontally across each visible
* pixel. On devices where we can be certain this characteristic is
* present a rasterizer can take advantage of the sub-pixels to add
* increments of weight. In Western writing systems this turns out to
* be the more critical direction anyway; the weights and spacing of
* vertical stems (see above) are central to Armenian, Cyrillic, Greek,
* and Latin type designs. Even when the rasterizer uses greyscale
* antialiasing instead of color (a necessary compromise when one
* doesn't know the screen characteristics), the unhinted vertical
* features preserve the design's weight and spacing much better than
* aliased type would.
*
* 2) Aligment in the vertical direction: Weights and spacing along the
* y~axis are less critical; what is much more important is the visual
* alignment of related features (like cap-height and x-height). The
* sense of alignment for these is enhanced by the sharpness of grid-fit
* edges, while the cruder vertical resolution (full pixels instead of
* 1/3 pixels) is less of a problem.
*
* On the technical side, horizontal alignment zones for ascender,
* x-height, and other important height values (traditionally called
* `blue zones') as defined in the font are positioned independently,
* each being rounded to the nearest pixel edge, taking care of
* overshoot suppression at small sizes, stem darkening, and scaling.
*
* Hstems (this is, hint values defined in the font to help align
* horizontal features) that fall within a blue zone are said to be
* `captured' and are aligned to that zone. Uncaptured stems are moved
* in one of four ways, top edge up or down, bottom edge up or down.
* Unless there are conflicting hstems, the smallest movement is taken
* to minimize distortion.
*
* @order:
* hinting-engine
* no-stem-darkening
* darkening-parameters
*
*/
/**************************************************************************
*
* @property:
* hinting-engine
*
* @description:
* Thanks to Adobe, which contributed a new hinting (and parsing)
* engine, an application can select between `freetype' and `adobe' if
* compiled with CFF_CONFIG_OPTION_OLD_ENGINE. If this configuration
* macro isn't defined, `hinting-engine' does nothing.
*
* The default engine is `freetype' if CFF_CONFIG_OPTION_OLD_ENGINE is
* defined, and `adobe' otherwise.
*
* The following example code demonstrates how to select Adobe's hinting
* engine (omitting the error handling).
*
* {
* FT_Library library;
* FT_UInt hinting_engine = FT_CFF_HINTING_ADOBE;
*
*
* FT_Init_FreeType( &library );
*
* FT_Property_Set( library, "cff",
* "hinting-engine", &hinting_engine );
* }
*
* @note:
* This property can be used with @FT_Property_Get also.
*
*/
/**************************************************************************
*
* @enum:
* FT_CFF_HINTING_XXX
*
* @description:
* A list of constants used for the @hinting-engine property to select
* the hinting engine for CFF fonts.
*
* @values:
* FT_CFF_HINTING_FREETYPE ::
* Use the old FreeType hinting engine.
*
* FT_CFF_HINTING_ADOBE ::
* Use the hinting engine contributed by Adobe.
*
*/
#define FT_CFF_HINTING_FREETYPE 0
#define FT_CFF_HINTING_ADOBE 1
/**************************************************************************
*
* @property:
* no-stem-darkening
*
* @description:
* By default, the Adobe CFF engine darkens stems at smaller sizes,
* regardless of hinting, to enhance contrast. This feature requires
* a rendering system with proper gamma correction. Setting this
* property, stem darkening gets switched off.
*
* Note that stem darkening is never applied if @FT_LOAD_NO_SCALE is set.
*
* {
* FT_Library library;
* FT_Bool no_stem_darkening = TRUE;
*
*
* FT_Init_FreeType( &library );
*
* FT_Property_Set( library, "cff",
* "no-stem-darkening", &no_stem_darkening );
* }
*
* @note:
* This property can be used with @FT_Property_Get also.
*
*/
/**************************************************************************
*
* @property:
* darkening-parameters
*
* @description:
* By default, the Adobe CFF engine darkens stems as follows (if the
* `no-stem-darkening' property isn't set):
*
* {
* stem width <= 0.5px: darkening amount = 0.4px
* stem width = 1px: darkening amount = 0.275px
* stem width = 1.667px: darkening amount = 0.275px
* stem width >= 2.333px: darkening amount = 0px
* }
*
* and piecewise linear in-between. At configuration time, these four
* control points can be set with the macro
* `CFF_CONFIG_OPTION_DARKENING_PARAMETERS'. At runtime, the control
* points can be changed using the `darkening-parameters' property, as
* the following example demonstrates.
*
* {
* FT_Library library;
* FT_Int darken_params[8] = { 500, 300, // x1, y1
* 1000, 200, // x2, y2
* 1500, 100, // x3, y3
* 2000, 0 }; // x4, y4
*
*
* FT_Init_FreeType( &library );
*
* FT_Property_Set( library, "cff",
* "darkening-parameters", darken_params );
* }
*
* The x~values give the stem width, and the y~values the darkening
* amount. The unit is 1000th of pixels. All coordinate values must be
* positive; the x~values must be monotonically increasing; the
* y~values must be monotonically decreasing and smaller than or
* equal to 500 (corresponding to half a pixel); the slope of each
* linear piece must be shallower than -1 (e.g., -.4).
*
* @note:
* This property can be used with @FT_Property_Get also.
*
*/
/* */
FT_END_HEADER
#endif /* __FTCFFDRV_H__ */
/* END */

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

@ -1,310 +0,0 @@
/***************************************************************************/
/* */
/* ftttdrv.h */
/* */
/* FreeType API for controlling the TrueType driver */
/* (specification only). */
/* */
/* Copyright 2013-2015 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 __FTTTDRV_H__
#define __FTTTDRV_H__
#include <ft2build.h>
#include FT_FREETYPE_H
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
#error "Please fix the directory search order for header files"
#error "so that freetype.h of FreeType 2 is found first."
#endif
FT_BEGIN_HEADER
/**************************************************************************
*
* @section:
* tt_driver
*
* @title:
* The TrueType driver
*
* @abstract:
* Controlling the TrueType driver module.
*
* @description:
* While FreeType's TrueType driver doesn't expose API functions by
* itself, it is possible to control its behaviour with @FT_Property_Set
* and @FT_Property_Get. The following lists the available properties
* together with the necessary macros and structures.
*
* The TrueType driver's module name is `truetype'.
*
* We start with a list of definitions, kindly provided by Greg
* Hitchcock.
*
* _Bi-Level_ _Rendering_
*
* Monochromatic rendering, exclusively used in the early days of
* TrueType by both Apple and Microsoft. Microsoft's GDI interface
* supported hinting of the right-side bearing point, such that the
* advance width could be non-linear. Most often this was done to
* achieve some level of glyph symmetry. To enable reasonable
* performance (e.g., not having to run hinting on all glyphs just to
* get the widths) there was a bit in the head table indicating if the
* side bearing was hinted, and additional tables, `hdmx' and `LTSH', to
* cache hinting widths across multiple sizes and device aspect ratios.
*
* _Font_ _Smoothing_
*
* Microsoft's GDI implementation of anti-aliasing. Not traditional
* anti-aliasing as the outlines were hinted before the sampling. The
* widths matched the bi-level rendering.
*
* _ClearType_ _Rendering_
*
* Technique that uses physical subpixels to improve rendering on LCD
* (and other) displays. Because of the higher resolution, many methods
* of improving symmetry in glyphs through hinting the right-side
* bearing were no longer necessary. This lead to what GDI calls
* `natural widths' ClearType, see
* http://www.beatstamm.com/typography/RTRCh4.htm#Sec21. Since hinting
* has extra resolution, most non-linearity went away, but it is still
* possible for hints to change the advance widths in this mode.
*
* _ClearType_ _Compatible_ _Widths_
*
* One of the earliest challenges with ClearType was allowing the
* implementation in GDI to be selected without requiring all UI and
* documents to reflow. To address this, a compatible method of
* rendering ClearType was added where the font hints are executed once
* to determine the width in bi-level rendering, and then re-run in
* ClearType, with the difference in widths being absorbed in the font
* hints for ClearType (mostly in the white space of hints); see
* http://www.beatstamm.com/typography/RTRCh4.htm#Sec20. Somewhat by
* definition, compatible width ClearType allows for non-linear widths,
* but only when the bi-level version has non-linear widths.
*
* _ClearType_ _Subpixel_ _Positioning_
*
* One of the nice benefits of ClearType is the ability to more crisply
* display fractional widths; unfortunately, the GDI model of integer
* bitmaps did not support this. However, the WPF and Direct Write
* frameworks do support fractional widths. DWrite calls this `natural
* mode', not to be confused with GDI's `natural widths'. Subpixel
* positioning, in the current implementation of Direct Write,
* unfortunately does not support hinted advance widths, see
* http://www.beatstamm.com/typography/RTRCh4.htm#Sec22. Note that the
* TrueType interpreter fully allows the advance width to be adjusted in
* this mode, just the DWrite client will ignore those changes.
*
* _ClearType_ _Backwards_ _Compatibility_
*
* This is a set of exceptions made in the TrueType interpreter to
* minimize hinting techniques that were problematic with the extra
* resolution of ClearType; see
* http://www.beatstamm.com/typography/RTRCh4.htm#Sec1 and
* http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx.
* This technique is not to be confused with ClearType compatible
* widths. ClearType backwards compatibility has no direct impact on
* changing advance widths, but there might be an indirect impact on
* disabling some deltas. This could be worked around in backwards
* compatibility mode.
*
* _Native_ _ClearType_ _Mode_
*
* (Not to be confused with `natural widths'.) This mode removes all
* the exceptions in the TrueType interpreter when running with
* ClearType. Any issues on widths would still apply, though.
*
*/
/**************************************************************************
*
* @property:
* interpreter-version
*
* @description:
* Currently, two versions are available, representing the bytecode
* interpreter with and without subpixel hinting support,
* respectively. The default is subpixel support if
* TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined, and no subpixel
* support otherwise (since it isn't available then).
*
* If subpixel hinting is on, many TrueType bytecode instructions behave
* differently compared to B/W or grayscale rendering (except if `native
* ClearType' is selected by the font). The main idea is to render at a
* much increased horizontal resolution, then sampling down the created
* output to subpixel precision. However, many older fonts are not
* suited to this and must be specially taken care of by applying
* (hardcoded) font-specific tweaks.
*
* Details on subpixel hinting and some of the necessary tweaks can be
* found in Greg Hitchcock's whitepaper at
* `http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx'.
*
* The following example code demonstrates how to activate subpixel
* hinting (omitting the error handling).
*
* {
* FT_Library library;
* FT_Face face;
* FT_UInt interpreter_version = TT_INTERPRETER_VERSION_38;
*
*
* FT_Init_FreeType( &library );
*
* FT_Property_Set( library, "truetype",
* "interpreter-version",
* &interpreter_version );
* }
*
* @note:
* This property can be used with @FT_Property_Get also.
*
*/
/**************************************************************************
*
* @enum:
* TT_INTERPRETER_VERSION_XXX
*
* @description:
* A list of constants used for the @interpreter-version property to
* select the hinting engine for Truetype fonts.
*
* The numeric value in the constant names represents the version
* number as returned by the `GETINFO' bytecode instruction.
*
* @values:
* TT_INTERPRETER_VERSION_35 ::
* Version~35 corresponds to MS rasterizer v.1.7 as used e.g. in
* Windows~98; only grayscale and B/W rasterizing is supported.
*
* TT_INTERPRETER_VERSION_38 ::
* Version~38 corresponds to MS rasterizer v.1.9; it is roughly
* equivalent to the hinting provided by DirectWrite ClearType (as
* can be found, for example, in the Internet Explorer~9 running on
* Windows~7).
*
* @note:
* This property controls the behaviour of the bytecode interpreter
* and thus how outlines get hinted. It does *not* control how glyph
* get rasterized! In particular, it does not control subpixel color
* filtering.
*
* If FreeType has not been compiled with configuration option
* FT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version~38 causes an
* `FT_Err_Unimplemented_Feature' error.
*
* Depending on the graphics framework, Microsoft uses different
* bytecode and rendering engines. As a consequence, the version
* numbers returned by a call to the `GETINFO' bytecode instruction are
* more convoluted than desired.
*
* Here are two tables that try to shed some light on the possible
* values for the MS rasterizer engine, together with the additional
* features introduced by it.
*
* {
* GETINFO framework version feature
* -------------------------------------------------------------------
* 3 GDI (Win 3.1), v1.0 16-bit, first version
* TrueImage
* 33 GDI (Win NT 3.1), v1.5 32-bit
* HP Laserjet
* 34 GDI (Win 95) v1.6 font smoothing,
* new SCANTYPE opcode
* 35 GDI (Win 98/2000) v1.7 (UN)SCALED_COMPONENT_OFFSET
* bits in composite glyphs
* 36 MGDI (Win CE 2) v1.6+ classic ClearType
* 37 GDI (XP and later), v1.8 ClearType
* GDI+ old (before Vista)
* 38 GDI+ old (Vista, Win 7), v1.9 subpixel ClearType,
* WPF Y-direction ClearType,
* additional error checking
* 39 DWrite (before Win 8) v2.0 subpixel ClearType flags
* in GETINFO opcode,
* bug fixes
* 40 GDI+ (after Win 7), v2.1 Y-direction ClearType flag
* DWrite (Win 8) in GETINFO opcode,
* Gray ClearType
* }
*
* The `version' field gives a rough orientation only, since some
* applications provided certain features much earlier (as an example,
* Microsoft Reader used subpixel and Y-direction ClearType already in
* Windows 2000). Similarly, updates to a given framework might include
* improved hinting support.
*
* {
* version sampling rendering comment
* x y x y
* --------------------------------------------------------------
* v1.0 normal normal B/W B/W bi-level
* v1.6 high high gray gray grayscale
* v1.8 high normal color-filter B/W (GDI) ClearType
* v1.9 high high color-filter gray Color ClearType
* v2.1 high normal gray B/W Gray ClearType
* v2.1 high high gray gray Gray ClearType
* }
*
* Color and Gray ClearType are the two available variants of
* `Y-direction ClearType', meaning grayscale rasterization along the
* Y-direction; the name used in the TrueType specification for this
* feature is `symmetric smoothing'. `Classic ClearType' is the
* original algorithm used before introducing a modified version in
* Win~XP. Another name for v1.6's grayscale rendering is `font
* smoothing', and `Color ClearType' is sometimes also called `DWrite
* ClearType'. To differentiate between today's Color ClearType and the
* earlier ClearType variant with B/W rendering along the vertical axis,
* the latter is sometimes called `GDI ClearType'.
*
* `Normal' and `high' sampling describe the (virtual) resolution to
* access the rasterized outline after the hinting process. `Normal'
* means 1 sample per grid line (i.e., B/W). In the current Microsoft
* implementation, `high' means an extra virtual resolution of 16x16 (or
* 16x1) grid lines per pixel for bytecode instructions like `MIRP'.
* After hinting, these 16 grid lines are mapped to 6x5 (or 6x1) grid
* lines for color filtering if Color ClearType is activated.
*
* Note that `Gray ClearType' is essentially the same as v1.6's
* grayscale rendering. However, the GETINFO instruction handles it
* differently: v1.6 returns bit~12 (hinting for grayscale), while v2.1
* returns bits~13 (hinting for ClearType), 18 (symmetrical smoothing),
* and~19 (Gray ClearType). Also, this mode respects bits 2 and~3 for
* the version~1 gasp table exclusively (like Color ClearType), while
* v1.6 only respects the values of version~0 (bits 0 and~1).
*
* FreeType doesn't provide all capabilities of the most recent
* ClearType incarnation, thus we identify our subpixel support as
* version~38.
*
*/
#define TT_INTERPRETER_VERSION_35 35
#define TT_INTERPRETER_VERSION_38 38
/* */
FT_END_HEADER
#endif /* __FTTTDRV_H__ */
/* END */

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

@ -4,7 +4,7 @@
*
* High-level 'autohint' module-specific 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,
@ -70,8 +70,7 @@
*/
#include <ft2build.h>
#include FT_FREETYPE_H
#include <freetype/freetype.h>
FT_BEGIN_HEADER
@ -208,6 +207,9 @@ FT_BEGIN_HEADER
} FT_AutoHinter_InterfaceRec, *FT_AutoHinter_Interface;
#define FT_DECLARE_AUTOHINTER_INTERFACE( class_ ) \
FT_CALLBACK_TABLE const FT_AutoHinter_InterfaceRec class_;
#define FT_DEFINE_AUTOHINTER_INTERFACE( \
class_, \
reset_face_, \

View File

@ -4,7 +4,7 @@
*
* Basic OpenType/CFF object type definitions (specification).
*
* 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,12 +19,11 @@
#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
#include <freetype/internal/ftobjs.h>
#include <freetype/internal/cfftypes.h>
#include <freetype/internal/tttypes.h>
#include <freetype/internal/services/svpscmap.h>
#include <freetype/internal/pshints.h>
FT_BEGIN_HEADER

View File

@ -5,7 +5,7 @@
* Basic OpenType/CFF type 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,13 +21,12 @@
#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
#include <freetype/freetype.h>
#include <freetype/t1tables.h>
#include <freetype/internal/ftserv.h>
#include <freetype/internal/services/svpscmap.h>
#include <freetype/internal/pshints.h>
#include <freetype/internal/t1types.h>
FT_BEGIN_HEADER

View File

@ -0,0 +1,307 @@
/****************************************************************************
*
* internal/compiler-macros.h
*
* Compiler-specific macro definitions used internally by FreeType.
*
* 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.
*
*/
#ifndef INTERNAL_COMPILER_MACROS_H_
#define INTERNAL_COMPILER_MACROS_H_
#include <freetype/config/public-macros.h>
FT_BEGIN_HEADER
/* Fix compiler warning with sgi compiler. */
#if defined( __sgi ) && !defined( __GNUC__ )
# if defined( _COMPILER_VERSION ) && ( _COMPILER_VERSION >= 730 )
# pragma set woff 3505
# 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
/*
* When defining a macro that expands to a non-trivial C statement, use
* FT_BEGIN_STMNT and FT_END_STMNT to enclose the macro's body. This
* ensures there are no surprises when the macro is invoked in conditional
* branches.
*
* Example:
*
* #define LOG( ... ) \
* FT_BEGIN_STMNT \
* if ( logging_enabled ) \
* log( __VA_ARGS__ ); \
* FT_END_STMNT
*/
#define FT_BEGIN_STMNT do {
#define FT_END_STMNT } while ( 0 )
/*
* FT_DUMMY_STMNT expands to an empty C statement. Useful for
* conditionally defined statement macros.
*
* Example:
*
* #ifdef BUILD_CONFIG_LOGGING
* #define LOG( ... ) \
* FT_BEGIN_STMNT \
* if ( logging_enabled ) \
* log( __VA_ARGS__ ); \
* FT_END_STMNT
* #else
* # define LOG( ... ) FT_DUMMY_STMNT
* #endif
*/
#define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT
#ifdef _WIN64
/* only 64bit Windows uses the LLP64 data model, i.e., */
/* 32-bit integers, 64-bit pointers. */
#define FT_UINT_TO_POINTER( x ) (void *)(unsigned __int64)(x)
#else
#define FT_UINT_TO_POINTER( x ) (void *)(unsigned long)(x)
#endif
/*
* Use `FT_TYPEOF( type )` to cast a value to `type`. This is useful to
* suppress signedness compilation warnings in macros.
*
* Example:
*
* #define PAD_( x, n ) ( (x) & ~FT_TYPEOF( x )( (n) - 1 ) )
*
* (The `typeof` condition is 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
/*
* Mark a function declaration as internal to the library. This ensures
* that it will not be exposed by default to client code, and helps
* generate smaller and faster code on ELF-based platforms. Place this
* before a function declaration.
*/
/* Visual C, mingw */
#if defined( _WIN32 )
#define FT_INTERNAL_FUNCTION_ATTRIBUTE /* empty */
/* gcc, clang */
#elif ( defined( __GNUC__ ) && __GNUC__ >= 4 ) || defined( __clang__ )
#define FT_INTERNAL_FUNCTION_ATTRIBUTE \
__attribute__(( visibility( "hidden" ) ))
/* Sun */
#elif defined( __SUNPRO_C ) && __SUNPRO_C >= 0x550
#define FT_INTERNAL_FUNCTION_ATTRIBUTE __hidden
#else
#define FT_INTERNAL_FUNCTION_ATTRIBUTE /* empty */
#endif
/*
* FreeType supports compilation of its C sources with a C++ compiler (in
* C++ mode); this introduces a number of subtle issues.
*
* The main one is that a C++ function declaration and its definition must
* have the same 'linkage'. Because all FreeType headers declare their
* functions with C linkage (i.e., within an `extern "C" { ... }` block
* due to the magic of FT_BEGIN_HEADER and FT_END_HEADER), their
* definition in FreeType sources should also be prefixed with `extern
* "C"` when compiled in C++ mode.
*
* The `FT_FUNCTION_DECLARATION` and `FT_FUNCTION_DEFINITION` macros are
* provided to deal with this case, as well as `FT_CALLBACK_DEF` and its
* siblings below.
*/
/*
* `FT_FUNCTION_DECLARATION( type )` can be used to write a C function
* declaration to ensure it will have C linkage when the library is built
* with a C++ compiler. The parameter is the function's return type, so a
* declaration would look like
*
* FT_FUNCTION_DECLARATION( int )
* foo( int x );
*
* NOTE: This requires that all uses are inside of `FT_BEGIN_HEADER ...
* FT_END_HEADER` blocks, which guarantees that the declarations have C
* linkage when the headers are included by C++ sources.
*
* NOTE: Do not use directly. Use `FT_LOCAL`, `FT_BASE`, and `FT_EXPORT`
* instead.
*/
#define FT_FUNCTION_DECLARATION( x ) extern x
/*
* Same as `FT_FUNCTION_DECLARATION`, but for function definitions instead.
*
* NOTE: Do not use directly. Use `FT_LOCAL_DEF`, `FT_BASE_DEF`, and
* `FT_EXPORT_DEF` instead.
*/
#ifdef __cplusplus
#define FT_FUNCTION_DEFINITION( x ) extern "C" x
#else
#define FT_FUNCTION_DEFINITION( x ) x
#endif
/*
* Use `FT_LOCAL` and `FT_LOCAL_DEF` to declare and define, respectively,
* an internal FreeType function that is only used by the sources of a
* single `src/module/` directory. This ensures that the functions are
* turned into static ones at build time, resulting in smaller and faster
* code.
*/
#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
#define FT_LOCAL( x ) static x
#define FT_LOCAL_DEF( x ) static x
#else
#define FT_LOCAL( x ) FT_INTERNAL_FUNCTION_ATTRIBUTE \
FT_FUNCTION_DECLARATION( x )
#define FT_LOCAL_DEF( x ) FT_FUNCTION_DEFINITION( x )
#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
/*
* Use `FT_LOCAL_ARRAY` and `FT_LOCAL_ARRAY_DEF` to declare and define,
* respectively, a constant array that must be accessed from several
* sources in the same `src/module/` sub-directory, and which are internal
* to the library.
*/
#define FT_LOCAL_ARRAY( x ) FT_INTERNAL_FUNCTION_ATTRIBUTE \
extern const x
#define FT_LOCAL_ARRAY_DEF( x ) FT_FUNCTION_DEFINITION( const x )
/*
* `Use FT_BASE` and `FT_BASE_DEF` to declare and define, respectively, an
* internal library function that is used by more than a single module.
*/
#define FT_BASE( x ) FT_INTERNAL_FUNCTION_ATTRIBUTE \
FT_FUNCTION_DECLARATION( x )
#define FT_BASE_DEF( x ) FT_FUNCTION_DEFINITION( x )
/*
* NOTE: Conditionally define `FT_EXPORT_VAR` due to its definition in
* `src/smooth/ftgrays.h` to make the header more portable.
*/
#ifndef FT_EXPORT_VAR
#define FT_EXPORT_VAR( x ) FT_FUNCTION_DECLARATION( x )
#endif
/* 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`. */
/* */
/* See `freetype/config/compiler_macros.h` for the `FT_EXPORT` definition */
#define FT_EXPORT_DEF( x ) FT_FUNCTION_DEFINITION( x )
/* 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. */
/* */
#ifdef __cplusplus
#define FT_CALLBACK_DEF( x ) extern "C" x
#else
#define FT_CALLBACK_DEF( x ) static x
#endif
#define FT_BASE_CALLBACK( x ) FT_FUNCTION_DECLARATION( x )
#define FT_BASE_CALLBACK_DEF( x ) FT_FUNCTION_DEFINITION( x )
#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 /* INTERNAL_COMPILER_MACROS_H_ */

View File

@ -4,7 +4,7 @@
*
* Arithmetic computations (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,9 @@
#define FTCALC_H_
#include <ft2build.h>
#include FT_FREETYPE_H
#include <freetype/freetype.h>
#include "compiler-macros.h"
FT_BEGIN_HEADER
@ -449,8 +449,7 @@ FT_BEGIN_HEADER
#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 ) ) )
#define ROUND_F26DOT6( x ) ( ( (x) + 32 - ( x < 0 ) ) & -64 )
/*
* The following macros have two purposes.

View File

@ -4,7 +4,7 @@
*
* Debugging and logging component (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,
@ -27,7 +27,9 @@
#include <ft2build.h>
#include FT_CONFIG_CONFIG_H
#include FT_FREETYPE_H
#include <freetype/freetype.h>
#include "compiler-macros.h"
FT_BEGIN_HEADER
@ -56,7 +58,7 @@ FT_BEGIN_HEADER
/* defining the enumeration */
typedef enum FT_Trace_
{
#include FT_INTERNAL_TRACE_H
#include <freetype/internal/fttrace.h>
trace_count
} FT_Trace;

View File

@ -1,409 +0,0 @@
/***************************************************************************/
/* */
/* ftdriver.h */
/* */
/* FreeType font driver interface (specification). */
/* */
/* Copyright 1996-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */
/* understand and accept it fully. */
/* */
/***************************************************************************/
#ifndef __FTDRIVER_H__
#define __FTDRIVER_H__
#include <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_UInt
(*FT_CharMap_CharIndexFunc)( FT_CharMap charmap,
FT_Long charcode );
typedef FT_Long
(*FT_CharMap_CharNextFunc)( FT_CharMap charmap,
FT_Long charcode );
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. */
/* */
/* When FT_CONFIG_OPTION_PIC is defined a `create' function has to be */
/* called with a pointer where the allocated structure is returned. */
/* And when it is no longer needed a `destroy' function needs to be */
/* called to release that allocation. */
/* */
/* `fcinit.c' (ft_create_default_module_classes) already contains a */
/* mechanism to call these functions for the default modules */
/* described in `ftmodule.h'. */
/* */
/* Notice that the created `create' and `destroy' functions call */
/* `pic_init' and `pic_free' to allow you to manually allocate and */
/* initialize any additional global data, like a module specific */
/* interface, and put them in the global pic container defined in */
/* `ftpic.h'. If you don't need them just implement the functions as */
/* empty to resolve the link error. Also the `pic_init' and */
/* `pic_free' functions should be declared in `pic.h', to be referred */
/* by driver definition calling `FT_DEFINE_DRIVER' in following. */
/* */
/* When FT_CONFIG_OPTION_PIC is not defined the struct will be */
/* allocated in the global scope (or the scope where the macro is */
/* used). */
/* */
#ifndef FT_CONFIG_OPTION_PIC
#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_ \
};
#else /* FT_CONFIG_OPTION_PIC */
#define FT_DECLARE_DRIVER( class_ ) FT_DECLARE_MODULE( 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_ ) \
void \
FT_Destroy_Class_ ## class_( FT_Library library, \
FT_Module_Class* clazz ) \
{ \
FT_Memory memory = library->memory; \
FT_Driver_Class dclazz = (FT_Driver_Class)clazz; \
\
\
class_ ## _pic_free( library ); \
if ( dclazz ) \
FT_FREE( dclazz ); \
} \
\
\
FT_Error \
FT_Create_Class_ ## class_( FT_Library library, \
FT_Module_Class** output_class ) \
{ \
FT_Driver_Class clazz = NULL; \
FT_Error error; \
FT_Memory memory = library->memory; \
\
\
if ( FT_ALLOC( clazz, sizeof ( *clazz ) ) ) \
return error; \
\
error = class_ ## _pic_init( library ); \
if ( error ) \
{ \
FT_FREE( clazz ); \
return error; \
} \
\
FT_DEFINE_ROOT_MODULE( flags_, \
size_, \
name_, \
version_, \
requires_, \
interface_, \
init_, \
done_, \
get_interface_ ) \
\
clazz->face_object_size = face_object_size_; \
clazz->size_object_size = size_object_size_; \
clazz->slot_object_size = slot_object_size_; \
\
clazz->init_face = init_face_; \
clazz->done_face = done_face_; \
\
clazz->init_size = init_size_; \
clazz->done_size = done_size_; \
\
clazz->init_slot = init_slot_; \
clazz->done_slot = done_slot_; \
\
clazz->load_glyph = load_glyph_; \
\
clazz->get_kerning = get_kerning_; \
clazz->attach_file = attach_file_; \
clazz->get_advances = get_advances_; \
\
clazz->request_size = request_size_; \
clazz->select_size = select_size_; \
\
*output_class = (FT_Module_Class*)clazz; \
\
return FT_Err_Ok; \
}
#endif /* FT_CONFIG_OPTION_PIC */
FT_END_HEADER
#endif /* __FTDRIVER_H__ */
/* END */

View File

@ -4,7 +4,7 @@
*
* FreeType internal font driver 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,9 @@
#define FTDRV_H_
#include <ft2build.h>
#include FT_MODULE_H
#include <freetype/ftmodapi.h>
#include "compiler-macros.h"
FT_BEGIN_HEADER

View File

@ -4,7 +4,7 @@
*
* The FreeType glyph loader (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,
@ -20,8 +20,7 @@
#define FTGLOADR_H_
#include <ft2build.h>
#include FT_FREETYPE_H
#include <freetype/freetype.h>
FT_BEGIN_HEADER
@ -138,8 +137,6 @@ FT_BEGIN_HEADER
FT_BASE( void )
FT_GlyphLoader_Add( FT_GlyphLoader loader );
/* */
FT_END_HEADER

View File

@ -43,8 +43,7 @@
#define FTHASH_H_
#include <ft2build.h>
#include FT_FREETYPE_H
#include <freetype/freetype.h>
FT_BEGIN_HEADER

View File

@ -4,7 +4,7 @@
*
* The FreeType memory management macros (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,
@ -22,8 +22,9 @@
#include <ft2build.h>
#include FT_CONFIG_CONFIG_H
#include FT_TYPES_H
#include <freetype/fttypes.h>
#include "compiler-macros.h"
FT_BEGIN_HEADER
@ -57,6 +58,14 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* The calculation `NULL + n' is undefined in C. Even if the resulting */
/* pointer doesn't get dereferenced, this causes warnings with */
/* sanitizers. */
/* */
/* We thus provide a macro that should be used if `base' can be NULL. */
#define FT_OFFSET( base, count ) ( (base) ? (base) + (count) : NULL )
/*
* 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++,
@ -153,10 +162,10 @@ extern "C++"
(FT_Long)(size), \
&error ) )
#define FT_MEM_FREE( ptr ) \
FT_BEGIN_STMNT \
ft_mem_free( memory, (ptr) ); \
(ptr) = NULL; \
#define FT_MEM_FREE( ptr ) \
FT_BEGIN_STMNT \
FT_DEBUG_INNER( ft_mem_free( memory, (ptr) ) ); \
(ptr) = NULL; \
FT_END_STMNT
#define FT_MEM_NEW( ptr ) \
@ -381,8 +390,6 @@ extern "C++"
#define FT_STRCPYN( dst, src, size ) \
ft_mem_strcpyn( (char*)dst, (const char*)(src), (FT_ULong)(size) )
/* */
FT_END_HEADER

View File

@ -4,7 +4,7 @@
*
* The FreeType private base classes (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,
@ -26,21 +26,21 @@
#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
#include <freetype/ftrender.h>
#include <freetype/ftsizes.h>
#include <freetype/ftlcdfil.h>
#include <freetype/internal/ftmemory.h>
#include <freetype/internal/ftgloadr.h>
#include <freetype/internal/ftdrv.h>
#include <freetype/internal/autohint.h>
#include <freetype/internal/ftserv.h>
#include <freetype/internal/ftcalc.h>
#ifdef FT_CONFIG_OPTION_INCREMENTAL
#include FT_INCREMENTAL_H
#include <freetype/ftincrem.h>
#endif
#include "compiler-macros.h"
FT_BEGIN_HEADER
@ -226,8 +226,8 @@ FT_BEGIN_HEADER
} FT_CMap_ClassRec;
#define FT_DECLARE_CMAP_CLASS( class_ ) \
FT_CALLBACK_TABLE const FT_CMap_ClassRec class_;
#define FT_DECLARE_CMAP_CLASS( class_ ) \
FT_CALLBACK_TABLE const FT_CMap_ClassRec class_;
#define FT_DEFINE_CMAP_CLASS( \
class_, \
@ -653,7 +653,7 @@ FT_BEGIN_HEADER
FT_BASE( void )
FT_Done_GlyphSlot( FT_GlyphSlot slot );
/* */
/* */
#define FT_REQUEST_WIDTH( req ) \
( (req)->horiResolution \
@ -1057,6 +1057,9 @@ FT_BEGIN_HEADER
* The struct will be allocated in the global scope (or the scope where
* the macro is used).
*/
#define FT_DECLARE_GLYPH( class_ ) \
FT_CALLBACK_TABLE const FT_Glyph_Class class_;
#define FT_DEFINE_GLYPH( \
class_, \
size_, \

View File

@ -1,71 +0,0 @@
/***************************************************************************/
/* */
/* ftpic.h */
/* */
/* The FreeType position independent code services (declaration). */
/* */
/* Copyright 2009-2018 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* 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. */
/* */
/***************************************************************************/
/*************************************************************************/
/* */
/* Modules that ordinarily have const global data that need address */
/* can instead define pointers here. */
/* */
/*************************************************************************/
#ifndef FTPIC_H_
#define FTPIC_H_
FT_BEGIN_HEADER
#ifdef FT_CONFIG_OPTION_PIC
typedef struct FT_PIC_Container_
{
/* pic containers for base */
void* base;
/* pic containers for modules */
void* autofit;
void* cff;
void* pshinter;
void* psnames;
void* raster;
void* sfnt;
void* smooth;
void* truetype;
} FT_PIC_Container;
/* Initialize the various function tables, structs, etc. */
/* stored in the container. */
FT_BASE( FT_Error )
ft_pic_container_init( FT_Library library );
/* Destroy the contents of the container. */
FT_BASE( void )
ft_pic_container_destroy( FT_Library library );
#endif /* FT_CONFIG_OPTION_PIC */
/* */
FT_END_HEADER
#endif /* FTPIC_H_ */
/* END */

View File

@ -4,7 +4,7 @@
*
* Get and set properties of PostScript drivers (specification).
*
* 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,
@ -20,8 +20,7 @@
#define FTPSPROP_H_
#include <ft2build.h>
#include FT_FREETYPE_H
#include <freetype/freetype.h>
FT_BEGIN_HEADER

View File

@ -4,7 +4,7 @@
*
* Embedded resource forks accessor (specification).
*
* Copyright (C) 2004-2019 by
* Copyright (C) 2004-2020 by
* Masatake YAMATO and Redhat K.K.
*
* This file is part of the FreeType project, and may only be used,
@ -25,8 +25,7 @@
#define FTRFORK_H_
#include <ft2build.h>
#include FT_INTERNAL_OBJECTS_H
#include <freetype/internal/ftobjs.h>
FT_BEGIN_HEADER

View File

@ -4,7 +4,7 @@
*
* The FreeType services (specification only).
*
* 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,
@ -31,6 +31,7 @@
#ifndef FTSERV_H_
#define FTSERV_H_
#include "compiler-macros.h"
FT_BEGIN_HEADER
@ -486,33 +487,6 @@ FT_BEGIN_HEADER
/* */
/*
* 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_ */

View File

@ -4,7 +4,7 @@
*
* Stream 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,
@ -21,8 +21,8 @@
#include <ft2build.h>
#include FT_SYSTEM_H
#include FT_INTERNAL_OBJECTS_H
#include <freetype/ftsystem.h>
#include <freetype/internal/ftobjs.h>
FT_BEGIN_HEADER

View File

@ -4,7 +4,7 @@
*
* Tracing handling (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,
@ -49,6 +49,7 @@ FT_TRACE_DEF( cache ) /* cache sub-system (ftcache.c, etc.) */
FT_TRACE_DEF( sfdriver ) /* SFNT font driver (sfdriver.c) */
FT_TRACE_DEF( sfobjs ) /* SFNT object handler (sfobjs.c) */
FT_TRACE_DEF( sfwoff ) /* WOFF format handler (sfwoff.c) */
FT_TRACE_DEF( sfwoff2 ) /* WOFF2 format handler (sfwoff2.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) */

View File

@ -4,7 +4,7 @@
*
* FreeType validation support (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,8 +20,9 @@
#define FTVALID_H_
#include <ft2build.h>
#include FT_CONFIG_STANDARD_LIBRARY_H /* for ft_setjmp and ft_longjmp */
#include FT_CONFIG_STANDARD_LIBRARY_H /* for ft_jmpbuf */
#include "compiler-macros.h"
FT_BEGIN_HEADER

View File

@ -1,67 +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_WOFF_TYPES_H <freetype/internal/wofftypes.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 */

View File

@ -5,7 +5,7 @@
* Auxiliary functions and data structures related to PostScript fonts
* (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,14 +21,13 @@
#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
#include <freetype/internal/ftobjs.h>
#include <freetype/internal/t1types.h>
#include <freetype/internal/fthash.h>
#include <freetype/internal/tttypes.h>
#include <freetype/internal/services/svpscmap.h>
#include <freetype/internal/cfftypes.h>
#include <freetype/internal/cffotypes.h>

View File

@ -6,7 +6,7 @@
* 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
* 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,
@ -22,9 +22,8 @@
#define PSHINTS_H_
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_TYPE1_TABLES_H
#include <freetype/freetype.h>
#include <freetype/t1tables.h>
FT_BEGIN_HEADER

View File

@ -4,7 +4,7 @@
*
* The FreeType BDF services (specification).
*
* 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,8 @@
#ifndef SVBDF_H_
#define SVBDF_H_
#include FT_BDF_H
#include FT_INTERNAL_SERVICE_H
#include <freetype/ftbdf.h>
#include <freetype/internal/ftserv.h>
FT_BEGIN_HEADER

View File

@ -4,7 +4,7 @@
*
* The FreeType CFF tables loader service (specification).
*
* 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,8 @@
#ifndef SVCFFTL_H_
#define SVCFFTL_H_
#include FT_INTERNAL_SERVICE_H
#include FT_INTERNAL_CFF_TYPES_H
#include <freetype/internal/ftserv.h>
#include <freetype/internal/cfftypes.h>
FT_BEGIN_HEADER

View File

@ -4,7 +4,7 @@
*
* The FreeType CID font services (specification).
*
* Copyright (C) 2007-2019 by
* Copyright (C) 2007-2020 by
* Derek Clegg and Michael Toftdal.
*
* This file is part of the FreeType project, and may only be used,
@ -19,7 +19,7 @@
#ifndef SVCID_H_
#define SVCID_H_
#include FT_INTERNAL_SERVICE_H
#include <freetype/internal/ftserv.h>
FT_BEGIN_HEADER

View File

@ -4,7 +4,7 @@
*
* The FreeType font format service (specification only).
*
* 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,7 +19,7 @@
#ifndef SVFNTFMT_H_
#define SVFNTFMT_H_
#include FT_INTERNAL_SERVICE_H
#include <freetype/internal/ftserv.h>
FT_BEGIN_HEADER

View File

@ -4,7 +4,7 @@
*
* The FreeType glyph dictionary services (specification).
*
* 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,7 +19,7 @@
#ifndef SVGLDICT_H_
#define SVGLDICT_H_
#include FT_INTERNAL_SERVICE_H
#include <freetype/internal/ftserv.h>
FT_BEGIN_HEADER

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, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
@ -28,8 +28,8 @@
#ifndef SVGXVAL_H_
#define SVGXVAL_H_
#include FT_GX_VALIDATE_H
#include FT_INTERNAL_VALIDATE_H
#include <freetype/ftgxval.h>
#include <freetype/internal/ftvalid.h>
FT_BEGIN_HEADER

View File

@ -4,7 +4,7 @@
*
* The FreeType Kerning service (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,
@ -19,8 +19,8 @@
#ifndef SVKERN_H_
#define SVKERN_H_
#include FT_INTERNAL_SERVICE_H
#include FT_TRUETYPE_TABLES_H
#include <freetype/internal/ftserv.h>
#include <freetype/tttables.h>
FT_BEGIN_HEADER

View File

@ -4,7 +4,7 @@
*
* The FreeType services for metrics variations (specification).
*
* Copyright (C) 2016-2019 by
* Copyright (C) 2016-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 SVMETRIC_H_
#define SVMETRIC_H_
#include FT_INTERNAL_SERVICE_H
#include <freetype/internal/ftserv.h>
FT_BEGIN_HEADER

View File

@ -4,7 +4,7 @@
*
* The FreeType Multiple Masters and GX var services (specification).
*
* 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,7 +19,7 @@
#ifndef SVMM_H_
#define SVMM_H_
#include FT_INTERNAL_SERVICE_H
#include <freetype/internal/ftserv.h>
FT_BEGIN_HEADER

View File

@ -4,7 +4,7 @@
*
* The FreeType OpenType validation service (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,
@ -19,8 +19,8 @@
#ifndef SVOTVAL_H_
#define SVOTVAL_H_
#include FT_OPENTYPE_VALIDATE_H
#include FT_INTERNAL_VALIDATE_H
#include <freetype/ftotval.h>
#include <freetype/internal/ftvalid.h>
FT_BEGIN_HEADER

View File

@ -4,7 +4,7 @@
*
* Internal PFR service functions (specification).
*
* 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,8 @@
#ifndef SVPFR_H_
#define SVPFR_H_
#include FT_PFR_H
#include FT_INTERNAL_SERVICE_H
#include <freetype/ftpfr.h>
#include <freetype/internal/ftserv.h>
FT_BEGIN_HEADER
@ -56,7 +56,6 @@ FT_BEGIN_HEADER
};
/* */
FT_END_HEADER

View File

@ -4,7 +4,7 @@
*
* The FreeType PostScript name services (specification).
*
* 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,7 +19,7 @@
#ifndef SVPOSTNM_H_
#define SVPOSTNM_H_
#include FT_INTERNAL_SERVICE_H
#include <freetype/internal/ftserv.h>
FT_BEGIN_HEADER

View File

@ -4,7 +4,7 @@
*
* The FreeType property service (specification).
*
* Copyright (C) 2012-2019 by
* Copyright (C) 2012-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 @@
*
* The FreeType PostScript charmap service (specification).
*
* 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,7 +19,7 @@
#ifndef SVPSCMAP_H_
#define SVPSCMAP_H_
#include FT_INTERNAL_OBJECTS_H
#include <freetype/internal/ftobjs.h>
FT_BEGIN_HEADER

View File

@ -4,7 +4,7 @@
*
* The FreeType PostScript info service (specification).
*
* 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,8 @@
#ifndef SVPSINFO_H_
#define SVPSINFO_H_
#include FT_INTERNAL_SERVICE_H
#include FT_INTERNAL_TYPE1_TYPES_H
#include <freetype/internal/ftserv.h>
#include <freetype/internal/t1types.h>
FT_BEGIN_HEADER

View File

@ -4,7 +4,7 @@
*
* The FreeType SFNT table loading service (specification).
*
* 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,8 @@
#ifndef SVSFNT_H_
#define SVSFNT_H_
#include FT_INTERNAL_SERVICE_H
#include FT_TRUETYPE_TABLES_H
#include <freetype/internal/ftserv.h>
#include <freetype/tttables.h>
FT_BEGIN_HEADER

View File

@ -4,7 +4,7 @@
*
* The FreeType TrueType/sfnt cmap extra information service.
*
* Copyright (C) 2003-2019 by
* Copyright (C) 2003-2020 by
* Masatake YAMATO, Redhat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
@ -22,8 +22,8 @@
#ifndef SVTTCMAP_H_
#define SVTTCMAP_H_
#include FT_INTERNAL_SERVICE_H
#include FT_TRUETYPE_TABLES_H
#include <freetype/internal/ftserv.h>
#include <freetype/tttables.h>
FT_BEGIN_HEADER

View File

@ -4,7 +4,7 @@
*
* The FreeType TrueType engine query service (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,
@ -19,8 +19,8 @@
#ifndef SVTTENG_H_
#define SVTTENG_H_
#include FT_INTERNAL_SERVICE_H
#include FT_MODULE_H
#include <freetype/internal/ftserv.h>
#include <freetype/ftmodapi.h>
FT_BEGIN_HEADER

View File

@ -4,7 +4,7 @@
*
* The FreeType TrueType glyph service.
*
* Copyright (C) 2007-2019 by
* Copyright (C) 2007-2020 by
* David Turner.
*
* This file is part of the FreeType project, and may only be used,
@ -18,8 +18,8 @@
#ifndef SVTTGLYF_H_
#define SVTTGLYF_H_
#include FT_INTERNAL_SERVICE_H
#include FT_TRUETYPE_TABLES_H
#include <freetype/internal/ftserv.h>
#include <freetype/tttables.h>
FT_BEGIN_HEADER

View File

@ -4,7 +4,7 @@
*
* The FreeType Windows FNT/FONT service (specification).
*
* 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,8 @@
#ifndef SVWINFNT_H_
#define SVWINFNT_H_
#include FT_INTERNAL_SERVICE_H
#include FT_WINFONTS_H
#include <freetype/internal/ftserv.h>
#include <freetype/ftwinfnt.h>
FT_BEGIN_HEADER

View File

@ -4,7 +4,7 @@
*
* High-level 'sfnt' driver 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,10 +20,9 @@
#define SFNT_H_
#include <ft2build.h>
#include FT_INTERNAL_DRIVER_H
#include FT_INTERNAL_TRUETYPE_TYPES_H
#include FT_INTERNAL_WOFF_TYPES_H
#include <freetype/internal/ftdrv.h>
#include <freetype/internal/tttypes.h>
#include <freetype/internal/wofftypes.h>
FT_BEGIN_HEADER

Some files were not shown because too many files have changed in this diff Show More