aboutsummaryrefslogtreecommitdiff
path: root/freetype/include
diff options
context:
space:
mode:
Diffstat (limited to 'freetype/include')
-rw-r--r--freetype/include/config/ftconfig.h (renamed from freetype/include/freetype/config/ftconfig.h)90
-rw-r--r--freetype/include/config/ftheader.h (renamed from freetype/include/freetype/config/ftheader.h)118
-rw-r--r--freetype/include/config/ftmodule.h (renamed from freetype/include/freetype/config/ftmodule.h)0
-rw-r--r--freetype/include/config/ftoption.h (renamed from freetype/include/freetype/config/ftoption.h)25
-rw-r--r--freetype/include/config/ftstdlib.h (renamed from freetype/include/freetype/config/ftstdlib.h)0
-rw-r--r--freetype/include/freetype.h (renamed from freetype/include/freetype/freetype.h)138
-rw-r--r--freetype/include/freetype/ftcffdrv.h151
-rw-r--r--freetype/include/ft2build.h23
-rw-r--r--freetype/include/ftadvanc.h (renamed from freetype/include/freetype/ftadvanc.h)4
-rw-r--r--freetype/include/ftautoh.h (renamed from freetype/include/freetype/ftautoh.h)51
-rw-r--r--freetype/include/ftbbox.h (renamed from freetype/include/freetype/ftbbox.h)6
-rw-r--r--freetype/include/ftbdf.h (renamed from freetype/include/freetype/ftbdf.h)5
-rw-r--r--freetype/include/ftbitmap.h (renamed from freetype/include/freetype/ftbitmap.h)0
-rw-r--r--freetype/include/ftbzip2.h (renamed from freetype/include/freetype/ftbzip2.h)0
-rw-r--r--freetype/include/ftcache.h (renamed from freetype/include/freetype/ftcache.h)2
-rw-r--r--freetype/include/ftcffdrv.h254
-rw-r--r--freetype/include/ftchapters.h (renamed from freetype/include/freetype/ftchapters.h)3
-rw-r--r--freetype/include/ftcid.h (renamed from freetype/include/freetype/ftcid.h)0
-rw-r--r--freetype/include/fterrdef.h (renamed from freetype/include/freetype/fterrdef.h)0
-rw-r--r--freetype/include/fterrors.h (renamed from freetype/include/freetype/fterrors.h)0
-rw-r--r--freetype/include/ftgasp.h (renamed from freetype/include/freetype/ftgasp.h)0
-rw-r--r--freetype/include/ftglyph.h (renamed from freetype/include/freetype/ftglyph.h)10
-rw-r--r--freetype/include/ftgxval.h (renamed from freetype/include/freetype/ftgxval.h)10
-rw-r--r--freetype/include/ftgzip.h (renamed from freetype/include/freetype/ftgzip.h)49
-rw-r--r--freetype/include/ftimage.h (renamed from freetype/include/freetype/ftimage.h)18
-rw-r--r--freetype/include/ftincrem.h (renamed from freetype/include/freetype/ftincrem.h)0
-rw-r--r--freetype/include/ftlcdfil.h (renamed from freetype/include/freetype/ftlcdfil.h)6
-rw-r--r--freetype/include/ftlist.h (renamed from freetype/include/freetype/ftlist.h)12
-rw-r--r--freetype/include/ftlzw.h (renamed from freetype/include/freetype/ftlzw.h)0
-rw-r--r--freetype/include/ftmac.h (renamed from freetype/include/freetype/ftmac.h)6
-rw-r--r--freetype/include/ftmm.h (renamed from freetype/include/freetype/ftmm.h)7
-rw-r--r--freetype/include/ftmodapi.h (renamed from freetype/include/freetype/ftmodapi.h)8
-rw-r--r--freetype/include/ftmoderr.h (renamed from freetype/include/freetype/ftmoderr.h)0
-rw-r--r--freetype/include/ftotval.h (renamed from freetype/include/freetype/ftotval.h)6
-rw-r--r--freetype/include/ftoutln.h (renamed from freetype/include/freetype/ftoutln.h)26
-rw-r--r--freetype/include/ftpfr.h (renamed from freetype/include/freetype/ftpfr.h)0
-rw-r--r--freetype/include/ftrender.h (renamed from freetype/include/freetype/ftrender.h)0
-rw-r--r--freetype/include/ftsizes.h (renamed from freetype/include/freetype/ftsizes.h)4
-rw-r--r--freetype/include/ftsnames.h (renamed from freetype/include/freetype/ftsnames.h)6
-rw-r--r--freetype/include/ftstroke.h (renamed from freetype/include/freetype/ftstroke.h)0
-rw-r--r--freetype/include/ftsynth.h (renamed from freetype/include/freetype/ftsynth.h)4
-rw-r--r--freetype/include/ftsystem.h (renamed from freetype/include/freetype/ftsystem.h)0
-rw-r--r--freetype/include/fttrigon.h (renamed from freetype/include/freetype/fttrigon.h)0
-rw-r--r--freetype/include/ftttdrv.h (renamed from freetype/include/freetype/ftttdrv.h)22
-rw-r--r--freetype/include/fttypes.h (renamed from freetype/include/freetype/fttypes.h)6
-rw-r--r--freetype/include/ftwinfnt.h (renamed from freetype/include/freetype/ftwinfnt.h)7
-rw-r--r--freetype/include/ftxf86.h (renamed from freetype/include/freetype/ftxf86.h)4
-rw-r--r--freetype/include/internal/autohint.h (renamed from freetype/include/freetype/internal/autohint.h)0
-rw-r--r--freetype/include/internal/ftcalc.h (renamed from freetype/include/freetype/internal/ftcalc.h)6
-rw-r--r--freetype/include/internal/ftdebug.h (renamed from freetype/include/freetype/internal/ftdebug.h)0
-rw-r--r--freetype/include/internal/ftdriver.h (renamed from freetype/include/freetype/internal/ftdriver.h)0
-rw-r--r--freetype/include/internal/ftgloadr.h (renamed from freetype/include/freetype/internal/ftgloadr.h)0
-rw-r--r--freetype/include/internal/ftmemory.h (renamed from freetype/include/freetype/internal/ftmemory.h)0
-rw-r--r--freetype/include/internal/ftobjs.h (renamed from freetype/include/freetype/internal/ftobjs.h)0
-rw-r--r--freetype/include/internal/ftpic.h (renamed from freetype/include/freetype/internal/ftpic.h)0
-rw-r--r--freetype/include/internal/ftrfork.h (renamed from freetype/include/freetype/internal/ftrfork.h)12
-rw-r--r--freetype/include/internal/ftserv.h (renamed from freetype/include/freetype/internal/ftserv.h)36
-rw-r--r--freetype/include/internal/ftstream.h (renamed from freetype/include/freetype/internal/ftstream.h)0
-rw-r--r--freetype/include/internal/fttrace.h (renamed from freetype/include/freetype/internal/fttrace.h)4
-rw-r--r--freetype/include/internal/ftvalid.h (renamed from freetype/include/freetype/internal/ftvalid.h)0
-rw-r--r--freetype/include/internal/internal.h (renamed from freetype/include/freetype/internal/internal.h)44
-rw-r--r--freetype/include/internal/psaux.h (renamed from freetype/include/freetype/internal/psaux.h)0
-rw-r--r--freetype/include/internal/pshints.h (renamed from freetype/include/freetype/internal/pshints.h)0
-rw-r--r--freetype/include/internal/services/svbdf.h (renamed from freetype/include/freetype/internal/services/svbdf.h)0
-rw-r--r--freetype/include/internal/services/svcid.h (renamed from freetype/include/freetype/internal/services/svcid.h)0
-rw-r--r--freetype/include/internal/services/svgldict.h (renamed from freetype/include/freetype/internal/services/svgldict.h)0
-rw-r--r--freetype/include/internal/services/svgxval.h (renamed from freetype/include/freetype/internal/services/svgxval.h)0
-rw-r--r--freetype/include/internal/services/svkern.h (renamed from freetype/include/freetype/internal/services/svkern.h)0
-rw-r--r--freetype/include/internal/services/svmm.h (renamed from freetype/include/freetype/internal/services/svmm.h)0
-rw-r--r--freetype/include/internal/services/svotval.h (renamed from freetype/include/freetype/internal/services/svotval.h)0
-rw-r--r--freetype/include/internal/services/svpfr.h (renamed from freetype/include/freetype/internal/services/svpfr.h)0
-rw-r--r--freetype/include/internal/services/svpostnm.h (renamed from freetype/include/freetype/internal/services/svpostnm.h)0
-rw-r--r--freetype/include/internal/services/svprop.h (renamed from freetype/include/freetype/internal/services/svprop.h)0
-rw-r--r--freetype/include/internal/services/svpscmap.h (renamed from freetype/include/freetype/internal/services/svpscmap.h)0
-rw-r--r--freetype/include/internal/services/svpsinfo.h (renamed from freetype/include/freetype/internal/services/svpsinfo.h)0
-rw-r--r--freetype/include/internal/services/svsfnt.h (renamed from freetype/include/freetype/internal/services/svsfnt.h)0
-rw-r--r--freetype/include/internal/services/svttcmap.h (renamed from freetype/include/freetype/internal/services/svttcmap.h)4
-rw-r--r--freetype/include/internal/services/svtteng.h (renamed from freetype/include/freetype/internal/services/svtteng.h)0
-rw-r--r--freetype/include/internal/services/svttglyf.h (renamed from freetype/include/freetype/internal/services/svttglyf.h)0
-rw-r--r--freetype/include/internal/services/svwinfnt.h (renamed from freetype/include/freetype/internal/services/svwinfnt.h)0
-rw-r--r--freetype/include/internal/services/svxf86nm.h (renamed from freetype/include/freetype/internal/services/svxf86nm.h)0
-rw-r--r--freetype/include/internal/sfnt.h (renamed from freetype/include/freetype/internal/sfnt.h)0
-rw-r--r--freetype/include/internal/t1types.h (renamed from freetype/include/freetype/internal/t1types.h)0
-rw-r--r--freetype/include/internal/tttypes.h (renamed from freetype/include/freetype/internal/tttypes.h)108
-rw-r--r--freetype/include/t1tables.h (renamed from freetype/include/freetype/t1tables.h)0
-rw-r--r--freetype/include/ttnameid.h (renamed from freetype/include/freetype/ttnameid.h)4
-rw-r--r--freetype/include/tttables.h (renamed from freetype/include/freetype/tttables.h)38
-rw-r--r--freetype/include/tttags.h (renamed from freetype/include/freetype/tttags.h)2
-rw-r--r--freetype/include/ttunpat.h (renamed from freetype/include/freetype/ttunpat.h)0
89 files changed, 912 insertions, 427 deletions
diff --git a/freetype/include/freetype/config/ftconfig.h b/freetype/include/config/ftconfig.h
index 5dce30ef3..d98a3116b 100644
--- a/freetype/include/freetype/config/ftconfig.h
+++ b/freetype/include/config/ftconfig.h
@@ -4,7 +4,7 @@
/* */
/* ANSI-specific configuration file (specification only). */
/* */
-/* Copyright 1996-2004, 2006-2008, 2010-2011, 2013 by */
+/* Copyright 1996-2004, 2006-2008, 2010-2011, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -27,11 +27,11 @@
/* Note however that if some specific modifications are needed, we */
/* advise you to place a modified copy in your build directory. */
/* */
- /* The build directory is usually `freetype/builds/<system>', and */
- /* contains system-specific files that are always included first when */
- /* building the library. */
+ /* The build directory is usually `builds/<system>', and contains */
+ /* system-specific files that are always included first when building */
+ /* the library. */
/* */
- /* This ANSI version should stay in `include/freetype/config'. */
+ /* This ANSI version should stay in `include/config/'. */
/* */
/*************************************************************************/
@@ -53,7 +53,7 @@ FT_BEGIN_HEADER
/* These macros can be toggled to suit a specific system. The current */
/* ones are defaults used to compile FreeType in an ANSI C environment */
/* (16bit compilers are also supported). Copy this file to your own */
- /* `freetype/builds/<system>' directory, and edit it to port the engine. */
+ /* `builds/<system>' directory, and edit it to port the engine. */
/* */
/*************************************************************************/
@@ -338,6 +338,7 @@ FT_BEGIN_HEADER
/* 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 */
@@ -367,8 +368,10 @@ FT_BEGIN_HEADER
#ifdef __GNUC__
-#if defined( __arm__ ) && !defined( __thumb__ ) && \
+#if defined( __arm__ ) && \
+ ( !defined( __thumb__ ) || defined( __thumb2__ ) ) && \
!( defined( __CC_ARM ) || defined( __ARMCC__ ) )
+
#define FT_MULFIX_ASSEMBLER FT_MulFix_arm
/* documentation is in freetype.h */
@@ -383,7 +386,11 @@ FT_BEGIN_HEADER
__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) */
+#if defined( __clang__ ) && defined( __thumb2__ )
+ "add.w %0, %0, #0x8000\n\t" /* %0 += 0x8000 */
+#else
"add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */
+#endif
"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 */
@@ -394,9 +401,13 @@ FT_BEGIN_HEADER
return a;
}
-#endif /* __arm__ && !__thumb__ && !( __CC_ARM || __ARMCC__ ) */
+#endif /* __arm__ && */
+ /* ( __thumb2__ || !__thumb__ ) && */
+ /* !( __CC_ARM || __ARMCC__ ) */
+
#if defined( __i386__ )
+
#define FT_MULFIX_ASSEMBLER FT_MulFix_i386
/* documentation is in freetype.h */
@@ -465,6 +476,66 @@ FT_BEGIN_HEADER
#endif /* _MSC_VER */
+
+#if defined( __GNUC__ ) && defined( __x86_64__ )
+
+#define FT_MULFIX_ASSEMBLER FT_MulFix_x86_64
+
+ static __inline__ FT_Int32
+ FT_MulFix_x86_64( FT_Int32 a,
+ FT_Int32 b )
+ {
+ /* Temporarily disable the warning that C90 doesn't support */
+ /* `long long'. */
+#if ( __GNUC__ > 4 ) || ( ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ >= 6 ) )
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
+#endif
+
+#if 1
+ /* Technically not an assembly fragment, but GCC does a really good */
+ /* job at inlining it and generating good machine code for it. */
+ long long ret, tmp;
+
+
+ ret = (long long)a * b;
+ tmp = ret >> 63;
+ ret += 0x8000 + tmp;
+
+ return (FT_Int32)( ret >> 16 );
+#else
+
+ /* For some reason, GCC 4.6 on Ubuntu 12.04 generates invalid machine */
+ /* code from the lines below. The main issue is that `wide_a' is not */
+ /* properly initialized by sign-extending `a'. Instead, the generated */
+ /* machine code assumes that the register that contains `a' on input */
+ /* can be used directly as a 64-bit value, which is wrong most of the */
+ /* time. */
+ long long wide_a = (long long)a;
+ long long wide_b = (long long)b;
+ long long result;
+
+
+ __asm__ __volatile__ (
+ "imul %2, %1\n"
+ "mov %1, %0\n"
+ "sar $63, %0\n"
+ "lea 0x8000(%1, %0), %0\n"
+ "sar $16, %0\n"
+ : "=&r"(result), "=&r"(wide_a)
+ : "r"(wide_b)
+ : "cc" );
+
+ return (FT_Int32)result;
+#endif
+
+#if ( __GNUC__ > 4 ) || ( ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ >= 6 ) )
+#pragma GCC diagnostic pop
+#endif
+ }
+
+#endif /* __GNUC__ && __x86_64__ */
+
#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */
@@ -492,6 +563,9 @@ FT_BEGIN_HEADER
#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
+#define FT_LOCAL_ARRAY( x ) extern const x
+#define FT_LOCAL_ARRAY_DEF( x ) const x
+
#ifndef FT_BASE
diff --git a/freetype/include/freetype/config/ftheader.h b/freetype/include/config/ftheader.h
index 8371a3161..b62362992 100644
--- a/freetype/include/freetype/config/ftheader.h
+++ b/freetype/include/config/ftheader.h
@@ -107,7 +107,7 @@
*
*/
#ifndef FT_CONFIG_CONFIG_H
-#define FT_CONFIG_CONFIG_H <freetype/config/ftconfig.h>
+#define FT_CONFIG_CONFIG_H <config/ftconfig.h>
#endif
@@ -122,7 +122,7 @@
*
*/
#ifndef FT_CONFIG_STANDARD_LIBRARY_H
-#define FT_CONFIG_STANDARD_LIBRARY_H <freetype/config/ftstdlib.h>
+#define FT_CONFIG_STANDARD_LIBRARY_H <config/ftstdlib.h>
#endif
@@ -137,7 +137,7 @@
*
*/
#ifndef FT_CONFIG_OPTIONS_H
-#define FT_CONFIG_OPTIONS_H <freetype/config/ftoption.h>
+#define FT_CONFIG_OPTIONS_H <config/ftoption.h>
#endif
@@ -153,7 +153,7 @@
*
*/
#ifndef FT_CONFIG_MODULES_H
-#define FT_CONFIG_MODULES_H <freetype/config/ftmodule.h>
+#define FT_CONFIG_MODULES_H <config/ftmodule.h>
#endif
/* */
@@ -170,7 +170,7 @@
* base FreeType~2 API.
*
*/
-#define FT_FREETYPE_H <freetype/freetype.h>
+#define FT_FREETYPE_H <freetype.h>
/*************************************************************************
@@ -185,7 +185,7 @@
* It is included by @FT_FREETYPE_H.
*
*/
-#define FT_ERRORS_H <freetype/fterrors.h>
+#define FT_ERRORS_H <fterrors.h>
/*************************************************************************
@@ -198,7 +198,7 @@
* list of FreeType~2 module error offsets (and messages).
*
*/
-#define FT_MODULE_ERRORS_H <freetype/ftmoderr.h>
+#define FT_MODULE_ERRORS_H <ftmoderr.h>
/*************************************************************************
@@ -214,7 +214,7 @@
* It is included by @FT_FREETYPE_H.
*
*/
-#define FT_SYSTEM_H <freetype/ftsystem.h>
+#define FT_SYSTEM_H <ftsystem.h>
/*************************************************************************
@@ -230,7 +230,7 @@
* It is included by @FT_FREETYPE_H.
*
*/
-#define FT_IMAGE_H <freetype/ftimage.h>
+#define FT_IMAGE_H <ftimage.h>
/*************************************************************************
@@ -245,7 +245,7 @@
* It is included by @FT_FREETYPE_H.
*
*/
-#define FT_TYPES_H <freetype/fttypes.h>
+#define FT_TYPES_H <fttypes.h>
/*************************************************************************
@@ -260,7 +260,7 @@
* (Most applications will never need to include this file.)
*
*/
-#define FT_LIST_H <freetype/ftlist.h>
+#define FT_LIST_H <ftlist.h>
/*************************************************************************
@@ -273,7 +273,7 @@
* scalable outline management API of FreeType~2.
*
*/
-#define FT_OUTLINE_H <freetype/ftoutln.h>
+#define FT_OUTLINE_H <ftoutln.h>
/*************************************************************************
@@ -286,7 +286,7 @@
* API which manages multiple @FT_Size objects per face.
*
*/
-#define FT_SIZES_H <freetype/ftsizes.h>
+#define FT_SIZES_H <ftsizes.h>
/*************************************************************************
@@ -299,7 +299,7 @@
* module management API of FreeType~2.
*
*/
-#define FT_MODULE_H <freetype/ftmodapi.h>
+#define FT_MODULE_H <ftmodapi.h>
/*************************************************************************
@@ -312,7 +312,7 @@
* renderer module management API of FreeType~2.
*
*/
-#define FT_RENDER_H <freetype/ftrender.h>
+#define FT_RENDER_H <ftrender.h>
/*************************************************************************
@@ -325,7 +325,7 @@
* structures and macros related to the auto-hinting module.
*
*/
-#define FT_AUTOHINTER_H <freetype/ftautoh.h>
+#define FT_AUTOHINTER_H <ftautoh.h>
/*************************************************************************
@@ -338,7 +338,7 @@
* structures and macros related to the CFF driver module.
*
*/
-#define FT_CFF_DRIVER_H <freetype/ftcffdrv.h>
+#define FT_CFF_DRIVER_H <ftcffdrv.h>
/*************************************************************************
@@ -351,7 +351,7 @@
* structures and macros related to the TrueType driver module.
*
*/
-#define FT_TRUETYPE_DRIVER_H <freetype/ftttdrv.h>
+#define FT_TRUETYPE_DRIVER_H <ftttdrv.h>
/*************************************************************************
@@ -364,7 +364,7 @@
* types and API specific to the Type~1 format.
*
*/
-#define FT_TYPE1_TABLES_H <freetype/t1tables.h>
+#define FT_TYPE1_TABLES_H <t1tables.h>
/*************************************************************************
@@ -379,7 +379,7 @@
* definitions, taken from the TrueType and OpenType specifications.
*
*/
-#define FT_TRUETYPE_IDS_H <freetype/ttnameid.h>
+#define FT_TRUETYPE_IDS_H <ttnameid.h>
/*************************************************************************
@@ -392,7 +392,7 @@
* types and API specific to the TrueType (as well as OpenType) format.
*
*/
-#define FT_TRUETYPE_TABLES_H <freetype/tttables.h>
+#define FT_TRUETYPE_TABLES_H <tttables.h>
/*************************************************************************
@@ -406,7 +406,7 @@
* SFNT-based font formats (i.e., TrueType and OpenType).
*
*/
-#define FT_TRUETYPE_TAGS_H <freetype/tttags.h>
+#define FT_TRUETYPE_TAGS_H <tttags.h>
/*************************************************************************
@@ -420,7 +420,7 @@
* face.
*
*/
-#define FT_BDF_H <freetype/ftbdf.h>
+#define FT_BDF_H <ftbdf.h>
/*************************************************************************
@@ -434,7 +434,7 @@
* face.
*
*/
-#define FT_CID_H <freetype/ftcid.h>
+#define FT_CID_H <ftcid.h>
/*************************************************************************
@@ -447,7 +447,7 @@
* definitions of an API which supports gzip-compressed files.
*
*/
-#define FT_GZIP_H <freetype/ftgzip.h>
+#define FT_GZIP_H <ftgzip.h>
/*************************************************************************
@@ -460,7 +460,7 @@
* definitions of an API which supports LZW-compressed files.
*
*/
-#define FT_LZW_H <freetype/ftlzw.h>
+#define FT_LZW_H <ftlzw.h>
/*************************************************************************
@@ -473,7 +473,7 @@
* definitions of an API which supports bzip2-compressed files.
*
*/
-#define FT_BZIP2_H <freetype/ftbzip2.h>
+#define FT_BZIP2_H <ftbzip2.h>
/*************************************************************************
@@ -486,7 +486,7 @@
* definitions of an API which supports Windows FNT files.
*
*/
-#define FT_WINFONTS_H <freetype/ftwinfnt.h>
+#define FT_WINFONTS_H <ftwinfnt.h>
/*************************************************************************
@@ -499,7 +499,7 @@
* API of the optional glyph management component.
*
*/
-#define FT_GLYPH_H <freetype/ftglyph.h>
+#define FT_GLYPH_H <ftglyph.h>
/*************************************************************************
@@ -512,7 +512,7 @@
* API of the optional bitmap conversion component.
*
*/
-#define FT_BITMAP_H <freetype/ftbitmap.h>
+#define FT_BITMAP_H <ftbitmap.h>
/*************************************************************************
@@ -525,7 +525,7 @@
* API of the optional exact bounding box computation routines.
*
*/
-#define FT_BBOX_H <freetype/ftbbox.h>
+#define FT_BBOX_H <ftbbox.h>
/*************************************************************************
@@ -538,7 +538,7 @@
* API of the optional FreeType~2 cache sub-system.
*
*/
-#define FT_CACHE_H <freetype/ftcache.h>
+#define FT_CACHE_H <ftcache.h>
/*************************************************************************
@@ -612,7 +612,7 @@
* compiled on the Mac (note that the base API still works though).
*
*/
-#define FT_MAC_H <freetype/ftmac.h>
+#define FT_MAC_H <ftmac.h>
/*************************************************************************
@@ -625,7 +625,7 @@
* optional multiple-masters management API of FreeType~2.
*
*/
-#define FT_MULTIPLE_MASTERS_H <freetype/ftmm.h>
+#define FT_MULTIPLE_MASTERS_H <ftmm.h>
/*************************************************************************
@@ -639,7 +639,7 @@
* SFNT-based font formats (i.e., TrueType and OpenType).
*
*/
-#define FT_SFNT_NAMES_H <freetype/ftsnames.h>
+#define FT_SFNT_NAMES_H <ftsnames.h>
/*************************************************************************
@@ -653,7 +653,7 @@
* GPOS, GSUB, JSTF).
*
*/
-#define FT_OPENTYPE_VALIDATE_H <freetype/ftotval.h>
+#define FT_OPENTYPE_VALIDATE_H <ftotval.h>
/*************************************************************************
@@ -667,7 +667,7 @@
* mort, morx, bsln, just, kern, opbd, trak, prop).
*
*/
-#define FT_GX_VALIDATE_H <freetype/ftgxval.h>
+#define FT_GX_VALIDATE_H <ftgxval.h>
/*************************************************************************
@@ -680,7 +680,7 @@
* FreeType~2 API which accesses PFR-specific data.
*
*/
-#define FT_PFR_H <freetype/ftpfr.h>
+#define FT_PFR_H <ftpfr.h>
/*************************************************************************
@@ -692,7 +692,7 @@
* A macro used in #include statements to name the file containing the
* FreeType~2 API which provides functions to stroke outline paths.
*/
-#define FT_STROKER_H <freetype/ftstroke.h>
+#define FT_STROKER_H <ftstroke.h>
/*************************************************************************
@@ -704,7 +704,7 @@
* A macro used in #include statements to name the file containing the
* FreeType~2 API which performs artificial obliquing and emboldening.
*/
-#define FT_SYNTHESIS_H <freetype/ftsynth.h>
+#define FT_SYNTHESIS_H <ftsynth.h>
/*************************************************************************
@@ -717,7 +717,7 @@
* FreeType~2 API which provides functions specific to the XFree86 and
* X.Org X11 servers.
*/
-#define FT_XFREE86_H <freetype/ftxf86.h>
+#define FT_XFREE86_H <ftxf86.h>
/*************************************************************************
@@ -730,7 +730,7 @@
* FreeType~2 API which performs trigonometric computations (e.g.,
* cosines and arc tangents).
*/
-#define FT_TRIGONOMETRY_H <freetype/fttrigon.h>
+#define FT_TRIGONOMETRY_H <fttrigon.h>
/*************************************************************************
@@ -742,7 +742,7 @@
* A macro used in #include statements to name the file containing the
* FreeType~2 API which performs color filtering for subpixel rendering.
*/
-#define FT_LCD_FILTER_H <freetype/ftlcdfil.h>
+#define FT_LCD_FILTER_H <ftlcdfil.h>
/*************************************************************************
@@ -754,7 +754,7 @@
* A macro used in #include statements to name the file containing the
* FreeType~2 API which performs color filtering for subpixel rendering.
*/
-#define FT_UNPATENTED_HINTING_H <freetype/ttunpat.h>
+#define FT_UNPATENTED_HINTING_H <ttunpat.h>
/*************************************************************************
@@ -766,7 +766,7 @@
* A macro used in #include statements to name the file containing the
* FreeType~2 API which performs color filtering for subpixel rendering.
*/
-#define FT_INCREMENTAL_H <freetype/ftincrem.h>
+#define FT_INCREMENTAL_H <ftincrem.h>
/*************************************************************************
@@ -778,7 +778,7 @@
* A macro used in #include statements to name the file containing the
* FreeType~2 API which returns entries from the TrueType GASP table.
*/
-#define FT_GASP_H <freetype/ftgasp.h>
+#define FT_GASP_H <ftgasp.h>
/*************************************************************************
@@ -790,38 +790,38 @@
* A macro used in #include statements to name the file containing the
* FreeType~2 API which returns individual and ranged glyph advances.
*/
-#define FT_ADVANCES_H <freetype/ftadvanc.h>
+#define FT_ADVANCES_H <ftadvanc.h>
/* */
-#define FT_ERROR_DEFINITIONS_H <freetype/fterrdef.h>
+#define FT_ERROR_DEFINITIONS_H <fterrdef.h>
/* The internals of the cache sub-system are no longer exposed. We */
/* default to FT_CACHE_H at the moment just in case, but we know of */
/* no rogue client that uses them. */
/* */
-#define FT_CACHE_MANAGER_H <freetype/ftcache.h>
-#define FT_CACHE_INTERNAL_MRU_H <freetype/ftcache.h>
-#define FT_CACHE_INTERNAL_MANAGER_H <freetype/ftcache.h>
-#define FT_CACHE_INTERNAL_CACHE_H <freetype/ftcache.h>
-#define FT_CACHE_INTERNAL_GLYPH_H <freetype/ftcache.h>
-#define FT_CACHE_INTERNAL_IMAGE_H <freetype/ftcache.h>
-#define FT_CACHE_INTERNAL_SBITS_H <freetype/ftcache.h>
+#define FT_CACHE_MANAGER_H <ftcache.h>
+#define FT_CACHE_INTERNAL_MRU_H <ftcache.h>
+#define FT_CACHE_INTERNAL_MANAGER_H <ftcache.h>
+#define FT_CACHE_INTERNAL_CACHE_H <ftcache.h>
+#define FT_CACHE_INTERNAL_GLYPH_H <ftcache.h>
+#define FT_CACHE_INTERNAL_IMAGE_H <ftcache.h>
+#define FT_CACHE_INTERNAL_SBITS_H <ftcache.h>
-#define FT_INCREMENTAL_H <freetype/ftincrem.h>
+#define FT_INCREMENTAL_H <ftincrem.h>
-#define FT_TRUETYPE_UNPATENTED_H <freetype/ttunpat.h>
+#define FT_TRUETYPE_UNPATENTED_H <ttunpat.h>
/*
- * Include internal headers definitions from <freetype/internal/...>
+ * Include internal headers definitions from <internal/...>
* only when building the library.
*/
#ifdef FT2_BUILD_LIBRARY
-#define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h>
+#define FT_INTERNAL_INTERNAL_H <internal/internal.h>
#include FT_INTERNAL_INTERNAL_H
#endif /* FT2_BUILD_LIBRARY */
diff --git a/freetype/include/freetype/config/ftmodule.h b/freetype/include/config/ftmodule.h
index 76d271a74..76d271a74 100644
--- a/freetype/include/freetype/config/ftmodule.h
+++ b/freetype/include/config/ftmodule.h
diff --git a/freetype/include/freetype/config/ftoption.h b/freetype/include/config/ftoption.h
index 0883c69e4..5b11f0e03 100644
--- a/freetype/include/freetype/config/ftoption.h
+++ b/freetype/include/config/ftoption.h
@@ -38,9 +38,9 @@ FT_BEGIN_HEADER
/* library from a single source directory. */
/* */
/* - You can put a copy of this file in your build directory, more */
- /* precisely in `$BUILD/freetype/config/ftoption.h', where `$BUILD' */
- /* is the name of a directory that is included _before_ the FreeType */
- /* include path during compilation. */
+ /* precisely in `$BUILD/config/ftoption.h', where `$BUILD' is the */
+ /* name of a directory that is included _before_ the FreeType include */
+ /* path during compilation. */
/* */
/* The default FreeType Makefiles and Jamfiles use the build */
/* directory `builds/<system>' by default, but you can easily change */
@@ -51,7 +51,7 @@ FT_BEGIN_HEADER
/* locate this file during the build. For example, */
/* */
/* #define FT_CONFIG_OPTIONS_H <myftoptions.h> */
- /* #include <freetype/config/ftheader.h> */
+ /* #include <config/ftheader.h> */
/* */
/* will use `$BUILD/myftoptions.h' instead of this file for macro */
/* definitions. */
@@ -59,7 +59,7 @@ FT_BEGIN_HEADER
/* Note also that you can similarly pre-define the macro */
/* FT_CONFIG_MODULES_H used to locate the file listing of the modules */
/* that are statically linked to the library at compile time. By */
- /* default, this file is <freetype/config/ftmodule.h>. */
+ /* default, this file is <config/ftmodule.h>. */
/* */
/* We highly recommend using the third method whenever possible. */
/* */
@@ -230,6 +230,19 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
+ /* HarfBuzz support. */
+ /* */
+ /* FreeType uses the HarfBuzz library to improve auto-hinting of */
+ /* OpenType fonts. If available, many glyphs not directly addressable */
+ /* by a font's character map will be hinted also. */
+ /* */
+ /* Define this macro if you want to enable this `feature'. */
+ /* */
+/* #define FT_CONFIG_OPTION_USE_HARFBUZZ */
+
+
+ /*************************************************************************/
+ /* */
/* DLL export compilation */
/* */
/* When compiling FreeType as a DLL, some systems/compilers need a */
@@ -528,7 +541,7 @@ FT_BEGIN_HEADER
/* does not contain any glyph name though. */
/* */
/* Accessing SFNT names is done through the functions declared in */
- /* `freetype/ftsnames.h'. */
+ /* `ftsnames.h'. */
/* */
#define TT_CONFIG_OPTION_SFNT_NAMES
diff --git a/freetype/include/freetype/config/ftstdlib.h b/freetype/include/config/ftstdlib.h
index b940efc42..b940efc42 100644
--- a/freetype/include/freetype/config/ftstdlib.h
+++ b/freetype/include/config/ftstdlib.h
diff --git a/freetype/include/freetype/freetype.h b/freetype/include/freetype.h
index fe46d2297..fb62b625f 100644
--- a/freetype/include/freetype/freetype.h
+++ b/freetype/include/freetype.h
@@ -4,7 +4,7 @@
/* */
/* FreeType high-level API and common types (specification only). */
/* */
-/* Copyright 1996-2013 by */
+/* Copyright 1996-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -42,6 +42,38 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Section> */
+ /* header_inclusion */
+ /* */
+ /* <Title> */
+ /* FreeType's header inclusion scheme */
+ /* */
+ /* <Abstract> */
+ /* How client applications should include FreeType header files. */
+ /* */
+ /* <Description> */
+ /* To be as flexible as possible (and for historical reasons), */
+ /* FreeType uses a very special inclusion scheme to load header */
+ /* files, for example */
+ /* */
+ /* { */
+ /* #include <ft2build.h> */
+ /* */
+ /* #include FT_FREETYPE_H */
+ /* #include FT_OUTLINE_H */
+ /* } */
+ /* */
+ /* A compiler and its preprocessor only needs an include path to find */
+ /* the file `ft2build.h'; the exact locations and names of the other */
+ /* FreeType header files are hidden by preprocessor macro names, */
+ /* loaded by `ft2build.h'. The API documentation always gives the */
+ /* header macro name needed for a particular function. */
+ /* */
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* <Section> */
/* user_allocation */
/* */
/* <Title> */
@@ -98,7 +130,10 @@ FT_BEGIN_HEADER
/* FT_FACE_FLAG_FIXED_WIDTH */
/* FT_FACE_FLAG_HORIZONTAL */
/* FT_FACE_FLAG_VERTICAL */
+ /* FT_FACE_FLAG_COLOR */
/* FT_FACE_FLAG_SFNT */
+ /* FT_FACE_FLAG_CID_KEYED */
+ /* FT_FACE_FLAG_TRICKY */
/* FT_FACE_FLAG_KERNING */
/* FT_FACE_FLAG_MULTIPLE_MASTERS */
/* FT_FACE_FLAG_GLYPH_NAMES */
@@ -417,7 +452,8 @@ FT_BEGIN_HEADER
/* <Note> */
/* Each @FT_Face has an _active_ @FT_Size object that is used by */
/* functions like @FT_Load_Glyph to determine the scaling */
- /* transformation which is used to load and hint glyphs and metrics. */
+ /* transformation that in turn is used to load and hint glyphs and */
+ /* metrics. */
/* */
/* You can use @FT_Set_Char_Size, @FT_Set_Pixel_Sizes, */
/* @FT_Request_Size or even @FT_Select_Size to change the content */
@@ -552,11 +588,12 @@ FT_BEGIN_HEADER
/* FT_ENCODING_MS_SYMBOL :: */
/* Corresponds to the Microsoft Symbol encoding, used to encode */
/* mathematical symbols in the 32..255 character code range. For */
- /* more information, see `http://www.ceviz.net/symbol.htm'. */
+ /* more information, see */
+ /* `http://www.kostis.net/charsets/symbol.htm'. */
/* */
/* FT_ENCODING_SJIS :: */
/* Corresponds to Japanese SJIS encoding. More info at */
- /* at `http://langsupport.japanreference.com/encoding.shtml'. */
+ /* at `http://en.wikipedia.org/wiki/Shift_JIS'. */
/* See note on multi-byte encodings below. */
/* */
/* FT_ENCODING_GB2312 :: */
@@ -570,7 +607,7 @@ FT_BEGIN_HEADER
/* FT_ENCODING_WANSUNG :: */
/* Corresponds to the Korean encoding system known as Wansung. */
/* For more information see */
- /* `http://www.microsoft.com/typography/unicode/949.txt'. */
+ /* `http://msdn.microsoft.com/en-US/goglobal/cc305154'. */
/* */
/* FT_ENCODING_JOHAB :: */
/* The Korean standard character set (KS~C 5601-1992), which */
@@ -645,10 +682,10 @@ 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 */
+ /* @FT_Get_CMap_Language_ID to query the Mac language ID that may */
/* be needed to be able to distinguish Apple encoding variants. See */
/* */
- /* http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/README.TXT */
+ /* 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. */
@@ -808,7 +845,7 @@ FT_BEGIN_HEADER
/* highest CID used in the font. */
/* */
/* family_name :: The face's family name. This is an ASCII */
- /* string, usually in English, which describes */
+ /* string, usually in English, that describes */
/* the typeface's family (like `Times New */
/* Roman', `Bodoni', `Garamond', etc). This */
/* is a least common denominator used to list */
@@ -820,7 +857,7 @@ FT_BEGIN_HEADER
/* PDF file). */
/* */
/* style_name :: The face's style name. This is an ASCII */
- /* string, usually in English, which describes */
+ /* string, usually in English, that describes */
/* the typeface's style (like `Italic', */
/* `Bold', `Condensed', etc). Not all font */
/* formats provide a style name, so this field */
@@ -1054,7 +1091,7 @@ FT_BEGIN_HEADER
/* exist make FT_Load_Glyph return successfully; in all other cases */
/* you get an `FT_Err_Invalid_Argument' error. */
/* */
- /* Note that CID-keyed fonts which are in an SFNT wrapper don't */
+ /* Note that CID-keyed fonts that are in an SFNT wrapper don't */
/* have this flag set since the glyphs are accessed in the normal */
/* way (using contiguous indices); the `CID-ness' isn't visible to */
/* the application. */
@@ -1062,7 +1099,7 @@ FT_BEGIN_HEADER
/* FT_FACE_FLAG_TRICKY :: */
/* Set if the font is `tricky', this is, it always needs the */
/* font format's native hinting engine to get a reasonable result. */
- /* A typical example is the Chinese font `mingli.ttf' which uses */
+ /* A typical example is the Chinese font `mingli.ttf' that uses */
/* TrueType bytecode instructions to move and scale all of its */
/* subglyphs. */
/* */
@@ -1075,6 +1112,10 @@ FT_BEGIN_HEADER
/* Currently, there are about a dozen TrueType fonts in the list of */
/* tricky fonts; they are hard-coded in file `ttobjs.c'. */
/* */
+ /* FT_FACE_FLAG_COLOR :: */
+ /* Set if the font has color glyph tables. To access color glyphs */
+ /* use @FT_LOAD_COLOR. */
+ /* */
#define FT_FACE_FLAG_SCALABLE ( 1L << 0 )
#define FT_FACE_FLAG_FIXED_SIZES ( 1L << 1 )
#define FT_FACE_FLAG_FIXED_WIDTH ( 1L << 2 )
@@ -1089,6 +1130,7 @@ FT_BEGIN_HEADER
#define FT_FACE_FLAG_HINTER ( 1L << 11 )
#define FT_FACE_FLAG_CID_KEYED ( 1L << 12 )
#define FT_FACE_FLAG_TRICKY ( 1L << 13 )
+#define FT_FACE_FLAG_COLOR ( 1L << 14 )
/*************************************************************************
@@ -1273,6 +1315,20 @@ FT_BEGIN_HEADER
( face->face_flags & FT_FACE_FLAG_TRICKY )
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_HAS_COLOR( face )
+ *
+ * @description:
+ * A macro that returns true whenever a face object contains
+ * tables for color glyphs.
+ *
+ */
+#define FT_HAS_COLOR( face ) \
+ ( face->face_flags & FT_FACE_FLAG_COLOR )
+
+
/*************************************************************************/
/* */
/* <Const> */
@@ -1394,9 +1450,9 @@ FT_BEGIN_HEADER
/* <Fields> */
/* face :: Handle to the parent face object. */
/* */
- /* generic :: A typeless pointer, which is unused by the FreeType */
- /* library or any of its drivers. It can be used by */
- /* client applications to link their own data to each size */
+ /* generic :: A typeless pointer, unused by the FreeType library or */
+ /* any of its drivers. It can be used by client */
+ /* applications to link their own data to each size */
/* object. */
/* */
/* metrics :: Metrics for this size object. This field is read-only. */
@@ -1464,10 +1520,10 @@ FT_BEGIN_HEADER
/* listed through a direct, single-linked list */
/* using its `next' field. */
/* */
- /* generic :: A typeless pointer which is unused by the */
- /* FreeType library or any of its drivers. It */
- /* can be used by client applications to link */
- /* their own data to each glyph slot object. */
+ /* generic :: A typeless pointer unused by the FreeType */
+ /* library or any of its drivers. It can be */
+ /* used by client applications to link their own */
+ /* data to each glyph slot object. */
/* */
/* metrics :: The metrics of the last loaded glyph in the */
/* slot. The returned values depend on the last */
@@ -1494,8 +1550,8 @@ FT_BEGIN_HEADER
/* */
/* 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 */
+ /* (hinted) 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. */
@@ -1584,7 +1640,7 @@ FT_BEGIN_HEADER
/* `slot->format' is also changed to @FT_GLYPH_FORMAT_BITMAP. */
/* */
/* <Note> */
- /* Here a small pseudo code fragment which shows how to use */
+ /* Here a small pseudo code fragment that shows how to use */
/* `lsb_delta' and `rsb_delta': */
/* */
/* { */
@@ -1813,7 +1869,7 @@ FT_BEGIN_HEADER
/* opening a new face. */
/* */
/* <Note> */
- /* The stream type is determined by the contents of `flags' which */
+ /* The stream type is determined by the contents of `flags' that */
/* are tested in the following order by @FT_Open_Face: */
/* */
/* If the `FT_OPEN_MEMORY' bit is set, assume that this is a */
@@ -1894,7 +1950,7 @@ FT_BEGIN_HEADER
/* FT_New_Memory_Face */
/* */
/* <Description> */
- /* This function calls @FT_Open_Face to open a font which has been */
+ /* This function calls @FT_Open_Face to open a font that has been */
/* loaded into memory. */
/* */
/* <InOut> */
@@ -1940,7 +1996,7 @@ FT_BEGIN_HEADER
/* library :: A handle to the library resource. */
/* */
/* <Input> */
- /* args :: A pointer to an `FT_Open_Args' structure which must */
+ /* args :: A pointer to an `FT_Open_Args' structure that must */
/* be filled by the caller. */
/* */
/* face_index :: The index of the face within the font. The first */
@@ -1956,7 +2012,7 @@ FT_BEGIN_HEADER
/* */
/* <Note> */
/* Unlike FreeType 1.x, this function automatically creates a glyph */
- /* slot for the face object which can be accessed directly through */
+ /* slot for the face object that can be accessed directly through */
/* `face->glyph'. */
/* */
/* FT_Open_Face can be used to quickly check whether the font */
@@ -1965,7 +2021,7 @@ FT_BEGIN_HEADER
/* if the font format is recognized, or non-zero otherwise; */
/* the function returns a more or less empty face handle in `*aface' */
/* (if `aface' isn't NULL). The only useful field in this special */
- /* case is `face->num_faces' which gives the number of faces within */
+ /* case is `face->num_faces' that gives the number of faces within */
/* the font file. After examination, the returned @FT_Face structure */
/* should be deallocated with a call to @FT_Done_Face. */
/* */
@@ -2023,7 +2079,7 @@ FT_BEGIN_HEADER
/* face :: The target face object. */
/* */
/* <Input> */
- /* parameters :: A pointer to @FT_Open_Args which must be filled by */
+ /* parameters :: A pointer to @FT_Open_Args that must be filled by */
/* the caller. */
/* */
/* <Return> */
@@ -2054,7 +2110,7 @@ FT_BEGIN_HEADER
/* 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 */
+ /* This function helps in managing life-cycles of structures that */
/* reference @FT_Face objects. */
/* */
/* <Input> */
@@ -2249,6 +2305,8 @@ FT_BEGIN_HEADER
/* glyph relative to this size. For more information refer to */
/* `http://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html' */
/* */
+ /* Don't use this function if you are using the FreeType cache API. */
+ /* */
FT_EXPORT( FT_Error )
FT_Request_Size( FT_Face face,
FT_Size_Request req );
@@ -2323,6 +2381,8 @@ FT_BEGIN_HEADER
/* constrained, to this pixel size. Refer to @FT_Request_Size to */
/* understand how requested sizes relate to actual sizes. */
/* */
+ /* Don't use this function if you are using the FreeType cache API. */
+ /* */
FT_EXPORT( FT_Error )
FT_Set_Pixel_Sizes( FT_Face face,
FT_UInt pixel_width,
@@ -2361,7 +2421,7 @@ FT_BEGIN_HEADER
/* the details. */
/* */
/* For subsetted CID-keyed fonts, `FT_Err_Invalid_Argument' is */
- /* returned for invalid CID values (this is, for CID values which */
+ /* returned for invalid CID values (this is, for CID values that */
/* don't have a corresponding glyph in the font). See the discussion */
/* of the @FT_FACE_FLAG_CID_KEYED flag for more details. */
/* */
@@ -2635,7 +2695,7 @@ FT_BEGIN_HEADER
* `load_flags'. They can't be ORed.
*
* If @FT_LOAD_RENDER is also set, the glyph is rendered in the
- * corresponding mode (i.e., the mode which matches the used algorithm
+ * corresponding mode (i.e., the mode that matches the used algorithm
* best). An exeption is FT_LOAD_TARGET_MONO since it implies
* @FT_LOAD_MONOCHROME.
*
@@ -2815,6 +2875,10 @@ FT_BEGIN_HEADER
/* <Return> */
/* FreeType error code. 0~means success. */
/* */
+ /* <Note> */
+ /* To get meaningful results, font scaling values must be set with */
+ /* functions like @FT_Set_Char_Size before calling FT_Render_Glyph. */
+ /* */
FT_EXPORT( FT_Error )
FT_Render_Glyph( FT_GlyphSlot slot,
FT_Render_Mode render_mode );
@@ -3003,7 +3067,7 @@ FT_BEGIN_HEADER
/* */
/* 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'. */
+ /* `ftoptions.h'. */
/* */
FT_EXPORT( FT_Error )
FT_Get_Glyph_Name( FT_Face face,
@@ -3059,8 +3123,8 @@ FT_BEGIN_HEADER
/* */
/* Because many fonts contain more than a single cmap for Unicode */
/* encoding, this function has some special code to select the one */
- /* which covers Unicode best (`best' in the sense that a UCS-4 cmap */
- /* is preferred to a UCS-2 cmap). It is thus preferable to */
+ /* that covers Unicode best (`best' in the sense that a UCS-4 cmap is */
+ /* preferred to a UCS-2 cmap). It is thus preferable to */
/* @FT_Set_Charmap in this case. */
/* */
FT_EXPORT( FT_Error )
@@ -3414,7 +3478,7 @@ FT_BEGIN_HEADER
/* */
/* <Note> */
/* Use this function rather than directly reading the `fs_type' field */
- /* in the @PS_FontInfoRec structure which is only guaranteed to */
+ /* in the @PS_FontInfoRec structure, which is only guaranteed to */
/* return the correct results for Type~1 fonts. */
/* */
/* <Since> */
@@ -3594,7 +3658,7 @@ FT_BEGIN_HEADER
/* The character codepoint in Unicode. */
/* */
/* <Return> */
- /* A pointer to an array of variant selector code points which are */
+ /* A pointer to an array of variant selector code points that are */
/* active for the given character, or NULL if the corresponding list */
/* is empty. */
/* */
@@ -3628,7 +3692,7 @@ FT_BEGIN_HEADER
/* The variant selector code point in Unicode. */
/* */
/* <Return> */
- /* A list of all the code points which are specified by this selector */
+ /* A list of all the code points that are specified by this selector */
/* (both default and non-default codes are returned) or NULL if there */
/* is no valid cmap or the variant selector is invalid. */
/* */
@@ -3901,7 +3965,7 @@ FT_BEGIN_HEADER
*/
#define FREETYPE_MAJOR 2
#define FREETYPE_MINOR 5
-#define FREETYPE_PATCH 0
+#define FREETYPE_PATCH 3
/*************************************************************************/
diff --git a/freetype/include/freetype/ftcffdrv.h b/freetype/include/freetype/ftcffdrv.h
deleted file mode 100644
index ccbcbccaa..000000000
--- a/freetype/include/freetype/ftcffdrv.h
+++ /dev/null
@@ -1,151 +0,0 @@
-/***************************************************************************/
-/* */
-/* ftcffdrv.h */
-/* */
-/* FreeType API for controlling the CFF driver (specification only). */
-/* */
-/* Copyright 2013 by */
-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
-/* */
-/* This file is part of the FreeType project, and may only be used, */
-/* modified, and distributed under the terms of the FreeType project */
-/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
-/* this file you indicate that you have read the license and */
-/* understand and accept it fully. */
-/* */
-/***************************************************************************/
-
-
-#ifndef __FTCFFDRV_H__
-#define __FTCFFDRV_H__
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-#ifdef FREETYPE_H
-#error "freetype.h of FreeType 1 has been loaded!"
-#error "Please fix the directory search order for header files"
-#error "so that freetype.h of FreeType 2 is found first."
-#endif
-
-
-FT_BEGIN_HEADER
-
-
- /**************************************************************************
- *
- * @section:
- * cff_driver
- *
- * @title:
- * The CFF driver
- *
- * @abstract:
- * Controlling the CFF driver module.
- *
- * @description:
- * While FreeType's CFF driver doesn't expose API functions by itself,
- * it is possible to control its behaviour with @FT_Property_Set and
- * @FT_Property_Get. The following lists the available properties
- * together with the necessary macros and structures.
- *
- * The CFF driver's module name is `cff'.
- *
- */
-
-
- /**************************************************************************
- *
- * @property:
- * hinting-engine
- *
- * @description:
- * Thanks to Adobe, which contributed a new hinting (and parsing)
- * engine, an application can select between `freetype' and `adobe' if
- * compiled with CFF_CONFIG_OPTION_OLD_ENGINE. If this configuration
- * macro isn't defined, `hinting-engine' does nothing.
- *
- * The default engine is `freetype' if CFF_CONFIG_OPTION_OLD_ENGINE is
- * defined, and `adobe' otherwise.
- *
- * The following example code demonstrates how to select Adobe's hinting
- * engine (omitting the error handling).
- *
- * {
- * FT_Library library;
- * FT_Face face;
- * FT_UInt hinting_engine = FT_CFF_HINTING_ADOBE;
- *
- *
- * FT_Init_FreeType( &library );
- *
- * FT_Property_Set( library, "cff",
- * "hinting-engine", &hinting_engine );
- * }
- *
- * @note:
- * This property can be used with @FT_Property_Get also.
- *
- */
-
-
- /**************************************************************************
- *
- * @enum:
- * FT_CFF_HINTING_XXX
- *
- * @description:
- * A list of constants used for the @hinting-engine property to select
- * the hinting engine for CFF fonts.
- *
- * @values:
- * FT_CFF_HINTING_FREETYPE ::
- * Use the old FreeType hinting engine.
- *
- * FT_CFF_HINTING_ADOBE ::
- * Use the hinting engine contributed by Adobe.
- *
- */
-#define FT_CFF_HINTING_FREETYPE 0
-#define FT_CFF_HINTING_ADOBE 1
-
-
- /**************************************************************************
- *
- * @property:
- * no-stem-darkening
- *
- * @description:
- * By default, the Adobe CFF engine darkens stems at smaller sizes,
- * regardless of hinting, to enhance contrast. Setting this property,
- * stem darkening gets switched off.
- *
- * Note that stem darkening is never applied if @FT_LOAD_NO_SCALE is set.
- *
- * {
- * FT_Library library;
- * FT_Face face;
- * FT_Bool no_stem_darkening = TRUE;
- *
- *
- * FT_Init_FreeType( &library );
- *
- * FT_Property_Set( library, "cff",
- * "no-stem-darkening", &no_stem_darkening );
- * }
- *
- * @note:
- * This property can be used with @FT_Property_Get also.
- *
- */
-
-
- /* */
-
-FT_END_HEADER
-
-
-#endif /* __FTCFFDRV_H__ */
-
-
-/* END */
diff --git a/freetype/include/ft2build.h b/freetype/include/ft2build.h
index 923d887df..6f8eb7f37 100644
--- a/freetype/include/ft2build.h
+++ b/freetype/include/ft2build.h
@@ -3,9 +3,8 @@
/* ft2build.h */
/* */
/* FreeType 2 build and setup macros. */
-/* (Generic version) */
/* */
-/* Copyright 1996-2001, 2006 by */
+/* Copyright 1996-2001, 2006, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -19,21 +18,25 @@
/*************************************************************************/
/* */
- /* This file corresponds to the default `ft2build.h' file for */
- /* FreeType 2. It uses the `freetype' include root. */
+ /* This is the `entry point' for FreeType header file inclusions. It is */
+ /* the only header file which should be included directly; all other */
+ /* FreeType header files should be accessed with macro names (after */
+ /* including `ft2build.h'). */
/* */
- /* Note that specific platforms might use a different configuration. */
- /* See builds/unix/ft2unix.h for an example. */
+ /* A typical example is */
+ /* */
+ /* #include <ft2build.h> */
+ /* #include FT_FREETYPE_H */
/* */
/*************************************************************************/
-#ifndef __FT2_BUILD_GENERIC_H__
-#define __FT2_BUILD_GENERIC_H__
+#ifndef __FT2BUILD_H__
+#define __FT2BUILD_H__
-#include <freetype/config/ftheader.h>
+#include <config/ftheader.h>
-#endif /* __FT2_BUILD_GENERIC_H__ */
+#endif /* __FT2BUILD_H__ */
/* END */
diff --git a/freetype/include/freetype/ftadvanc.h b/freetype/include/ftadvanc.h
index 012b74b81..8f7e2fce5 100644
--- a/freetype/include/freetype/ftadvanc.h
+++ b/freetype/include/ftadvanc.h
@@ -64,11 +64,11 @@ FT_BEGIN_HEADER
/* corresponding hinting mode or font driver doesn't allow for very */
/* quick advance computation. */
/* */
- /* Typically, glyphs which are either unscaled, unhinted, bitmapped, */
+ /* Typically, glyphs that are either unscaled, unhinted, bitmapped, */
/* or light-hinted can have their advance width computed very */
/* quickly. */
/* */
- /* Normal and bytecode hinted modes, which require loading, scaling, */
+ /* Normal and bytecode hinted modes that require loading, scaling, */
/* and hinting of the glyph outline, are extremely slow by */
/* comparison. */
/* */
diff --git a/freetype/include/freetype/ftautoh.h b/freetype/include/ftautoh.h
index 5e1153a1c..936791e72 100644
--- a/freetype/include/freetype/ftautoh.h
+++ b/freetype/include/ftautoh.h
@@ -79,7 +79,7 @@ FT_BEGIN_HEADER
* sense, see the @FT_AUTOHINTER_SCRIPT_XXX values) is stored as an
* array with `num_glyphs' elements, as found in the font's @FT_Face
* structure. The `glyph-to-script-map' property returns a pointer to
- * this array which can be modified as needed. Note that the
+ * this array, which can be modified as needed. Note that the
* modification should happen before the first glyph gets processed by
* the auto-hinter so that the global analysis of the font shapes
* actually uses the modified mapping.
@@ -282,12 +282,57 @@ FT_BEGIN_HEADER
* This property can be used with @FT_Property_Get also.
*
* It's important to use the right timing for changing this value: The
- * creation of the glyph-to-script map which eventually uses the
+ * creation of the glyph-to-script map that eventually uses the
* fallback script value gets triggered either by setting or reading a
* face-specific property like @glyph-to-script-map, or by auto-hinting
* any glyph from that face. In particular, if you have already created
* an @FT_Face structure but not loaded any glyph (using the
- * auto-hinter), a change of the fallback glyph will affect this face.
+ * auto-hinter), a change of the fallback script will affect this face.
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @property:
+ * default-script
+ *
+ * @description:
+ * *Experimental* *only*
+ *
+ * If Freetype gets compiled with FT_CONFIG_OPTION_USE_HARFBUZZ to make
+ * the HarfBuzz library access OpenType features for getting better
+ * glyph coverages, this property sets the (auto-fitter) script to be
+ * used for the default (OpenType) script data of a font's GSUB table.
+ * Features for the default script are intended for all scripts not
+ * explicitly handled in GSUB; an example is a `dlig' feature,
+ * containing the combination of the characters `T', `E', and `L' to
+ * form a `TEL' ligature.
+ *
+ * By default, this is @FT_AUTOHINTER_SCRIPT_LATIN. Using the
+ * `default-script' property, this default value can be changed.
+ *
+ * {
+ * FT_Library library;
+ * FT_UInt default_script = FT_AUTOHINTER_SCRIPT_NONE;
+ *
+ *
+ * FT_Init_FreeType( &library );
+ *
+ * FT_Property_Set( library, "autofitter",
+ * "default-script", &default_script );
+ * }
+ *
+ * @note:
+ * This property can be used with @FT_Property_Get also.
+ *
+ * It's important to use the right timing for changing this value: The
+ * creation of the glyph-to-script map that eventually uses the
+ * default script value gets triggered either by setting or reading a
+ * face-specific property like @glyph-to-script-map, or by auto-hinting
+ * any glyph from that face. In particular, if you have already created
+ * an @FT_Face structure but not loaded any glyph (using the
+ * auto-hinter), a change of the default script will affect this face.
*
*/
diff --git a/freetype/include/freetype/ftbbox.h b/freetype/include/ftbbox.h
index 976691956..8938841a6 100644
--- a/freetype/include/freetype/ftbbox.h
+++ b/freetype/include/ftbbox.h
@@ -4,7 +4,7 @@
/* */
/* FreeType exact bbox computation (specification). */
/* */
-/* Copyright 1996-2001, 2003, 2007, 2011 by */
+/* Copyright 1996-2001, 2003, 2007, 2011, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -60,7 +60,7 @@ FT_BEGIN_HEADER
/* <Description> */
/* Compute the exact bounding box of an outline. This is slower */
/* than computing the control box. However, it uses an advanced */
- /* algorithm which returns _very_ quickly when the two boxes */
+ /* algorithm that returns _very_ quickly when the two boxes */
/* coincide. Otherwise, the outline Bézier arcs are traversed to */
/* extract their extrema. */
/* */
@@ -78,7 +78,7 @@ FT_BEGIN_HEADER
/* @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 */
+ /* properly shift and scale the subglyphs), then extracting the BBox, */
/* which can be eventually converted back to font units. */
/* */
FT_EXPORT( FT_Error )
diff --git a/freetype/include/freetype/ftbdf.h b/freetype/include/ftbdf.h
index 4f8baf840..8b3c41115 100644
--- a/freetype/include/freetype/ftbdf.h
+++ b/freetype/include/ftbdf.h
@@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing BDF-specific strings (specification). */
/* */
-/* Copyright 2002, 2003, 2004, 2006, 2009 by */
+/* Copyright 2002-2004, 2006, 2009, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -106,7 +106,8 @@ FT_BEGIN_HEADER
* The property type.
*
* u.atom ::
- * The atom string, if type is @BDF_PROPERTY_TYPE_ATOM.
+ * The atom string, if type is @BDF_PROPERTY_TYPE_ATOM. May be
+ * NULL, indicating an empty string.
*
* u.integer ::
* A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER.
diff --git a/freetype/include/freetype/ftbitmap.h b/freetype/include/ftbitmap.h
index 7dbf5ba3f..7dbf5ba3f 100644
--- a/freetype/include/freetype/ftbitmap.h
+++ b/freetype/include/ftbitmap.h
diff --git a/freetype/include/freetype/ftbzip2.h b/freetype/include/ftbzip2.h
index 1bf81b15e..1bf81b15e 100644
--- a/freetype/include/freetype/ftbzip2.h
+++ b/freetype/include/ftbzip2.h
diff --git a/freetype/include/freetype/ftcache.h b/freetype/include/ftcache.h
index 4ec9587cf..a5d7100a3 100644
--- a/freetype/include/freetype/ftcache.h
+++ b/freetype/include/ftcache.h
@@ -156,7 +156,7 @@ FT_BEGIN_HEADER
* @note:
* Never use NULL as a valid @FTC_FaceID.
*
- * Face IDs are passed by the client to the cache manager, which calls,
+ * Face IDs are passed by the client to the cache manager that calls,
* when needed, the @FTC_Face_Requester to translate them into new
* @FT_Face objects.
*
diff --git a/freetype/include/ftcffdrv.h b/freetype/include/ftcffdrv.h
new file mode 100644
index 000000000..e4d039d02
--- /dev/null
+++ b/freetype/include/ftcffdrv.h
@@ -0,0 +1,254 @@
+/***************************************************************************/
+/* */
+/* ftcffdrv.h */
+/* */
+/* FreeType API for controlling the CFF driver (specification only). */
+/* */
+/* Copyright 2013 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __FTCFFDRV_H__
+#define __FTCFFDRV_H__
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+ /**************************************************************************
+ *
+ * @section:
+ * cff_driver
+ *
+ * @title:
+ * The CFF driver
+ *
+ * @abstract:
+ * Controlling the CFF driver module.
+ *
+ * @description:
+ * While FreeType's CFF driver doesn't expose API functions by itself,
+ * it is possible to control its behaviour with @FT_Property_Set and
+ * @FT_Property_Get. The list below gives the available properties
+ * together with the necessary macros and structures.
+ *
+ * The CFF driver's module name is `cff'.
+ *
+ * *Hinting* *and* *antialiasing* *principles* *of* *the* *new* *engine*
+ *
+ * The rasterizer is positioning horizontal features (e.g., ascender
+ * height & x-height, or crossbars) on the pixel grid and minimizing the
+ * amount of antialiasing applied to them, while placing vertical
+ * features (vertical stems) on the pixel grid without hinting, thus
+ * representing the stem position and weight accurately. Sometimes the
+ * vertical stems may be only partially black. In this context,
+ * `antialiasing' means that stems are not positioned exactly on pixel
+ * borders, causing a fuzzy appearance.
+ *
+ * There are two principles behind this approach.
+ *
+ * 1) No hinting in the horizontal direction: Unlike `superhinted'
+ * TrueType, which changes glyph widths to accommodate regular
+ * inter-glyph spacing, Adobe's approach is `faithful to the design' in
+ * representing both the glyph width and the inter-glyph spacing
+ * designed for the font. This makes the screen display as close as it
+ * can be to the result one would get with infinite resolution, while
+ * preserving what is considered the key characteristics of each glyph.
+ * Note that the distances between unhinted and grid-fitted positions at
+ * small sizes are comparable to kerning values and thus would be
+ * noticeable (and distracting) while reading if hinting were applied.
+ *
+ * One of the reasons to not hint horizontally is antialiasing for LCD
+ * screens: The pixel geometry of modern displays supplies three
+ * vertical sub-pixels as the eye moves horizontally across each visible
+ * pixel. On devices where we can be certain this characteristic is
+ * present a rasterizer can take advantage of the sub-pixels to add
+ * increments of weight. In Western writing systems this turns out to
+ * be the more critical direction anyway; the weights and spacing of
+ * vertical stems (see above) are central to Armenian, Cyrillic, Greek,
+ * and Latin type designs. Even when the rasterizer uses greyscale
+ * antialiasing instead of color (a necessary compromise when one
+ * doesn't know the screen characteristics), the unhinted vertical
+ * features preserve the design's weight and spacing much better than
+ * aliased type would.
+ *
+ * 2) Aligment in the vertical direction: Weights and spacing along the
+ * y~axis are less critical; what is much more important is the visual
+ * alignment of related features (like cap-height and x-height). The
+ * sense of alignment for these is enhanced by the sharpness of grid-fit
+ * edges, while the cruder vertical resolution (full pixels instead of
+ * 1/3 pixels) is less of a problem.
+ *
+ * On the technical side, horizontal alignment zones for ascender,
+ * x-height, and other important height values (traditionally called
+ * `blue zones') as defined in the font are positioned independently,
+ * each being rounded to the nearest pixel edge, taking care of
+ * overshoot suppression at small sizes, stem darkening, and scaling.
+ *
+ * Hstems (this is, hint values defined in the font to help align
+ * horizontal features) that fall within a blue zone are said to be
+ * `captured' and are aligned to that zone. Uncaptured stems are moved
+ * in one of four ways, top edge up or down, bottom edge up or down.
+ * Unless there are conflicting hstems, the smallest movement is taken
+ * to minimize distortion.
+ */
+
+
+ /**************************************************************************
+ *
+ * @property:
+ * hinting-engine
+ *
+ * @description:
+ * Thanks to Adobe, which contributed a new hinting (and parsing)
+ * engine, an application can select between `freetype' and `adobe' if
+ * compiled with CFF_CONFIG_OPTION_OLD_ENGINE. If this configuration
+ * macro isn't defined, `hinting-engine' does nothing.
+ *
+ * The default engine is `freetype' if CFF_CONFIG_OPTION_OLD_ENGINE is
+ * defined, and `adobe' otherwise.
+ *
+ * The following example code demonstrates how to select Adobe's hinting
+ * engine (omitting the error handling).
+ *
+ * {
+ * FT_Library library;
+ * FT_UInt hinting_engine = FT_CFF_HINTING_ADOBE;
+ *
+ *
+ * FT_Init_FreeType( &library );
+ *
+ * FT_Property_Set( library, "cff",
+ * "hinting-engine", &hinting_engine );
+ * }
+ *
+ * @note:
+ * This property can be used with @FT_Property_Get also.
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @enum:
+ * FT_CFF_HINTING_XXX
+ *
+ * @description:
+ * A list of constants used for the @hinting-engine property to select
+ * the hinting engine for CFF fonts.
+ *
+ * @values:
+ * FT_CFF_HINTING_FREETYPE ::
+ * Use the old FreeType hinting engine.
+ *
+ * FT_CFF_HINTING_ADOBE ::
+ * Use the hinting engine contributed by Adobe.
+ *
+ */
+#define FT_CFF_HINTING_FREETYPE 0
+#define FT_CFF_HINTING_ADOBE 1
+
+
+ /**************************************************************************
+ *
+ * @property:
+ * no-stem-darkening
+ *
+ * @description:
+ * By default, the Adobe CFF engine darkens stems at smaller sizes,
+ * regardless of hinting, to enhance contrast. This feature requires
+ * a rendering system with proper gamma correction. Setting this
+ * property, stem darkening gets switched off.
+ *
+ * Note that stem darkening is never applied if @FT_LOAD_NO_SCALE is set.
+ *
+ * {
+ * FT_Library library;
+ * FT_Bool no_stem_darkening = TRUE;
+ *
+ *
+ * FT_Init_FreeType( &library );
+ *
+ * FT_Property_Set( library, "cff",
+ * "no-stem-darkening", &no_stem_darkening );
+ * }
+ *
+ * @note:
+ * This property can be used with @FT_Property_Get also.
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @property:
+ * darkening-parameters
+ *
+ * @description:
+ * By default, the Adobe CFF engine darkens stems as follows (if the
+ * `no-stem-darkening' property isn't set):
+ *
+ * {
+ * stem width <= 0.5px: darkening amount = 0.4px
+ * stem width = 1px: darkening amount = 0.275px
+ * stem width = 1.667px: darkening amount = 0.275px
+ * stem width >= 2.333px: darkening amount = 0px
+ * }
+ *
+ * and piecewise linear in-between. Using the `darkening-parameters'
+ * property, these four control points can be changed, as the following
+ * example demonstrates.
+ *
+ * {
+ * FT_Library library;
+ * FT_Int darken_params[8] = { 500, 300, // x1, y1
+ * 1000, 200, // x2, y2
+ * 1500, 100, // x3, y3
+ * 2000, 0 }; // x4, y4
+ *
+ *
+ * FT_Init_FreeType( &library );
+ *
+ * FT_Property_Set( library, "cff",
+ * "darkening-parameters", darken_params );
+ * }
+ *
+ * The x~values give the stem width, and the y~values the darkening
+ * amount. The unit is 1000th of pixels. All coordinate values must be
+ * positive; the x~values must be monotonically increasing; the
+ * y~values must be monotonically decreasing and smaller than or
+ * equal to 500 (corresponding to half a pixel); the slope of each
+ * linear piece must be shallower than -1 (e.g., -.4).
+ *
+ * @note:
+ * This property can be used with @FT_Property_Get also.
+ *
+ */
+
+
+ /* */
+
+FT_END_HEADER
+
+
+#endif /* __FTCFFDRV_H__ */
+
+
+/* END */
diff --git a/freetype/include/freetype/ftchapters.h b/freetype/include/ftchapters.h
index c55670d1d..d333761c8 100644
--- a/freetype/include/freetype/ftchapters.h
+++ b/freetype/include/ftchapters.h
@@ -1,7 +1,7 @@
/***************************************************************************/
/* */
/* This file defines the structure of the FreeType reference. */
-/* It is used by the python script which generates the HTML files. */
+/* It is used by the python script that generates the HTML files. */
/* */
/***************************************************************************/
@@ -15,6 +15,7 @@
/* General Remarks */
/* */
/* <Sections> */
+/* header_inclusion */
/* user_allocation */
/* */
/***************************************************************************/
diff --git a/freetype/include/freetype/ftcid.h b/freetype/include/ftcid.h
index 203a30caf..203a30caf 100644
--- a/freetype/include/freetype/ftcid.h
+++ b/freetype/include/ftcid.h
diff --git a/freetype/include/freetype/fterrdef.h b/freetype/include/fterrdef.h
index 76c7b9e36..76c7b9e36 100644
--- a/freetype/include/freetype/fterrdef.h
+++ b/freetype/include/fterrdef.h
diff --git a/freetype/include/freetype/fterrors.h b/freetype/include/fterrors.h
index 0fa3e4dce..0fa3e4dce 100644
--- a/freetype/include/freetype/fterrors.h
+++ b/freetype/include/fterrors.h
diff --git a/freetype/include/freetype/ftgasp.h b/freetype/include/ftgasp.h
index 453d4fa42..453d4fa42 100644
--- a/freetype/include/freetype/ftgasp.h
+++ b/freetype/include/ftgasp.h
diff --git a/freetype/include/freetype/ftglyph.h b/freetype/include/ftglyph.h
index 31dc33187..2d30ed9de 100644
--- a/freetype/include/freetype/ftglyph.h
+++ b/freetype/include/ftglyph.h
@@ -4,7 +4,7 @@
/* */
/* FreeType convenience functions to handle glyphs (specification). */
/* */
-/* Copyright 1996-2003, 2006, 2008, 2009, 2011 by */
+/* Copyright 1996-2003, 2006, 2008, 2009, 2011, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -358,17 +358,17 @@ FT_BEGIN_HEADER
/* outline's points, including Bézier control points. Though it */
/* coincides with the exact bounding box for most glyphs, it can be */
/* slightly larger in some situations (like when rotating an outline */
- /* which contains Bézier outside arcs). */
+ /* that contains Bézier outside arcs). */
/* */
/* Computing the control box is very fast, while getting the bounding */
/* box can take much more time as it needs to walk over all segments */
/* and arcs in the outline. To get the latter, you can use the */
- /* `ftbbox' component which is dedicated to this single task. */
+ /* `ftbbox' component, which is dedicated to this single task. */
/* */
/* <Input> */
/* glyph :: A handle to the source glyph object. */
/* */
- /* mode :: The mode which indicates how to interpret the returned */
+ /* mode :: The mode that indicates how to interpret the returned */
/* bounding box values. */
/* */
/* <Output> */
@@ -388,7 +388,7 @@ FT_BEGIN_HEADER
/* @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 */
+ /* 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 */
diff --git a/freetype/include/freetype/ftgxval.h b/freetype/include/ftgxval.h
index 497015c10..6d38e327a 100644
--- a/freetype/include/freetype/ftgxval.h
+++ b/freetype/include/ftgxval.h
@@ -4,7 +4,7 @@
/* */
/* FreeType API for validating TrueTypeGX/AAT tables (specification). */
/* */
-/* Copyright 2004, 2005, 2006 by */
+/* Copyright 2004-2006, 2013 by */
/* Masatake YAMATO, Redhat K.K, */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
@@ -180,7 +180,7 @@ FT_BEGIN_HEADER
*
* @description:
* Validate various TrueTypeGX tables to assure that all offsets and
- * indices are valid. The idea is that a higher-level library which
+ * indices are valid. The idea is that a higher-level library that
* actually does the text layout can access those tables without
* error checking (which can be quite time consuming).
*
@@ -189,7 +189,7 @@ FT_BEGIN_HEADER
* A handle to the input face.
*
* validation_flags ::
- * A bit field which specifies the tables to be validated. See
+ * A bit field that specifies the tables to be validated. See
* @FT_VALIDATE_GXXXX for possible values.
*
* table_length ::
@@ -286,7 +286,7 @@ FT_BEGIN_HEADER
*
* @description:
* Validate classic (16-bit format) kern table to assure that the offsets
- * and indices are valid. The idea is that a higher-level library which
+ * and indices are valid. The idea is that a higher-level library that
* actually does the text layout can access those tables without error
* checking (which can be quite time consuming).
*
@@ -299,7 +299,7 @@ FT_BEGIN_HEADER
* A handle to the input face.
*
* validation_flags ::
- * A bit field which specifies the dialect to be validated. See
+ * A bit field that specifies the dialect to be validated. See
* @FT_VALIDATE_CKERNXXX for possible values.
*
* @output:
diff --git a/freetype/include/freetype/ftgzip.h b/freetype/include/ftgzip.h
index acbc4f032..78e726999 100644
--- a/freetype/include/freetype/ftgzip.h
+++ b/freetype/include/ftgzip.h
@@ -4,7 +4,7 @@
/* */
/* Gzip-compressed stream support. */
/* */
-/* Copyright 2002, 2003, 2004, 2006 by */
+/* Copyright 2002-2004, 2006, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -91,6 +91,53 @@ FT_BEGIN_HEADER
FT_Stream_OpenGzip( FT_Stream stream,
FT_Stream source );
+
+ /************************************************************************
+ *
+ * @function:
+ * FT_Gzip_Uncompress
+ *
+ * @description:
+ * Decompress a zipped input buffer into an output buffer. This function
+ * is modeled after zlib's `uncompress' function.
+ *
+ * @input:
+ * memory ::
+ * A FreeType memory handle.
+ *
+ * input ::
+ * The input buffer.
+ *
+ * input_len ::
+ * The length of the input buffer.
+ *
+ * @output:
+ * output::
+ * The output buffer.
+ *
+ * @inout:
+ * output_len ::
+ * Before calling the function, this is the the total size of the
+ * output buffer, which must be large enough to hold the entire
+ * uncompressed data (so the size of the uncompressed data must be
+ * known in advance). After calling the function, `output_len' is the
+ * size of the used data in `output'.
+ *
+ * @return:
+ * FreeType error code. 0~means success.
+ *
+ * @note:
+ * This function may return `FT_Err_Unimplemented_Feature' if your build
+ * of FreeType was not compiled with zlib support.
+ */
+ FT_EXPORT( FT_Error )
+ FT_Gzip_Uncompress( FT_Memory memory,
+ FT_Byte* output,
+ FT_ULong* output_len,
+ const FT_Byte* input,
+ FT_ULong input_len );
+
+
/* */
diff --git a/freetype/include/freetype/ftimage.h b/freetype/include/ftimage.h
index 3b826b1d3..ea71a78ef 100644
--- a/freetype/include/freetype/ftimage.h
+++ b/freetype/include/ftimage.h
@@ -555,7 +555,7 @@ FT_BEGIN_HEADER
/* <Input> */
/* to :: A pointer to the target point of the `move to'. */
/* */
- /* user :: A typeless pointer which is passed from the caller of the */
+ /* user :: A typeless pointer, which is passed from the caller of the */
/* decomposition function. */
/* */
/* <Return> */
@@ -582,7 +582,7 @@ FT_BEGIN_HEADER
/* <Input> */
/* to :: A pointer to the target point of the `line to'. */
/* */
- /* user :: A typeless pointer which is passed from the caller of the */
+ /* user :: A typeless pointer, which is passed from the caller of the */
/* decomposition function. */
/* */
/* <Return> */
@@ -613,7 +613,7 @@ FT_BEGIN_HEADER
/* */
/* to :: A pointer to the target end point of the conic arc. */
/* */
- /* user :: A typeless pointer which is passed from the caller of */
+ /* user :: A typeless pointer, which is passed from the caller of */
/* the decomposition function. */
/* */
/* <Return> */
@@ -645,7 +645,7 @@ FT_BEGIN_HEADER
/* */
/* to :: A pointer to the target end point. */
/* */
- /* user :: A typeless pointer which is passed from the caller of */
+ /* user :: A typeless pointer, which is passed from the caller of */
/* the decomposition function. */
/* */
/* <Return> */
@@ -836,8 +836,8 @@ FT_BEGIN_HEADER
/* a a bitmap. This section contains the public API for rasters. */
/* */
/* Note that in FreeType 2, all rasters are now encapsulated within */
- /* specific modules called `renderers'. See `freetype/ftrender.h' for */
- /* more details on renderers. */
+ /* specific modules called `renderers'. See `ftrender.h' for more */
+ /* details on renderers. */
/* */
/*************************************************************************/
@@ -891,8 +891,8 @@ FT_BEGIN_HEADER
/* */
/* <Note> */
/* This structure is used by the span drawing callback type named */
- /* @FT_SpanFunc which takes the y~coordinate of the span as a */
- /* a parameter. */
+ /* @FT_SpanFunc that takes the y~coordinate of the span as a */
+ /* parameter. */
/* */
/* The coverage value is always between 0 and 255. If you want less */
/* gray values, the callback function has to reduce them. */
@@ -1265,7 +1265,7 @@ FT_BEGIN_HEADER
/* XXX: For now, the standard raster doesn't support direct */
/* composition but this should change for the final release (see */
/* the files `demos/src/ftgrays.c' and `demos/src/ftgrays2.c' */
- /* for examples of distinct implementations which support direct */
+ /* for examples of distinct implementations that support direct */
/* composition). */
/* */
typedef int
diff --git a/freetype/include/freetype/ftincrem.h b/freetype/include/ftincrem.h
index aaf689ff1..aaf689ff1 100644
--- a/freetype/include/freetype/ftincrem.h
+++ b/freetype/include/ftincrem.h
diff --git a/freetype/include/freetype/ftlcdfil.h b/freetype/include/ftlcdfil.h
index 8b253f118..39206f019 100644
--- a/freetype/include/freetype/ftlcdfil.h
+++ b/freetype/include/ftlcdfil.h
@@ -5,7 +5,7 @@
/* FreeType API for color filtering of subpixel bitmap glyphs */
/* (specification). */
/* */
-/* Copyright 2006, 2007, 2008, 2010 by */
+/* Copyright 2006-2008, 2010, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -45,9 +45,9 @@ FT_BEGIN_HEADER
*
* @description:
* The @FT_Library_SetLcdFilter API can be used to specify a low-pass
- * filter which is then applied to LCD-optimized bitmaps generated
+ * filter, which is then applied to LCD-optimized bitmaps generated
* through @FT_Render_Glyph. This is useful to reduce color fringes
- * which would occur with unfiltered rendering.
+ * that would occur with unfiltered rendering.
*
* Note that no filter is active by default, and that this function is
* *not* implemented in default builds of the library. You need to
diff --git a/freetype/include/freetype/ftlist.h b/freetype/include/ftlist.h
index bb6f7f119..241e21e55 100644
--- a/freetype/include/freetype/ftlist.h
+++ b/freetype/include/ftlist.h
@@ -4,7 +4,7 @@
/* */
/* Generic list support for FreeType (specification). */
/* */
-/* Copyright 1996-2001, 2003, 2007, 2010 by */
+/* Copyright 1996-2001, 2003, 2007, 2010, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -173,7 +173,7 @@ FT_BEGIN_HEADER
/* FT_List_Iterator */
/* */
/* <Description> */
- /* An FT_List iterator function which is called during a list parse */
+ /* An FT_List iterator function that is called during a list parse */
/* by @FT_List_Iterate. */
/* */
/* <Input> */
@@ -200,7 +200,7 @@ FT_BEGIN_HEADER
/* <Input> */
/* list :: A handle to the list. */
/* iterator :: An iterator function, called on each node of the list. */
- /* user :: A user-supplied field which is passed as the second */
+ /* user :: A user-supplied field that is passed as the second */
/* argument to the iterator. */
/* */
/* <Return> */
@@ -218,7 +218,7 @@ FT_BEGIN_HEADER
/* FT_List_Destructor */
/* */
/* <Description> */
- /* An @FT_List iterator function which is called during a list */
+ /* An @FT_List iterator function that is called during a list */
/* finalization by @FT_List_Finalize to destroy all elements in a */
/* given list. */
/* */
@@ -250,9 +250,9 @@ FT_BEGIN_HEADER
/* destroy :: A list destructor that will be applied to each element */
/* of the list. */
/* */
- /* memory :: The current memory object which handles deallocation. */
+ /* memory :: The current memory object that handles deallocation. */
/* */
- /* user :: A user-supplied field which is passed as the last */
+ /* user :: A user-supplied field that is passed as the last */
/* argument to the destructor. */
/* */
/* <Note> */
diff --git a/freetype/include/freetype/ftlzw.h b/freetype/include/ftlzw.h
index 00d40169a..00d40169a 100644
--- a/freetype/include/freetype/ftlzw.h
+++ b/freetype/include/ftlzw.h
diff --git a/freetype/include/freetype/ftmac.h b/freetype/include/ftmac.h
index ab5bab517..42874fe6f 100644
--- a/freetype/include/freetype/ftmac.h
+++ b/freetype/include/ftmac.h
@@ -4,7 +4,7 @@
/* */
/* Additional Mac-specific API. */
/* */
-/* Copyright 1996-2001, 2004, 2006, 2007 by */
+/* Copyright 1996-2001, 2004, 2006, 2007, 2013 by */
/* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -18,7 +18,7 @@
/***************************************************************************/
/* */
-/* NOTE: Include this file after <freetype/freetype.h> and after any */
+/* NOTE: Include this file after FT_FREETYPE_H and after any */
/* Mac-specific headers (because this header uses Mac types such as */
/* Handle, FSSpec, FSRef, etc.) */
/* */
@@ -168,7 +168,7 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* Return a pathname of the disk file and face index for given font */
- /* name which is handled by ATS framework. */
+ /* name that is handled by ATS framework. */
/* */
/* <Input> */
/* fontName :: Mac OS name of the font in ATS framework. */
diff --git a/freetype/include/freetype/ftmm.h b/freetype/include/ftmm.h
index 3aefb9e4f..837975a0b 100644
--- a/freetype/include/freetype/ftmm.h
+++ b/freetype/include/ftmm.h
@@ -4,7 +4,7 @@
/* */
/* FreeType Multiple Master font interface (specification). */
/* */
-/* Copyright 1996-2001, 2003, 2004, 2006, 2009 by */
+/* Copyright 1996-2001, 2003, 2004, 2006, 2009, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -196,7 +196,7 @@ FT_BEGIN_HEADER
/* number of designs). */
/* */
/* num_namedstyles :: The number of named styles; only meaningful for */
- /* GX which allows certain design coordinates to */
+ /* GX that allows certain design coordinates to */
/* have a string ID (in the `name' table) */
/* associated with them. The font can tell the */
/* user that, for example, Weight=1.5 is `Bold'. */
@@ -258,8 +258,7 @@ FT_BEGIN_HEADER
/* */
/* <Output> */
/* 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). */
+ /* Allocates a data structure, which the user must free. */
/* */
/* <Return> */
/* FreeType error code. 0~means success. */
diff --git a/freetype/include/freetype/ftmodapi.h b/freetype/include/ftmodapi.h
index 8abffb558..22878f8c6 100644
--- a/freetype/include/freetype/ftmodapi.h
+++ b/freetype/include/ftmodapi.h
@@ -298,7 +298,7 @@ FT_BEGIN_HEADER
* Note that only a few modules have properties.
*
* value ::
- * A generic pointer to a variable or structure which gives the new
+ * A generic pointer to a variable or structure that gives the new
* value of the property. The exact definition of `value' is
* dependent on the property; see the `Synopsis' subsection of the
* module's documentation.
@@ -364,7 +364,7 @@ FT_BEGIN_HEADER
*
* @inout:
* value ::
- * A generic pointer to a variable or structure which gives the
+ * A generic pointer to a variable or structure that gives the
* value of the property. The exact definition of `value' is
* dependent on the property; see the `Synopsis' subsection of the
* module's documentation.
@@ -418,7 +418,7 @@ FT_BEGIN_HEADER
/* @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 */
+ /* This function helps in managing life-cycles of structures that */
/* reference @FT_Library objects. */
/* */
/* <Input> */
@@ -584,7 +584,7 @@ FT_BEGIN_HEADER
* The library implements a bytecode interpreter that doesn't
* support the patented operations of the TrueType virtual machine.
*
- * Its main use is to load certain Asian fonts which position and
+ * Its main use is to load certain Asian fonts that position and
* scale glyph components with bytecode instructions. It produces
* bad output for most other fonts.
*
diff --git a/freetype/include/freetype/ftmoderr.h b/freetype/include/ftmoderr.h
index 5a27db151..5a27db151 100644
--- a/freetype/include/freetype/ftmoderr.h
+++ b/freetype/include/ftmoderr.h
diff --git a/freetype/include/freetype/ftotval.h b/freetype/include/ftotval.h
index 027f2e886..bb52dc4a0 100644
--- a/freetype/include/freetype/ftotval.h
+++ b/freetype/include/ftotval.h
@@ -4,7 +4,7 @@
/* */
/* FreeType API for validating OpenType tables (specification). */
/* */
-/* Copyright 2004, 2005, 2006, 2007 by */
+/* Copyright 2004-2007, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -116,7 +116,7 @@ FT_BEGIN_HEADER
*
* @description:
* Validate various OpenType tables to assure that all offsets and
- * indices are valid. The idea is that a higher-level library which
+ * indices are valid. The idea is that a higher-level library that
* actually does the text layout can access those tables without
* error checking (which can be quite time consuming).
*
@@ -125,7 +125,7 @@ FT_BEGIN_HEADER
* A handle to the input face.
*
* validation_flags ::
- * A bit field which specifies the tables to be validated. See
+ * A bit field that specifies the tables to be validated. See
* @FT_VALIDATE_OTXXX for possible values.
*
* @output:
diff --git a/freetype/include/freetype/ftoutln.h b/freetype/include/ftoutln.h
index fd69f2829..6c6d3f94b 100644
--- a/freetype/include/freetype/ftoutln.h
+++ b/freetype/include/ftoutln.h
@@ -5,7 +5,7 @@
/* Support for the FT_Outline type used to store glyph shapes of */
/* most scalable font formats (specification). */
/* */
-/* Copyright 1996-2003, 2005-2012 by */
+/* Copyright 1996-2003, 2005-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -97,7 +97,7 @@ FT_BEGIN_HEADER
/* operations. */
/* */
/* <InOut> */
- /* user :: A typeless pointer which is passed to each */
+ /* user :: A typeless pointer that is passed to each */
/* emitter during the decomposition. It can be */
/* used to store the state during the */
/* decomposition. */
@@ -105,6 +105,13 @@ FT_BEGIN_HEADER
/* <Return> */
/* FreeType error code. 0~means success. */
/* */
+ /* <Note> */
+ /* A contour that contains a single point only is represented by a */
+ /* `move to' operation followed by `line to' to the same point. In */
+ /* most cases, it is best to filter this out before using the */
+ /* outline for stroking purposes (otherwise it would result in a */
+ /* visible dot when round caps are used). */
+ /* */
FT_EXPORT( FT_Error )
FT_Outline_Decompose( FT_Outline* outline,
const FT_Outline_Funcs* func_interface,
@@ -217,12 +224,12 @@ FT_BEGIN_HEADER
/* the outline's points, including Bézier control points. Though it */
/* coincides with the exact bounding box for most glyphs, it can be */
/* slightly larger in some situations (like when rotating an outline */
- /* which contains Bézier outside arcs). */
+ /* that contains Bézier outside arcs). */
/* */
/* Computing the control box is very fast, while getting the bounding */
/* box can take much more time as it needs to walk over all segments */
/* and arcs in the outline. To get the latter, you can use the */
- /* `ftbbox' component which is dedicated to this single task. */
+ /* `ftbbox' component, which is dedicated to this single task. */
/* */
/* <Input> */
/* outline :: A pointer to the source outline descriptor. */
@@ -348,6 +355,9 @@ FT_BEGIN_HEADER
/* FT_Outline_Embolden( &face->slot->outline, strength ); */
/* } */
/* */
+ /* To get meaningful results, font scaling values must be set with */
+ /* functions like @FT_Set_Char_Size before calling FT_Render_Glyph. */
+ /* */
FT_EXPORT( FT_Error )
FT_Outline_Embolden( FT_Outline* outline,
FT_Pos strength );
@@ -525,9 +535,11 @@ FT_BEGIN_HEADER
*
* @description:
* This function analyzes a glyph outline and tries to compute its
- * fill orientation (see @FT_Orientation). This is done by computing
- * the direction of each global horizontal and/or vertical extrema
- * within the outline.
+ * fill orientation (see @FT_Orientation). This is done by integrating
+ * the total area covered by the outline. The positive integral
+ * corresponds to the clockwise orientation and @FT_ORIENTATION_POSTSCRIPT
+ * is returned. The negative integral corresponds to the counter-clockwise
+ * orientation and @FT_ORIENTATION_TRUETYPE is returned.
*
* Note that this will return @FT_ORIENTATION_TRUETYPE for empty
* outlines.
diff --git a/freetype/include/freetype/ftpfr.h b/freetype/include/ftpfr.h
index 0b7b7d427..0b7b7d427 100644
--- a/freetype/include/freetype/ftpfr.h
+++ b/freetype/include/ftpfr.h
diff --git a/freetype/include/freetype/ftrender.h b/freetype/include/ftrender.h
index dd0229b81..dd0229b81 100644
--- a/freetype/include/freetype/ftrender.h
+++ b/freetype/include/ftrender.h
diff --git a/freetype/include/freetype/ftsizes.h b/freetype/include/ftsizes.h
index 3e548cc39..416704570 100644
--- a/freetype/include/freetype/ftsizes.h
+++ b/freetype/include/ftsizes.h
@@ -4,7 +4,7 @@
/* */
/* FreeType size objects management (specification). */
/* */
-/* Copyright 1996-2001, 2003, 2004, 2006, 2009 by */
+/* Copyright 1996-2001, 2003, 2004, 2006, 2009, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -129,7 +129,7 @@ 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 one which has been */
+ /* @FT_Load_Glyph or @FT_Load_Char only use the one that has been */
/* activated last to determine the `current character pixel size'. */
/* */
/* This function can be used to `activate' a previously created size */
diff --git a/freetype/include/freetype/ftsnames.h b/freetype/include/ftsnames.h
index 485e4e162..88af44035 100644
--- a/freetype/include/freetype/ftsnames.h
+++ b/freetype/include/ftsnames.h
@@ -7,7 +7,7 @@
/* */
/* This is _not_ used to retrieve glyph names! */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2006, 2009, 2010 by */
+/* Copyright 1996-2003, 2006, 2009, 2010, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -169,7 +169,7 @@ FT_BEGIN_HEADER
* 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.
+ * legacy systems that have a 4-face-per-family restriction.
*
*/
#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY FT_MAKE_TAG( 'i', 'g', 'p', 'f' )
@@ -184,7 +184,7 @@ FT_BEGIN_HEADER
* 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.
+ * systems that have a 4-face-per-family restriction.
*
*/
#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY FT_MAKE_TAG( 'i', 'g', 'p', 's' )
diff --git a/freetype/include/freetype/ftstroke.h b/freetype/include/ftstroke.h
index a498e4a88..a498e4a88 100644
--- a/freetype/include/freetype/ftstroke.h
+++ b/freetype/include/ftstroke.h
diff --git a/freetype/include/freetype/ftsynth.h b/freetype/include/ftsynth.h
index 2074503cf..839ab5e40 100644
--- a/freetype/include/freetype/ftsynth.h
+++ b/freetype/include/ftsynth.h
@@ -5,7 +5,7 @@
/* FreeType synthesizing code for emboldening and slanting */
/* (specification). */
/* */
-/* Copyright 2000-2001, 2003, 2006, 2008, 2012 by */
+/* Copyright 2000-2001, 2003, 2006, 2008, 2012, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -37,7 +37,7 @@
/* Main reason for not lifting the functions in this module to a */
/* `standard' API is that the used parameters for emboldening and */
/* slanting are not configurable. Consider the functions as a */
- /* code resource which should be copied into the application and */
+ /* code resource that should be copied into the application and */
/* adapted to the particular needs. */
diff --git a/freetype/include/freetype/ftsystem.h b/freetype/include/ftsystem.h
index e07460c55..e07460c55 100644
--- a/freetype/include/freetype/ftsystem.h
+++ b/freetype/include/ftsystem.h
diff --git a/freetype/include/freetype/fttrigon.h b/freetype/include/fttrigon.h
index 65143cb8c..65143cb8c 100644
--- a/freetype/include/freetype/fttrigon.h
+++ b/freetype/include/fttrigon.h
diff --git a/freetype/include/freetype/ftttdrv.h b/freetype/include/ftttdrv.h
index d5d3f1ccc..70ad3d583 100644
--- a/freetype/include/freetype/ftttdrv.h
+++ b/freetype/include/ftttdrv.h
@@ -61,7 +61,7 @@ FT_BEGIN_HEADER
* interpreter-version
*
* @description:
- * Currently, two versions are available which represent the bytecode
+ * Currently, two versions are available, representing the bytecode
* interpreter with and without subpixel hinting support,
* respectively. The default is subpixel support if
* TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined, and no subpixel
@@ -134,6 +134,26 @@ FT_BEGIN_HEADER
* FT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version~38 causes an
* `FT_Err_Unimplemented_Feature' error.
*
+ * Depending on the graphics framework, Microsoft uses different
+ * bytecode engines. As a consequence, the version numbers returned by
+ * a call to the `GETINFO[1]' bytecode instruction are more convoluted
+ * than desired.
+ *
+ * {
+ * framework Windows version result of GETINFO[1]
+ * ----------------------------------------------------
+ * GDI before XP 35
+ * GDI XP and later 37
+ * GDI+ old before Vista 37
+ * GDI+ old Vista, 7 38
+ * GDI+ after 7 40
+ * DWrite before 8 39
+ * DWrite 8 and later 40
+ * }
+ *
+ * Since FreeType doesn't provide all capabilities of DWrite ClearType,
+ * using version~38 seems justified.
+ *
*/
#define TT_INTERPRETER_VERSION_35 35
#define TT_INTERPRETER_VERSION_38 38
diff --git a/freetype/include/freetype/fttypes.h b/freetype/include/fttypes.h
index 027e59ce1..bd944a493 100644
--- a/freetype/include/freetype/fttypes.h
+++ b/freetype/include/fttypes.h
@@ -418,7 +418,7 @@ FT_BEGIN_HEADER
/* details of usage. */
/* */
/* <Input> */
- /* The address of the FreeType object which is under finalization. */
+ /* The address of the FreeType object that is under finalization. */
/* Its client data is accessed through its `generic' field. */
/* */
typedef void (*FT_Generic_Finalizer)(void* object);
@@ -466,8 +466,8 @@ FT_BEGIN_HEADER
/* FT_MAKE_TAG */
/* */
/* <Description> */
- /* This macro converts four-letter tags which are used to label */
- /* TrueType tables into an unsigned long to be used within FreeType. */
+ /* This macro converts four-letter tags that are used to label */
+ /* TrueType tables into an unsigned long, to be used within FreeType. */
/* */
/* <Note> */
/* The produced values *must* be 32-bit integers. Don't redefine */
diff --git a/freetype/include/freetype/ftwinfnt.h b/freetype/include/ftwinfnt.h
index ea3335353..0b6735179 100644
--- a/freetype/include/freetype/ftwinfnt.h
+++ b/freetype/include/ftwinfnt.h
@@ -58,9 +58,10 @@ FT_BEGIN_HEADER
* @description:
* A list of valid values for the `charset' byte in
* @FT_WinFNT_HeaderRec. Exact mapping tables for the various cpXXXX
- * encodings (except for cp1361) can be found at ftp://ftp.unicode.org
- * in the MAPPINGS/VENDORS/MICSFT/WINDOWS subdirectory. cp1361 is
- * roughly a superset of MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.
+ * encodings (except for cp1361) can be found at
+ * ftp://ftp.unicode.org/public in the MAPPINGS/VENDORS/MICSFT/WINDOWS
+ * subdirectory. cp1361 is roughly a superset of
+ * MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.
*
* @values:
* FT_WinFNT_ID_DEFAULT ::
diff --git a/freetype/include/freetype/ftxf86.h b/freetype/include/ftxf86.h
index 8c68afdcc..493cccdd0 100644
--- a/freetype/include/freetype/ftxf86.h
+++ b/freetype/include/ftxf86.h
@@ -4,7 +4,7 @@
/* */
/* Support functions for X11. */
/* */
-/* Copyright 2002, 2003, 2004, 2006, 2007 by */
+/* Copyright 2002-2004, 2006, 2007, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -62,7 +62,7 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* Return a string describing the format of a given face, using values */
- /* which can be used as an X11 FONT_PROPERTY. Possible values are */
+ /* that can be used as an X11 FONT_PROPERTY. Possible values are */
/* `TrueType', `Type~1', `BDF', `PCF', `Type~42', `CID~Type~1', `CFF', */
/* `PFR', and `Windows~FNT'. */
/* */
diff --git a/freetype/include/freetype/internal/autohint.h b/freetype/include/internal/autohint.h
index 545de938c..545de938c 100644
--- a/freetype/include/freetype/internal/autohint.h
+++ b/freetype/include/internal/autohint.h
diff --git a/freetype/include/freetype/internal/ftcalc.h b/freetype/include/internal/ftcalc.h
index faac3a386..03bd68eb1 100644
--- a/freetype/include/freetype/internal/ftcalc.h
+++ b/freetype/include/internal/ftcalc.h
@@ -27,10 +27,12 @@
FT_BEGIN_HEADER
+#if 0
+
/*************************************************************************/
/* */
/* <Function> */
- /* FT_FixedSqrt */
+ /* FT_SqrtFixed */
/* */
/* <Description> */
/* Computes the square root of a 16.16 fixed-point value. */
@@ -47,6 +49,8 @@ FT_BEGIN_HEADER
FT_BASE( FT_Int32 )
FT_SqrtFixed( FT_Int32 x );
+#endif /* 0 */
+
/*************************************************************************/
/* */
diff --git a/freetype/include/freetype/internal/ftdebug.h b/freetype/include/internal/ftdebug.h
index 58a3916d7..58a3916d7 100644
--- a/freetype/include/freetype/internal/ftdebug.h
+++ b/freetype/include/internal/ftdebug.h
diff --git a/freetype/include/freetype/internal/ftdriver.h b/freetype/include/internal/ftdriver.h
index 940218e62..940218e62 100644
--- a/freetype/include/freetype/internal/ftdriver.h
+++ b/freetype/include/internal/ftdriver.h
diff --git a/freetype/include/freetype/internal/ftgloadr.h b/freetype/include/internal/ftgloadr.h
index ce4dc6c9c..ce4dc6c9c 100644
--- a/freetype/include/freetype/internal/ftgloadr.h
+++ b/freetype/include/internal/ftgloadr.h
diff --git a/freetype/include/freetype/internal/ftmemory.h b/freetype/include/internal/ftmemory.h
index 3d51aeec6..3d51aeec6 100644
--- a/freetype/include/freetype/internal/ftmemory.h
+++ b/freetype/include/internal/ftmemory.h
diff --git a/freetype/include/freetype/internal/ftobjs.h b/freetype/include/internal/ftobjs.h
index 701c850eb..701c850eb 100644
--- a/freetype/include/freetype/internal/ftobjs.h
+++ b/freetype/include/internal/ftobjs.h
diff --git a/freetype/include/freetype/internal/ftpic.h b/freetype/include/internal/ftpic.h
index 485ce7a24..485ce7a24 100644
--- a/freetype/include/freetype/internal/ftpic.h
+++ b/freetype/include/internal/ftpic.h
diff --git a/freetype/include/freetype/internal/ftrfork.h b/freetype/include/internal/ftrfork.h
index 6307f2d0c..d750cbefd 100644
--- a/freetype/include/freetype/internal/ftrfork.h
+++ b/freetype/include/internal/ftrfork.h
@@ -4,7 +4,7 @@
/* */
/* Embedded resource forks accessor (specification). */
/* */
-/* Copyright 2004, 2006, 2007, 2012 by */
+/* Copyright 2004, 2006, 2007, 2012, 2013 by */
/* Masatake YAMATO and Redhat K.K. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -94,7 +94,7 @@ FT_BEGIN_HEADER
/* this array is a function in PIC mode, so no ; is needed in END */
#define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type ) \
void \
- FT_Init_ ## name( type* storage ) \
+ FT_Init_Table_ ## name( type* storage ) \
{ \
type* local = storage; \
\
@@ -224,6 +224,13 @@ FT_BEGIN_HEADER
/* tag :: */
/* The resource tag. */
/* */
+ /* sort_by_res_id :: */
+ /* A Boolean to sort the fragmented resource by their ids. */
+ /* The fragmented resources for `POST' resource should be sorted */
+ /* to restore Type1 font properly. For `snft' resources, sorting */
+ /* may induce a different order of the faces in comparison to that */
+ /* by QuickDraw API. */
+ /* */
/* <Output> */
/* offsets :: */
/* The stream offsets for the resource data specified by `tag'. */
@@ -246,6 +253,7 @@ FT_BEGIN_HEADER
FT_Long map_offset,
FT_Long rdata_pos,
FT_Long tag,
+ FT_Bool sort_by_res_id,
FT_Long **offsets,
FT_Long *count );
diff --git a/freetype/include/freetype/internal/ftserv.h b/freetype/include/internal/ftserv.h
index cd5fbd0fa..1203ec812 100644
--- a/freetype/include/freetype/internal/ftserv.h
+++ b/freetype/include/internal/ftserv.h
@@ -734,24 +734,24 @@ FT_BEGIN_HEADER
* The header files containing the services.
*/
-#define FT_SERVICE_BDF_H <freetype/internal/services/svbdf.h>
-#define FT_SERVICE_CID_H <freetype/internal/services/svcid.h>
-#define FT_SERVICE_GLYPH_DICT_H <freetype/internal/services/svgldict.h>
-#define FT_SERVICE_GX_VALIDATE_H <freetype/internal/services/svgxval.h>
-#define FT_SERVICE_KERNING_H <freetype/internal/services/svkern.h>
-#define FT_SERVICE_MULTIPLE_MASTERS_H <freetype/internal/services/svmm.h>
-#define FT_SERVICE_OPENTYPE_VALIDATE_H <freetype/internal/services/svotval.h>
-#define FT_SERVICE_PFR_H <freetype/internal/services/svpfr.h>
-#define FT_SERVICE_POSTSCRIPT_CMAPS_H <freetype/internal/services/svpscmap.h>
-#define FT_SERVICE_POSTSCRIPT_INFO_H <freetype/internal/services/svpsinfo.h>
-#define FT_SERVICE_POSTSCRIPT_NAME_H <freetype/internal/services/svpostnm.h>
-#define FT_SERVICE_PROPERTIES_H <freetype/internal/services/svprop.h>
-#define FT_SERVICE_SFNT_H <freetype/internal/services/svsfnt.h>
-#define FT_SERVICE_TRUETYPE_ENGINE_H <freetype/internal/services/svtteng.h>
-#define FT_SERVICE_TT_CMAP_H <freetype/internal/services/svttcmap.h>
-#define FT_SERVICE_WINFNT_H <freetype/internal/services/svwinfnt.h>
-#define FT_SERVICE_XFREE86_NAME_H <freetype/internal/services/svxf86nm.h>
-#define FT_SERVICE_TRUETYPE_GLYF_H <freetype/internal/services/svttglyf.h>
+#define FT_SERVICE_BDF_H <internal/services/svbdf.h>
+#define FT_SERVICE_CID_H <internal/services/svcid.h>
+#define FT_SERVICE_GLYPH_DICT_H <internal/services/svgldict.h>
+#define FT_SERVICE_GX_VALIDATE_H <internal/services/svgxval.h>
+#define FT_SERVICE_KERNING_H <internal/services/svkern.h>
+#define FT_SERVICE_MULTIPLE_MASTERS_H <internal/services/svmm.h>
+#define FT_SERVICE_OPENTYPE_VALIDATE_H <internal/services/svotval.h>
+#define FT_SERVICE_PFR_H <internal/services/svpfr.h>
+#define FT_SERVICE_POSTSCRIPT_CMAPS_H <internal/services/svpscmap.h>
+#define FT_SERVICE_POSTSCRIPT_INFO_H <internal/services/svpsinfo.h>
+#define FT_SERVICE_POSTSCRIPT_NAME_H <internal/services/svpostnm.h>
+#define FT_SERVICE_PROPERTIES_H <internal/services/svprop.h>
+#define FT_SERVICE_SFNT_H <internal/services/svsfnt.h>
+#define FT_SERVICE_TRUETYPE_ENGINE_H <internal/services/svtteng.h>
+#define FT_SERVICE_TT_CMAP_H <internal/services/svttcmap.h>
+#define FT_SERVICE_WINFNT_H <internal/services/svwinfnt.h>
+#define FT_SERVICE_XFREE86_NAME_H <internal/services/svxf86nm.h>
+#define FT_SERVICE_TRUETYPE_GLYF_H <internal/services/svttglyf.h>
/* */
diff --git a/freetype/include/freetype/internal/ftstream.h b/freetype/include/internal/ftstream.h
index 266185832..266185832 100644
--- a/freetype/include/freetype/internal/ftstream.h
+++ b/freetype/include/internal/ftstream.h
diff --git a/freetype/include/freetype/internal/fttrace.h b/freetype/include/internal/fttrace.h
index a9d98b60a..d5253db78 100644
--- a/freetype/include/freetype/internal/fttrace.h
+++ b/freetype/include/internal/fttrace.h
@@ -4,7 +4,7 @@
/* */
/* Tracing handling (specification only). */
/* */
-/* Copyright 2002, 2004-2007, 2009, 2011-2013 by */
+/* Copyright 2002, 2004-2007, 2009, 2011-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -148,5 +148,7 @@ FT_TRACE_DEF( afcjk )
FT_TRACE_DEF( aflatin )
FT_TRACE_DEF( aflatin2 )
FT_TRACE_DEF( afwarp )
+FT_TRACE_DEF( afharfbuzz )
+FT_TRACE_DEF( afglobal )
/* END */
diff --git a/freetype/include/freetype/internal/ftvalid.h b/freetype/include/internal/ftvalid.h
index 12ad03685..12ad03685 100644
--- a/freetype/include/freetype/internal/ftvalid.h
+++ b/freetype/include/internal/ftvalid.h
diff --git a/freetype/include/freetype/internal/internal.h b/freetype/include/internal/internal.h
index 262afcfa8..e0ddb06b7 100644
--- a/freetype/include/freetype/internal/internal.h
+++ b/freetype/include/internal/internal.h
@@ -24,28 +24,28 @@
/*************************************************************************/
-#define FT_INTERNAL_OBJECTS_H <freetype/internal/ftobjs.h>
-#define FT_INTERNAL_PIC_H <freetype/internal/ftpic.h>
-#define FT_INTERNAL_STREAM_H <freetype/internal/ftstream.h>
-#define FT_INTERNAL_MEMORY_H <freetype/internal/ftmemory.h>
-#define FT_INTERNAL_DEBUG_H <freetype/internal/ftdebug.h>
-#define FT_INTERNAL_CALC_H <freetype/internal/ftcalc.h>
-#define FT_INTERNAL_DRIVER_H <freetype/internal/ftdriver.h>
-#define FT_INTERNAL_TRACE_H <freetype/internal/fttrace.h>
-#define FT_INTERNAL_GLYPH_LOADER_H <freetype/internal/ftgloadr.h>
-#define FT_INTERNAL_SFNT_H <freetype/internal/sfnt.h>
-#define FT_INTERNAL_SERVICE_H <freetype/internal/ftserv.h>
-#define FT_INTERNAL_RFORK_H <freetype/internal/ftrfork.h>
-#define FT_INTERNAL_VALIDATE_H <freetype/internal/ftvalid.h>
-
-#define FT_INTERNAL_TRUETYPE_TYPES_H <freetype/internal/tttypes.h>
-#define FT_INTERNAL_TYPE1_TYPES_H <freetype/internal/t1types.h>
-
-#define FT_INTERNAL_POSTSCRIPT_AUX_H <freetype/internal/psaux.h>
-#define FT_INTERNAL_POSTSCRIPT_HINTS_H <freetype/internal/pshints.h>
-#define FT_INTERNAL_POSTSCRIPT_GLOBALS_H <freetype/internal/psglobal.h>
-
-#define FT_INTERNAL_AUTOHINT_H <freetype/internal/autohint.h>
+#define FT_INTERNAL_OBJECTS_H <internal/ftobjs.h>
+#define FT_INTERNAL_PIC_H <internal/ftpic.h>
+#define FT_INTERNAL_STREAM_H <internal/ftstream.h>
+#define FT_INTERNAL_MEMORY_H <internal/ftmemory.h>
+#define FT_INTERNAL_DEBUG_H <internal/ftdebug.h>
+#define FT_INTERNAL_CALC_H <internal/ftcalc.h>
+#define FT_INTERNAL_DRIVER_H <internal/ftdriver.h>
+#define FT_INTERNAL_TRACE_H <internal/fttrace.h>
+#define FT_INTERNAL_GLYPH_LOADER_H <internal/ftgloadr.h>
+#define FT_INTERNAL_SFNT_H <internal/sfnt.h>
+#define FT_INTERNAL_SERVICE_H <internal/ftserv.h>
+#define FT_INTERNAL_RFORK_H <internal/ftrfork.h>
+#define FT_INTERNAL_VALIDATE_H <internal/ftvalid.h>
+
+#define FT_INTERNAL_TRUETYPE_TYPES_H <internal/tttypes.h>
+#define FT_INTERNAL_TYPE1_TYPES_H <internal/t1types.h>
+
+#define FT_INTERNAL_POSTSCRIPT_AUX_H <internal/psaux.h>
+#define FT_INTERNAL_POSTSCRIPT_HINTS_H <internal/pshints.h>
+#define FT_INTERNAL_POSTSCRIPT_GLOBALS_H <internal/psglobal.h>
+
+#define FT_INTERNAL_AUTOHINT_H <internal/autohint.h>
#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */
diff --git a/freetype/include/freetype/internal/psaux.h b/freetype/include/internal/psaux.h
index e903114f8..e903114f8 100644
--- a/freetype/include/freetype/internal/psaux.h
+++ b/freetype/include/internal/psaux.h
diff --git a/freetype/include/freetype/internal/pshints.h b/freetype/include/internal/pshints.h
index 3fb18dc2d..3fb18dc2d 100644
--- a/freetype/include/freetype/internal/pshints.h
+++ b/freetype/include/internal/pshints.h
diff --git a/freetype/include/freetype/internal/services/svbdf.h b/freetype/include/internal/services/svbdf.h
index 0974752a7..0974752a7 100644
--- a/freetype/include/freetype/internal/services/svbdf.h
+++ b/freetype/include/internal/services/svbdf.h
diff --git a/freetype/include/freetype/internal/services/svcid.h b/freetype/include/internal/services/svcid.h
index 6be3f9374..6be3f9374 100644
--- a/freetype/include/freetype/internal/services/svcid.h
+++ b/freetype/include/internal/services/svcid.h
diff --git a/freetype/include/freetype/internal/services/svgldict.h b/freetype/include/internal/services/svgldict.h
index 1d1253472..1d1253472 100644
--- a/freetype/include/freetype/internal/services/svgldict.h
+++ b/freetype/include/internal/services/svgldict.h
diff --git a/freetype/include/freetype/internal/services/svgxval.h b/freetype/include/internal/services/svgxval.h
index 2cdab5065..2cdab5065 100644
--- a/freetype/include/freetype/internal/services/svgxval.h
+++ b/freetype/include/internal/services/svgxval.h
diff --git a/freetype/include/freetype/internal/services/svkern.h b/freetype/include/internal/services/svkern.h
index 1488adf49..1488adf49 100644
--- a/freetype/include/freetype/internal/services/svkern.h
+++ b/freetype/include/internal/services/svkern.h
diff --git a/freetype/include/freetype/internal/services/svmm.h b/freetype/include/internal/services/svmm.h
index b08a663d6..b08a663d6 100644
--- a/freetype/include/freetype/internal/services/svmm.h
+++ b/freetype/include/internal/services/svmm.h
diff --git a/freetype/include/freetype/internal/services/svotval.h b/freetype/include/internal/services/svotval.h
index 970bbd575..970bbd575 100644
--- a/freetype/include/freetype/internal/services/svotval.h
+++ b/freetype/include/internal/services/svotval.h
diff --git a/freetype/include/freetype/internal/services/svpfr.h b/freetype/include/internal/services/svpfr.h
index 462786f9c..462786f9c 100644
--- a/freetype/include/freetype/internal/services/svpfr.h
+++ b/freetype/include/internal/services/svpfr.h
diff --git a/freetype/include/freetype/internal/services/svpostnm.h b/freetype/include/internal/services/svpostnm.h
index a76b4fe05..a76b4fe05 100644
--- a/freetype/include/freetype/internal/services/svpostnm.h
+++ b/freetype/include/internal/services/svpostnm.h
diff --git a/freetype/include/freetype/internal/services/svprop.h b/freetype/include/internal/services/svprop.h
index 22da0bbc6..22da0bbc6 100644
--- a/freetype/include/freetype/internal/services/svprop.h
+++ b/freetype/include/internal/services/svprop.h
diff --git a/freetype/include/freetype/internal/services/svpscmap.h b/freetype/include/internal/services/svpscmap.h
index 030948ea6..030948ea6 100644
--- a/freetype/include/freetype/internal/services/svpscmap.h
+++ b/freetype/include/internal/services/svpscmap.h
diff --git a/freetype/include/freetype/internal/services/svpsinfo.h b/freetype/include/internal/services/svpsinfo.h
index 4bfb50671..4bfb50671 100644
--- a/freetype/include/freetype/internal/services/svpsinfo.h
+++ b/freetype/include/internal/services/svpsinfo.h
diff --git a/freetype/include/freetype/internal/services/svsfnt.h b/freetype/include/internal/services/svsfnt.h
index d3835aa1c..d3835aa1c 100644
--- a/freetype/include/freetype/internal/services/svsfnt.h
+++ b/freetype/include/internal/services/svsfnt.h
diff --git a/freetype/include/freetype/internal/services/svttcmap.h b/freetype/include/internal/services/svttcmap.h
index 83994aaf8..4370f4c2d 100644
--- a/freetype/include/freetype/internal/services/svttcmap.h
+++ b/freetype/include/internal/services/svttcmap.h
@@ -7,7 +7,7 @@
/* Copyright 2003 by */
/* Masatake YAMATO, Redhat K.K. */
/* */
-/* Copyright 2003, 2008, 2009, 2012 by */
+/* Copyright 2003, 2008, 2009, 2012, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -47,7 +47,7 @@ FT_BEGIN_HEADER
/* <Fields> */
/* language :: */
/* The language ID used in Mac fonts. Definitions of values are in */
- /* freetype/ttnameid.h. */
+ /* `ttnameid.h'. */
/* */
/* format :: */
/* The cmap format. OpenType 1.5 defines the formats 0 (byte */
diff --git a/freetype/include/freetype/internal/services/svtteng.h b/freetype/include/internal/services/svtteng.h
index 58e02a6f9..58e02a6f9 100644
--- a/freetype/include/freetype/internal/services/svtteng.h
+++ b/freetype/include/internal/services/svtteng.h
diff --git a/freetype/include/freetype/internal/services/svttglyf.h b/freetype/include/internal/services/svttglyf.h
index 369eb8421..369eb8421 100644
--- a/freetype/include/freetype/internal/services/svttglyf.h
+++ b/freetype/include/internal/services/svttglyf.h
diff --git a/freetype/include/freetype/internal/services/svwinfnt.h b/freetype/include/internal/services/svwinfnt.h
index 57f7765d9..57f7765d9 100644
--- a/freetype/include/freetype/internal/services/svwinfnt.h
+++ b/freetype/include/internal/services/svwinfnt.h
diff --git a/freetype/include/freetype/internal/services/svxf86nm.h b/freetype/include/internal/services/svxf86nm.h
index ca5d884a8..ca5d884a8 100644
--- a/freetype/include/freetype/internal/services/svxf86nm.h
+++ b/freetype/include/internal/services/svxf86nm.h
diff --git a/freetype/include/freetype/internal/sfnt.h b/freetype/include/internal/sfnt.h
index 6b5e41f1a..6b5e41f1a 100644
--- a/freetype/include/freetype/internal/sfnt.h
+++ b/freetype/include/internal/sfnt.h
diff --git a/freetype/include/freetype/internal/t1types.h b/freetype/include/internal/t1types.h
index e20237c14..e20237c14 100644
--- a/freetype/include/freetype/internal/t1types.h
+++ b/freetype/include/internal/t1types.h
diff --git a/freetype/include/freetype/internal/tttypes.h b/freetype/include/internal/tttypes.h
index 1bbfe499c..ad302b87c 100644
--- a/freetype/include/freetype/internal/tttypes.h
+++ b/freetype/include/internal/tttypes.h
@@ -140,6 +140,75 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Struct> */
+ /* WOFF_HeaderRec */
+ /* */
+ /* <Description> */
+ /* WOFF file format header. */
+ /* */
+ /* <Fields> */
+ /* See */
+ /* */
+ /* http://www.w3.org/TR/WOFF/#WOFFHeader */
+ /* */
+ typedef struct WOFF_HeaderRec_
+ {
+ FT_ULong signature;
+ FT_ULong flavor;
+ FT_ULong length;
+ FT_UShort num_tables;
+ FT_UShort reserved;
+ FT_ULong totalSfntSize;
+ FT_UShort majorVersion;
+ FT_UShort minorVersion;
+ FT_ULong metaOffset;
+ FT_ULong metaLength;
+ FT_ULong metaOrigLength;
+ FT_ULong privOffset;
+ FT_ULong privLength;
+
+ } WOFF_HeaderRec, *WOFF_Header;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Struct> */
+ /* WOFF_TableRec */
+ /* */
+ /* <Description> */
+ /* This structure describes a given table of a WOFF font. */
+ /* */
+ /* <Fields> */
+ /* Tag :: A four-bytes tag describing the table. */
+ /* */
+ /* Offset :: The offset of the table from the start of the WOFF */
+ /* font in its resource. */
+ /* */
+ /* CompLength :: Compressed table length (in bytes). */
+ /* */
+ /* OrigLength :: Unompressed table length (in bytes). */
+ /* */
+ /* CheckSum :: The table checksum. This value can be ignored. */
+ /* */
+ /* OrigOffset :: The uncompressed table file offset. This value gets */
+ /* computed while constructing the (uncompressed) SFNT */
+ /* header. It is not contained in the WOFF file. */
+ /* */
+ typedef struct WOFF_TableRec_
+ {
+ FT_ULong Tag; /* table ID */
+ FT_ULong Offset; /* table file offset */
+ FT_ULong CompLength; /* compressed table length */
+ FT_ULong OrigLength; /* uncompressed table length */
+ FT_ULong CheckSum; /* uncompressed checksum */
+
+ FT_ULong OrigOffset; /* uncompressed table file offset */
+ /* (not in the WOFF file) */
+ } WOFF_TableRec, *WOFF_Table;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Struct> */
/* TT_LongMetricsRec */
/* */
/* <Description> */
@@ -353,16 +422,16 @@ FT_BEGIN_HEADER
/* */
typedef struct TT_SBit_MetricsRec_
{
- FT_Byte height;
- FT_Byte width;
+ FT_UShort height;
+ FT_UShort width;
- FT_Char horiBearingX;
- FT_Char horiBearingY;
- FT_Byte horiAdvance;
+ FT_Short horiBearingX;
+ FT_Short horiBearingY;
+ FT_UShort horiAdvance;
- FT_Char vertBearingX;
- FT_Char vertBearingY;
- FT_Byte vertAdvance;
+ FT_Short vertBearingX;
+ FT_Short vertBearingY;
+ FT_UShort vertAdvance;
} TT_SBit_MetricsRec, *TT_SBit_Metrics;
@@ -979,6 +1048,20 @@ FT_BEGIN_HEADER
(*TT_Loader_EndGlyphFunc)( TT_Loader loader );
+ typedef enum TT_SbitTableType_
+ {
+ TT_SBIT_TABLE_TYPE_NONE = 0,
+ TT_SBIT_TABLE_TYPE_EBLC, /* `EBLC' (Microsoft), */
+ /* `bloc' (Apple) */
+ TT_SBIT_TABLE_TYPE_CBLC, /* `CBLC' (Google) */
+ TT_SBIT_TABLE_TYPE_SBIX, /* `sbix' (Apple) */
+
+ /* do not remove */
+ TT_SBIT_TABLE_TYPE_MAX
+
+ } TT_SbitTableType;
+
+
/*************************************************************************/
/* */
/* TrueType Face Type */
@@ -1090,13 +1173,6 @@ FT_BEGIN_HEADER
/* */
/* pclt :: The `pclt' SFNT table. */
/* */
- /* num_sbit_strikes :: The number of sbit strikes, i.e., bitmap */
- /* sizes, embedded in this font. */
- /* */
- /* sbit_strikes :: An array of sbit strikes embedded in this */
- /* font. This table is optional in a */
- /* TrueType/OpenType font. */
- /* */
/* num_sbit_scales :: The number of sbit scales for this font. */
/* */
/* sbit_scales :: Array of sbit scales embedded in this */
@@ -1302,6 +1378,7 @@ FT_BEGIN_HEADER
FT_Byte* sbit_table;
FT_ULong sbit_table_size;
+ TT_SbitTableType sbit_table_type;
FT_UInt sbit_num_strikes;
FT_Byte* kern_table;
@@ -1402,7 +1479,6 @@ FT_BEGIN_HEADER
FT_Int advance;
FT_Int linear;
FT_Bool linear_def;
- FT_Bool preserve_pps;
FT_Vector pp1;
FT_Vector pp2;
diff --git a/freetype/include/freetype/t1tables.h b/freetype/include/t1tables.h
index a14255e5f..a14255e5f 100644
--- a/freetype/include/freetype/t1tables.h
+++ b/freetype/include/t1tables.h
diff --git a/freetype/include/freetype/ttnameid.h b/freetype/include/ttnameid.h
index 173f88c95..9711d1d94 100644
--- a/freetype/include/freetype/ttnameid.h
+++ b/freetype/include/ttnameid.h
@@ -4,7 +4,7 @@
/* */
/* TrueType name ID definitions (specification only). */
/* */
-/* Copyright 1996-2004, 2006-2008, 2012 by */
+/* Copyright 1996-2004, 2006-2008, 2012, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -1208,7 +1208,7 @@ FT_BEGIN_HEADER
/* */
/* Here some alias #defines in order to be clearer. */
/* */
- /* These are not always #defined to stay within the 31~character limit */
+ /* These are not always #defined to stay within the 31~character limit, */
/* which some compilers have. */
/* */
/* Credits go to Dave Hoo <dhoo@flash.net> for pointing out that modern */
diff --git a/freetype/include/freetype/tttables.h b/freetype/include/tttables.h
index fe07117b0..bb49dc0da 100644
--- a/freetype/include/freetype/tttables.h
+++ b/freetype/include/tttables.h
@@ -5,7 +5,7 @@
/* Basic SFNT/TrueType tables definitions and interface */
/* (specification only). */
/* */
-/* Copyright 1996-2005, 2008-2012 by */
+/* Copyright 1996-2005, 2008-2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -170,8 +170,8 @@ FT_BEGIN_HEADER
/* */
/* <Note> */
/* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */
- /* be identical except for the names of their fields which */
- /* are different. */
+ /* be identical except for the names of their fields, */
+ /* which are different. */
/* */
/* This ensures that a single function in the `ttload' */
/* module is able to read both the horizontal and vertical */
@@ -296,8 +296,8 @@ FT_BEGIN_HEADER
/* */
/* <Note> */
/* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */
- /* be identical except for the names of their fields which */
- /* are different. */
+ /* be identical except for the names of their fields, */
+ /* which are different. */
/* */
/* This ensures that a single function in the `ttload' */
/* module is able to read both the horizontal and vertical */
@@ -340,12 +340,11 @@ FT_BEGIN_HEADER
/* TT_OS2 */
/* */
/* <Description> */
- /* A structure used to model a TrueType OS/2 table. This is the long */
- /* table version. All fields comply to the TrueType specification. */
+ /* A structure used to model a TrueType OS/2 table. All fields */
+ /* comply to the OpenType specification. */
/* */
- /* Note that we now support old Mac fonts which do not include an */
- /* OS/2 table. In this case, the `version' field is always set to */
- /* 0xFFFF. */
+ /* Note that we now support old Mac fonts that do not include an OS/2 */
+ /* table. In this case, the `version' field is always set to 0xFFFF. */
/* */
typedef struct TT_OS2_
{
@@ -384,12 +383,12 @@ FT_BEGIN_HEADER
FT_UShort usWinAscent;
FT_UShort usWinDescent;
- /* only version 1 tables: */
+ /* only version 1 and higher: */
FT_ULong ulCodePageRange1; /* Bits 0-31 */
FT_ULong ulCodePageRange2; /* Bits 32-63 */
- /* only version 2 tables: */
+ /* only version 2 and higher: */
FT_Short sxHeight;
FT_Short sCapHeight;
@@ -397,6 +396,11 @@ FT_BEGIN_HEADER
FT_UShort usBreakChar;
FT_UShort usMaxContext;
+ /* only version 5 and higher: */
+
+ FT_UShort usLowerOpticalPointSize; /* in twips (1/20th points) */
+ FT_UShort usUpperOpticalPointSize; /* in twips (1/20th points) */
+
} TT_OS2;
@@ -465,7 +469,7 @@ FT_BEGIN_HEADER
/* TT_MaxProfile */
/* */
/* <Description> */
- /* The maximum profile is a table containing many max values which */
+ /* The maximum profile is a table containing many max values, which */
/* can be used to pre-allocate arrays. This ensures that no memory */
/* allocation occurs during a glyph load. */
/* */
@@ -672,6 +676,12 @@ FT_BEGIN_HEADER
* error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length );
* if ( error ) { ... could not load table ... }
* }
+ *
+ * Note that structures like @TT_Header or @TT_OS2 can't be used with
+ * this function; they are limited to @FT_Get_Sfnt_Table. Reason is that
+ * those structures depend on the processor architecture, with varying
+ * size (e.g. 32bit vs. 64bit) or order (big endian vs. little endian).
+ *
*/
FT_EXPORT( FT_Error )
FT_Load_Sfnt_Table( FT_Face face,
@@ -730,7 +740,7 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* Return TrueType/sfnt specific cmap language ID. Definitions of */
- /* language ID values are in `freetype/ttnameid.h'. */
+ /* language ID values are in `ttnameid.h'. */
/* */
/* <Input> */
/* charmap :: */
diff --git a/freetype/include/freetype/tttags.h b/freetype/include/tttags.h
index be8c524ed..d59aa19a3 100644
--- a/freetype/include/freetype/tttags.h
+++ b/freetype/include/tttags.h
@@ -88,6 +88,7 @@ FT_BEGIN_HEADER
#define TTAG_post FT_MAKE_TAG( 'p', 'o', 's', 't' )
#define TTAG_prep FT_MAKE_TAG( 'p', 'r', 'e', 'p' )
#define TTAG_prop FT_MAKE_TAG( 'p', 'r', 'o', 'p' )
+#define TTAG_sbix FT_MAKE_TAG( 's', 'b', 'i', 'x' )
#define TTAG_sfnt FT_MAKE_TAG( 's', 'f', 'n', 't' )
#define TTAG_SING FT_MAKE_TAG( 'S', 'I', 'N', 'G' )
#define TTAG_trak FT_MAKE_TAG( 't', 'r', 'a', 'k' )
@@ -99,6 +100,7 @@ FT_BEGIN_HEADER
#define TTAG_VDMX FT_MAKE_TAG( 'V', 'D', 'M', 'X' )
#define TTAG_vhea FT_MAKE_TAG( 'v', 'h', 'e', 'a' )
#define TTAG_vmtx FT_MAKE_TAG( 'v', 'm', 't', 'x' )
+#define TTAG_wOFF FT_MAKE_TAG( 'w', 'O', 'F', 'F' )
FT_END_HEADER
diff --git a/freetype/include/freetype/ttunpat.h b/freetype/include/ttunpat.h
index a0162759b..a0162759b 100644
--- a/freetype/include/freetype/ttunpat.h
+++ b/freetype/include/ttunpat.h