Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.
/ jdk13u-dev Public archive

8285686: Update FreeType to 2.12.0 #348

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/java.desktop/share/legal/freetype.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## The FreeType Project: Freetype v2.10.4
## The FreeType Project: Freetype v2.12.0


### FreeType Notice
2 changes: 1 addition & 1 deletion src/java.desktop/share/native/libfreetype/UPDATING.txt
Original file line number Diff line number Diff line change
@@ -30,6 +30,6 @@ src/java.desktop/share/legal/freetype.md

When updating specify --with-freetype=bundled to test builds to
expose build issues.
This is important because presently on Linux and Solaris the build
This is important because presently on Linux the build
defaults to linking against the system library and does not attempt
to compile the sources.
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* ANSI-specific configuration file (specification only).
*
* Copyright (C) 1996-2020 by
* Copyright (C) 1996-2022 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* Build macros of the FreeType 2 library.
*
* Copyright (C) 1996-2020 by
* Copyright (C) 1996-2022 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -777,6 +777,18 @@
#define FT_COLOR_H <freetype/ftcolor.h>


/**************************************************************************
*
* @macro:
* FT_OTSVG_H
*
* @description:
* A macro used in `#include` statements to name the file containing the
* FreeType~2 API which handles the OpenType 'SVG~' glyphs.
*/
#define FT_OTSVG_H <freetype/otsvg.h>


/* */

/* These header files don't need to be included by the user. */
Original file line number Diff line number Diff line change
@@ -19,12 +19,15 @@ FT_USE_MODULE( FT_Driver_ClassRec, t1cid_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 )
// FT_USE_MODULE( FT_Renderer_Class, ft_svg_renderer_class )

/* EOF */
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* User-selectable configuration macros (specification only).
*
* Copyright (C) 1996-2020 by
* Copyright (C) 1996-2022 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -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
* ```
*
*/
@@ -220,6 +219,10 @@ FT_BEGIN_HEADER
* 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.
*
* If you use the GNU make build system directly (that is, without the
* `configure` script) and you define this macro, you also have to pass
* `SYSTEM_ZLIB=yes` as an argument to make.
*/
/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */

@@ -431,6 +434,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
@@ -507,6 +527,20 @@ FT_BEGIN_HEADER
#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS


/**************************************************************************
*
* OpenType SVG Glyph Support
*
* Setting this macro enables support for OpenType SVG glyphs. By
* default, FreeType can only fetch SVG documents. However, it can also
* render them if external rendering hook functions are plugged in at
* runtime.
*
* More details on the hooks can be found in file `otsvg.h`.
*/
/* #define FT_CONFIG_OPTION_SVG */


/**************************************************************************
*
* Error Strings
@@ -892,24 +926,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.
@@ -961,6 +977,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`.
@@ -989,8 +1020,8 @@ FT_BEGIN_HEADER
#error "Invalid CFF darkening parameters!"
#endif

FT_END_HEADER

FT_END_HEADER

#endif /* FTOPTION_H_ */

Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
* ANSI-specific library and header configuration file (specification
* only).
*
* Copyright (C) 2002-2020 by
* Copyright (C) 2002-2022 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -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
@@ -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


/**************************************************************************
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* FreeType integer types definitions.
*
* Copyright (C) 1996-2020 by
* Copyright (C) 1996-2022 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -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:
@@ -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
@@ -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

@@ -211,32 +218,30 @@
/* 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++ */
#elif defined( __WATCOMC__ ) && __WATCOMC__ >= 1100 /* Watcom C++ */

/* Watcom doesn't provide 64-bit data types */
#define FT_INT64 long long int
#define FT_UINT64 unsigned long long int

#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
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* Mac/OS X support configuration header.
*
* Copyright (C) 1996-2020 by
* Copyright (C) 1996-2022 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* Define a set of compiler macros used in public FreeType headers.
*
* Copyright (C) 2020 by
* Copyright (C) 2020-2022 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -103,6 +103,7 @@ FT_BEGIN_HEADER
*/
#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.
@@ -115,6 +116,23 @@ FT_BEGIN_HEADER
#endif


/*
* Support for casts in both C and C++.
*/
#ifdef __cplusplus
#define FT_STATIC_CAST( type, var ) static_cast<type>(var)
#define FT_REINTERPRET_CAST( type, var ) reinterpret_cast<type>(var)

#define FT_STATIC_BYTE_CAST( type, var ) \
static_cast<type>( static_cast<unsigned char>( var ) )
#else
#define FT_STATIC_CAST( type, var ) (type)(var)
#define FT_REINTERPRET_CAST( type, var ) (type)(var)

#define FT_STATIC_BYTE_CAST( type, var ) (type)(unsigned char)(var)
#endif


FT_END_HEADER

#endif /* FREETYPE_CONFIG_PUBLIC_MACROS_H_ */
Loading