Commit d85890f9 authored by Kitware Robot's avatar Kitware Robot Committed by Utkarsh Ayachit

freetype 2019-06-06 (92a4f876)

Code extracted from:

    https://gitlab.kitware.com/third-party/freetype.git

at commit 92a4f87696e991bada570b341c207fe9f11a1725 (for/vtk-20190606-2.10.0).
parent 82a6cf7f
......@@ -56,6 +56,15 @@ target_include_directories(freetype
"${CMAKE_CURRENT_SOURCE_DIR}/include"
"${CMAKE_CURRENT_BINARY_DIR}/include")
if (WIN32)
target_compile_definitions(
freetype PRIVATE _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS)
if (BUILD_SHARED_LIBS)
target_compile_definitions(
freetype PRIVATE DLL_EXPORT)
endif ()
endif ()
# If we want freetype's Mac font support we need to link against
# a couple of Mac OS X frameworks.
if (APPLE AND VTKFREETYPE_MAC_FONT_SUPPORT)
......
FreeType 2.9.1
==============
FreeType 2.10.0
===============
Homepage: https://www.freetype.org
......@@ -15,8 +15,8 @@
Read the files `docs/INSTALL*' for installation instructions; see
the file `docs/LICENSE.TXT' for the available licenses.
The FreeType 2 API reference is located in `docs/reference'; use the
file `ft2-toc.html' as the top entry point. Additional
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
......@@ -24,13 +24,13 @@
and download one of the following files.
freetype-doc-2.9.1.tar.bz2
freetype-doc-2.9.1.tar.gz
ftdoc291.zip
freetype-doc-2.10.0.tar.bz2
freetype-doc-2.10.0.tar.gz
ftdoc2100.zip
To view the documentation online, go to
https://www.freetype.org/freetype2/documentation.html
https://www.freetype.org/freetype2/docs/
Mailing Lists
......@@ -71,7 +71,7 @@
----------------------------------------------------------------------
Copyright 2006-2018 by
Copyright (C) 2006-2019 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
......
This diff is collapsed.
......@@ -4,7 +4,7 @@
/* */
/* Unix-specific FreeType low-level system interface (body). */
/* */
/* Copyright 1996-2018 by */
/* 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, */
......@@ -173,7 +173,7 @@
/* messages during execution. */
/* */
#undef FT_COMPONENT
#define FT_COMPONENT trace_io
#define FT_COMPONENT io
/* We use the macro STREAM_FILE for convenience to extract the */
/* system-specific stream handle from a given FreeType stream object */
......
/***************************************************************************/
/* */
/* ftdebug.c */
/* */
/* Debugging and logging component for Win32 (body). */
/* */
/* Copyright 1996-2018 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 component contains various macros and functions used to ease the */
/* debugging of the FreeType engine. Its main purpose is in assertion */
/* checking, tracing, and error detection. */
/* */
/* There are now three debugging modes: */
/* */
/* - trace mode */
/* */
/* Error and trace messages are sent to the log file (which can be the */
/* standard error output). */
/* */
/* - error mode */
/* */
/* Only error messages are generated. */
/* */
/* - release mode: */
/* */
/* No error message is sent or generated. The code is free from any */
/* debugging parts. */
/* */
/*************************************************************************/
/****************************************************************************
*
* ftdebug.c
*
* Debugging and logging component for Win32 (body).
*
* 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 component contains various macros and functions used to ease the
* debugging of the FreeType engine. Its main purpose is in assertion
* checking, tracing, and error detection.
*
* There are now three debugging modes:
*
* - trace mode
*
* Error and trace messages are sent to the log file (which can be the
* standard error output).
*
* - error mode
*
* Only error messages are generated.
*
* - release mode:
*
* No error message is sent or generated. The code is free from any
* debugging parts.
*
*/
#include <vtkfreetype/include/ft2build.h>
#include FT_FREETYPE_H
#include FT_INTERNAL_DEBUG_H
......@@ -99,19 +101,38 @@
int line,
const char* file )
{
#if 0
/* activating the code in this block makes FreeType very chatty */
fprintf( stderr,
"%s:%d: error 0x%02x: %s\n",
file,
line,
error,
FT_Error_String( error ) );
#else
FT_UNUSED( error );
FT_UNUSED( line );
FT_UNUSED( file );
#endif
return 0;
}
#endif /* FT_DEBUG_LEVEL_ERROR */
#ifdef FT_DEBUG_LEVEL_TRACE
/* array of trace levels, initialized to 0; */
/* this gets adjusted at run-time */
static int ft_trace_levels_enabled[trace_count];
/* array of trace levels, always initialized to 0 */
static int ft_trace_levels_disabled[trace_count];
/* array of trace levels, initialized to 0 */
int ft_trace_levels[trace_count];
/* a pointer to either `ft_trace_levels_enabled' */
/* or `ft_trace_levels_disabled' */
int* ft_trace_levels;
/* define array of trace toggle names */
#define FT_TRACE_DEF( x ) #x ,
......@@ -125,24 +146,66 @@
#undef FT_TRACE_DEF
/*************************************************************************/
/* */
/* Initialize the tracing sub-system. This is done by retrieving the */
/* value of the "FT2_DEBUG" environment variable. It must be a list of */
/* toggles, separated by spaces, `;' or `,'. Example: */
/* */
/* "any:3 memory:6 stream:5" */
/* */
/* This will request that all levels be set to 3, except the trace level */
/* for the memory and stream components which are set to 6 and 5, */
/* respectively. */
/* */
/* See the file `include/freetype/internal/fttrace.h' for details of the */
/* available toggle names. */
/* */
/* The level must be between 0 and 6; 0 means quiet (except for serious */
/* runtime errors), and 6 means _very_ verbose. */
/* */
/* documentation is in ftdebug.h */
FT_BASE_DEF( FT_Int )
FT_Trace_Get_Count( void )
{
return trace_count;
}
/* documentation is in ftdebug.h */
FT_BASE_DEF( const char * )
FT_Trace_Get_Name( FT_Int idx )
{
int max = FT_Trace_Get_Count();
if ( idx < max )
return ft_trace_toggles[idx];
else
return NULL;
}
/* documentation is in ftdebug.h */
FT_BASE_DEF( void )
FT_Trace_Disable( void )
{
ft_trace_levels = ft_trace_levels_disabled;
}
/* documentation is in ftdebug.h */
FT_BASE_DEF( void )
FT_Trace_Enable( void )
{
ft_trace_levels = ft_trace_levels_enabled;
}
/**************************************************************************
*
* Initialize the tracing sub-system. This is done by retrieving the
* value of the `FT2_DEBUG' environment variable. It must be a list of
* toggles, separated by spaces, `;', or `,'. Example:
*
* export FT2_DEBUG="any:3 memory:7 stream:5"
*
* This requests that all levels be set to 3, except the trace level for
* the memory and stream components which are set to 7 and 5,
* respectively.
*
* See the file `include/freetype/internal/fttrace.h' for details of
* the available toggle names.
*
* The level must be between 0 and 7; 0 means quiet (except for serious
* runtime errors), and 7 means _very_ verbose.
*/
FT_BASE_DEF( void )
ft_debug_init( void )
{
......@@ -171,8 +234,8 @@
if ( *p == ':' && p > q )
{
int n, i, len = (int)( p - q );
int level = -1, found = -1;
FT_Int n, i, len = (FT_Int)( p - q );
FT_Int level = -1, found = -1;
for ( n = 0; n < trace_count; n++ )
......@@ -206,16 +269,18 @@
{
if ( found == trace_any )
{
/* special case for "any" */
/* special case for `any' */
for ( n = 0; n < trace_count; n++ )
ft_trace_levels[n] = level;
ft_trace_levels_enabled[n] = level;
}
else
ft_trace_levels[found] = level;
ft_trace_levels_enabled[found] = level;
}
}
}
}
ft_trace_levels = ft_trace_levels_enabled;
}
......@@ -229,9 +294,39 @@
}
#endif /* !FT_DEBUG_LEVEL_TRACE */
FT_BASE_DEF( FT_Int )
FT_Trace_Get_Count( void )
{
return 0;
}
#endif /* FT_DEBUG_LEVEL_ERROR */
FT_BASE_DEF( const char * )
FT_Trace_Get_Name( FT_Int idx )
{
FT_UNUSED( idx );
return NULL;
}
FT_BASE_DEF( void )
FT_Trace_Disable( void )
{
/* nothing */
}
/* documentation is in ftdebug.h */
FT_BASE_DEF( void )
FT_Trace_Enable( void )
{
/* nothing */
}
#endif /* !FT_DEBUG_LEVEL_TRACE */
/* END */
This diff is collapsed.
This diff is collapsed.
/*
* This file registers the FreeType modules compiled into the library.
* This file registers the FreeType modules compiled into the library.
*
* If you use GNU make, this file IS NOT USED! Instead, it is created in
* the objects directory (normally `<topdir>/objs/') based on information
* from `<topdir>/modules.cfg'.
* If you use GNU make, this file IS NOT USED! Instead, it is created in
* the objects directory (normally `<topdir>/objs/`) based on information
* from `<topdir>/modules.cfg`.
*
* Please read `docs/INSTALL.ANY' and `docs/CUSTOMIZE' how to compile
* FreeType without GNU make.
* Please read `docs/INSTALL.ANY` and `docs/CUSTOMIZE` how to compile
* FreeType without GNU make.
*
*/
......
This diff is collapsed.
/***************************************************************************/
/* */
/* ftstdlib.h */
/* */
/* ANSI-specific library and header configuration file (specification */
/* only). */
/* */
/* Copyright 2002-2018 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 used to group all #includes to the ANSI C library that */
/* FreeType normally requires. It also defines macros to rename the */
/* standard functions within the FreeType source code. */
/* */
/* Load a file which defines FTSTDLIB_H_ before this one to override it. */
/* */
/*************************************************************************/
/****************************************************************************
*
* ftstdlib.h
*
* ANSI-specific library and header configuration file (specification
* only).
*
* Copyright (C) 2002-2019 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
* modified, and distributed under the terms of the FreeType project
* license, LICENSE.TXT. By continuing to use, modify, or distribute
* this file you indicate that you have read the license and
* understand and accept it fully.
*
*/
/**************************************************************************
*
* This file is used to group all `#includes` to the ANSI~C library that
* FreeType normally requires. It also defines macros to rename the
* standard functions within the FreeType source code.
*
* Load a file which defines `FTSTDLIB_H_` before this one to override it.
*
*/
#ifndef FTSTDLIB_H_
......@@ -37,23 +37,23 @@
#define ft_ptrdiff_t ptrdiff_t
/**********************************************************************/
/* */
/* integer limits */
/* */
/* 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. */
/* */
/* 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 `int' is 36 bits), we do not make any guarantee */
/* about the correct behaviour of FT2 with all fonts. */
/* */
/* In these case, `ftconfig.h' will refuse to compile anyway with a */
/* message like `couldn't find 32-bit type' or something similar. */
/* */
/**********************************************************************/
/**************************************************************************
*
* integer limits
*
* `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.
*
* 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
* `int` is 36~bits), we do not make any guarantee about the correct
* behaviour of FreeType~2 with all fonts.
*
* In these cases, `ftconfig.h` will refuse to compile anyway with a
* message like 'couldn't find 32-bit type' or something similar.
*
*/
#include <limits.h>
......@@ -68,11 +68,11 @@
#define FT_ULONG_MAX ULONG_MAX
/**********************************************************************/
/* */
/* character and string processing */
/* */
/**********************************************************************/
/**************************************************************************
*
* character and string processing
*
*/
#include <string.h>
......@@ -92,11 +92,11 @@
#define ft_strstr strstr
/**********************************************************************/
/* */
/* file handling */
/* */
/**********************************************************************/
/**************************************************************************
*
* file handling
*
*/
#include <stdio.h>
......@@ -110,11 +110,11 @@
#define ft_sprintf sprintf
/**********************************************************************/
/* */
/* sorting */
/* */
/**********************************************************************/
/**************************************************************************
*
* sorting
*
*/
#include <stdlib.h>
......@@ -122,11 +122,11 @@
#define ft_qsort qsort
/**********************************************************************/
/* */
/* memory allocation */
/* */
/**********************************************************************/
/**************************************************************************
*
* memory allocation
*
*/