Skip to content

Commit

Permalink
freetype: Update to upstream version 2.11.1
Browse files Browse the repository at this point in the history
(cherry picked from commit f615926)
  • Loading branch information
akien-mga committed Jan 19, 2022
1 parent d76a26e commit 4f1e33b
Show file tree
Hide file tree
Showing 473 changed files with 13,800 additions and 8,978 deletions.
2 changes: 1 addition & 1 deletion COPYRIGHT.txt
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ License: Expat and Bitstream Vera Fonts Copyright

Files: ./thirdparty/freetype/
Comment: The FreeType Project
Copyright: 1996-2020, David Turner, Robert Wilhelm, and Werner Lemberg.
Copyright: 1996-2021, David Turner, Robert Wilhelm, and Werner Lemberg.
License: FTL

Files: ./thirdparty/glad/
Expand Down
1 change: 1 addition & 0 deletions modules/freetype/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ if env["builtin_freetype"]:
"src/pshinter/pshinter.c",
"src/psnames/psnames.c",
"src/raster/raster.c",
"src/sdf/sdf.c",
"src/smooth/smooth.c",
"src/truetype/truetype.c",
"src/type1/type1.c",
Expand Down
8 changes: 4 additions & 4 deletions thirdparty/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,14 @@ comments.
## freetype

- Upstream: https://www.freetype.org
- Version: 2.10.4 (6a2b3e4007e794bfc6c91030d0ed987f925164a8, 2020)
- Version: 2.11.1 (3f83daeecb1a78d851b660eed025eeba362c0e4a, 2021)
- License: FreeType License (BSD-like)

Files extracted from upstream source:

- the `src/` folder, stripped of the `Jamfile` files and the `tools` subfolder
- the `include/` folder
- `docs/{FTL.TXT,LICENSE.TXT}`
- the `src/` folder, minus the `.mk` files and the `dlg` and `tools` subfolders
- the `include/` folder, minus the `dlg` subfolder
- `LICENSE.TXT` and `docs/FTL.TXT`


## glad
Expand Down
53 changes: 28 additions & 25 deletions thirdparty/freetype/LICENSE.TXT
Original file line number Diff line number Diff line change
@@ -1,39 +1,42 @@
FREETYPE LICENSES
-----------------

The FreeType 2 font engine is copyrighted work and cannot be used
legally without a software license. In order to make this project
usable to a vast majority of developers, we distribute it under two
The FreeType 2 font engine is copyrighted work and cannot be used
legally without a software license. In order to make this project
usable to a vast majority of developers, we distribute it under two
mutually exclusive open-source licenses.

This means that *you* must choose *one* of the two licenses described
below, then obey all its terms and conditions when using FreeType 2 in
This means that *you* must choose *one* of the two licenses described
below, then obey all its terms and conditions when using FreeType 2 in
any of your projects or products.

- The FreeType License, found in the file `FTL.TXT', which is similar
to the original BSD license *with* an advertising clause that forces
you to explicitly cite the FreeType project in your product's
documentation. All details are in the license file. This license
is suited to products which don't use the GNU General Public
License.
- The FreeType License, found in the file `docs/FTL.TXT`, which is
similar to the original BSD license *with* an advertising clause
that forces you to explicitly cite the FreeType project in your
product's documentation. All details are in the license file.
This license is suited to products which don't use the GNU General
Public License.

Note that this license is compatible to the GNU General Public
Note that this license is compatible to the GNU General Public
License version 3, but not version 2.

- The GNU General Public License version 2, found in `GPLv2.TXT' (any
later version can be used also), for programs which already use the
GPL. Note that the FTL is incompatible with GPLv2 due to its
advertisement clause.
- The GNU General Public License version 2, found in
`docs/GPLv2.TXT` (any later version can be used also), for
programs which already use the GPL. Note that the FTL is
incompatible with GPLv2 due to its advertisement clause.

The contributed BDF and PCF drivers come with a license similar to that
of the X Window System. It is compatible to the above two licenses (see
file src/bdf/README and src/pcf/README). The same holds for the files
`fthash.c' and `fthash.h'; their code was part of the BDF driver in
earlier FreeType versions.
The contributed BDF and PCF drivers come with a license similar to
that of the X Window System. It is compatible to the above two
licenses (see files `src/bdf/README` and `src/pcf/README`). The same
holds for the source code files `src/base/fthash.c` and
`include/freetype/internal/fthash.h`; they wer part of the BDF driver
in earlier FreeType versions.

The gzip module uses the zlib license (see src/gzip/zlib.h) which too is
compatible to the above two licenses.
The gzip module uses the zlib license (see `src/gzip/zlib.h`) which
too is compatible to the above two licenses.

The MD5 checksum support (only used for debugging in development builds)
is in the public domain.
The MD5 checksum support (only used for debugging in development
builds) is in the public domain.


--- end of LICENSE.TXT ---
2 changes: 1 addition & 1 deletion thirdparty/freetype/include/freetype/config/ftconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* ANSI-specific configuration file (specification only).
*
* Copyright (C) 1996-2020 by
* Copyright (C) 1996-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/freetype/include/freetype/config/ftheader.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Build macros of the FreeType 2 library.
*
* Copyright (C) 1996-2020 by
* Copyright (C) 1996-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
Expand Down
6 changes: 4 additions & 2 deletions thirdparty/freetype/include/freetype/config/ftmodule.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class )
FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class )
FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class )
FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class )
FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )
FT_USE_MODULE( FT_Module_Class, psaux_module_class )
FT_USE_MODULE( FT_Module_Class, psnames_module_class )
FT_USE_MODULE( FT_Module_Class, pshinter_module_class )
FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class )
FT_USE_MODULE( FT_Module_Class, sfnt_module_class )
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class )
FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )
FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class )
FT_USE_MODULE( FT_Renderer_Class, ft_sdf_renderer_class )
FT_USE_MODULE( FT_Renderer_Class, ft_bitmap_sdf_renderer_class )

/* EOF */
55 changes: 34 additions & 21 deletions thirdparty/freetype/include/freetype/config/ftoption.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* User-selectable configuration macros (specification only).
*
* Copyright (C) 1996-2020 by
* Copyright (C) 1996-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
Expand Down Expand Up @@ -105,8 +105,7 @@ FT_BEGIN_HEADER
*
* ```
* FREETYPE_PROPERTIES=truetype:interpreter-version=35 \
* cff:no-stem-darkening=1 \
* autofitter:warping=1
* cff:no-stem-darkening=1
* ```
*
*/
Expand Down Expand Up @@ -431,6 +430,23 @@ FT_BEGIN_HEADER
/* #define FT_DEBUG_LEVEL_TRACE */


/**************************************************************************
*
* Logging
*
* Compiling FreeType in debug or trace mode makes FreeType write error
* and trace log messages to `stderr`. Enabling this macro
* automatically forces the `FT_DEBUG_LEVEL_ERROR` and
* `FT_DEBUG_LEVEL_TRACE` macros and allows FreeType to write error and
* trace log messages to a file instead of `stderr`. For writing logs
* to a file, FreeType uses an the external `dlg` library (the source
* code is in `src/dlg`).
*
* This option needs a C99 compiler.
*/
/* #define FT_DEBUG_LOGGING */


/**************************************************************************
*
* Autofitter debugging
Expand Down Expand Up @@ -892,24 +908,6 @@ FT_BEGIN_HEADER
#endif


/**************************************************************************
*
* Compile 'autofit' module with warp hinting. The idea of the warping
* code is to slightly scale and shift a glyph within a single dimension so
* that as much of its segments are aligned (more or less) on the grid. To
* find out the optimal scaling and shifting value, various parameter
* combinations are tried and scored.
*
* You can switch warping on and off with the `warping` property of the
* auto-hinter (see file `ftdriver.h` for more information; by default it
* is switched off).
*
* This experimental option is not active if the rendering mode is
* `FT_RENDER_MODE_LIGHT`.
*/
#define AF_CONFIG_OPTION_USE_WARPER


/**************************************************************************
*
* Use TrueType-like size metrics for 'light' auto-hinting.
Expand Down Expand Up @@ -961,6 +959,21 @@ FT_BEGIN_HEADER
#endif


/*
* The TT_SUPPORT_COLRV1 macro is defined to indicate to clients that this
* version of FreeType has support for 'COLR' v1 API. This definition is
* useful to FreeType clients that want to build in support for 'COLR' v1
* depending on a tip-of-tree checkout before it is officially released in
* FreeType, and while the feature cannot yet be tested against using
* version macros. Don't change this macro. This may be removed once the
* feature is in a FreeType release version and version macros can be used
* to test for availability.
*/
#ifdef TT_CONFIG_OPTION_COLOR_LAYERS
#define TT_SUPPORT_COLRV1
#endif


/*
* Check CFF darkening parameters. The checks are the same as in function
* `cff_property_set` in file `cffdrivr.c`.
Expand Down
14 changes: 12 additions & 2 deletions thirdparty/freetype/include/freetype/config/ftstdlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* ANSI-specific library and header configuration file (specification
* only).
*
* Copyright (C) 2002-2020 by
* Copyright (C) 2002-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
Expand Down Expand Up @@ -43,7 +43,8 @@
*
* `UINT_MAX` and `ULONG_MAX` are used to automatically compute the size of
* `int` and `long` in bytes at compile-time. So far, this works for all
* platforms the library has been tested on.
* platforms the library has been tested on. We also check `ULLONG_MAX`
* to see whether we can use 64-bit `long long` later on.
*
* Note that on the extremely rare platforms that do not provide integer
* types that are _exactly_ 16 and 32~bits wide (e.g., some old Crays where
Expand All @@ -66,6 +67,15 @@
#define FT_LONG_MIN LONG_MIN
#define FT_LONG_MAX LONG_MAX
#define FT_ULONG_MAX ULONG_MAX
#ifdef LLONG_MAX
#define FT_LLONG_MAX LLONG_MAX
#endif
#ifdef LLONG_MIN
#define FT_LLONG_MIN LLONG_MIN
#endif
#ifdef ULLONG_MAX
#define FT_ULLONG_MAX ULLONG_MAX
#endif


/**************************************************************************
Expand Down
40 changes: 22 additions & 18 deletions thirdparty/freetype/include/freetype/config/integer-types.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* FreeType integer types definitions.
*
* Copyright (C) 1996-2020 by
* Copyright (C) 1996-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
Expand Down Expand Up @@ -60,6 +60,18 @@

#endif /* !defined(FT_SIZEOF_LONG) */

#ifndef FT_SIZEOF_LONG_LONG

/* The size of a `long long` type if available */
#if defined( FT_ULLONG_MAX ) && FT_ULLONG_MAX >= 0xFFFFFFFFFFFFFFFFULL
#define FT_SIZEOF_LONG_LONG ( 64 / FT_CHAR_BIT )
#else
#define FT_SIZEOF_LONG_LONG 0
#endif

#endif /* !defined(FT_SIZEOF_LONG_LONG) */


/**************************************************************************
*
* @section:
Expand Down Expand Up @@ -174,15 +186,17 @@
#endif


/* determine whether we have a 64-bit `int` type for platforms without */
/* Autoconf */
/* determine whether we have a 64-bit integer type */
#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

#elif FT_SIZEOF_LONG_LONG >= ( 64 / FT_CHAR_BIT )

#define FT_INT64 long long int
#define FT_UINT64 unsigned long long int

/**************************************************************************
*
* A 64-bit data type may create compilation problems if you compile in
Expand All @@ -192,16 +206,9 @@
*/
#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++) */
#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

Expand All @@ -211,7 +218,6 @@
/* to test the compiler version. */

/* this compiler provides the `__int64` type */
#define FT_LONG64
#define FT_INT64 __int64
#define FT_UINT64 unsigned __int64

Expand All @@ -221,22 +227,20 @@

#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 /* !__STDC__ */

#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */

#ifdef FT_LONG64
#ifdef FT_INT64
typedef FT_INT64 FT_Int64;
typedef FT_UINT64 FT_UInt64;
#endif
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/freetype/include/freetype/config/mac-support.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Mac/OS X support configuration header.
*
* Copyright (C) 1996-2020 by
* Copyright (C) 1996-2021 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
Expand Down
Loading

0 comments on commit 4f1e33b

Please sign in to comment.