mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-27 13:44:15 +01:00
-updated freetype from 2.3.7 to 2.4.10
-updated zlib from 1.2.5 to 1.2.7 -updated jpeglib from 8b to 8d -fixed possible wiiflow exit bug
This commit is contained in:
parent
ee49554a49
commit
09b5210138
@ -1,11 +1,10 @@
|
||||
/* ftconfig.h. Generated from ftconfig.in by configure. */
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* ftconfig.in */
|
||||
/* ftconfig.h */
|
||||
/* */
|
||||
/* UNIX-specific configuration file (specification only). */
|
||||
/* ANSI-specific configuration file (specification only). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008 by */
|
||||
/* Copyright 1996-2004, 2006-2008, 2010-2011 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -32,9 +31,10 @@
|
||||
/* contains system-specific files that are always included first when */
|
||||
/* building the library. */
|
||||
/* */
|
||||
/* This ANSI version should stay in `include/freetype/config'. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTCONFIG_H__
|
||||
#define __FTCONFIG_H__
|
||||
|
||||
@ -58,11 +58,6 @@ FT_BEGIN_HEADER
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
#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 */
|
||||
@ -76,22 +71,6 @@ FT_BEGIN_HEADER
|
||||
#endif
|
||||
|
||||
|
||||
/* #undef FT_USE_AUTOCONF_SIZEOF_TYPES */
|
||||
#ifdef FT_USE_AUTOCONF_SIZEOF_TYPES
|
||||
|
||||
#define SIZEOF_INT 4
|
||||
#define SIZEOF_LONG 4
|
||||
#define FT_SIZEOF_INT SIZEOF_INT
|
||||
#define FT_SIZEOF_LONG SIZEOF_LONG
|
||||
|
||||
#else /* !FT_USE_AUTOCONF_SIZEOF_TYPES */
|
||||
|
||||
/* Following cpp computation of the bit length of int and long */
|
||||
/* is copied from default include/freetype/config/ftconfig.h. */
|
||||
/* If any improvement is required for this file, it should be */
|
||||
/* applied to the original header file for the builders that */
|
||||
/* does not use configure script. */
|
||||
|
||||
/* The size of an `int' type. */
|
||||
#if FT_UINT_MAX == 0xFFFFUL
|
||||
#define FT_SIZEOF_INT (16 / FT_CHAR_BIT)
|
||||
@ -115,12 +94,6 @@ FT_BEGIN_HEADER
|
||||
#error "Unsupported size of `long' type!"
|
||||
#endif
|
||||
|
||||
#endif /* !FT_USE_AUTOCONF_SIZEOF_TYPES */
|
||||
|
||||
|
||||
/* Preferred alignment of data */
|
||||
#define FT_ALIGNMENT 8
|
||||
|
||||
|
||||
/* 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 */
|
||||
@ -147,15 +120,17 @@ FT_BEGIN_HEADER
|
||||
/* This is the only necessary change, so it is defined here instead */
|
||||
/* providing a new configuration file. */
|
||||
/* */
|
||||
#if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \
|
||||
( defined( __MWERKS__ ) && defined( macintosh ) )
|
||||
#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 )
|
||||
#define DARWIN_NO_CARBON 1
|
||||
#else
|
||||
#define FT_MACINTOSH 1
|
||||
#undef FT_MACINTOSH
|
||||
#endif
|
||||
|
||||
#elif defined( __SC__ ) || defined( __MRC__ )
|
||||
@ -168,29 +143,73 @@ FT_BEGIN_HEADER
|
||||
#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 */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* IntN types */
|
||||
/* <Type> */
|
||||
/* FT_Int16 */
|
||||
/* */
|
||||
/* Used to guarantee the size of some specific integers. */
|
||||
/* <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;
|
||||
|
||||
#if FT_SIZEOF_INT == 4
|
||||
/* */
|
||||
|
||||
|
||||
/* 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;
|
||||
|
||||
/* */
|
||||
|
||||
#endif
|
||||
|
||||
#if FT_SIZEOF_INT == (32 / FT_CHAR_BIT)
|
||||
|
||||
typedef signed int FT_Int32;
|
||||
typedef unsigned int FT_UInt32;
|
||||
|
||||
#elif FT_SIZEOF_LONG == 4
|
||||
#elif FT_SIZEOF_LONG == (32 / FT_CHAR_BIT)
|
||||
|
||||
typedef signed long FT_Int32;
|
||||
typedef unsigned long FT_UInt32;
|
||||
@ -201,12 +220,12 @@ FT_BEGIN_HEADER
|
||||
|
||||
|
||||
/* look up an integer type that is at least 32 bits */
|
||||
#if FT_SIZEOF_INT >= 4
|
||||
#if FT_SIZEOF_INT >= (32 / FT_CHAR_BIT)
|
||||
|
||||
typedef int FT_Fast;
|
||||
typedef unsigned int FT_UFast;
|
||||
|
||||
#elif FT_SIZEOF_LONG >= 4
|
||||
#elif FT_SIZEOF_LONG >= (32 / FT_CHAR_BIT)
|
||||
|
||||
typedef long FT_Fast;
|
||||
typedef unsigned long FT_UFast;
|
||||
@ -216,7 +235,7 @@ FT_BEGIN_HEADER
|
||||
|
||||
/* determine whether we have a 64-bit int type for platforms without */
|
||||
/* Autoconf */
|
||||
#if FT_SIZEOF_LONG == 8
|
||||
#if FT_SIZEOF_LONG == (64 / FT_CHAR_BIT)
|
||||
|
||||
/* FT_LONG64 must be defined if a 64-bit type is available */
|
||||
#define FT_LONG64
|
||||
@ -252,7 +271,7 @@ FT_BEGIN_HEADER
|
||||
#define FT_LONG64
|
||||
#define FT_INT64 long long int
|
||||
|
||||
#endif /* FT_SIZEOF_LONG == 8 */
|
||||
#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
@ -266,10 +285,7 @@ FT_BEGIN_HEADER
|
||||
|
||||
#ifdef __STDC__
|
||||
|
||||
/* Undefine the 64-bit macros in strict ANSI compilation mode. */
|
||||
/* Since `#undef' doesn't survive in configuration header files */
|
||||
/* we use the postprocessing facility of AC_CONFIG_HEADERS to */
|
||||
/* replace the leading `/' with `#'. */
|
||||
/* undefine the 64-bit macros in strict ANSI compilation mode */
|
||||
#undef FT_LONG64
|
||||
#undef FT_INT64
|
||||
|
||||
@ -287,11 +303,42 @@ FT_BEGIN_HEADER
|
||||
/* Provide assembler fragments for performance-critical functions. */
|
||||
/* These must be defined `static __inline__' with GCC. */
|
||||
|
||||
#if defined( __CC_ARM ) || defined( __ARMCC__ ) /* RVCT */
|
||||
#define FT_MULFIX_ASSEMBLER FT_MulFix_arm
|
||||
|
||||
/* documentation is in freetype.h */
|
||||
|
||||
static __inline FT_Int32
|
||||
FT_MulFix_arm( FT_Int32 a,
|
||||
FT_Int32 b )
|
||||
{
|
||||
register FT_Int32 t, t2;
|
||||
|
||||
|
||||
__asm
|
||||
{
|
||||
smull t2, t, b, a /* (lo=t2,hi=t) = a*b */
|
||||
mov a, t, asr #31 /* a = (hi >> 31) */
|
||||
add a, a, #0x8000 /* a += 0x8000 */
|
||||
adds t2, t2, a /* t2 += a */
|
||||
adc t, t, #0 /* t += carry */
|
||||
mov a, t2, lsr #16 /* a = t2 >> 16 */
|
||||
orr a, a, t, lsl #16 /* a |= t << 16 */
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
#endif /* __CC_ARM || __ARMCC__ */
|
||||
|
||||
|
||||
#ifdef __GNUC__
|
||||
|
||||
#if defined( __arm__ ) && !defined( __thumb__ )
|
||||
#if defined( __arm__ ) && !defined( __thumb__ ) && \
|
||||
!( defined( __CC_ARM ) || defined( __ARMCC__ ) )
|
||||
#define FT_MULFIX_ASSEMBLER FT_MulFix_arm
|
||||
|
||||
/* documentation is in freetype.h */
|
||||
|
||||
static __inline__ FT_Int32
|
||||
FT_MulFix_arm( FT_Int32 a,
|
||||
FT_Int32 b )
|
||||
@ -299,24 +346,26 @@ FT_BEGIN_HEADER
|
||||
register FT_Int32 t, t2;
|
||||
|
||||
|
||||
asm __volatile__ (
|
||||
__asm__ __volatile__ (
|
||||
"smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */
|
||||
"mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */
|
||||
"add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */
|
||||
"adds %1, %1, %0\n\t" /* %1 += %0 */
|
||||
"adc %2, %2, #0\n\t" /* %2 += carry */
|
||||
"mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */
|
||||
"orr %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */
|
||||
"orr %0, %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */
|
||||
: "=r"(a), "=&r"(t2), "=&r"(t)
|
||||
: "r"(a), "r"(b) );
|
||||
return a;
|
||||
}
|
||||
|
||||
#endif /* __arm__ && !__thumb__ */
|
||||
#endif /* __arm__ && !__thumb__ && !( __CC_ARM || __ARMCC__ ) */
|
||||
|
||||
#if defined( i386 )
|
||||
#if defined( __i386__ )
|
||||
#define FT_MULFIX_ASSEMBLER FT_MulFix_i386
|
||||
|
||||
/* documentation is in freetype.h */
|
||||
|
||||
static __inline__ FT_Int32
|
||||
FT_MulFix_i386( FT_Int32 a,
|
||||
FT_Int32 b )
|
||||
@ -334,9 +383,9 @@ FT_BEGIN_HEADER
|
||||
"shrl $16, %%eax\n"
|
||||
"shll $16, %%edx\n"
|
||||
"addl %%edx, %%eax\n"
|
||||
: "=a"(result), "+d"(b)
|
||||
: "a"(a)
|
||||
: "%ecx" );
|
||||
: "=a"(result), "=d"(b)
|
||||
: "a"(a), "d"(b)
|
||||
: "%ecx", "cc" );
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -344,6 +393,43 @@ FT_BEGIN_HEADER
|
||||
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
|
||||
#ifdef _MSC_VER /* Visual C++ */
|
||||
|
||||
#ifdef _M_IX86
|
||||
|
||||
#define FT_MULFIX_ASSEMBLER FT_MulFix_i386
|
||||
|
||||
/* documentation is in freetype.h */
|
||||
|
||||
static __inline FT_Int32
|
||||
FT_MulFix_i386( FT_Int32 a,
|
||||
FT_Int32 b )
|
||||
{
|
||||
register FT_Int32 result;
|
||||
|
||||
__asm
|
||||
{
|
||||
mov eax, a
|
||||
mov edx, b
|
||||
imul edx
|
||||
mov ecx, edx
|
||||
sar ecx, 31
|
||||
add ecx, 8000h
|
||||
add eax, ecx
|
||||
adc edx, 0
|
||||
shr eax, 16
|
||||
shl edx, 16
|
||||
add eax, edx
|
||||
mov result, eax
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif /* _M_IX86 */
|
||||
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */
|
||||
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* Build macros of the FreeType 2 library. */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -424,6 +424,19 @@
|
||||
#define FT_LZW_H <freetype/ftlzw.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* @macro:
|
||||
* FT_BZIP2_H
|
||||
*
|
||||
* @description:
|
||||
* A macro used in #include statements to name the file containing the
|
||||
* definitions of an API which supports bzip2-compressed files.
|
||||
*
|
||||
*/
|
||||
#define FT_BZIP2_H <freetype/ftbzip2.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* @macro:
|
||||
|
@ -1,13 +1,32 @@
|
||||
/* This is a generated file. */
|
||||
/*
|
||||
* 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'.
|
||||
*
|
||||
* Please read `docs/INSTALL.ANY' and `docs/CUSTOMIZE' how to compile
|
||||
* FreeType without GNU make.
|
||||
*
|
||||
*/
|
||||
|
||||
FT_USE_MODULE( FT_Module_Class, autofit_module_class )
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class )
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class )
|
||||
FT_USE_MODULE( FT_Module_Class, sfnt_module_class )
|
||||
FT_USE_MODULE( FT_Module_Class, autofit_module_class )
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class )
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class )
|
||||
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_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_Renderer_Class, ft_smooth_lcd_renderer_class )
|
||||
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class )
|
||||
FT_USE_MODULE( FT_Module_Class, psaux_module_class )
|
||||
FT_USE_MODULE( FT_Module_Class, psnames_module_class )
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )
|
||||
|
||||
/* EOF */
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* User-selectable configuration macros (specification only). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */
|
||||
/* Copyright 1996-2012 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -85,9 +85,9 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* This macro has no impact on the FreeType API, only on its */
|
||||
/* _implementation_. For example, using FT_RENDER_MODE_LCD when calling */
|
||||
/* FT_Render_Glyph still generates a bitmap that is 3 times larger than */
|
||||
/* the original size; the difference will be that each triplet of */
|
||||
/* subpixels has R=G=B. */
|
||||
/* FT_Render_Glyph still generates a bitmap that is 3 times wider than */
|
||||
/* the original size in case this macro isn't defined; however, each */
|
||||
/* triplet of subpixels has R=G=B. */
|
||||
/* */
|
||||
/* This is done to allow FreeType clients to run unmodified, forcing */
|
||||
/* them to display normal gray-level anti-aliased glyphs. */
|
||||
@ -187,6 +187,33 @@ FT_BEGIN_HEADER
|
||||
/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Bzip2-compressed file support. */
|
||||
/* */
|
||||
/* FreeType now handles font files that have been compressed with the */
|
||||
/* `bzip2' program. This is mostly used to parse many of the PCF */
|
||||
/* files that come with XFree86. The implementation uses `libbz2' to */
|
||||
/* partially uncompress the file on the fly (see src/bzip2/ftbzip2.c). */
|
||||
/* Contrary to gzip, bzip2 currently is not included and need to use */
|
||||
/* the system available bzip2 implementation. */
|
||||
/* */
|
||||
/* Define this macro if you want to enable this `feature'. */
|
||||
/* */
|
||||
/* #define FT_CONFIG_OPTION_USE_BZIP2 */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Define to disable the use of file stream functions and types, FILE, */
|
||||
/* fopen() etc. Enables the use of smaller system libraries on embedded */
|
||||
/* systems that have multiple system libraries, some with or without */
|
||||
/* file stream support, in the cases where file stream support is not */
|
||||
/* necessary such as memory loading of font files. */
|
||||
/* */
|
||||
/* #define FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* DLL export compilation */
|
||||
@ -312,10 +339,11 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* Allow the use of FT_Incremental_Interface to load typefaces that */
|
||||
/* contain no glyph data, but supply it via a callback function. */
|
||||
/* This allows FreeType to be used with the PostScript language, using */
|
||||
/* the GhostScript interpreter. */
|
||||
/* This is required by clients supporting document formats which */
|
||||
/* supply font data incrementally as the document is parsed, such */
|
||||
/* as the Ghostscript interpreter for the PostScript language. */
|
||||
/* */
|
||||
/* #define FT_CONFIG_OPTION_INCREMENTAL */
|
||||
#define FT_CONFIG_OPTION_INCREMENTAL
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
@ -361,6 +389,39 @@ FT_BEGIN_HEADER
|
||||
/* #define FT_DEBUG_LEVEL_TRACE */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Autofitter debugging */
|
||||
/* */
|
||||
/* If FT_DEBUG_AUTOFIT is defined, FreeType provides some means to */
|
||||
/* control the autofitter behaviour for debugging purposes with global */
|
||||
/* boolean variables (consequently, you should *never* enable this */
|
||||
/* while compiling in `release' mode): */
|
||||
/* */
|
||||
/* _af_debug_disable_horz_hints */
|
||||
/* _af_debug_disable_vert_hints */
|
||||
/* _af_debug_disable_blue_hints */
|
||||
/* */
|
||||
/* Additionally, the following functions provide dumps of various */
|
||||
/* internal autofit structures to stdout (using `printf'): */
|
||||
/* */
|
||||
/* af_glyph_hints_dump_points */
|
||||
/* af_glyph_hints_dump_segments */
|
||||
/* af_glyph_hints_dump_edges */
|
||||
/* */
|
||||
/* As an argument, they use another global variable: */
|
||||
/* */
|
||||
/* _af_debug_hints */
|
||||
/* */
|
||||
/* Please have a look at the `ftgrid' demo program to see how those */
|
||||
/* variables and macros should be used. */
|
||||
/* */
|
||||
/* Do not #undef these macros here since the build system might define */
|
||||
/* them for certain configurations only. */
|
||||
/* */
|
||||
/* #define FT_DEBUG_AUTOFIT */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Memory Debugging */
|
||||
@ -396,6 +457,20 @@ FT_BEGIN_HEADER
|
||||
#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Position Independent Code */
|
||||
/* */
|
||||
/* If this macro is set (which is _not_ the default), FreeType2 will */
|
||||
/* avoid creating constants that require address fixups. Instead the */
|
||||
/* constants will be moved into a struct and additional intialization */
|
||||
/* code will be used. */
|
||||
/* */
|
||||
/* Setting this macro is needed for systems that prohibit address */
|
||||
/* fixups, such as BREW. */
|
||||
/* */
|
||||
/* #define FT_CONFIG_OPTION_PIC */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
@ -439,7 +514,7 @@ FT_BEGIN_HEADER
|
||||
/* does not contain any glyph name though. */
|
||||
/* */
|
||||
/* Accessing SFNT names is done through the functions declared in */
|
||||
/* `freetype/ftnames.h'. */
|
||||
/* `freetype/ftsnames.h'. */
|
||||
/* */
|
||||
#define TT_CONFIG_OPTION_SFNT_NAMES
|
||||
|
||||
@ -457,6 +532,7 @@ FT_BEGIN_HEADER
|
||||
#define TT_CONFIG_CMAP_FORMAT_8
|
||||
#define TT_CONFIG_CMAP_FORMAT_10
|
||||
#define TT_CONFIG_CMAP_FORMAT_12
|
||||
#define TT_CONFIG_CMAP_FORMAT_13
|
||||
#define TT_CONFIG_CMAP_FORMAT_14
|
||||
|
||||
|
||||
@ -471,8 +547,7 @@ FT_BEGIN_HEADER
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */
|
||||
/* a bytecode interpreter in the TrueType driver. Note that there are */
|
||||
/* important patent issues related to the use of the interpreter. */
|
||||
/* a bytecode interpreter in the TrueType driver. */
|
||||
/* */
|
||||
/* By undefining this, you will only compile the code necessary to load */
|
||||
/* TrueType glyphs without hinting. */
|
||||
@ -480,17 +555,20 @@ FT_BEGIN_HEADER
|
||||
/* Do not #undef this macro here, since the build system might */
|
||||
/* define it for certain configurations only. */
|
||||
/* */
|
||||
/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
|
||||
#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */
|
||||
/* of the TrueType bytecode interpreter is used that doesn't implement */
|
||||
/* any of the patented opcodes and algorithms. Note that the */
|
||||
/* TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* if you define */
|
||||
/* TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, either define */
|
||||
/* TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */
|
||||
/* any of the patented opcodes and algorithms. The patents related to */
|
||||
/* TrueType hinting have expired worldwide since May 2010; this option */
|
||||
/* is now deprecated. */
|
||||
/* */
|
||||
/* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* */
|
||||
/* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, */
|
||||
/* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */
|
||||
/* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time. */
|
||||
/* */
|
||||
/* This macro is only useful for a small number of font files (mostly */
|
||||
@ -527,7 +605,7 @@ FT_BEGIN_HEADER
|
||||
/* ... */
|
||||
/* } */
|
||||
/* */
|
||||
#define TT_CONFIG_OPTION_UNPATENTED_HINTING
|
||||
/* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
@ -556,7 +634,7 @@ FT_BEGIN_HEADER
|
||||
/* composite flags array which can be used to disambiguate, but old */
|
||||
/* fonts will not have them. */
|
||||
/* */
|
||||
/* http://partners.adobe.com/asn/developer/opentype/glyf.html */
|
||||
/* http://www.microsoft.com/typography/otspec/glyf.htm */
|
||||
/* http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html */
|
||||
/* */
|
||||
#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
|
||||
@ -591,7 +669,7 @@ FT_BEGIN_HEADER
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* T1_MAX_DICT_DEPTH is the maximal depth of nest dictionaries and */
|
||||
/* T1_MAX_DICT_DEPTH is the maximum depth of nest dictionaries and */
|
||||
/* arrays in the Type 1 stream (see t1load.c). A minimum of 4 is */
|
||||
/* required. */
|
||||
/* */
|
||||
@ -657,6 +735,19 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
#define AF_CONFIG_OPTION_INDIC
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* 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. */
|
||||
/* */
|
||||
/* This experimental option is only active if the render mode is */
|
||||
/* FT_RENDER_MODE_LIGHT. */
|
||||
/* */
|
||||
/* #define AF_CONFIG_OPTION_USE_WARPER */
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
@ -673,6 +764,27 @@ FT_BEGIN_HEADER
|
||||
#define FT_CONFIG_OPTION_OLD_INTERNALS
|
||||
|
||||
|
||||
/*
|
||||
* To detect legacy cache-lookup call from a rogue client (<= 2.1.7),
|
||||
* we restrict the number of charmaps in a font. The current API of
|
||||
* FTC_CMapCache_Lookup() takes cmap_index & charcode, but old API
|
||||
* takes charcode only. To determine the passed value is for cmap_index
|
||||
* or charcode, the possible cmap_index is restricted not to exceed
|
||||
* the minimum possible charcode by a rogue client. It is also very
|
||||
* unlikely that a rogue client is interested in Unicode values 0 to 15.
|
||||
*
|
||||
* NOTE: The original threshold was 4 deduced from popular number of
|
||||
* cmap subtables in UCS-4 TrueType fonts, but now it is not
|
||||
* irregular for OpenType fonts to have more than 4 subtables,
|
||||
* because variation selector subtables are available for Apple
|
||||
* and Microsoft platforms.
|
||||
*/
|
||||
|
||||
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
|
||||
#define FT_MAX_CHARMAP_CACHEABLE 15
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* This macro is defined if either unpatented or native TrueType
|
||||
* hinting is requested by the definitions above.
|
||||
|
@ -5,7 +5,7 @@
|
||||
/* ANSI-specific library and header configuration file (specification */
|
||||
/* only). */
|
||||
/* */
|
||||
/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2009 by */
|
||||
/* Copyright 2002-2007, 2009, 2011 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -60,7 +60,9 @@
|
||||
#include <limits.h>
|
||||
|
||||
#define FT_CHAR_BIT CHAR_BIT
|
||||
#define FT_USHORT_MAX USHRT_MAX
|
||||
#define FT_INT_MAX INT_MAX
|
||||
#define FT_INT_MIN INT_MIN
|
||||
#define FT_UINT_MAX UINT_MAX
|
||||
#define FT_ULONG_MAX ULONG_MAX
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType high-level API and common types (specification only). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
|
||||
/* Copyright 1996-2012 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -16,6 +16,10 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FREETYPE_H__
|
||||
#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."
|
||||
@ -25,18 +29,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* The `raster' component duplicates some of the declarations in */
|
||||
/* freetype.h for stand-alone use if _FREETYPE_ isn't defined. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FREETYPE_H__
|
||||
#define __FREETYPE_H__
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_CONFIG_CONFIG_H
|
||||
#include FT_ERRORS_H
|
||||
@ -234,10 +226,20 @@ FT_BEGIN_HEADER
|
||||
/* Left side bearing for vertical layout. */
|
||||
/* */
|
||||
/* vertBearingY :: */
|
||||
/* Top side bearing for vertical layout. */
|
||||
/* Top side bearing for vertical layout. Larger positive values */
|
||||
/* mean further below the vertical glyph origin. */
|
||||
/* */
|
||||
/* vertAdvance :: */
|
||||
/* Advance height for vertical layout. */
|
||||
/* Advance height for vertical layout. Positive values mean the */
|
||||
/* glyph has a positive advance downward. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* If not disabled with @FT_LOAD_NO_HINTING, the values represent */
|
||||
/* dimensions of the hinted glyph (in case hinting is applicable). */
|
||||
/* */
|
||||
/* Stroking a glyph with an outside border does not increase */
|
||||
/* `horiAdvance' or `vertAdvance'; you have to manually adjust these */
|
||||
/* values to account for the added width and height. */
|
||||
/* */
|
||||
typedef struct FT_Glyph_Metrics_
|
||||
{
|
||||
@ -395,8 +397,8 @@ FT_BEGIN_HEADER
|
||||
/* Use @FT_Done_Face to destroy it (along with its slot and sizes). */
|
||||
/* */
|
||||
/* <Also> */
|
||||
/* The @FT_FaceRec details the publicly accessible fields of a given */
|
||||
/* face object. */
|
||||
/* See @FT_FaceRec for the publicly accessible fields of a given face */
|
||||
/* object. */
|
||||
/* */
|
||||
typedef struct FT_FaceRec_* FT_Face;
|
||||
|
||||
@ -425,8 +427,8 @@ FT_BEGIN_HEADER
|
||||
/* activated at any given time per face. */
|
||||
/* */
|
||||
/* <Also> */
|
||||
/* The @FT_SizeRec structure details the publicly accessible fields */
|
||||
/* of a given size object. */
|
||||
/* See @FT_SizeRec for the publicly accessible fields of a given size */
|
||||
/* object. */
|
||||
/* */
|
||||
typedef struct FT_SizeRec_* FT_Size;
|
||||
|
||||
@ -438,7 +440,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A handle to a given `glyph slot'. A slot is a container where it */
|
||||
/* is possible to load any one of the glyphs contained in its parent */
|
||||
/* is possible to load any of the glyphs contained in its parent */
|
||||
/* face. */
|
||||
/* */
|
||||
/* In other words, each time you call @FT_Load_Glyph or */
|
||||
@ -447,7 +449,7 @@ FT_BEGIN_HEADER
|
||||
/* other control information. */
|
||||
/* */
|
||||
/* <Also> */
|
||||
/* @FT_GlyphSlotRec details the publicly accessible glyph fields. */
|
||||
/* See @FT_GlyphSlotRec for the publicly accessible glyph fields. */
|
||||
/* */
|
||||
typedef struct FT_GlyphSlotRec_* FT_GlyphSlot;
|
||||
|
||||
@ -478,8 +480,8 @@ FT_BEGIN_HEADER
|
||||
/* the list and automatically activates it. */
|
||||
/* */
|
||||
/* <Also> */
|
||||
/* The @FT_CharMapRec details the publicly accessible fields of a */
|
||||
/* given character map. */
|
||||
/* See @FT_CharMapRec for the publicly accessible fields of a given */
|
||||
/* character map. */
|
||||
/* */
|
||||
typedef struct FT_CharMapRec_* FT_CharMap;
|
||||
|
||||
@ -527,10 +529,7 @@ FT_BEGIN_HEADER
|
||||
/* <Note> */
|
||||
/* Despite the name, this enumeration lists specific character */
|
||||
/* repertories (i.e., charsets), and not text encoding methods (e.g., */
|
||||
/* UTF-8, UTF-16, GB2312_EUC, etc.). */
|
||||
/* */
|
||||
/* Because of 32-bit charcodes defined in Unicode (i.e., surrogates), */
|
||||
/* all character codes must be expressed as FT_Longs. */
|
||||
/* UTF-8, UTF-16, etc.). */
|
||||
/* */
|
||||
/* Other encodings might be defined in the future. */
|
||||
/* */
|
||||
@ -544,6 +543,10 @@ FT_BEGIN_HEADER
|
||||
/* Latin-1. Most fonts include a Unicode charmap, but not all */
|
||||
/* of them. */
|
||||
/* */
|
||||
/* For example, if you want to access Unicode value U+1F028 (and */
|
||||
/* the font contains it), use value 0x1F028 as the input value for */
|
||||
/* @FT_Get_Char_Index. */
|
||||
/* */
|
||||
/* FT_ENCODING_MS_SYMBOL :: */
|
||||
/* Corresponds to the Microsoft Symbol encoding, used to encode */
|
||||
/* mathematical symbols in the 32..255 character code range. For */
|
||||
@ -559,8 +562,8 @@ FT_BEGIN_HEADER
|
||||
/* used in mainland China. */
|
||||
/* */
|
||||
/* FT_ENCODING_BIG5 :: */
|
||||
/* Corresponds to an encoding system for Traditional Chinese as used */
|
||||
/* in Taiwan and Hong Kong. */
|
||||
/* Corresponds to an encoding system for Traditional Chinese as */
|
||||
/* used in Taiwan and Hong Kong. */
|
||||
/* */
|
||||
/* FT_ENCODING_WANSUNG :: */
|
||||
/* Corresponds to the Korean encoding system known as Wansung. */
|
||||
@ -591,9 +594,9 @@ FT_BEGIN_HEADER
|
||||
/* OpenType/CFF fonts. It is limited to 256 character codes. */
|
||||
/* */
|
||||
/* FT_ENCODING_APPLE_ROMAN :: */
|
||||
/* Corresponds to the 8-bit Apple roman encoding. Many TrueType and */
|
||||
/* OpenType fonts contain a charmap for this encoding, since older */
|
||||
/* versions of Mac OS are able to use it. */
|
||||
/* Corresponds to the 8-bit Apple roman encoding. Many TrueType */
|
||||
/* and OpenType fonts contain a charmap for this encoding, since */
|
||||
/* older versions of Mac OS are able to use it. */
|
||||
/* */
|
||||
/* FT_ENCODING_OLD_LATIN_2 :: */
|
||||
/* This value is deprecated and was never used nor reported by */
|
||||
@ -623,10 +626,10 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* FT_ENCODING_NONE is set by the BDF and PCF drivers if the charmap */
|
||||
/* is neither Unicode nor ISO-8859-1 (otherwise it is set to */
|
||||
/* FT_ENCODING_UNICODE). Use @FT_Get_BDF_Charset_ID to find out which */
|
||||
/* encoding is really present. If, for example, the `cs_registry' */
|
||||
/* field is `KOI8' and the `cs_encoding' field is `R', the font is */
|
||||
/* encoded in KOI8-R. */
|
||||
/* FT_ENCODING_UNICODE). Use @FT_Get_BDF_Charset_ID to find out */
|
||||
/* which encoding is really present. If, for example, the */
|
||||
/* `cs_registry' field is `KOI8' and the `cs_encoding' field is `R', */
|
||||
/* the font is encoded in KOI8-R. */
|
||||
/* */
|
||||
/* FT_ENCODING_NONE is always set (with a single exception) by the */
|
||||
/* winfonts driver. Use @FT_Get_WinFNT_Header and examine the */
|
||||
@ -640,14 +643,14 @@ FT_BEGIN_HEADER
|
||||
/* FT_ENCODING_APPLE_ROMAN). */
|
||||
/* */
|
||||
/* If `platform_id' is @TT_PLATFORM_MACINTOSH, use the function */
|
||||
/* @FT_Get_CMap_Language_ID to query the Mac language ID which may be */
|
||||
/* needed to be able to distinguish Apple encoding variants. See */
|
||||
/* @FT_Get_CMap_Language_ID to query the Mac language ID which may */
|
||||
/* be needed to be able to distinguish Apple encoding variants. See */
|
||||
/* */
|
||||
/* http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/README.TXT */
|
||||
/* */
|
||||
/* to get an idea how to do that. Basically, if the language ID is~0, */
|
||||
/* don't use it, otherwise subtract 1 from the language ID. Then */
|
||||
/* examine `encoding_id'. If, for example, `encoding_id' is */
|
||||
/* to get an idea how to do that. Basically, if the language ID */
|
||||
/* is~0, don't use it, otherwise subtract 1 from the language ID. */
|
||||
/* Then examine `encoding_id'. If, for example, `encoding_id' is */
|
||||
/* @TT_MAC_ID_ROMAN and the language ID (minus~1) is */
|
||||
/* `TT_MAC_LANGID_GREEK', it is the Greek encoding, not Roman. */
|
||||
/* @TT_MAC_ID_ARABIC with `TT_MAC_LANGID_FARSI' means the Farsi */
|
||||
@ -845,8 +848,8 @@ FT_BEGIN_HEADER
|
||||
/* expressed in font units (see */
|
||||
/* `units_per_EM'). The box is large enough */
|
||||
/* to contain any glyph from the font. Thus, */
|
||||
/* `bbox.yMax' can be seen as the `maximal */
|
||||
/* ascender', and `bbox.yMin' as the `minimal */
|
||||
/* `bbox.yMax' can be seen as the `maximum */
|
||||
/* ascender', and `bbox.yMin' as the `minimum */
|
||||
/* descender'. Only relevant for scalable */
|
||||
/* formats. */
|
||||
/* */
|
||||
@ -878,13 +881,13 @@ FT_BEGIN_HEADER
|
||||
/* positive. Only relevant for scalable */
|
||||
/* formats. */
|
||||
/* */
|
||||
/* max_advance_width :: The maximal advance width, in font units, */
|
||||
/* max_advance_width :: The maximum advance width, in font units, */
|
||||
/* for all glyphs in this face. This can be */
|
||||
/* used to make word wrapping computations */
|
||||
/* faster. Only relevant for scalable */
|
||||
/* formats. */
|
||||
/* */
|
||||
/* max_advance_height :: The maximal advance height, in font units, */
|
||||
/* max_advance_height :: The maximum advance height, in font units, */
|
||||
/* for all glyphs in this face. This is only */
|
||||
/* relevant for vertical layouts, and is set */
|
||||
/* to `height' for fonts that do not provide */
|
||||
@ -959,8 +962,8 @@ FT_BEGIN_HEADER
|
||||
|
||||
FT_ListRec sizes_list;
|
||||
|
||||
FT_Generic autohint;
|
||||
void* extensions;
|
||||
FT_Generic autohint; /* face-specific auto-hinter data */
|
||||
void* extensions; /* unused */
|
||||
|
||||
FT_Face_Internal internal;
|
||||
|
||||
@ -1060,12 +1063,12 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* It is not possible to autohint such fonts using */
|
||||
/* @FT_LOAD_FORCE_AUTOHINT; it will also ignore */
|
||||
/* @FT_LOAD_NO_HINTING. You have to set both FT_LOAD_NO_HINTING */
|
||||
/* @FT_LOAD_NO_HINTING. You have to set both @FT_LOAD_NO_HINTING */
|
||||
/* and @FT_LOAD_NO_AUTOHINT to really disable hinting; however, you */
|
||||
/* probably never want this except for demonstration purposes. */
|
||||
/* */
|
||||
/* Currently, there are six TrueType fonts in the list of tricky */
|
||||
/* fonts; they are hard-coded in file `ttobjs.c'. */
|
||||
/* Currently, there are about a dozen TrueType fonts in the list of */
|
||||
/* tricky fonts; they are hard-coded in file `ttobjs.c'. */
|
||||
/* */
|
||||
#define FT_FACE_FLAG_SCALABLE ( 1L << 0 )
|
||||
#define FT_FACE_FLAG_FIXED_SIZES ( 1L << 1 )
|
||||
@ -1339,7 +1342,7 @@ FT_BEGIN_HEADER
|
||||
/* height :: The height in 26.6 fractional pixels. See */
|
||||
/* @FT_FaceRec for the details. */
|
||||
/* */
|
||||
/* max_advance :: The maximal advance width in 26.6 fractional */
|
||||
/* max_advance :: The maximum advance width in 26.6 fractional */
|
||||
/* pixels. See @FT_FaceRec for the details. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
@ -1484,8 +1487,13 @@ FT_BEGIN_HEADER
|
||||
/* important to perform correct WYSIWYG layout. */
|
||||
/* Only relevant for outline glyphs. */
|
||||
/* */
|
||||
/* advance :: This is the transformed advance width for the */
|
||||
/* glyph. */
|
||||
/* advance :: This shorthand is, depending on */
|
||||
/* @FT_LOAD_IGNORE_TRANSFORM, the transformed */
|
||||
/* advance width for the glyph (in 26.6 */
|
||||
/* fractional pixel format). As specified with */
|
||||
/* @FT_LOAD_VERTICAL_LAYOUT, it uses either the */
|
||||
/* `horiAdvance' or the `vertAdvance' value of */
|
||||
/* `metrics' field. */
|
||||
/* */
|
||||
/* format :: This field indicates the format of the image */
|
||||
/* contained in the glyph slot. Typically */
|
||||
@ -1659,6 +1667,14 @@ FT_BEGIN_HEADER
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* In case you want to provide your own memory allocating routines, */
|
||||
/* use @FT_New_Library instead, followed by a call to */
|
||||
/* @FT_Add_Default_Modules (or a series of calls to @FT_Add_Module). */
|
||||
/* */
|
||||
/* For multi-threading applications each thread should have its own */
|
||||
/* FT_Library object. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Init_FreeType( FT_Library *alibrary );
|
||||
|
||||
@ -1736,8 +1752,8 @@ FT_BEGIN_HEADER
|
||||
/* FT_Parameter */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A simple structure used to pass more or less generic parameters */
|
||||
/* to @FT_Open_Face. */
|
||||
/* A simple structure used to pass more or less generic parameters to */
|
||||
/* @FT_Open_Face. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* tag :: A four-byte identification tag. */
|
||||
@ -1745,7 +1761,8 @@ FT_BEGIN_HEADER
|
||||
/* data :: A pointer to the parameter data. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* The ID and function of parameters are driver-specific. */
|
||||
/* The ID and function of parameters are driver-specific. See the */
|
||||
/* various FT_PARAM_TAG_XXX flags for more information. */
|
||||
/* */
|
||||
typedef struct FT_Parameter_
|
||||
{
|
||||
@ -1943,6 +1960,13 @@ FT_BEGIN_HEADER
|
||||
/* Each new face object created with this function also owns a */
|
||||
/* default @FT_Size object, accessible as `face->size'. */
|
||||
/* */
|
||||
/* One @FT_Library instance can have multiple face objects, this is, */
|
||||
/* @FT_Open_Face and its siblings can be called multiple times using */
|
||||
/* the same `library' argument. */
|
||||
/* */
|
||||
/* See the discussion of reference counters in the description of */
|
||||
/* @FT_Reference_Face. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Open_Face( FT_Library library,
|
||||
const FT_Open_Args* args,
|
||||
@ -2007,6 +2031,33 @@ FT_BEGIN_HEADER
|
||||
FT_Open_Args* parameters );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* FT_Reference_Face */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A counter gets initialized to~1 at the time an @FT_Face structure */
|
||||
/* is created. This function increments the counter. @FT_Done_Face */
|
||||
/* then only destroys a face if the counter is~1, otherwise it simply */
|
||||
/* decrements the counter. */
|
||||
/* */
|
||||
/* This function helps in managing life-cycles of structures which */
|
||||
/* reference @FT_Face objects. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* face :: A handle to a target face object. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
/* <Since> */
|
||||
/* 2.4.2 */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Reference_Face( FT_Face face );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
@ -2022,6 +2073,10 @@ FT_BEGIN_HEADER
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* See the discussion of reference counters in the description of */
|
||||
/* @FT_Reference_Face. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Done_Face( FT_Face face );
|
||||
|
||||
@ -2063,8 +2118,8 @@ FT_BEGIN_HEADER
|
||||
/* used to determine both scaling values. */
|
||||
/* */
|
||||
/* FT_SIZE_REQUEST_TYPE_REAL_DIM :: */
|
||||
/* The real dimension. The sum of the the `Ascender' and (minus */
|
||||
/* of) the `Descender' fields of @FT_FaceRec are used to determine */
|
||||
/* The real dimension. The sum of the the `ascender' and (minus */
|
||||
/* of) the `descender' fields of @FT_FaceRec are used to determine */
|
||||
/* both scaling values. */
|
||||
/* */
|
||||
/* FT_SIZE_REQUEST_TYPE_BBOX :: */
|
||||
@ -2128,8 +2183,8 @@ FT_BEGIN_HEADER
|
||||
/* value. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* If `width' is zero, then the horizontal scaling value is set */
|
||||
/* equal to the vertical scaling value, and vice versa. */
|
||||
/* If `width' is zero, then the horizontal scaling value is set equal */
|
||||
/* to the vertical scaling value, and vice versa. */
|
||||
/* */
|
||||
typedef struct FT_Size_RequestRec_
|
||||
{
|
||||
@ -2401,14 +2456,13 @@ FT_BEGIN_HEADER
|
||||
* during glyph loading. This is mostly used to detect broken glyphs
|
||||
* in fonts. By default, FreeType tries to handle broken fonts also.
|
||||
*
|
||||
* FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ::
|
||||
* Indicates that the font driver should ignore the global advance
|
||||
* width defined in the font. By default, that value is used as the
|
||||
* advance width for all glyphs when the face has
|
||||
* @FT_FACE_FLAG_FIXED_WIDTH set.
|
||||
* In particular, errors from the TrueType bytecode engine are not
|
||||
* passed to the application if this flag is not set; this might
|
||||
* result in partially hinted or distorted glyphs in case a glyph's
|
||||
* bytecode is buggy.
|
||||
*
|
||||
* This flag exists for historical reasons (to support buggy CJK
|
||||
* fonts).
|
||||
* FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ::
|
||||
* Ignored. Deprecated.
|
||||
*
|
||||
* FT_LOAD_NO_RECURSE ::
|
||||
* This flag is only used internally. It merely indicates that the
|
||||
@ -2456,28 +2510,36 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* Besides deciding which hinter to use, you can also decide which
|
||||
* hinting algorithm to use. See @FT_LOAD_TARGET_XXX for details.
|
||||
*
|
||||
* Note that the auto-hinter needs a valid Unicode cmap (either a native
|
||||
* one or synthesized by FreeType) for producing correct results. If a
|
||||
* font provides an incorrect mapping (for example, assigning the
|
||||
* character code U+005A, LATIN CAPITAL LETTER Z, to a glyph depicting a
|
||||
* mathematical integral sign), the auto-hinter might produce useless
|
||||
* results.
|
||||
*
|
||||
*/
|
||||
#define FT_LOAD_DEFAULT 0x0
|
||||
#define FT_LOAD_NO_SCALE 0x1
|
||||
#define FT_LOAD_NO_HINTING 0x2
|
||||
#define FT_LOAD_RENDER 0x4
|
||||
#define FT_LOAD_NO_BITMAP 0x8
|
||||
#define FT_LOAD_VERTICAL_LAYOUT 0x10
|
||||
#define FT_LOAD_FORCE_AUTOHINT 0x20
|
||||
#define FT_LOAD_CROP_BITMAP 0x40
|
||||
#define FT_LOAD_PEDANTIC 0x80
|
||||
#define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH 0x200
|
||||
#define FT_LOAD_NO_RECURSE 0x400
|
||||
#define FT_LOAD_IGNORE_TRANSFORM 0x800
|
||||
#define FT_LOAD_MONOCHROME 0x1000
|
||||
#define FT_LOAD_LINEAR_DESIGN 0x2000
|
||||
#define FT_LOAD_NO_AUTOHINT 0x8000U
|
||||
#define FT_LOAD_NO_SCALE ( 1L << 0 )
|
||||
#define FT_LOAD_NO_HINTING ( 1L << 1 )
|
||||
#define FT_LOAD_RENDER ( 1L << 2 )
|
||||
#define FT_LOAD_NO_BITMAP ( 1L << 3 )
|
||||
#define FT_LOAD_VERTICAL_LAYOUT ( 1L << 4 )
|
||||
#define FT_LOAD_FORCE_AUTOHINT ( 1L << 5 )
|
||||
#define FT_LOAD_CROP_BITMAP ( 1L << 6 )
|
||||
#define FT_LOAD_PEDANTIC ( 1L << 7 )
|
||||
#define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ( 1L << 9 )
|
||||
#define FT_LOAD_NO_RECURSE ( 1L << 10 )
|
||||
#define FT_LOAD_IGNORE_TRANSFORM ( 1L << 11 )
|
||||
#define FT_LOAD_MONOCHROME ( 1L << 12 )
|
||||
#define FT_LOAD_LINEAR_DESIGN ( 1L << 13 )
|
||||
#define FT_LOAD_NO_AUTOHINT ( 1L << 15 )
|
||||
|
||||
/* */
|
||||
|
||||
/* used internally only by certain font drivers! */
|
||||
#define FT_LOAD_ADVANCE_ONLY 0x100
|
||||
#define FT_LOAD_SBITS_ONLY 0x4000
|
||||
#define FT_LOAD_ADVANCE_ONLY ( 1L << 8 )
|
||||
#define FT_LOAD_SBITS_ONLY ( 1L << 14 )
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
@ -2529,7 +2591,8 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* If @FT_LOAD_RENDER is also set, the glyph is rendered in the
|
||||
* corresponding mode (i.e., the mode which matches the used algorithm
|
||||
* best) unless @FT_LOAD_MONOCHROME is set.
|
||||
* best). An exeption is FT_LOAD_TARGET_MONO since it implies
|
||||
* @FT_LOAD_MONOCHROME.
|
||||
*
|
||||
* You can use a hinting algorithm that doesn't correspond to the same
|
||||
* rendering mode. As an example, it is possible to use the `light'
|
||||
@ -2542,8 +2605,8 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* FT_Render_Glyph( face->glyph, FT_RENDER_MODE_LCD );
|
||||
* }
|
||||
*
|
||||
*/
|
||||
|
||||
#define FT_LOAD_TARGET_( x ) ( (FT_Int32)( (x) & 15 ) << 16 )
|
||||
|
||||
#define FT_LOAD_TARGET_NORMAL FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL )
|
||||
@ -2563,7 +2626,6 @@ FT_BEGIN_HEADER
|
||||
* @FT_LOAD_TARGET_XXX value.
|
||||
*
|
||||
*/
|
||||
|
||||
#define FT_LOAD_TARGET_MODE( x ) ( (FT_Render_Mode)( ( (x) >> 16 ) & 15 ) )
|
||||
|
||||
|
||||
@ -2611,9 +2673,9 @@ FT_BEGIN_HEADER
|
||||
/* FreeType~2. Each mode corresponds to a specific type of scanline */
|
||||
/* conversion performed on the outline. */
|
||||
/* */
|
||||
/* For bitmap fonts the `bitmap->pixel_mode' field in the */
|
||||
/* @FT_GlyphSlotRec structure gives the format of the returned */
|
||||
/* bitmap. */
|
||||
/* For bitmap fonts and embedded bitmaps the `bitmap->pixel_mode' */
|
||||
/* field in the @FT_GlyphSlotRec structure gives the format of the */
|
||||
/* returned bitmap. */
|
||||
/* */
|
||||
/* All modes except @FT_RENDER_MODE_MONO use 256 levels of opacity. */
|
||||
/* */
|
||||
@ -2634,7 +2696,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* FT_RENDER_MODE_LCD :: */
|
||||
/* This mode corresponds to horizontal RGB and BGR sub-pixel */
|
||||
/* displays, like LCD-screens. It produces 8-bit bitmaps that are */
|
||||
/* displays like LCD screens. It produces 8-bit bitmaps that are */
|
||||
/* 3~times the width of the original glyph outline in pixels, and */
|
||||
/* which use the @FT_PIXEL_MODE_LCD mode. */
|
||||
/* */
|
||||
@ -2651,6 +2713,11 @@ FT_BEGIN_HEADER
|
||||
/* either call @FT_Library_SetLcdFilter (if available) or do the */
|
||||
/* filtering itself. */
|
||||
/* */
|
||||
/* 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 into 8-bit pixmaps. */
|
||||
/* */
|
||||
typedef enum FT_Render_Mode_
|
||||
{
|
||||
FT_RENDER_MODE_NORMAL = 0,
|
||||
@ -2826,14 +2893,26 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* point_size :: The point size in 16.16 fractional points. */
|
||||
/* */
|
||||
/* degree :: The degree of tightness. */
|
||||
/* degree :: The degree of tightness. Increasingly negative */
|
||||
/* values represent tighter track kerning, while */
|
||||
/* increasingly positive values represent looser track */
|
||||
/* kerning. Value zero means no track kerning. */
|
||||
/* */
|
||||
/* <Output> */
|
||||
/* akerning :: The kerning in 16.16 fractional points. */
|
||||
/* akerning :: The kerning in 16.16 fractional points, to be */
|
||||
/* uniformly applied between all glyphs. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* Currently, only the Type~1 font driver supports track kerning, */
|
||||
/* using data from AFM files (if attached with @FT_Attach_File or */
|
||||
/* @FT_Attach_Stream). */
|
||||
/* */
|
||||
/* Only very few AFM files come with track kerning data; please refer */
|
||||
/* to the Adobe's AFM specification for more details. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Get_Track_Kerning( FT_Face face,
|
||||
FT_Fixed point_size,
|
||||
@ -2855,7 +2934,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* glyph_index :: The glyph index. */
|
||||
/* */
|
||||
/* buffer_max :: The maximal number of bytes available in the */
|
||||
/* buffer_max :: The maximum number of bytes available in the */
|
||||
/* buffer. */
|
||||
/* */
|
||||
/* <Output> */
|
||||
@ -2873,6 +2952,10 @@ FT_BEGIN_HEADER
|
||||
/* The glyph name is truncated to fit within the buffer if it is too */
|
||||
/* long. The returned string is always zero-terminated. */
|
||||
/* */
|
||||
/* Be aware that FreeType reorders glyph indices internally so that */
|
||||
/* glyph index~0 always corresponds to the `missing glyph' (called */
|
||||
/* `.notdef'). */
|
||||
/* */
|
||||
/* This function is not compiled within the library if the config */
|
||||
/* macro `FT_CONFIG_OPTION_NO_GLYPH_NAMES' is defined in */
|
||||
/* `include/freetype/config/ftoptions.h'. */
|
||||
@ -2983,7 +3066,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @return:
|
||||
* The index into the array of character maps within the face to which
|
||||
* `charmap' belongs.
|
||||
* `charmap' belongs. If an error occurs, -1 is returned.
|
||||
*
|
||||
*/
|
||||
FT_EXPORT( FT_Int )
|
||||
@ -3010,9 +3093,15 @@ FT_BEGIN_HEADER
|
||||
/* <Note> */
|
||||
/* If you use FreeType to manipulate the contents of font files */
|
||||
/* directly, be aware that the glyph index returned by this function */
|
||||
/* doesn't always correspond to the internal indices used within */
|
||||
/* the file. This is done to ensure that value~0 always corresponds */
|
||||
/* to the `missing glyph'. */
|
||||
/* doesn't always correspond to the internal indices used within the */
|
||||
/* file. This is done to ensure that value~0 always corresponds to */
|
||||
/* the `missing glyph'. If the first glyph is not named `.notdef', */
|
||||
/* then for Type~1 and Type~42 fonts, `.notdef' will be moved into */
|
||||
/* the glyph ID~0 position, and whatever was there will be moved to */
|
||||
/* the position `.notdef' had. For Type~1 fonts, if there is no */
|
||||
/* `.notdef' glyph at all, then one will be created at index~0 and */
|
||||
/* whatever was there will be moved to the last index -- Type~42 */
|
||||
/* fonts are considered invalid under this condition. */
|
||||
/* */
|
||||
FT_EXPORT( FT_UInt )
|
||||
FT_Get_Char_Index( FT_Face face,
|
||||
@ -3060,7 +3149,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* Note that `*agindex' is set to~0 if the charmap is empty. The */
|
||||
/* result itself can be~0 in two cases: if the charmap is empty or */
|
||||
/* when the value~0 is the first valid character code. */
|
||||
/* if the value~0 is the first valid character code. */
|
||||
/* */
|
||||
FT_EXPORT( FT_ULong )
|
||||
FT_Get_First_Char( FT_Face face,
|
||||
@ -3082,7 +3171,7 @@ FT_BEGIN_HEADER
|
||||
/* char_code :: The starting character code. */
|
||||
/* */
|
||||
/* <Output> */
|
||||
/* agindex :: Glyph index of first character code. 0~if charmap */
|
||||
/* agindex :: Glyph index of next character code. 0~if charmap */
|
||||
/* is empty. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
@ -3159,15 +3248,16 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @description:
|
||||
* Retrieve a description of a given subglyph. Only use it if
|
||||
* `glyph->format' is @FT_GLYPH_FORMAT_COMPOSITE, or an error is
|
||||
* returned.
|
||||
* `glyph->format' is @FT_GLYPH_FORMAT_COMPOSITE; an error is
|
||||
* returned otherwise.
|
||||
*
|
||||
* @input:
|
||||
* glyph ::
|
||||
* The source glyph slot.
|
||||
*
|
||||
* sub_index ::
|
||||
* The index of subglyph. Must be less than `glyph->num_subglyphs'.
|
||||
* The index of the subglyph. Must be less than
|
||||
* `glyph->num_subglyphs'.
|
||||
*
|
||||
* @output:
|
||||
* p_index ::
|
||||
@ -3282,6 +3372,9 @@ FT_BEGIN_HEADER
|
||||
/* in the @PS_FontInfoRec structure which is only guaranteed to */
|
||||
/* return the correct results for Type~1 fonts. */
|
||||
/* */
|
||||
/* <Since> */
|
||||
/* 2.3.8 */
|
||||
/* */
|
||||
FT_EXPORT( FT_UShort )
|
||||
FT_Get_FSType_Flags( FT_Face face );
|
||||
|
||||
@ -3539,7 +3632,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A very simple function used to perform the computation `(a*b)/c' */
|
||||
/* with maximal accuracy (it uses a 64-bit intermediate integer */
|
||||
/* with maximum accuracy (it uses a 64-bit intermediate integer */
|
||||
/* whenever necessary). */
|
||||
/* */
|
||||
/* This function isn't necessarily as fast as some processor specific */
|
||||
@ -3574,7 +3667,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A very simple function used to perform the computation */
|
||||
/* `(a*b)/0x10000' with maximal accuracy. Most of the time this is */
|
||||
/* `(a*b)/0x10000' with maximum accuracy. Most of the time this is */
|
||||
/* used to multiply a given value by a 16.16 fixed float factor. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
@ -3619,7 +3712,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A very simple function used to perform the computation */
|
||||
/* `(a*0x10000)/b' with maximal accuracy. Most of the time, this is */
|
||||
/* `(a*0x10000)/b' with maximum accuracy. Most of the time, this is */
|
||||
/* used to divide a given value by a 16.16 fixed float factor. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
@ -3755,10 +3848,11 @@ FT_BEGIN_HEADER
|
||||
* The version number of FreeType if built as a dynamic link library
|
||||
* with the `libtool' package is _not_ controlled by these three
|
||||
* macros.
|
||||
*
|
||||
*/
|
||||
#define FREETYPE_MAJOR 2
|
||||
#define FREETYPE_MINOR 3
|
||||
#define FREETYPE_PATCH 8
|
||||
#define FREETYPE_MINOR 4
|
||||
#define FREETYPE_PATCH 10
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
@ -3818,6 +3912,9 @@ FT_BEGIN_HEADER
|
||||
/* 1~if this is a TrueType font that uses one of the patented */
|
||||
/* opcodes, 0~otherwise. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* Since May 2010, TrueType hinting is no longer patented. */
|
||||
/* */
|
||||
/* <Since> */
|
||||
/* 2.3.5 */
|
||||
/* */
|
||||
@ -3845,6 +3942,9 @@ FT_BEGIN_HEADER
|
||||
/* an SFNT font, or if the unpatented hinter is not compiled in this */
|
||||
/* instance of the library. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* Since May 2010, TrueType hinting is no longer patented. */
|
||||
/* */
|
||||
/* <Since> */
|
||||
/* 2.3.5 */
|
||||
/* */
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType exact bbox computation (specification). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2003, 2007 by */
|
||||
/* Copyright 1996-2001, 2003, 2007, 2011 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -73,6 +73,14 @@ FT_BEGIN_HEADER
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* If the font is tricky and the glyph has been loaded with */
|
||||
/* @FT_LOAD_NO_SCALE, the resulting BBox is meaningless. To get */
|
||||
/* reasonable values for the BBox it is necessary to load the glyph */
|
||||
/* at a large ppem value (so that the hinting instructions can */
|
||||
/* properly shift and scale the subglyphs), then extracting the BBox */
|
||||
/* which can be eventually converted back to font units. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Outline_Get_BBox( FT_Outline* outline,
|
||||
FT_BBox *abbox );
|
||||
|
102
portlibs/include/freetype/ftbzip2.h
Normal file
102
portlibs/include/freetype/ftbzip2.h
Normal file
@ -0,0 +1,102 @@
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* ftbzip2.h */
|
||||
/* */
|
||||
/* Bzip2-compressed stream support. */
|
||||
/* */
|
||||
/* Copyright 2010 by */
|
||||
/* Joel Klinghed. */
|
||||
/* */
|
||||
/* 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 __FTBZIP2_H__
|
||||
#define __FTBZIP2_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> */
|
||||
/* bzip2 */
|
||||
/* */
|
||||
/* <Title> */
|
||||
/* BZIP2 Streams */
|
||||
/* */
|
||||
/* <Abstract> */
|
||||
/* Using bzip2-compressed font files. */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* This section contains the declaration of Bzip2-specific functions. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/************************************************************************
|
||||
*
|
||||
* @function:
|
||||
* FT_Stream_OpenBzip2
|
||||
*
|
||||
* @description:
|
||||
* Open a new stream to parse bzip2-compressed font files. This is
|
||||
* mainly used to support the compressed `*.pcf.bz2' fonts that come
|
||||
* with XFree86.
|
||||
*
|
||||
* @input:
|
||||
* stream ::
|
||||
* The target embedding stream.
|
||||
*
|
||||
* source ::
|
||||
* The source stream.
|
||||
*
|
||||
* @return:
|
||||
* FreeType error code. 0~means success.
|
||||
*
|
||||
* @note:
|
||||
* The source stream must be opened _before_ calling this function.
|
||||
*
|
||||
* Calling the internal function `FT_Stream_Close' on the new stream will
|
||||
* *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.
|
||||
*/
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Stream_OpenBzip2( FT_Stream stream,
|
||||
FT_Stream source );
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* __FTBZIP2_H__ */
|
||||
|
||||
|
||||
/* END */
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType Cache subsystem (specification). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -56,9 +56,12 @@ FT_BEGIN_HEADER
|
||||
* interpret them in any way.
|
||||
*
|
||||
* Second, the cache calls, only when needed, a client-provided function
|
||||
* to convert a @FTC_FaceID into a new @FT_Face object. The latter is
|
||||
* to convert an @FTC_FaceID into a new @FT_Face object. The latter is
|
||||
* then completely managed by the cache, including its termination
|
||||
* through @FT_Done_Face.
|
||||
* through @FT_Done_Face. To monitor termination of face objects, the
|
||||
* finalizer callback in the `generic' field of the @FT_Face object can
|
||||
* be used, which might also be used to store the @FTC_FaceID of the
|
||||
* face.
|
||||
*
|
||||
* Clients are free to map face IDs to anything else. The most simple
|
||||
* usage is to associate them to a (pathname,face_index) pair that is
|
||||
@ -211,12 +214,17 @@ FT_BEGIN_HEADER
|
||||
|
||||
/* */
|
||||
|
||||
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
|
||||
|
||||
/* these macros are incompatible with LLP64, should not be used */
|
||||
|
||||
#define FT_POINTER_TO_ULONG( p ) ( (FT_ULong)(FT_Pointer)(p) )
|
||||
|
||||
#define FTC_FACE_ID_HASH( i ) \
|
||||
((FT_UInt32)(( FT_POINTER_TO_ULONG( i ) >> 3 ) ^ \
|
||||
( FT_POINTER_TO_ULONG( i ) << 7 ) ) )
|
||||
|
||||
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
|
||||
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
@ -263,10 +271,10 @@ FT_BEGIN_HEADER
|
||||
/* reference-counted. A node with a count of~0 might be flushed */
|
||||
/* out of a full cache whenever a lookup request is performed. */
|
||||
/* */
|
||||
/* If you lookup nodes, you have the ability to `acquire' them, i.e., */
|
||||
/* to increment their reference count. This will prevent the node */
|
||||
/* from being flushed out of the cache until you explicitly `release' */
|
||||
/* it (see @FTC_Node_Unref). */
|
||||
/* If you look up nodes, you have the ability to `acquire' them, */
|
||||
/* i.e., to increment their reference count. This will prevent the */
|
||||
/* node from being flushed out of the cache until you explicitly */
|
||||
/* `release' it (see @FTC_Node_Unref). */
|
||||
/* */
|
||||
/* See also @FTC_SBitCache_Lookup and @FTC_ImageCache_Lookup. */
|
||||
/* */
|
||||
@ -697,11 +705,17 @@ FT_BEGIN_HEADER
|
||||
(d1)->width == (d2)->width && \
|
||||
(d1)->flags == (d2)->flags )
|
||||
|
||||
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
|
||||
|
||||
/* this macro is incompatible with LLP64, should not be used */
|
||||
|
||||
#define FTC_IMAGE_TYPE_HASH( d ) \
|
||||
(FT_UFast)( FTC_FACE_ID_HASH( (d)->face_id ) ^ \
|
||||
( (d)->width << 8 ) ^ (d)->height ^ \
|
||||
( (d)->flags << 4 ) )
|
||||
|
||||
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
@ -1093,6 +1107,7 @@ FT_BEGIN_HEADER
|
||||
(f1)->pix_width == (f2)->pix_width && \
|
||||
(f1)->pix_height == (f2)->pix_height )
|
||||
|
||||
/* this macro is incompatible with LLP64, should not be used */
|
||||
#define FTC_FONT_HASH( f ) \
|
||||
(FT_UInt32)( FTC_FACE_ID_HASH((f)->face_id) ^ \
|
||||
((f)->pix_width << 8) ^ \
|
||||
|
@ -98,6 +98,7 @@
|
||||
/* module_management */
|
||||
/* gzip */
|
||||
/* lzw */
|
||||
/* bzip2 */
|
||||
/* lcd_filtering */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType API for accessing CID font information (specification). */
|
||||
/* */
|
||||
/* Copyright 2007 by Dereg Clegg. */
|
||||
/* Copyright 2007, 2009 by Dereg Clegg, Michael Toftdal. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
/* modified, and distributed under the terms of the FreeType project */
|
||||
@ -88,6 +88,74 @@ FT_BEGIN_HEADER
|
||||
const char* *ordering,
|
||||
FT_Int *supplement);
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* @function:
|
||||
* FT_Get_CID_Is_Internally_CID_Keyed
|
||||
*
|
||||
* @description:
|
||||
* Retrieve the type of the input face, CID keyed or not. In
|
||||
* constrast to the @FT_IS_CID_KEYED macro this function returns
|
||||
* successfully also for CID-keyed fonts in an SNFT wrapper.
|
||||
*
|
||||
* @input:
|
||||
* face ::
|
||||
* A handle to the input face.
|
||||
*
|
||||
* @output:
|
||||
* is_cid ::
|
||||
* The type of the face as an @FT_Bool.
|
||||
*
|
||||
* @return:
|
||||
* FreeType error code. 0~means success.
|
||||
*
|
||||
* @note:
|
||||
* This function only works with CID faces and OpenType fonts,
|
||||
* returning an error otherwise.
|
||||
*
|
||||
* @since:
|
||||
* 2.3.9
|
||||
*/
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Get_CID_Is_Internally_CID_Keyed( FT_Face face,
|
||||
FT_Bool *is_cid );
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* @function:
|
||||
* FT_Get_CID_From_Glyph_Index
|
||||
*
|
||||
* @description:
|
||||
* Retrieve the CID of the input glyph index.
|
||||
*
|
||||
* @input:
|
||||
* face ::
|
||||
* A handle to the input face.
|
||||
*
|
||||
* glyph_index ::
|
||||
* The input glyph index.
|
||||
*
|
||||
* @output:
|
||||
* cid ::
|
||||
* The CID as an @FT_UInt.
|
||||
*
|
||||
* @return:
|
||||
* FreeType error code. 0~means success.
|
||||
*
|
||||
* @note:
|
||||
* This function only works with CID faces and OpenType fonts,
|
||||
* returning an error otherwise.
|
||||
*
|
||||
* @since:
|
||||
* 2.3.9
|
||||
*/
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Get_CID_From_Glyph_Index( FT_Face face,
|
||||
FT_UInt glyph_index,
|
||||
FT_UInt *cid );
|
||||
|
||||
/* */
|
||||
|
||||
FT_END_HEADER
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType error codes (specification). */
|
||||
/* */
|
||||
/* Copyright 2002, 2004, 2006, 2007 by */
|
||||
/* Copyright 2002, 2004, 2006, 2007, 2010-2011 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -54,6 +54,8 @@
|
||||
"broken offset within table" )
|
||||
FT_ERRORDEF_( Array_Too_Large, 0x0A, \
|
||||
"array allocation size too large" )
|
||||
FT_ERRORDEF_( Missing_Module, 0x0B, \
|
||||
"missing module" )
|
||||
|
||||
/* glyph/character errors */
|
||||
|
||||
@ -211,6 +213,8 @@
|
||||
"argument stack underflow" )
|
||||
FT_ERRORDEF_( Ignore, 0xA2, \
|
||||
"ignore" )
|
||||
FT_ERRORDEF_( No_Unicode_Glyph_Name, 0xA3, \
|
||||
"no Unicode glyph name found" )
|
||||
|
||||
/* BDF errors */
|
||||
|
||||
@ -220,19 +224,21 @@
|
||||
"`FONT' field missing" )
|
||||
FT_ERRORDEF_( Missing_Size_Field, 0xB2, \
|
||||
"`SIZE' field missing" )
|
||||
FT_ERRORDEF_( Missing_Chars_Field, 0xB3, \
|
||||
FT_ERRORDEF_( Missing_Fontboundingbox_Field, 0xB3, \
|
||||
"`FONTBOUNDINGBOX' field missing" )
|
||||
FT_ERRORDEF_( Missing_Chars_Field, 0xB4, \
|
||||
"`CHARS' field missing" )
|
||||
FT_ERRORDEF_( Missing_Startchar_Field, 0xB4, \
|
||||
FT_ERRORDEF_( Missing_Startchar_Field, 0xB5, \
|
||||
"`STARTCHAR' field missing" )
|
||||
FT_ERRORDEF_( Missing_Encoding_Field, 0xB5, \
|
||||
FT_ERRORDEF_( Missing_Encoding_Field, 0xB6, \
|
||||
"`ENCODING' field missing" )
|
||||
FT_ERRORDEF_( Missing_Bbx_Field, 0xB6, \
|
||||
FT_ERRORDEF_( Missing_Bbx_Field, 0xB7, \
|
||||
"`BBX' field missing" )
|
||||
FT_ERRORDEF_( Bbx_Too_Big, 0xB7, \
|
||||
FT_ERRORDEF_( Bbx_Too_Big, 0xB8, \
|
||||
"`BBX' too big" )
|
||||
FT_ERRORDEF_( Corrupted_Font_Header, 0xB8, \
|
||||
FT_ERRORDEF_( Corrupted_Font_Header, 0xB9, \
|
||||
"Font header corrupted or missing fields" )
|
||||
FT_ERRORDEF_( Corrupted_Font_Glyphs, 0xB9, \
|
||||
FT_ERRORDEF_( Corrupted_Font_Glyphs, 0xBA, \
|
||||
"Font glyphs corrupted or missing fields" )
|
||||
|
||||
|
||||
|
@ -192,12 +192,13 @@
|
||||
#undef FT_NOERRORDEF_
|
||||
|
||||
#undef FT_NEED_EXTERN_C
|
||||
#undef FT_ERR_CONCAT
|
||||
#undef FT_ERR_BASE
|
||||
|
||||
/* FT_KEEP_ERR_PREFIX is needed for ftvalid.h */
|
||||
#ifndef FT_KEEP_ERR_PREFIX
|
||||
#undef FT_ERR_PREFIX
|
||||
#else
|
||||
#undef FT_KEEP_ERR_PREFIX
|
||||
#endif
|
||||
|
||||
#endif /* __FTERRORS_H__ */
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* Access of TrueType's `gasp' table (specification). */
|
||||
/* */
|
||||
/* Copyright 2007, 2008 by */
|
||||
/* Copyright 2007, 2008, 2011 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -63,18 +63,26 @@
|
||||
*
|
||||
* FT_GASP_DO_GRIDFIT ::
|
||||
* Grid-fitting and hinting should be performed at the specified ppem.
|
||||
* This *really* means TrueType bytecode interpretation.
|
||||
* This *really* means TrueType bytecode interpretation. If this bit
|
||||
* is not set, no hinting gets applied.
|
||||
*
|
||||
* FT_GASP_DO_GRAY ::
|
||||
* Anti-aliased rendering should be performed at the specified ppem.
|
||||
* If not set, do monochrome rendering.
|
||||
*
|
||||
* FT_GASP_SYMMETRIC_SMOOTHING ::
|
||||
* Smoothing along multiple axes must be used with ClearType.
|
||||
* If set, smoothing along multiple axes must be used with ClearType.
|
||||
*
|
||||
* FT_GASP_SYMMETRIC_GRIDFIT ::
|
||||
* Grid-fitting must be used with ClearType's symmetric smoothing.
|
||||
*
|
||||
* @note:
|
||||
* The bit-flags `FT_GASP_DO_GRIDFIT' and `FT_GASP_DO_GRAY' are to be
|
||||
* used for standard font rasterization only. Independently of that,
|
||||
* `FT_GASP_SYMMETRIC_SMOOTHING' and `FT_GASP_SYMMETRIC_GRIDFIT' are to
|
||||
* be used if ClearType is enabled (and `FT_GASP_DO_GRIDFIT' and
|
||||
* `FT_GASP_DO_GRAY' are consequently ignored).
|
||||
*
|
||||
* `ClearType' is Microsoft's implementation of LCD rendering, partly
|
||||
* protected by patents.
|
||||
*
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType convenience functions to handle glyphs (specification). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2006, 2008 by */
|
||||
/* Copyright 1996-2003, 2006, 2008, 2009, 2011 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -194,7 +194,7 @@ FT_BEGIN_HEADER
|
||||
/* outline :: A descriptor for the outline. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* You can typecast a @FT_Glyph to @FT_OutlineGlyph if you have */
|
||||
/* You can typecast an @FT_Glyph to @FT_OutlineGlyph if you have */
|
||||
/* `glyph->format == FT_GLYPH_FORMAT_OUTLINE'. This lets you access */
|
||||
/* the outline's content easily. */
|
||||
/* */
|
||||
@ -384,6 +384,13 @@ FT_BEGIN_HEADER
|
||||
/* units in 26.6 pixel format. The value @FT_GLYPH_BBOX_SUBPIXELS */
|
||||
/* is another name for this constant. */
|
||||
/* */
|
||||
/* If the font is tricky and the glyph has been loaded with */
|
||||
/* @FT_LOAD_NO_SCALE, the resulting CBox is meaningless. To get */
|
||||
/* reasonable values for the CBox it is necessary to load the glyph */
|
||||
/* at a large ppem value (so that the hinting instructions can */
|
||||
/* properly shift and scale the subglyphs), then extracting the CBox */
|
||||
/* which can be eventually converted back to font units. */
|
||||
/* */
|
||||
/* Note that the maximum coordinates are exclusive, which means that */
|
||||
/* one can compute the width and height of the glyph image (be it in */
|
||||
/* integer or 26.6 pixels) as: */
|
||||
@ -468,7 +475,7 @@ FT_BEGIN_HEADER
|
||||
/* // convert to a bitmap (default render mode + destroying old) */
|
||||
/* if ( glyph->format != FT_GLYPH_FORMAT_BITMAP ) */
|
||||
/* { */
|
||||
/* error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_DEFAULT, */
|
||||
/* error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_NORMAL, */
|
||||
/* 0, 1 ); */
|
||||
/* if ( error ) // `glyph' unchanged */
|
||||
/* ... */
|
||||
|
@ -5,7 +5,8 @@
|
||||
/* FreeType glyph image formats and default raster interface */
|
||||
/* (specification). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
|
||||
/* 2010 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -51,10 +52,9 @@ FT_BEGIN_HEADER
|
||||
/* FT_Pos */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* The type FT_Pos is a 32-bit integer used to store vectorial */
|
||||
/* coordinates. Depending on the context, these can represent */
|
||||
/* distances in integer font units, or 16.16, or 26.6 fixed float */
|
||||
/* pixel coordinates. */
|
||||
/* The type FT_Pos is used to store vectorial coordinates. Depending */
|
||||
/* on the context, these can represent distances in integer font */
|
||||
/* units, or 16.16, or 26.6 fixed float pixel coordinates. */
|
||||
/* */
|
||||
typedef signed long FT_Pos;
|
||||
|
||||
@ -99,6 +99,20 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* yMax :: The vertical maximum (top-most). */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* The bounding box is specified with the coordinates of the lower */
|
||||
/* left and the upper right corner. In PostScript, those values are */
|
||||
/* often called (llx,lly) and (urx,ury), respectively. */
|
||||
/* */
|
||||
/* If `yMin' is negative, this value gives the glyph's descender. */
|
||||
/* Otherwise, the glyph doesn't descend below the baseline. */
|
||||
/* Similarly, if `ymax' is positive, this value gives the glyph's */
|
||||
/* ascender. */
|
||||
/* */
|
||||
/* `xMin' gives the horizontal distance from the glyph's origin to */
|
||||
/* the left edge of the glyph's bounding box. If `xMin' is negative, */
|
||||
/* the glyph extends to the left of the origin. */
|
||||
/* */
|
||||
typedef struct FT_BBox_
|
||||
{
|
||||
FT_Pos xMin, yMin;
|
||||
@ -254,6 +268,21 @@ FT_BEGIN_HEADER
|
||||
/* flow. In all cases, the pitch is an offset to add */
|
||||
/* to a bitmap pointer in order to go down one row. */
|
||||
/* */
|
||||
/* Note that `padding' means the alignment of a */
|
||||
/* bitmap to a byte border, and FreeType functions */
|
||||
/* normally align to the smallest possible integer */
|
||||
/* value. */
|
||||
/* */
|
||||
/* For the B/W rasterizer, `pitch' is always an even */
|
||||
/* number. */
|
||||
/* */
|
||||
/* To change the pitch of a bitmap (say, to make it a */
|
||||
/* multiple of 4), use @FT_Bitmap_Convert. */
|
||||
/* Alternatively, you might use callback functions to */
|
||||
/* directly render to the application's surface; see */
|
||||
/* the file `example2.cpp' in the tutorial for a */
|
||||
/* demonstration. */
|
||||
/* */
|
||||
/* buffer :: A typeless pointer to the bitmap buffer. This */
|
||||
/* value should be aligned on 32-bit boundaries in */
|
||||
/* most cases. */
|
||||
@ -318,14 +347,23 @@ FT_BEGIN_HEADER
|
||||
/* elements, giving the outline's point coordinates. */
|
||||
/* */
|
||||
/* tags :: A pointer to an array of `n_points' chars, giving */
|
||||
/* each outline point's type. If bit~0 is unset, the */
|
||||
/* point is `off' the curve, i.e., a Bézier control */
|
||||
/* point, while it is `on' when set. */
|
||||
/* each outline point's type. */
|
||||
/* */
|
||||
/* If bit~0 is unset, the point is `off' the curve, */
|
||||
/* i.e., a Bézier control point, while it is `on' if */
|
||||
/* set. */
|
||||
/* */
|
||||
/* Bit~1 is meaningful for `off' points only. If set, */
|
||||
/* it indicates a third-order Bézier arc control point; */
|
||||
/* and a second-order control point if unset. */
|
||||
/* */
|
||||
/* If bit~2 is set, bits 5-7 contain the drop-out mode */
|
||||
/* (as defined in the OpenType specification; the value */
|
||||
/* is the same as the argument to the SCANMODE */
|
||||
/* instruction). */
|
||||
/* */
|
||||
/* Bits 3 and~4 are reserved for internal purposes. */
|
||||
/* */
|
||||
/* contours :: An array of `n_contours' shorts, giving the end */
|
||||
/* point of each contour within the outline. For */
|
||||
/* example, the first contour is defined by the points */
|
||||
@ -336,6 +374,12 @@ FT_BEGIN_HEADER
|
||||
/* and give hints to the scan-converter and hinter on */
|
||||
/* how to convert/grid-fit it. See @FT_OUTLINE_FLAGS. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* The B/W rasterizer only checks bit~2 in the `tags' array for the */
|
||||
/* first point of each contour. The drop-out mode as given with */
|
||||
/* @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, and */
|
||||
/* @FT_OUTLINE_INCLUDE_STUBS in `flags' is then overridden. */
|
||||
/* */
|
||||
typedef struct FT_Outline_
|
||||
{
|
||||
short n_contours; /* number of contours in glyph */
|
||||
@ -349,6 +393,11 @@ FT_BEGIN_HEADER
|
||||
|
||||
} FT_Outline;
|
||||
|
||||
/* Following limits must be consistent with */
|
||||
/* FT_Outline.{n_contours,n_points} */
|
||||
#define FT_OUTLINE_CONTOURS_MAX SHRT_MAX
|
||||
#define FT_OUTLINE_POINTS_MAX SHRT_MAX
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
@ -371,7 +420,7 @@ FT_BEGIN_HEADER
|
||||
/* FT_OUTLINE_EVEN_ODD_FILL :: */
|
||||
/* By default, outlines are filled using the non-zero winding rule. */
|
||||
/* If set to 1, the outline will be filled using the even-odd fill */
|
||||
/* rule (only works with the smooth raster). */
|
||||
/* rule (only works with the smooth rasterizer). */
|
||||
/* */
|
||||
/* FT_OUTLINE_REVERSE_FILL :: */
|
||||
/* By default, outside contours of an outline are oriented in */
|
||||
@ -384,15 +433,17 @@ FT_BEGIN_HEADER
|
||||
/* By default, the scan converter will try to detect drop-outs in */
|
||||
/* an outline and correct the glyph bitmap to ensure consistent */
|
||||
/* shape continuity. If set, this flag hints the scan-line */
|
||||
/* converter to ignore such cases. */
|
||||
/* converter to ignore such cases. See below for more information. */
|
||||
/* */
|
||||
/* FT_OUTLINE_SMART_DROPOUTS :: */
|
||||
/* Select smart dropout control. If unset, use simple dropout */
|
||||
/* control. Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. */
|
||||
/* control. Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. See */
|
||||
/* below for more information. */
|
||||
/* */
|
||||
/* FT_OUTLINE_INCLUDE_STUBS :: */
|
||||
/* If set, turn pixels on for `stubs', otherwise exclude them. */
|
||||
/* Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. */
|
||||
/* Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. See below for */
|
||||
/* more information. */
|
||||
/* */
|
||||
/* FT_OUTLINE_HIGH_PRECISION :: */
|
||||
/* This flag indicates that the scan-line converter should try to */
|
||||
@ -409,6 +460,13 @@ FT_BEGIN_HEADER
|
||||
/* scan-converter. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* The flags @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, */
|
||||
/* and @FT_OUTLINE_INCLUDE_STUBS are ignored by the smooth */
|
||||
/* rasterizer. */
|
||||
/* */
|
||||
/* There exists a second mechanism to pass the drop-out mode to the */
|
||||
/* B/W rasterizer; see the `tags' field in @FT_Outline. */
|
||||
/* */
|
||||
/* Please refer to the description of the `SCANTYPE' instruction in */
|
||||
/* the OpenType specification (in file `ttinst1.doc') how simple */
|
||||
/* drop-outs, smart drop-outs, and stubs are defined. */
|
||||
@ -459,6 +517,8 @@ FT_BEGIN_HEADER
|
||||
#define FT_CURVE_TAG_CONIC 0
|
||||
#define FT_CURVE_TAG_CUBIC 2
|
||||
|
||||
#define FT_CURVE_TAG_HAS_SCANMODE 4
|
||||
|
||||
#define FT_CURVE_TAG_TOUCH_X 8 /* reserved for the TrueType hinter */
|
||||
#define FT_CURVE_TAG_TOUCH_Y 16 /* reserved for the TrueType hinter */
|
||||
|
||||
@ -532,8 +592,8 @@ FT_BEGIN_HEADER
|
||||
/* FT_Outline_ConicToFunc */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A function pointer type use to describe the signature of a `conic */
|
||||
/* to' function during outline walking/decomposition. */
|
||||
/* A function pointer type used to describe the signature of a `conic */
|
||||
/* to' function during outline walking or decomposition. */
|
||||
/* */
|
||||
/* A `conic to' is emitted to indicate a second-order Bézier arc in */
|
||||
/* the outline. */
|
||||
@ -565,7 +625,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A function pointer type used to describe the signature of a `cubic */
|
||||
/* to' function during outline walking/decomposition. */
|
||||
/* to' function during outline walking or decomposition. */
|
||||
/* */
|
||||
/* A `cubic to' is emitted to indicate a third-order Bézier arc. */
|
||||
/* */
|
||||
@ -598,8 +658,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A structure to hold various function pointers used during outline */
|
||||
/* decomposition in order to emit segments, conic, and cubic Béziers, */
|
||||
/* as well as `move to' and `close to' operations. */
|
||||
/* decomposition in order to emit segments, conic, and cubic Béziers. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* move_to :: The `move to' emitter. */
|
||||
@ -626,7 +685,7 @@ FT_BEGIN_HEADER
|
||||
/* y' = (x << shift) - delta */
|
||||
/* } */
|
||||
/* */
|
||||
/* Set the value of `shift' and `delta' to~0 to get the original */
|
||||
/* Set the values of `shift' and `delta' to~0 to get the original */
|
||||
/* point coordinates. */
|
||||
/* */
|
||||
typedef struct FT_Outline_Funcs_
|
||||
@ -1011,7 +1070,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* gray_spans :: The gray span drawing callback. */
|
||||
/* */
|
||||
/* black_spans :: The black span drawing callback. */
|
||||
/* black_spans :: The black span drawing callback. UNIMPLEMENTED! */
|
||||
/* */
|
||||
/* bit_test :: The bit test callback. UNIMPLEMENTED! */
|
||||
/* */
|
||||
@ -1048,7 +1107,7 @@ FT_BEGIN_HEADER
|
||||
const void* source;
|
||||
int flags;
|
||||
FT_SpanFunc gray_spans;
|
||||
FT_SpanFunc black_spans;
|
||||
FT_SpanFunc black_spans; /* doesn't work! */
|
||||
FT_Raster_BitTest_Func bit_test; /* doesn't work! */
|
||||
FT_Raster_BitSet_Func bit_set; /* doesn't work! */
|
||||
void* user;
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType incremental loading (specification). */
|
||||
/* */
|
||||
/* Copyright 2002, 2003, 2006, 2007, 2008 by */
|
||||
/* Copyright 2002, 2003, 2006, 2007, 2008, 2010 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -101,7 +101,10 @@ FT_BEGIN_HEADER
|
||||
* Top bearing, in font units.
|
||||
*
|
||||
* advance ::
|
||||
* Glyph advance, in font units.
|
||||
* Horizontal component of glyph advance, in font units.
|
||||
*
|
||||
* advance_v ::
|
||||
* Vertical component of glyph advance, in font units.
|
||||
*
|
||||
* @note:
|
||||
* These correspond to horizontal or vertical metrics depending on the
|
||||
@ -114,6 +117,7 @@ FT_BEGIN_HEADER
|
||||
FT_Long bearing_x;
|
||||
FT_Long bearing_y;
|
||||
FT_Long advance;
|
||||
FT_Long advance_v; /* since 2.3.12 */
|
||||
|
||||
} FT_Incremental_MetricsRec;
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
/* FreeType API for color filtering of subpixel bitmap glyphs */
|
||||
/* (specification). */
|
||||
/* */
|
||||
/* Copyright 2006, 2007, 2008 by */
|
||||
/* Copyright 2006, 2007, 2008, 2010 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -58,7 +58,7 @@ FT_BEGIN_HEADER
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* @func:
|
||||
* @enum:
|
||||
* FT_LcdFilter
|
||||
*
|
||||
* @description:
|
||||
@ -161,6 +161,47 @@ FT_BEGIN_HEADER
|
||||
FT_Library_SetLcdFilter( FT_Library library,
|
||||
FT_LcdFilter filter );
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @func:
|
||||
* FT_Library_SetLcdFilterWeights
|
||||
*
|
||||
* @description:
|
||||
* Use this function to override the filter weights selected by
|
||||
* @FT_Library_SetLcdFilter. By default, FreeType uses the quintuple
|
||||
* (0x00, 0x55, 0x56, 0x55, 0x00) for FT_LCD_FILTER_LIGHT, and (0x10,
|
||||
* 0x40, 0x70, 0x40, 0x10) for FT_LCD_FILTER_DEFAULT and
|
||||
* FT_LCD_FILTER_LEGACY.
|
||||
*
|
||||
* @input:
|
||||
* library ::
|
||||
* A handle to the target library instance.
|
||||
*
|
||||
* weights ::
|
||||
* A pointer to an array; the function copies the first five bytes and
|
||||
* uses them to specify the filter weights.
|
||||
*
|
||||
* @return:
|
||||
* 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 must be called after @FT_Library_SetLcdFilter to have
|
||||
* any effect.
|
||||
*
|
||||
* @since:
|
||||
* 2.4.0
|
||||
*/
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Library_SetLcdFilterWeights( FT_Library library,
|
||||
unsigned char *weights );
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* Generic list support for FreeType (specification). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2003, 2007 by */
|
||||
/* Copyright 1996-2001, 2003, 2007, 2010 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -255,6 +255,10 @@ FT_BEGIN_HEADER
|
||||
/* user :: A user-supplied field which is passed as the last */
|
||||
/* argument to the destructor. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* This function expects that all nodes added by @FT_List_Add or */
|
||||
/* @FT_List_Insert have been dynamically allocated. */
|
||||
/* */
|
||||
FT_EXPORT( void )
|
||||
FT_List_Finalize( FT_List list,
|
||||
FT_List_Destructor destroy,
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType Multiple Master font interface (specification). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2003, 2004, 2006 by */
|
||||
/* Copyright 1996-2001, 2003, 2004, 2006, 2009 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -257,7 +257,7 @@ FT_BEGIN_HEADER
|
||||
/* face :: A handle to the source face. */
|
||||
/* */
|
||||
/* <Output> */
|
||||
/* amaster :: The Multiple Masters descriptor. */
|
||||
/* amaster :: The Multiple Masters/GX var descriptor. */
|
||||
/* Allocates a data structure, which the user must free */
|
||||
/* (a single call to FT_FREE will do it). */
|
||||
/* */
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType modules public interface (specification). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2006, 2008 by */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2006, 2008, 2009, 2010 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -249,6 +249,33 @@ FT_BEGIN_HEADER
|
||||
FT_Module module );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* FT_Reference_Library */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A counter gets initialized to~1 at the time an @FT_Library */
|
||||
/* structure is created. This function increments the counter. */
|
||||
/* @FT_Done_Library then only destroys a library if the counter is~1, */
|
||||
/* otherwise it simply decrements the counter. */
|
||||
/* */
|
||||
/* This function helps in managing life-cycles of structures which */
|
||||
/* reference @FT_Library objects. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* library :: A handle to a target library object. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
/* <Since> */
|
||||
/* 2.4.2 */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Reference_Library( FT_Library library );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
@ -259,6 +286,13 @@ FT_BEGIN_HEADER
|
||||
/* from a given memory object. It is thus possible to use libraries */
|
||||
/* with distinct memory allocators within the same program. */
|
||||
/* */
|
||||
/* Normally, you would call this function (followed by a call to */
|
||||
/* @FT_Add_Default_Modules or a series of calls to @FT_Add_Module) */
|
||||
/* instead of @FT_Init_FreeType to initialize the FreeType library. */
|
||||
/* */
|
||||
/* Don't use @FT_Done_FreeType but @FT_Done_Library to destroy a */
|
||||
/* library instance. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* memory :: A handle to the original memory object. */
|
||||
/* */
|
||||
@ -268,6 +302,10 @@ FT_BEGIN_HEADER
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* See the discussion of reference counters in the description of */
|
||||
/* @FT_Reference_Library. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_New_Library( FT_Memory memory,
|
||||
FT_Library *alibrary );
|
||||
@ -288,6 +326,10 @@ FT_BEGIN_HEADER
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* See the discussion of reference counters in the description of */
|
||||
/* @FT_Reference_Library. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Done_Library( FT_Library library );
|
||||
|
||||
@ -390,8 +432,8 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* FT_TRUETYPE_ENGINE_TYPE_PATENTED ::
|
||||
* The library implements a bytecode interpreter that covers
|
||||
* the full instruction set of the TrueType virtual machine.
|
||||
* See the file `docs/PATENTS' for legal aspects.
|
||||
* the full instruction set of the TrueType virtual machine (this
|
||||
* was governed by patents until May 2010, hence the name).
|
||||
*
|
||||
* @since:
|
||||
* 2.2
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType module error offsets (specification). */
|
||||
/* */
|
||||
/* Copyright 2001, 2002, 2003, 2004, 2005 by */
|
||||
/* Copyright 2001, 2002, 2003, 2004, 2005, 2010 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -105,24 +105,25 @@
|
||||
FT_MODERRDEF( Base, 0x000, "base module" )
|
||||
FT_MODERRDEF( Autofit, 0x100, "autofitter module" )
|
||||
FT_MODERRDEF( BDF, 0x200, "BDF module" )
|
||||
FT_MODERRDEF( Cache, 0x300, "cache module" )
|
||||
FT_MODERRDEF( CFF, 0x400, "CFF module" )
|
||||
FT_MODERRDEF( CID, 0x500, "CID module" )
|
||||
FT_MODERRDEF( Gzip, 0x600, "Gzip module" )
|
||||
FT_MODERRDEF( LZW, 0x700, "LZW module" )
|
||||
FT_MODERRDEF( OTvalid, 0x800, "OpenType validation module" )
|
||||
FT_MODERRDEF( PCF, 0x900, "PCF module" )
|
||||
FT_MODERRDEF( PFR, 0xA00, "PFR module" )
|
||||
FT_MODERRDEF( PSaux, 0xB00, "PS auxiliary module" )
|
||||
FT_MODERRDEF( PShinter, 0xC00, "PS hinter module" )
|
||||
FT_MODERRDEF( PSnames, 0xD00, "PS names module" )
|
||||
FT_MODERRDEF( Raster, 0xE00, "raster module" )
|
||||
FT_MODERRDEF( SFNT, 0xF00, "SFNT module" )
|
||||
FT_MODERRDEF( Smooth, 0x1000, "smooth raster module" )
|
||||
FT_MODERRDEF( TrueType, 0x1100, "TrueType module" )
|
||||
FT_MODERRDEF( Type1, 0x1200, "Type 1 module" )
|
||||
FT_MODERRDEF( Type42, 0x1300, "Type 42 module" )
|
||||
FT_MODERRDEF( Winfonts, 0x1400, "Windows FON/FNT module" )
|
||||
FT_MODERRDEF( Bzip2, 0x300, "Bzip2 module" )
|
||||
FT_MODERRDEF( Cache, 0x400, "cache module" )
|
||||
FT_MODERRDEF( CFF, 0x500, "CFF module" )
|
||||
FT_MODERRDEF( CID, 0x600, "CID module" )
|
||||
FT_MODERRDEF( Gzip, 0x700, "Gzip module" )
|
||||
FT_MODERRDEF( LZW, 0x800, "LZW module" )
|
||||
FT_MODERRDEF( OTvalid, 0x900, "OpenType validation module" )
|
||||
FT_MODERRDEF( PCF, 0xA00, "PCF module" )
|
||||
FT_MODERRDEF( PFR, 0xB00, "PFR module" )
|
||||
FT_MODERRDEF( PSaux, 0xC00, "PS auxiliary module" )
|
||||
FT_MODERRDEF( PShinter, 0xD00, "PS hinter module" )
|
||||
FT_MODERRDEF( PSnames, 0xE00, "PS names module" )
|
||||
FT_MODERRDEF( Raster, 0xF00, "raster module" )
|
||||
FT_MODERRDEF( SFNT, 0x1000, "SFNT module" )
|
||||
FT_MODERRDEF( Smooth, 0x1100, "smooth raster module" )
|
||||
FT_MODERRDEF( TrueType, 0x1200, "TrueType module" )
|
||||
FT_MODERRDEF( Type1, 0x1300, "Type 1 module" )
|
||||
FT_MODERRDEF( Type42, 0x1400, "Type 42 module" )
|
||||
FT_MODERRDEF( Winfonts, 0x1500, "Windows FON/FNT module" )
|
||||
|
||||
|
||||
#ifdef FT_MODERR_END_LIST
|
||||
|
@ -5,7 +5,7 @@
|
||||
/* Support for the FT_Outline type used to store glyph shapes of */
|
||||
/* most scalable font formats (specification). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2005, 2006, 2007, 2008 by */
|
||||
/* Copyright 1996-2003, 2005-2012 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -59,6 +59,7 @@ FT_BEGIN_HEADER
|
||||
/* FT_Outline_Translate */
|
||||
/* FT_Outline_Transform */
|
||||
/* FT_Outline_Embolden */
|
||||
/* FT_Outline_EmboldenXY */
|
||||
/* FT_Outline_Reverse */
|
||||
/* FT_Outline_Check */
|
||||
/* */
|
||||
@ -85,9 +86,8 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Walk over an outline's structure to decompose it into individual */
|
||||
/* segments and Bézier arcs. This function is also able to emit */
|
||||
/* `move to' and `close to' operations to indicate the start and end */
|
||||
/* of new contours in the outline. */
|
||||
/* segments and Bézier arcs. This function also emits `move to' */
|
||||
/* operations to indicate the start of new contours in the outline. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* outline :: A pointer to the source target. */
|
||||
@ -125,13 +125,12 @@ FT_BEGIN_HEADER
|
||||
/* outline will *not* necessarily be *freed*, when */
|
||||
/* destroying the library, by @FT_Done_FreeType. */
|
||||
/* */
|
||||
/* numPoints :: The maximal number of points within the outline. */
|
||||
/* numPoints :: The maximum number of points within the outline. */
|
||||
/* */
|
||||
/* numContours :: The maximal number of contours within the outline. */
|
||||
/* numContours :: The maximum number of contours within the outline. */
|
||||
/* */
|
||||
/* <Output> */
|
||||
/* anoutline :: A handle to the new outline. NULL in case of */
|
||||
/* error. */
|
||||
/* anoutline :: A handle to the new outline. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
@ -229,6 +228,9 @@ FT_BEGIN_HEADER
|
||||
/* <Output> */
|
||||
/* acbox :: The outline's control box. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* See @FT_Glyph_Get_CBox for a discussion of tricky fonts. */
|
||||
/* */
|
||||
FT_EXPORT( void )
|
||||
FT_Outline_Get_CBox( const FT_Outline* outline,
|
||||
FT_BBox *acbox );
|
||||
@ -334,7 +336,7 @@ FT_BEGIN_HEADER
|
||||
/* handled incorrectly. */
|
||||
/* */
|
||||
/* If you need `better' metrics values you should call */
|
||||
/* @FT_Outline_Get_CBox ot @FT_Outline_Get_BBox. */
|
||||
/* @FT_Outline_Get_CBox or @FT_Outline_Get_BBox. */
|
||||
/* */
|
||||
/* Example call: */
|
||||
/* */
|
||||
@ -349,6 +351,23 @@ FT_BEGIN_HEADER
|
||||
FT_Pos strength );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* FT_Outline_EmboldenXY */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Embolden an outline. The new outline will be `xstrength' pixels */
|
||||
/* wider and `ystrength' pixels higher. Otherwise, it is similar to */
|
||||
/* @FT_Outline_Embolden, which uses the same strength in both */
|
||||
/* directions. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Outline_EmboldenXY( FT_Outline* outline,
|
||||
FT_Pos xstrength,
|
||||
FT_Pos ystrength );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
@ -362,7 +381,7 @@ FT_BEGIN_HEADER
|
||||
/* outline :: A pointer to the target outline descriptor. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* This functions toggles the bit flag @FT_OUTLINE_REVERSE_FILL in */
|
||||
/* This function toggles the bit flag @FT_OUTLINE_REVERSE_FILL in */
|
||||
/* the outline's `flags' field. */
|
||||
/* */
|
||||
/* It shouldn't be used by a normal client application, unless it */
|
||||
@ -416,7 +435,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Render an outline within a bitmap using the current scan-convert. */
|
||||
/* This functions uses an @FT_Raster_Params structure as an argument, */
|
||||
/* This function uses an @FT_Raster_Params structure as an argument, */
|
||||
/* allowing advanced features like direct composition, translucency, */
|
||||
/* etc. */
|
||||
/* */
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType API for accessing PFR-specific data (specification only). */
|
||||
/* */
|
||||
/* Copyright 2002, 2003, 2004, 2006, 2008 by */
|
||||
/* Copyright 2002, 2003, 2004, 2006, 2008, 2009 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -62,8 +62,8 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @output:
|
||||
* aoutline_resolution ::
|
||||
* Outline resolution. This is equivalent to `face->units_per_EM'.
|
||||
* Optional (parameter can be NULL).
|
||||
* Outline resolution. This is equivalent to `face->units_per_EM'
|
||||
* for non-PFR fonts. Optional (parameter can be NULL).
|
||||
*
|
||||
* ametrics_resolution ::
|
||||
* Metrics resolution. This is equivalent to `outline_resolution'
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType renderer modules public interface (specification). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2005, 2006 by */
|
||||
/* Copyright 1996-2001, 2005, 2006, 2010 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -141,10 +141,6 @@ FT_BEGIN_HEADER
|
||||
/* raster_class :: For @FT_GLYPH_FORMAT_OUTLINE renderers only. */
|
||||
/* This is a pointer to its raster's class. */
|
||||
/* */
|
||||
/* raster :: For @FT_GLYPH_FORMAT_OUTLINE renderers only. */
|
||||
/* This is a pointer to the corresponding raster */
|
||||
/* object, if any. */
|
||||
/* */
|
||||
typedef struct FT_Renderer_Class_
|
||||
{
|
||||
FT_Module_Class root;
|
||||
@ -216,6 +212,14 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* This doesn't change the current renderer for other formats. */
|
||||
/* */
|
||||
/* Currently, only the B/W renderer, if compiled with */
|
||||
/* FT_RASTER_OPTION_ANTI_ALIASING (providing a 5-levels */
|
||||
/* anti-aliasing mode; this option must be set directly in */
|
||||
/* `ftraster.c' and is undefined by default) accepts a single tag */
|
||||
/* `pal5' to set its gray palette as a character string with */
|
||||
/* 5~elements. Consequently, the third and fourth argument are zero */
|
||||
/* normally. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Set_Renderer( FT_Library library,
|
||||
FT_Renderer renderer,
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType size objects management (specification). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2003, 2004, 2006 by */
|
||||
/* Copyright 1996-2001, 2003, 2004, 2006, 2009 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -129,8 +129,8 @@ FT_BEGIN_HEADER
|
||||
/* <Description> */
|
||||
/* Even though it is possible to create several size objects for a */
|
||||
/* given face (see @FT_New_Size for details), functions like */
|
||||
/* @FT_Load_Glyph or @FT_Load_Char only use the last-created one to */
|
||||
/* determine the `current character pixel size'. */
|
||||
/* @FT_Load_Glyph or @FT_Load_Char only use the one which has been */
|
||||
/* activated last to determine the `current character pixel size'. */
|
||||
/* */
|
||||
/* This function can be used to `activate' a previously created size */
|
||||
/* object. */
|
||||
|
@ -7,7 +7,7 @@
|
||||
/* */
|
||||
/* This is _not_ used to retrieve glyph names! */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2006 by */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2006, 2009, 2010 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -147,7 +147,8 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* The `string' array returned in the `aname' structure is not */
|
||||
/* null-terminated. */
|
||||
/* null-terminated. The application should deallocate it if it is no */
|
||||
/* longer in use. */
|
||||
/* */
|
||||
/* Use @FT_Get_Sfnt_Name_Count to get the total number of available */
|
||||
/* `name' table entries, then do a loop until you get the right */
|
||||
@ -159,6 +160,35 @@ FT_BEGIN_HEADER
|
||||
FT_SfntName *aname );
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* @constant:
|
||||
* FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY
|
||||
*
|
||||
* @description:
|
||||
* A constant used as the tag of @FT_Parameter structures to make
|
||||
* FT_Open_Face() ignore preferred family subfamily names in `name'
|
||||
* table since OpenType version 1.4. For backwards compatibility with
|
||||
* legacy systems which has 4-face-per-family restriction.
|
||||
*
|
||||
*/
|
||||
#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY FT_MAKE_TAG( 'i', 'g', 'p', 'f' )
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* @constant:
|
||||
* FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY
|
||||
*
|
||||
* @description:
|
||||
* A constant used as the tag of @FT_Parameter structures to make
|
||||
* FT_Open_Face() ignore preferred subfamily names in `name' table since
|
||||
* OpenType version 1.4. For backwards compatibility with legacy
|
||||
* systems which has 4-face-per-family restriction.
|
||||
*
|
||||
*/
|
||||
#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY FT_MAKE_TAG( 'i', 'g', 'p', 's' )
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType path stroker (specification). */
|
||||
/* */
|
||||
/* Copyright 2002, 2003, 2004, 2005, 2006, 2008 by */
|
||||
/* Copyright 2002-2006, 2008, 2009, 2011-2012 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -75,20 +75,44 @@ FT_BEGIN_HEADER
|
||||
* to join two lines smoothly.
|
||||
*
|
||||
* FT_STROKER_LINEJOIN_BEVEL ::
|
||||
* Used to render beveled line joins; i.e., the two joining lines
|
||||
* are extended until they intersect.
|
||||
* Used to render beveled line joins. The outer corner of
|
||||
* the joined lines is filled by enclosing the triangular
|
||||
* region of the corner with a straight line between the
|
||||
* outer corners of each stroke.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* FT_STROKER_LINEJOIN_MITER_VARIABLE ::
|
||||
* FT_STROKER_LINEJOIN_MITER ::
|
||||
* Same as beveled rendering, except that an additional line
|
||||
* break is added if the angle between the two joining lines
|
||||
* is too closed (this is useful to avoid unpleasant spikes
|
||||
* in beveled rendering).
|
||||
* 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.
|
||||
* 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
|
||||
* backwards compatibility.
|
||||
*/
|
||||
typedef enum FT_Stroker_LineJoin_
|
||||
{
|
||||
FT_STROKER_LINEJOIN_ROUND = 0,
|
||||
FT_STROKER_LINEJOIN_BEVEL,
|
||||
FT_STROKER_LINEJOIN_MITER
|
||||
FT_STROKER_LINEJOIN_BEVEL = 1,
|
||||
FT_STROKER_LINEJOIN_MITER_VARIABLE = 2,
|
||||
FT_STROKER_LINEJOIN_MITER = FT_STROKER_LINEJOIN_MITER_VARIABLE,
|
||||
FT_STROKER_LINEJOIN_MITER_FIXED = 3
|
||||
|
||||
} FT_Stroker_LineJoin;
|
||||
|
||||
@ -171,7 +195,7 @@ FT_BEGIN_HEADER
|
||||
* The source outline handle.
|
||||
*
|
||||
* @return:
|
||||
* The border index. @FT_STROKER_BORDER_LEFT for empty or invalid
|
||||
* The border index. @FT_STROKER_BORDER_RIGHT for empty or invalid
|
||||
* outlines.
|
||||
*/
|
||||
FT_EXPORT( FT_StrokerBorder )
|
||||
@ -245,7 +269,8 @@ FT_BEGIN_HEADER
|
||||
* The line join style.
|
||||
*
|
||||
* miter_limit ::
|
||||
* The miter limit for the FT_STROKER_LINEJOIN_MITER style,
|
||||
* 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.
|
||||
*
|
||||
* @note:
|
||||
@ -598,7 +623,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @description:
|
||||
* Call this function after @FT_Stroker_GetBorderCounts to
|
||||
* export the all borders to your own @FT_Outline structure.
|
||||
* export all borders to your own @FT_Outline structure.
|
||||
*
|
||||
* Note that this function appends the border points and
|
||||
* contours to your outline, but does not try to resize its
|
||||
@ -657,6 +682,11 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @note:
|
||||
* The source glyph is untouched in case of error.
|
||||
*
|
||||
* Adding stroke may yield a significantly wider and taller glyph
|
||||
* depending on how large of a radius was used to stroke the glyph. You
|
||||
* may need to manually adjust horizontal and vertical advance amounts
|
||||
* to account for this added size.
|
||||
*/
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Glyph_Stroke( FT_Glyph *pglyph,
|
||||
@ -694,6 +724,11 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @note:
|
||||
* The source glyph is untouched in case of error.
|
||||
*
|
||||
* Adding stroke may yield a significantly wider and taller glyph
|
||||
* depending on how large of a radius was used to stroke the glyph. You
|
||||
* may need to manually adjust horizontal and vertical advance amounts
|
||||
* to account for this added size.
|
||||
*/
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Glyph_StrokeBorder( FT_Glyph *pglyph,
|
||||
|
@ -5,7 +5,7 @@
|
||||
/* FreeType synthesizing code for emboldening and slanting */
|
||||
/* (specification). */
|
||||
/* */
|
||||
/* Copyright 2000-2001, 2003, 2006, 2008 by */
|
||||
/* Copyright 2000-2001, 2003, 2006, 2008, 2012 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -61,8 +61,9 @@ FT_BEGIN_HEADER
|
||||
/* taste). This function is actually a convenience function, providing */
|
||||
/* a wrapper for @FT_Outline_Embolden and @FT_Bitmap_Embolden. */
|
||||
/* */
|
||||
/* For emboldened outlines the metrics are estimates only; if you need */
|
||||
/* precise values you should call @FT_Outline_Get_CBox. */
|
||||
/* For emboldened outlines the height, width, and advance metrics are */
|
||||
/* increased by the strength of the emboldening. You can also call */
|
||||
/* @FT_Outline_Get_CBox to get precise values. */
|
||||
FT_EXPORT( void )
|
||||
FT_GlyphSlot_Embolden( FT_GlyphSlot slot );
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType low-level system interface definition (specification). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2005 by */
|
||||
/* Copyright 1996-2001, 2002, 2005, 2010 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -240,7 +240,8 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @note:
|
||||
* This function might be called to perform a seek or skip operation
|
||||
* with a `count' of~0.
|
||||
* with a `count' of~0. A non-zero return value then indicates an
|
||||
* error.
|
||||
*
|
||||
*/
|
||||
typedef unsigned long
|
||||
@ -301,7 +302,7 @@ FT_BEGIN_HEADER
|
||||
* The stream's input function.
|
||||
*
|
||||
* close ::
|
||||
* The stream;s close function.
|
||||
* The stream's close function.
|
||||
*
|
||||
* memory ::
|
||||
* The memory manager to use to preload frames. This is set
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType simple types definitions (specification only). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2004, 2006, 2007, 2008 by */
|
||||
/* Copyright 1996-2002, 2004, 2006-2009, 2012 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -434,7 +434,7 @@ FT_BEGIN_HEADER
|
||||
/* variety of FreeType core objects. For example, a text layout API */
|
||||
/* might want to associate a glyph cache to a given size object. */
|
||||
/* */
|
||||
/* Most FreeType object contains a `generic' field, of type */
|
||||
/* Some FreeType object contains a `generic' field, of type */
|
||||
/* FT_Generic, which usage is left to client applications and font */
|
||||
/* servers. */
|
||||
/* */
|
||||
@ -474,6 +474,7 @@ FT_BEGIN_HEADER
|
||||
/* this macro. */
|
||||
/* */
|
||||
#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \
|
||||
(FT_Tag) \
|
||||
( ( (FT_ULong)_x1 << 24 ) | \
|
||||
( (FT_ULong)_x2 << 16 ) | \
|
||||
( (FT_ULong)_x3 << 8 ) | \
|
||||
|
@ -49,6 +49,9 @@ FT_BEGIN_HEADER
|
||||
/* however, there are special cases (like in PDF devices) where it is */
|
||||
/* important to differentiate, in spite of FreeType's uniform API. */
|
||||
/* */
|
||||
/* This function is in the X11/xf86 namespace for historical reasons */
|
||||
/* and in no way depends on that windowing system. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
/* Basic Type 1/Type 2 tables definitions and interface (specification */
|
||||
/* only). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2008 by */
|
||||
/* Copyright 1996-2004, 2006, 2008, 2009, 2011 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -78,10 +78,6 @@ FT_BEGIN_HEADER
|
||||
FT_Short underline_position;
|
||||
FT_UShort underline_thickness;
|
||||
|
||||
/* since 2.3.8 */
|
||||
|
||||
FT_UShort fs_type;
|
||||
|
||||
} PS_FontInfoRec;
|
||||
|
||||
|
||||
@ -486,19 +482,177 @@ FT_BEGIN_HEADER
|
||||
* FreeType error code. 0~means success.
|
||||
*
|
||||
* @note:
|
||||
* The string pointers within the font info structure are owned by
|
||||
* The string pointers within the @PS_PrivateRec structure are owned by
|
||||
* the face and don't need to be freed by the caller.
|
||||
*
|
||||
* If the font's format is not PostScript-based, this function will
|
||||
* return the `FT_Err_Invalid_Argument' error code.
|
||||
* If the font's format is not PostScript-based, this function returns
|
||||
* the `FT_Err_Invalid_Argument' error code.
|
||||
*
|
||||
*/
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Get_PS_Font_Private( FT_Face face,
|
||||
PS_Private afont_private );
|
||||
|
||||
/* */
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Enum> */
|
||||
/* T1_EncodingType */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* An enumeration describing the `Encoding' entry in a Type 1 */
|
||||
/* dictionary. */
|
||||
/* */
|
||||
typedef enum T1_EncodingType_
|
||||
{
|
||||
T1_ENCODING_TYPE_NONE = 0,
|
||||
T1_ENCODING_TYPE_ARRAY,
|
||||
T1_ENCODING_TYPE_STANDARD,
|
||||
T1_ENCODING_TYPE_ISOLATIN1,
|
||||
T1_ENCODING_TYPE_EXPERT
|
||||
|
||||
} T1_EncodingType;
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Enum> */
|
||||
/* PS_Dict_Keys */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* An enumeration used in calls to @FT_Get_PS_Font_Value to identify */
|
||||
/* the Type~1 dictionary entry to retrieve. */
|
||||
/* */
|
||||
typedef enum PS_Dict_Keys_
|
||||
{
|
||||
/* conventionally in the font dictionary */
|
||||
PS_DICT_FONT_TYPE, /* FT_Byte */
|
||||
PS_DICT_FONT_MATRIX, /* FT_Fixed */
|
||||
PS_DICT_FONT_BBOX, /* FT_Fixed */
|
||||
PS_DICT_PAINT_TYPE, /* FT_Byte */
|
||||
PS_DICT_FONT_NAME, /* FT_String* */
|
||||
PS_DICT_UNIQUE_ID, /* FT_Int */
|
||||
PS_DICT_NUM_CHAR_STRINGS, /* FT_Int */
|
||||
PS_DICT_CHAR_STRING_KEY, /* FT_String* */
|
||||
PS_DICT_CHAR_STRING, /* FT_String* */
|
||||
PS_DICT_ENCODING_TYPE, /* T1_EncodingType */
|
||||
PS_DICT_ENCODING_ENTRY, /* FT_String* */
|
||||
|
||||
/* conventionally in the font Private dictionary */
|
||||
PS_DICT_NUM_SUBRS, /* FT_Int */
|
||||
PS_DICT_SUBR, /* FT_String* */
|
||||
PS_DICT_STD_HW, /* FT_UShort */
|
||||
PS_DICT_STD_VW, /* FT_UShort */
|
||||
PS_DICT_NUM_BLUE_VALUES, /* FT_Byte */
|
||||
PS_DICT_BLUE_VALUE, /* FT_Short */
|
||||
PS_DICT_BLUE_FUZZ, /* FT_Int */
|
||||
PS_DICT_NUM_OTHER_BLUES, /* FT_Byte */
|
||||
PS_DICT_OTHER_BLUE, /* FT_Short */
|
||||
PS_DICT_NUM_FAMILY_BLUES, /* FT_Byte */
|
||||
PS_DICT_FAMILY_BLUE, /* FT_Short */
|
||||
PS_DICT_NUM_FAMILY_OTHER_BLUES, /* FT_Byte */
|
||||
PS_DICT_FAMILY_OTHER_BLUE, /* FT_Short */
|
||||
PS_DICT_BLUE_SCALE, /* FT_Fixed */
|
||||
PS_DICT_BLUE_SHIFT, /* FT_Int */
|
||||
PS_DICT_NUM_STEM_SNAP_H, /* FT_Byte */
|
||||
PS_DICT_STEM_SNAP_H, /* FT_Short */
|
||||
PS_DICT_NUM_STEM_SNAP_V, /* FT_Byte */
|
||||
PS_DICT_STEM_SNAP_V, /* FT_Short */
|
||||
PS_DICT_FORCE_BOLD, /* FT_Bool */
|
||||
PS_DICT_RND_STEM_UP, /* FT_Bool */
|
||||
PS_DICT_MIN_FEATURE, /* FT_Short */
|
||||
PS_DICT_LEN_IV, /* FT_Int */
|
||||
PS_DICT_PASSWORD, /* FT_Long */
|
||||
PS_DICT_LANGUAGE_GROUP, /* FT_Long */
|
||||
|
||||
/* conventionally in the font FontInfo dictionary */
|
||||
PS_DICT_VERSION, /* FT_String* */
|
||||
PS_DICT_NOTICE, /* FT_String* */
|
||||
PS_DICT_FULL_NAME, /* FT_String* */
|
||||
PS_DICT_FAMILY_NAME, /* FT_String* */
|
||||
PS_DICT_WEIGHT, /* FT_String* */
|
||||
PS_DICT_IS_FIXED_PITCH, /* FT_Bool */
|
||||
PS_DICT_UNDERLINE_POSITION, /* FT_Short */
|
||||
PS_DICT_UNDERLINE_THICKNESS, /* FT_UShort */
|
||||
PS_DICT_FS_TYPE, /* FT_UShort */
|
||||
PS_DICT_ITALIC_ANGLE, /* FT_Long */
|
||||
|
||||
PS_DICT_MAX = PS_DICT_ITALIC_ANGLE
|
||||
|
||||
} PS_Dict_Keys;
|
||||
|
||||
|
||||
/************************************************************************
|
||||
*
|
||||
* @function:
|
||||
* FT_Get_PS_Font_Value
|
||||
*
|
||||
* @description:
|
||||
* Retrieve the value for the supplied key from a PostScript font.
|
||||
*
|
||||
* @input:
|
||||
* face ::
|
||||
* PostScript face handle.
|
||||
*
|
||||
* key ::
|
||||
* An enumeration value representing the dictionary key to retrieve.
|
||||
*
|
||||
* idx ::
|
||||
* For array values, this specifies the index to be returned.
|
||||
*
|
||||
* value ::
|
||||
* A pointer to memory into which to write the value.
|
||||
*
|
||||
* valen_len ::
|
||||
* The size, in bytes, of the memory supplied for the value.
|
||||
*
|
||||
* @output:
|
||||
* value ::
|
||||
* The value matching the above key, if it exists.
|
||||
*
|
||||
* @return:
|
||||
* The amount of memory (in bytes) required to hold the requested
|
||||
* value (if it exists, -1 otherwise).
|
||||
*
|
||||
* @note:
|
||||
* The values returned are not pointers into the internal structures of
|
||||
* the face, but are `fresh' copies, so that the memory containing them
|
||||
* belongs to the calling application. This also enforces the
|
||||
* `read-only' nature of these values, i.e., this function cannot be
|
||||
* used to manipulate the face.
|
||||
*
|
||||
* `value' is a void pointer because the values returned can be of
|
||||
* various types.
|
||||
*
|
||||
* If either `value' is NULL or `value_len' is too small, just the
|
||||
* required memory size for the requested entry is returned.
|
||||
*
|
||||
* The `idx' parameter is used, not only to retrieve elements of, for
|
||||
* example, the FontMatrix or FontBBox, but also to retrieve name keys
|
||||
* from the CharStrings dictionary, and the charstrings themselves. It
|
||||
* is ignored for atomic values.
|
||||
*
|
||||
* PS_DICT_BLUE_SCALE returns a value that is scaled up by 1000. To
|
||||
* get the value as in the font stream, you need to divide by
|
||||
* 65536000.0 (to remove the FT_Fixed scale, and the x1000 scale).
|
||||
*
|
||||
* IMPORTANT: Only key/value pairs read by the FreeType interpreter can
|
||||
* be retrieved. So, for example, PostScript procedures such as NP,
|
||||
* ND, and RD are not available. Arbitrary keys are, obviously, not be
|
||||
* available either.
|
||||
*
|
||||
* If the font's format is not PostScript-based, this function returns
|
||||
* the `FT_Err_Invalid_Argument' error code.
|
||||
*
|
||||
*/
|
||||
FT_EXPORT( FT_Long )
|
||||
FT_Get_PS_Font_Value( FT_Face face,
|
||||
PS_Dict_Keys key,
|
||||
FT_UInt idx,
|
||||
void *value,
|
||||
FT_Long value_len );
|
||||
|
||||
/* */
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
|
@ -64,7 +64,7 @@ FT_BEGIN_HEADER
|
||||
* MacOS systems (even if they contain a Microsoft charmap as well).
|
||||
*
|
||||
* TT_PLATFORM_ISO ::
|
||||
* This value was used to specify Unicode charmaps. It is however
|
||||
* This value was used to specify ISO/IEC 10646 charmaps. It is however
|
||||
* now deprecated. See @TT_ISO_ID_XXX for a list of corresponding
|
||||
* `encoding_id' values.
|
||||
*
|
||||
|
@ -5,7 +5,7 @@
|
||||
/* Basic SFNT/TrueType tables definitions and interface */
|
||||
/* (specification only). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2008 by */
|
||||
/* Copyright 1996-2005, 2008-2011 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -557,13 +557,13 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
typedef enum FT_Sfnt_Tag_
|
||||
{
|
||||
ft_sfnt_head = 0,
|
||||
ft_sfnt_maxp = 1,
|
||||
ft_sfnt_os2 = 2,
|
||||
ft_sfnt_hhea = 3,
|
||||
ft_sfnt_vhea = 4,
|
||||
ft_sfnt_post = 5,
|
||||
ft_sfnt_pclt = 6,
|
||||
ft_sfnt_head = 0, /* TT_Header */
|
||||
ft_sfnt_maxp = 1, /* TT_MaxProfile */
|
||||
ft_sfnt_os2 = 2, /* TT_OS2 */
|
||||
ft_sfnt_hhea = 3, /* TT_HoriHeader */
|
||||
ft_sfnt_vhea = 4, /* TT_VertHeader */
|
||||
ft_sfnt_post = 5, /* TT_Postscript */
|
||||
ft_sfnt_pclt = 6, /* TT_PCLT */
|
||||
|
||||
sfnt_max /* internal end mark */
|
||||
|
||||
@ -590,6 +590,9 @@ FT_BEGIN_HEADER
|
||||
/* error, or if the corresponding table was not found *OR* loaded */
|
||||
/* from the file. */
|
||||
/* */
|
||||
/* Use a typecast according to `tag' to access the structure */
|
||||
/* elements. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* The table is owned by the face object and disappears with it. */
|
||||
/* */
|
||||
@ -684,18 +687,23 @@ FT_BEGIN_HEADER
|
||||
* The index of an SFNT table. The function returns
|
||||
* FT_Err_Table_Missing for an invalid value.
|
||||
*
|
||||
* @output:
|
||||
* @inout:
|
||||
* tag ::
|
||||
* The name tag of the SFNT table.
|
||||
* The name tag of the SFNT table. If the value is NULL, `table_index'
|
||||
* is ignored, and `length' returns the number of SFNT tables in the
|
||||
* font.
|
||||
*
|
||||
* @output:
|
||||
* length ::
|
||||
* The length of the SFNT table.
|
||||
* The length of the SFNT table (or the number of SFNT tables, depending
|
||||
* on `tag').
|
||||
*
|
||||
* @return:
|
||||
* FreeType error code. 0~means success.
|
||||
*
|
||||
* @note:
|
||||
* SFNT tables with length zero are treated as missing by Windows.
|
||||
* While parsing fonts, FreeType handles SFNT tables with length zero as
|
||||
* missing.
|
||||
*
|
||||
*/
|
||||
FT_EXPORT( FT_Error )
|
||||
|
@ -2,9 +2,10 @@
|
||||
/* */
|
||||
/* ft2build.h */
|
||||
/* */
|
||||
/* Build macros of the FreeType 2 library. */
|
||||
/* FreeType 2 build and setup macros. */
|
||||
/* (Generic version) */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2003, 2006 by */
|
||||
/* Copyright 1996-2001, 2006 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -18,44 +19,21 @@
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* This is a Unix-specific version of <ft2build.h> that should be used */
|
||||
/* exclusively *after* installation of the library. */
|
||||
/* This file corresponds to the default `ft2build.h' file for */
|
||||
/* FreeType 2. It uses the `freetype' include root. */
|
||||
/* */
|
||||
/* It assumes that `/usr/local/include/freetype2' (or whatever is */
|
||||
/* returned by the `freetype-config --cflags' or `pkg-config --cflags' */
|
||||
/* command) is in your compilation include path. */
|
||||
/* */
|
||||
/* We don't need to do anything special in this release. However, for */
|
||||
/* a future FreeType 2 release, the following installation changes will */
|
||||
/* be performed: */
|
||||
/* */
|
||||
/* - The contents of `freetype-2.x/include/freetype' will be installed */
|
||||
/* to `/usr/local/include/freetype2' instead of */
|
||||
/* `/usr/local/include/freetype2/freetype'. */
|
||||
/* */
|
||||
/* - This file will #include <freetype2/config/ftheader.h>, instead */
|
||||
/* of <freetype/config/ftheader.h>. */
|
||||
/* */
|
||||
/* - The contents of `ftheader.h' will be processed with `sed' to */
|
||||
/* replace all `<freetype/xxx>' with `<freetype2/xxx>'. */
|
||||
/* */
|
||||
/* - Adding `/usr/local/include/freetype2' to your compilation include */
|
||||
/* path will not be necessary anymore. */
|
||||
/* */
|
||||
/* These changes will be transparent to client applications which use */
|
||||
/* freetype-config (or pkg-config). No modifications will be necessary */
|
||||
/* to compile with the new scheme. */
|
||||
/* Note that specific platforms might use a different configuration. */
|
||||
/* See builds/unix/ft2unix.h for an example. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FT2_BUILD_UNIX_H__
|
||||
#define __FT2_BUILD_UNIX_H__
|
||||
#ifndef __FT2_BUILD_GENERIC_H__
|
||||
#define __FT2_BUILD_GENERIC_H__
|
||||
|
||||
/* `<prefix>/include/freetype2' must be in your current inclusion path */
|
||||
#include <freetype/config/ftheader.h>
|
||||
|
||||
#endif /* __FT2_BUILD_UNIX_H__ */
|
||||
#endif /* __FT2_BUILD_GENERIC_H__ */
|
||||
|
||||
|
||||
/* END */
|
||||
|
@ -2,7 +2,7 @@
|
||||
* jmorecfg.h
|
||||
*
|
||||
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||
* Modified 1997-2009 by Guido Vollbeding.
|
||||
* Modified 1997-2011 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@ -312,9 +312,7 @@ typedef int boolean;
|
||||
* the offsets will also change the order in which colormap data is organized.
|
||||
* RESTRICTIONS:
|
||||
* 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats.
|
||||
* 2. These macros only affect RGB<=>YCbCr color conversion, so they are not
|
||||
* useful if you are using JPEG color spaces other than YCbCr or grayscale.
|
||||
* 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE
|
||||
* 2. The color quantizer modules will not behave desirably if RGB_PIXELSIZE
|
||||
* is not 3 (they don't understand about dummy color components!). So you
|
||||
* can't use color quantization if you change that value.
|
||||
*/
|
||||
|
@ -2,7 +2,7 @@
|
||||
* jpeglib.h
|
||||
*
|
||||
* Copyright (C) 1991-1998, Thomas G. Lane.
|
||||
* Modified 2002-2009 by Guido Vollbeding.
|
||||
* Modified 2002-2011 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@ -33,11 +33,13 @@ extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Version ID for the JPEG library.
|
||||
/* Version IDs for the JPEG library.
|
||||
* Might be useful for tests like "#if JPEG_LIB_VERSION >= 80".
|
||||
*/
|
||||
|
||||
#define JPEG_LIB_VERSION 80 /* Version 8.0 */
|
||||
#define JPEG_LIB_VERSION 80 /* Compatibility version 8.0 */
|
||||
#define JPEG_LIB_VERSION_MAJOR 8
|
||||
#define JPEG_LIB_VERSION_MINOR 4
|
||||
|
||||
|
||||
/* Various constants determining the sizes of things.
|
||||
@ -45,7 +47,7 @@ extern "C" {
|
||||
* if you want to be compatible.
|
||||
*/
|
||||
|
||||
#define DCTSIZE 8 /* The basic DCT block is 8x8 samples */
|
||||
#define DCTSIZE 8 /* The basic DCT block is 8x8 coefficients */
|
||||
#define DCTSIZE2 64 /* DCTSIZE squared; # of elements in a block */
|
||||
#define NUM_QUANT_TBLS 4 /* Quantization tables are numbered 0..3 */
|
||||
#define NUM_HUFF_TBLS 4 /* Huffman tables are numbered 0..3 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* zconf.h -- configuration of the zlib compression library
|
||||
* Copyright (C) 1995-2010 Jean-loup Gailly.
|
||||
* Copyright (C) 1995-2012 Jean-loup Gailly.
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
* this permanently in zconf.h using "./configure --zprefix".
|
||||
*/
|
||||
#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
|
||||
# define Z_PREFIX_SET
|
||||
|
||||
/* all linked symbols */
|
||||
# define _dist_code z__dist_code
|
||||
@ -27,9 +28,11 @@
|
||||
# define adler32 z_adler32
|
||||
# define adler32_combine z_adler32_combine
|
||||
# define adler32_combine64 z_adler32_combine64
|
||||
# ifndef Z_SOLO
|
||||
# define compress z_compress
|
||||
# define compress2 z_compress2
|
||||
# define compressBound z_compressBound
|
||||
# endif
|
||||
# define crc32 z_crc32
|
||||
# define crc32_combine z_crc32_combine
|
||||
# define crc32_combine64 z_crc32_combine64
|
||||
@ -40,13 +43,16 @@
|
||||
# define deflateInit2_ z_deflateInit2_
|
||||
# define deflateInit_ z_deflateInit_
|
||||
# define deflateParams z_deflateParams
|
||||
# define deflatePending z_deflatePending
|
||||
# define deflatePrime z_deflatePrime
|
||||
# define deflateReset z_deflateReset
|
||||
# define deflateResetKeep z_deflateResetKeep
|
||||
# define deflateSetDictionary z_deflateSetDictionary
|
||||
# define deflateSetHeader z_deflateSetHeader
|
||||
# define deflateTune z_deflateTune
|
||||
# define deflate_copyright z_deflate_copyright
|
||||
# define get_crc_table z_get_crc_table
|
||||
# ifndef Z_SOLO
|
||||
# define gz_error z_gz_error
|
||||
# define gz_intmax z_gz_intmax
|
||||
# define gz_strwinerror z_gz_strwinerror
|
||||
@ -61,11 +67,15 @@
|
||||
# define gzerror z_gzerror
|
||||
# define gzflush z_gzflush
|
||||
# define gzgetc z_gzgetc
|
||||
# define gzgetc_ z_gzgetc_
|
||||
# define gzgets z_gzgets
|
||||
# define gzoffset z_gzoffset
|
||||
# define gzoffset64 z_gzoffset64
|
||||
# define gzopen z_gzopen
|
||||
# define gzopen64 z_gzopen64
|
||||
# ifdef _WIN32
|
||||
# define gzopen_w z_gzopen_w
|
||||
# endif
|
||||
# define gzprintf z_gzprintf
|
||||
# define gzputc z_gzputc
|
||||
# define gzputs z_gzputs
|
||||
@ -78,6 +88,7 @@
|
||||
# define gztell64 z_gztell64
|
||||
# define gzungetc z_gzungetc
|
||||
# define gzwrite z_gzwrite
|
||||
# endif
|
||||
# define inflate z_inflate
|
||||
# define inflateBack z_inflateBack
|
||||
# define inflateBackEnd z_inflateBackEnd
|
||||
@ -95,13 +106,18 @@
|
||||
# define inflateSync z_inflateSync
|
||||
# define inflateSyncPoint z_inflateSyncPoint
|
||||
# define inflateUndermine z_inflateUndermine
|
||||
# define inflateResetKeep z_inflateResetKeep
|
||||
# define inflate_copyright z_inflate_copyright
|
||||
# define inflate_fast z_inflate_fast
|
||||
# define inflate_table z_inflate_table
|
||||
# ifndef Z_SOLO
|
||||
# define uncompress z_uncompress
|
||||
# endif
|
||||
# define zError z_zError
|
||||
# ifndef Z_SOLO
|
||||
# define zcalloc z_zcalloc
|
||||
# define zcfree z_zcfree
|
||||
# endif
|
||||
# define zlibCompileFlags z_zlibCompileFlags
|
||||
# define zlibVersion z_zlibVersion
|
||||
|
||||
@ -111,7 +127,9 @@
|
||||
# define alloc_func z_alloc_func
|
||||
# define charf z_charf
|
||||
# define free_func z_free_func
|
||||
# ifndef Z_SOLO
|
||||
# define gzFile z_gzFile
|
||||
# endif
|
||||
# define gz_header z_gz_header
|
||||
# define gz_headerp z_gz_headerp
|
||||
# define in_func z_in_func
|
||||
@ -197,6 +215,12 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(ZLIB_CONST) && !defined(z_const)
|
||||
# define z_const const
|
||||
#else
|
||||
# define z_const
|
||||
#endif
|
||||
|
||||
/* Some Mac compilers merge all .h files incorrectly: */
|
||||
#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
|
||||
# define NO_DUMMY_DECL
|
||||
@ -243,6 +267,14 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef Z_ARG /* function prototypes for stdarg */
|
||||
# if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
||||
# define Z_ARG(args) args
|
||||
# else
|
||||
# define Z_ARG(args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* The following definitions for FAR are needed only for MSDOS mixed
|
||||
* model programming (small or medium model with some far allocations).
|
||||
* This was tested only with MSC; for other MSDOS compilers you may have
|
||||
@ -356,13 +388,25 @@ typedef uLong FAR uLongf;
|
||||
typedef Byte *voidp;
|
||||
#endif
|
||||
|
||||
#if 1 /* was set to #if 1 by ./configure */
|
||||
typedef unsigned long z_crc_t;
|
||||
|
||||
#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
|
||||
# define Z_HAVE_STDARG_H
|
||||
#endif
|
||||
|
||||
#ifdef STDC
|
||||
# ifndef Z_SOLO
|
||||
# include <sys/types.h> /* for off_t */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <stddef.h> /* for wchar_t */
|
||||
#endif
|
||||
|
||||
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
|
||||
* "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
|
||||
@ -370,12 +414,16 @@ typedef uLong FAR uLongf;
|
||||
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
|
||||
* equivalently requesting no 64-bit operations
|
||||
*/
|
||||
#if -_LARGEFILE64_SOURCE - -1 == 1
|
||||
#if defined(LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
|
||||
# undef _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
|
||||
#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
|
||||
# include <unistd.h> /* for SEEK_* and off_t */
|
||||
#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
#ifndef Z_SOLO
|
||||
# if defined(Z_HAVE_UNISTD_H) || defined(LARGEFILE64_SOURCE)
|
||||
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
|
||||
# ifdef VMS
|
||||
# include <unixio.h> /* for off_t */
|
||||
# endif
|
||||
@ -383,8 +431,21 @@ typedef uLong FAR uLongf;
|
||||
# define z_off_t off_t
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef SEEK_SET
|
||||
#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
|
||||
# define Z_LFS64
|
||||
#endif
|
||||
|
||||
#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
|
||||
# define Z_LARGE64
|
||||
#endif
|
||||
|
||||
#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
|
||||
# define Z_WANT64
|
||||
#endif
|
||||
|
||||
#if !defined(SEEK_SET) && !defined(Z_SOLO)
|
||||
# define SEEK_SET 0 /* Seek from beginning of file. */
|
||||
# define SEEK_CUR 1 /* Seek from current position. */
|
||||
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
|
||||
@ -394,18 +455,14 @@ typedef uLong FAR uLongf;
|
||||
# define z_off_t long
|
||||
#endif
|
||||
|
||||
#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
|
||||
#if !defined(_WIN32) && defined(Z_LARGE64)
|
||||
# define z_off64_t off64_t
|
||||
#else
|
||||
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
|
||||
# define z_off64_t __int64
|
||||
# else
|
||||
# define z_off64_t z_off_t
|
||||
# endif
|
||||
|
||||
#if defined(__OS400__)
|
||||
# define NO_vsnprintf
|
||||
#endif
|
||||
|
||||
#if defined(__MVS__)
|
||||
# define NO_vsnprintf
|
||||
#endif
|
||||
|
||||
/* MVS linker does not support external names larger than 8 bytes */
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* zlib.h -- interface of the 'zlib' general purpose compression library
|
||||
version 1.2.5, April 19th, 2010
|
||||
version 1.2.7, May 2nd, 2012
|
||||
|
||||
Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
|
||||
Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -24,8 +24,8 @@
|
||||
|
||||
|
||||
The data format used by the zlib library is described by RFCs (Request for
|
||||
Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
|
||||
(zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
|
||||
Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950
|
||||
(zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).
|
||||
*/
|
||||
|
||||
#ifndef ZLIB_H
|
||||
@ -37,11 +37,11 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ZLIB_VERSION "1.2.5"
|
||||
#define ZLIB_VERNUM 0x1250
|
||||
#define ZLIB_VERSION "1.2.7"
|
||||
#define ZLIB_VERNUM 0x1270
|
||||
#define ZLIB_VER_MAJOR 1
|
||||
#define ZLIB_VER_MINOR 2
|
||||
#define ZLIB_VER_REVISION 5
|
||||
#define ZLIB_VER_REVISION 7
|
||||
#define ZLIB_VER_SUBREVISION 0
|
||||
|
||||
/*
|
||||
@ -83,15 +83,15 @@ typedef void (*free_func) OF((voidpf opaque, voidpf address));
|
||||
struct internal_state;
|
||||
|
||||
typedef struct z_stream_s {
|
||||
Bytef *next_in; /* next input byte */
|
||||
z_const Bytef *next_in; /* next input byte */
|
||||
uInt avail_in; /* number of bytes available at next_in */
|
||||
uLong total_in; /* total nb of input bytes read so far */
|
||||
uLong total_in; /* total number of input bytes read so far */
|
||||
|
||||
Bytef *next_out; /* next output byte should be put there */
|
||||
uInt avail_out; /* remaining free space at next_out */
|
||||
uLong total_out; /* total nb of bytes output so far */
|
||||
uLong total_out; /* total number of bytes output so far */
|
||||
|
||||
char *msg; /* last error message, NULL if no error */
|
||||
z_const char *msg; /* last error message, NULL if no error */
|
||||
struct internal_state FAR *state; /* not visible by applications */
|
||||
|
||||
alloc_func zalloc; /* used to allocate the internal state */
|
||||
@ -327,8 +327,9 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
|
||||
|
||||
Z_FINISH can be used immediately after deflateInit if all the compression
|
||||
is to be done in a single step. In this case, avail_out must be at least the
|
||||
value returned by deflateBound (see below). If deflate does not return
|
||||
Z_STREAM_END, then it must be called again as described above.
|
||||
value returned by deflateBound (see below). Then deflate is guaranteed to
|
||||
return Z_STREAM_END. If not enough output space is provided, deflate will
|
||||
not return Z_STREAM_END, and it must be called again as described above.
|
||||
|
||||
deflate() sets strm->adler to the adler32 checksum of all input read
|
||||
so far (that is, total_in bytes).
|
||||
@ -451,23 +452,29 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
|
||||
error. However if all decompression is to be performed in a single step (a
|
||||
single call of inflate), the parameter flush should be set to Z_FINISH. In
|
||||
this case all pending input is processed and all pending output is flushed;
|
||||
avail_out must be large enough to hold all the uncompressed data. (The size
|
||||
of the uncompressed data may have been saved by the compressor for this
|
||||
purpose.) The next operation on this stream must be inflateEnd to deallocate
|
||||
the decompression state. The use of Z_FINISH is never required, but can be
|
||||
used to inform inflate that a faster approach may be used for the single
|
||||
inflate() call.
|
||||
avail_out must be large enough to hold all of the uncompressed data for the
|
||||
operation to complete. (The size of the uncompressed data may have been
|
||||
saved by the compressor for this purpose.) The use of Z_FINISH is not
|
||||
required to perform an inflation in one step. However it may be used to
|
||||
inform inflate that a faster approach can be used for the single inflate()
|
||||
call. Z_FINISH also informs inflate to not maintain a sliding window if the
|
||||
stream completes, which reduces inflate's memory footprint. If the stream
|
||||
does not complete, either because not all of the stream is provided or not
|
||||
enough output space is provided, then a sliding window will be allocated and
|
||||
inflate() can be called again to continue the operation as if Z_NO_FLUSH had
|
||||
been used.
|
||||
|
||||
In this implementation, inflate() always flushes as much output as
|
||||
possible to the output buffer, and always uses the faster approach on the
|
||||
first call. So the only effect of the flush parameter in this implementation
|
||||
is on the return value of inflate(), as noted below, or when it returns early
|
||||
because Z_BLOCK or Z_TREES is used.
|
||||
first call. So the effects of the flush parameter in this implementation are
|
||||
on the return value of inflate() as noted below, when inflate() returns early
|
||||
when Z_BLOCK or Z_TREES is used, and when inflate() avoids the allocation of
|
||||
memory for a sliding window when Z_FINISH is used.
|
||||
|
||||
If a preset dictionary is needed after this call (see inflateSetDictionary
|
||||
below), inflate sets strm->adler to the adler32 checksum of the dictionary
|
||||
below), inflate sets strm->adler to the Adler-32 checksum of the dictionary
|
||||
chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
|
||||
strm->adler to the adler32 checksum of all output produced so far (that is,
|
||||
strm->adler to the Adler-32 checksum of all output produced so far (that is,
|
||||
total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
|
||||
below. At the end of the stream, inflate() checks that its computed adler32
|
||||
checksum is equal to that saved by the compressor and returns Z_STREAM_END
|
||||
@ -478,7 +485,9 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
|
||||
initializing with inflateInit2(). Any information contained in the gzip
|
||||
header is not retained, so applications that need that information should
|
||||
instead use raw inflate, see inflateInit2() below, or inflateBack() and
|
||||
perform their own processing of the gzip header and trailer.
|
||||
perform their own processing of the gzip header and trailer. When processing
|
||||
gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output
|
||||
producted so far. The CRC-32 is checked against the gzip trailer.
|
||||
|
||||
inflate() returns Z_OK if some progress has been made (more input processed
|
||||
or more output produced), Z_STREAM_END if the end of the compressed data has
|
||||
@ -580,10 +589,15 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
|
||||
uInt dictLength));
|
||||
/*
|
||||
Initializes the compression dictionary from the given byte sequence
|
||||
without producing any compressed output. This function must be called
|
||||
immediately after deflateInit, deflateInit2 or deflateReset, before any call
|
||||
of deflate. The compressor and decompressor must use exactly the same
|
||||
dictionary (see inflateSetDictionary).
|
||||
without producing any compressed output. When using the zlib format, this
|
||||
function must be called immediately after deflateInit, deflateInit2 or
|
||||
deflateReset, and before any call of deflate. When doing raw deflate, this
|
||||
function must be called either before any call of deflate, or immediately
|
||||
after the completion of a deflate block, i.e. after all input has been
|
||||
consumed and all output has been delivered when using any of the flush
|
||||
options Z_BLOCK, Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, or Z_FULL_FLUSH. The
|
||||
compressor and decompressor must use exactly the same dictionary (see
|
||||
inflateSetDictionary).
|
||||
|
||||
The dictionary should consist of strings (byte sequences) that are likely
|
||||
to be encountered later in the data to be compressed, with the most commonly
|
||||
@ -610,8 +624,8 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
|
||||
deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
|
||||
parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is
|
||||
inconsistent (for example if deflate has already been called for this stream
|
||||
or if the compression method is bsort). deflateSetDictionary does not
|
||||
perform any compression: this will be done by deflate().
|
||||
or if not at a block boundary for raw deflate). deflateSetDictionary does
|
||||
not perform any compression: this will be done by deflate().
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
|
||||
@ -688,7 +702,27 @@ ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
|
||||
deflation of sourceLen bytes. It must be called after deflateInit() or
|
||||
deflateInit2(), and after deflateSetHeader(), if used. This would be used
|
||||
to allocate an output buffer for deflation in a single pass, and so would be
|
||||
called before deflate().
|
||||
called before deflate(). If that first deflate() call is provided the
|
||||
sourceLen input bytes, an output buffer allocated to the size returned by
|
||||
deflateBound(), and the flush value Z_FINISH, then deflate() is guaranteed
|
||||
to return Z_STREAM_END. Note that it is possible for the compressed size to
|
||||
be larger than the value returned by deflateBound() if flush options other
|
||||
than Z_FINISH or Z_NO_FLUSH are used.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm,
|
||||
unsigned *pending,
|
||||
int *bits));
|
||||
/*
|
||||
deflatePending() returns the number of bytes and bits of output that have
|
||||
been generated, but not yet provided in the available output. The bytes not
|
||||
provided would be due to the available output space having being consumed.
|
||||
The number of bits of output not provided are between 0 and 7, where they
|
||||
await more bits to join them in order to fill out a full byte. If pending
|
||||
or bits are Z_NULL, then those values are not set.
|
||||
|
||||
deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source
|
||||
stream state was inconsistent.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
|
||||
@ -703,8 +737,9 @@ ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
|
||||
than or equal to 16, and that many of the least significant bits of value
|
||||
will be inserted in the output.
|
||||
|
||||
deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
|
||||
stream state was inconsistent.
|
||||
deflatePrime returns Z_OK if success, Z_BUF_ERROR if there was not enough
|
||||
room in the internal buffer to insert the bits, or Z_STREAM_ERROR if the
|
||||
source stream state was inconsistent.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
|
||||
@ -790,10 +825,11 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
|
||||
if that call returned Z_NEED_DICT. The dictionary chosen by the compressor
|
||||
can be determined from the adler32 value returned by that call of inflate.
|
||||
The compressor and decompressor must use exactly the same dictionary (see
|
||||
deflateSetDictionary). For raw inflate, this function can be called
|
||||
immediately after inflateInit2() or inflateReset() and before any call of
|
||||
inflate() to set the dictionary. The application must insure that the
|
||||
dictionary that was used for compression is provided.
|
||||
deflateSetDictionary). For raw inflate, this function can be called at any
|
||||
time to set the dictionary. If the provided dictionary is smaller than the
|
||||
window and there is already data in the window, then the provided dictionary
|
||||
will amend what's there. The application must insure that the dictionary
|
||||
that was used for compression is provided.
|
||||
|
||||
inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
|
||||
parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is
|
||||
@ -805,17 +841,21 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
|
||||
|
||||
ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
|
||||
/*
|
||||
Skips invalid compressed data until a full flush point (see above the
|
||||
description of deflate with Z_FULL_FLUSH) can be found, or until all
|
||||
Skips invalid compressed data until a possible full flush point (see above
|
||||
for the description of deflate with Z_FULL_FLUSH) can be found, or until all
|
||||
available input is skipped. No output is provided.
|
||||
|
||||
inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
|
||||
if no more input was provided, Z_DATA_ERROR if no flush point has been
|
||||
found, or Z_STREAM_ERROR if the stream structure was inconsistent. In the
|
||||
success case, the application may save the current current value of total_in
|
||||
which indicates where valid compressed data was found. In the error case,
|
||||
the application may repeatedly call inflateSync, providing more input each
|
||||
time, until success or end of the input data.
|
||||
inflateSync searches for a 00 00 FF FF pattern in the compressed data.
|
||||
All full flush points have this pattern, but not all occurences of this
|
||||
pattern are full flush points.
|
||||
|
||||
inflateSync returns Z_OK if a possible full flush point has been found,
|
||||
Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point
|
||||
has been found, or Z_STREAM_ERROR if the stream structure was inconsistent.
|
||||
In the success case, the application may save the current current value of
|
||||
total_in which indicates where valid compressed data was found. In the
|
||||
error case, the application may repeatedly call inflateSync, providing more
|
||||
input each time, until success or end of the input data.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
|
||||
@ -962,7 +1002,7 @@ ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
|
||||
See inflateBack() for the usage of these routines.
|
||||
|
||||
inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
|
||||
the paramaters are invalid, Z_MEM_ERROR if the internal state could not be
|
||||
the parameters are invalid, Z_MEM_ERROR if the internal state could not be
|
||||
allocated, or Z_VERSION_ERROR if the version of the library does not match
|
||||
the version of the header file.
|
||||
*/
|
||||
@ -1088,6 +1128,7 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
|
||||
27-31: 0 (reserved)
|
||||
*/
|
||||
|
||||
#ifndef Z_SOLO
|
||||
|
||||
/* utility functions */
|
||||
|
||||
@ -1149,10 +1190,11 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
|
||||
|
||||
uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
|
||||
enough memory, Z_BUF_ERROR if there was not enough room in the output
|
||||
buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.
|
||||
buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. In
|
||||
the case where there is not enough room, uncompress() will fill the output
|
||||
buffer with the uncompressed data up to that point.
|
||||
*/
|
||||
|
||||
|
||||
/* gzip file access functions */
|
||||
|
||||
/*
|
||||
@ -1162,7 +1204,7 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
|
||||
wrapper, documented in RFC 1952, wrapped around a deflate stream.
|
||||
*/
|
||||
|
||||
typedef voidp gzFile; /* opaque gzip file descriptor */
|
||||
typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */
|
||||
|
||||
/*
|
||||
ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
|
||||
@ -1172,13 +1214,28 @@ ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
|
||||
a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only
|
||||
compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F'
|
||||
for fixed code compression as in "wb9F". (See the description of
|
||||
deflateInit2 for more information about the strategy parameter.) Also "a"
|
||||
can be used instead of "w" to request that the gzip stream that will be
|
||||
written be appended to the file. "+" will result in an error, since reading
|
||||
and writing to the same gzip file is not supported.
|
||||
deflateInit2 for more information about the strategy parameter.) 'T' will
|
||||
request transparent writing or appending with no compression and not using
|
||||
the gzip format.
|
||||
|
||||
"a" can be used instead of "w" to request that the gzip stream that will
|
||||
be written be appended to the file. "+" will result in an error, since
|
||||
reading and writing to the same gzip file is not supported. The addition of
|
||||
"x" when writing will create the file exclusively, which fails if the file
|
||||
already exists. On systems that support it, the addition of "e" when
|
||||
reading or writing will set the flag to close the file on an execve() call.
|
||||
|
||||
These functions, as well as gzip, will read and decode a sequence of gzip
|
||||
streams in a file. The append function of gzopen() can be used to create
|
||||
such a file. (Also see gzflush() for another way to do this.) When
|
||||
appending, gzopen does not test whether the file begins with a gzip stream,
|
||||
nor does it look for the end of the gzip streams to begin appending. gzopen
|
||||
will simply append a gzip stream to the existing file.
|
||||
|
||||
gzopen can be used to read a file which is not in gzip format; in this
|
||||
case gzread will directly read from the file without decompression.
|
||||
case gzread will directly read from the file without decompression. When
|
||||
reading, this will be detected automatically by looking for the magic two-
|
||||
byte gzip header.
|
||||
|
||||
gzopen returns NULL if the file could not be opened, if there was
|
||||
insufficient memory to allocate the gzFile state, or if an invalid mode was
|
||||
@ -1197,7 +1254,11 @@ ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
|
||||
descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor
|
||||
fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd,
|
||||
mode);. The duplicated descriptor should be saved to avoid a leak, since
|
||||
gzdopen does not close fd if it fails.
|
||||
gzdopen does not close fd if it fails. If you are using fileno() to get the
|
||||
file descriptor from a FILE *, then you will have to use dup() to avoid
|
||||
double-close()ing the file descriptor. Both gzclose() and fclose() will
|
||||
close the associated file descriptor, so they need to have different file
|
||||
descriptors.
|
||||
|
||||
gzdopen returns NULL if there was insufficient memory to allocate the
|
||||
gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not
|
||||
@ -1235,14 +1296,26 @@ ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
|
||||
ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
|
||||
/*
|
||||
Reads the given number of uncompressed bytes from the compressed file. If
|
||||
the input file was not in gzip format, gzread copies the given number of
|
||||
bytes into the buffer.
|
||||
the input file is not in gzip format, gzread copies the given number of
|
||||
bytes into the buffer directly from the file.
|
||||
|
||||
After reaching the end of a gzip stream in the input, gzread will continue
|
||||
to read, looking for another gzip stream, or failing that, reading the rest
|
||||
of the input file directly without decompression. The entire input file
|
||||
will be read if gzread is called until it returns less than the requested
|
||||
len.
|
||||
to read, looking for another gzip stream. Any number of gzip streams may be
|
||||
concatenated in the input file, and will all be decompressed by gzread().
|
||||
If something other than a gzip stream is encountered after a gzip stream,
|
||||
that remaining trailing garbage is ignored (and no error is returned).
|
||||
|
||||
gzread can be used to read a gzip file that is being concurrently written.
|
||||
Upon reaching the end of the input, gzread will return with the available
|
||||
data. If the error code returned by gzerror is Z_OK or Z_BUF_ERROR, then
|
||||
gzclearerr can be used to clear the end of file indicator in order to permit
|
||||
gzread to be tried again. Z_OK indicates that a gzip stream was completed
|
||||
on the last gzread. Z_BUF_ERROR indicates that the input file ended in the
|
||||
middle of a gzip stream. Note that gzread does not return -1 in the event
|
||||
of an incomplete gzip stream. This error is deferred until gzclose(), which
|
||||
will return Z_BUF_ERROR if the last gzread ended in the middle of a gzip
|
||||
stream. Alternatively, gzerror can be used before gzclose to detect this
|
||||
case.
|
||||
|
||||
gzread returns the number of uncompressed bytes actually read, less than
|
||||
len for end of file, or -1 for error.
|
||||
@ -1256,7 +1329,7 @@ ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
|
||||
error.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...));
|
||||
ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));
|
||||
/*
|
||||
Converts, formats, and writes the arguments to the compressed file under
|
||||
control of the format string, as in fprintf. gzprintf returns the number of
|
||||
@ -1301,7 +1374,10 @@ ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
|
||||
ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
|
||||
/*
|
||||
Reads one byte from the compressed file. gzgetc returns this byte or -1
|
||||
in case of end of file or error.
|
||||
in case of end of file or error. This is implemented as a macro for speed.
|
||||
As such, it does not do all of the checking the other functions do. I.e.
|
||||
it does not check to see if file is NULL, nor whether the structure file
|
||||
points to has been clobbered or not.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
|
||||
@ -1397,9 +1473,7 @@ ZEXTERN int ZEXPORT gzeof OF((gzFile file));
|
||||
ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
|
||||
/*
|
||||
Returns true (1) if file is being copied directly while reading, or false
|
||||
(0) if file is a gzip stream being decompressed. This state can change from
|
||||
false to true while reading the input file if the end of a gzip stream is
|
||||
reached, but is followed by data that is not another gzip stream.
|
||||
(0) if file is a gzip stream being decompressed.
|
||||
|
||||
If the input file is empty, gzdirect() will return true, since the input
|
||||
does not contain a gzip stream.
|
||||
@ -1408,6 +1482,13 @@ ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
|
||||
cause buffers to be allocated to allow reading the file to determine if it
|
||||
is a gzip file. Therefore if gzbuffer() is used, it should be called before
|
||||
gzdirect().
|
||||
|
||||
When writing, gzdirect() returns true (1) if transparent writing was
|
||||
requested ("wT" for the gzopen() mode), or false (0) otherwise. (Note:
|
||||
gzdirect() is not needed when writing. Transparent writing must be
|
||||
explicitly requested, so the application already knows the answer. When
|
||||
linking statically, using gzdirect() will include all of the zlib code for
|
||||
gzip file reading and decompression, which may not be desired.)
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT gzclose OF((gzFile file));
|
||||
@ -1419,7 +1500,8 @@ ZEXTERN int ZEXPORT gzclose OF((gzFile file));
|
||||
must not be called more than once on the same allocation.
|
||||
|
||||
gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a
|
||||
file operation error, or Z_OK on success.
|
||||
file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the
|
||||
last read ended in the middle of a gzip stream, or Z_OK on success.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT gzclose_r OF((gzFile file));
|
||||
@ -1457,6 +1539,7 @@ ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
|
||||
file that is being written concurrently.
|
||||
*/
|
||||
|
||||
#endif /* !Z_SOLO */
|
||||
|
||||
/* checksum functions */
|
||||
|
||||
@ -1492,16 +1575,17 @@ ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
|
||||
Combine two Adler-32 checksums into one. For two sequences of bytes, seq1
|
||||
and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
|
||||
each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of
|
||||
seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.
|
||||
seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. Note
|
||||
that the z_off_t type (like off_t) is a signed integer. If len2 is
|
||||
negative, the result has no meaning or utility.
|
||||
*/
|
||||
|
||||
ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
|
||||
/*
|
||||
Update a running CRC-32 with the bytes buf[0..len-1] and return the
|
||||
updated CRC-32. If buf is Z_NULL, this function returns the required
|
||||
initial value for the for the crc. Pre- and post-conditioning (one's
|
||||
complement) is performed within this function so it shouldn't be done by the
|
||||
application.
|
||||
initial value for the crc. Pre- and post-conditioning (one's complement) is
|
||||
performed within this function so it shouldn't be done by the application.
|
||||
|
||||
Usage example:
|
||||
|
||||
@ -1544,17 +1628,42 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
|
||||
const char *version,
|
||||
int stream_size));
|
||||
#define deflateInit(strm, level) \
|
||||
deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream))
|
||||
deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
|
||||
#define inflateInit(strm) \
|
||||
inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream))
|
||||
inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
|
||||
#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
|
||||
deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
|
||||
(strategy), ZLIB_VERSION, sizeof(z_stream))
|
||||
(strategy), ZLIB_VERSION, (int)sizeof(z_stream))
|
||||
#define inflateInit2(strm, windowBits) \
|
||||
inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
|
||||
inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
|
||||
(int)sizeof(z_stream))
|
||||
#define inflateBackInit(strm, windowBits, window) \
|
||||
inflateBackInit_((strm), (windowBits), (window), \
|
||||
ZLIB_VERSION, sizeof(z_stream))
|
||||
ZLIB_VERSION, (int)sizeof(z_stream))
|
||||
|
||||
#ifndef Z_SOLO
|
||||
|
||||
/* gzgetc() macro and its supporting function and exposed data structure. Note
|
||||
* that the real internal state is much larger than the exposed structure.
|
||||
* This abbreviated structure exposes just enough for the gzgetc() macro. The
|
||||
* user should not mess with these exposed elements, since their names or
|
||||
* behavior could change in the future, perhaps even capriciously. They can
|
||||
* only be used by the gzgetc() macro. You have been warned.
|
||||
*/
|
||||
struct gzFile_s {
|
||||
unsigned have;
|
||||
unsigned char *next;
|
||||
z_off64_t pos;
|
||||
};
|
||||
ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
|
||||
#ifdef Z_PREFIX_SET
|
||||
# undef z_gzgetc
|
||||
# define z_gzgetc(g) \
|
||||
((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
|
||||
#else
|
||||
# define gzgetc(g) \
|
||||
((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
|
||||
#endif
|
||||
|
||||
/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or
|
||||
* change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if
|
||||
@ -1562,7 +1671,7 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
|
||||
* functions are changed to 64 bits) -- in case these are set on systems
|
||||
* without large file support, _LFS64_LARGEFILE must also be true
|
||||
*/
|
||||
#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
|
||||
#ifdef Z_LARGE64
|
||||
ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
|
||||
ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
|
||||
ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
|
||||
@ -1571,14 +1680,23 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
|
||||
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
|
||||
#endif
|
||||
|
||||
#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0
|
||||
#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64)
|
||||
# ifdef Z_PREFIX_SET
|
||||
# define z_gzopen z_gzopen64
|
||||
# define z_gzseek z_gzseek64
|
||||
# define z_gztell z_gztell64
|
||||
# define z_gzoffset z_gzoffset64
|
||||
# define z_adler32_combine z_adler32_combine64
|
||||
# define z_crc32_combine z_crc32_combine64
|
||||
# else
|
||||
# define gzopen gzopen64
|
||||
# define gzseek gzseek64
|
||||
# define gztell gztell64
|
||||
# define gzoffset gzoffset64
|
||||
# define adler32_combine adler32_combine64
|
||||
# define crc32_combine crc32_combine64
|
||||
# ifdef _LARGEFILE64_SOURCE
|
||||
# endif
|
||||
# ifndef Z_LARGE64
|
||||
ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
|
||||
ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
|
||||
ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
|
||||
@ -1595,6 +1713,13 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
|
||||
ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
|
||||
#endif
|
||||
|
||||
#else /* Z_SOLO */
|
||||
|
||||
ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
|
||||
ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
|
||||
|
||||
#endif /* !Z_SOLO */
|
||||
|
||||
/* hack for buggy compilers */
|
||||
#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
|
||||
struct internal_state {int dummy;};
|
||||
@ -1603,8 +1728,14 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
|
||||
/* undocumented functions */
|
||||
ZEXTERN const char * ZEXPORT zError OF((int));
|
||||
ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp));
|
||||
ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void));
|
||||
ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void));
|
||||
ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int));
|
||||
ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp));
|
||||
ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp));
|
||||
#if defined(_WIN32) && !defined(Z_SOLO)
|
||||
ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path,
|
||||
const char *mode));
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -9,6 +9,7 @@ More info : http://frontier-dev.net
|
||||
********************************************************************************************/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "pngu.h"
|
||||
#include "png.h"
|
||||
|
@ -25,7 +25,7 @@ public:
|
||||
bool fromBuffer(const SmartBuf &buffer, u32 bufferSize, u32 size, u32 lspacing, u32 w = 0, u32 idx = 0, const char *genKey = NULL);
|
||||
bool fromFile(const char *filename, u32 size, u32 lspacing, u32 w = 0, u32 idx = 0);
|
||||
SFont(void) : data(SmartBuf(NULL, SmartBuf::SRCALL_MEM2)), dataSize(0), font(SmartPtr<FreeTypeGX>(new FreeTypeGX)), lineSpacing(0), weight(0), index(0) { }
|
||||
~SFont(void) { font.release(); }
|
||||
~SFont(void) { }
|
||||
};
|
||||
|
||||
class CText
|
||||
|
@ -129,7 +129,7 @@ int main(int argc, char **argv)
|
||||
ret = mainMenu->main();
|
||||
}
|
||||
}
|
||||
delete mainMenu;
|
||||
mainMenu->cleanup();
|
||||
|
||||
ISFS_Deinitialize();
|
||||
Sys_Exit();
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "ZipFile.h"
|
||||
#include "gc/fileOps.h"
|
||||
|
Loading…
Reference in New Issue
Block a user