summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorVictoria Lease <violets@google.com>2013-12-12 09:12:18 -0800
committerVictoria Lease <violets@google.com>2013-12-12 09:23:45 -0800
commitec0bab5697bb31ba980810145f62e3799946ec60 (patch)
treebaa7eea792c50b86250831c67a9f2a6eb5be6a91 /include
parent899c67b6cfcd2010784fbf08c5415af16c526e0c (diff)
downloadandroid_external_freetype-ec0bab5697bb31ba980810145f62e3799946ec60.tar.gz
android_external_freetype-ec0bab5697bb31ba980810145f62e3799946ec60.tar.bz2
android_external_freetype-ec0bab5697bb31ba980810145f62e3799946ec60.zip
Update freetype to 8bb09b0fe4d9747bcf452a777cabed7d7ef435e2
Integrated patches from freetype2 git repository, up to hashval 8bb09b0fe4d9747bcf452a777cabed7d7ef435e2, which is post-2.5.2. Most recent commit message from freetype git: [truetype] Simplify logic of rendering modes. Noteworthy patches included: [sfnt] Fix handling of embedded bitmap strikes. [truetype] Improve handling of buggy embedded bitmap strikes. Add FT_FACE_FLAG_COLOR and FT_HAS_COLOR. Change-Id: I4a22d96c9443c7a587475ca0a9c684843e144b18
Diffstat (limited to 'include')
-rw-r--r--include/config/ftconfig.h (renamed from include/freetype/config/ftconfig.h)88
-rw-r--r--include/config/ftheader.h (renamed from include/freetype/config/ftheader.h)118
-rw-r--r--include/config/ftmodule.h (renamed from include/freetype/config/ftmodule.h)0
-rw-r--r--include/config/ftoption.h (renamed from include/freetype/config/ftoption.h)16
-rw-r--r--include/config/ftstdlib.h (renamed from include/freetype/config/ftstdlib.h)0
-rw-r--r--include/freetype.h (renamed from include/freetype/freetype.h)145
-rw-r--r--include/freetype/ftcffdrv.h151
-rw-r--r--include/freetype/internal/internal.h51
-rw-r--r--include/freetype/internal/pcftypes.h56
-rw-r--r--include/ft2build.h23
-rw-r--r--include/ftadvanc.h (renamed from include/freetype/ftadvanc.h)4
-rw-r--r--include/ftautoh.h (renamed from include/freetype/ftautoh.h)14
-rw-r--r--include/ftbbox.h (renamed from include/freetype/ftbbox.h)6
-rw-r--r--include/ftbdf.h (renamed from include/freetype/ftbdf.h)0
-rw-r--r--include/ftbitmap.h (renamed from include/freetype/ftbitmap.h)0
-rw-r--r--include/ftbzip2.h102
-rw-r--r--include/ftcache.h (renamed from include/freetype/ftcache.h)2
-rw-r--r--include/ftcffdrv.h254
-rw-r--r--include/ftchapters.h (renamed from include/freetype/ftchapters.h)3
-rw-r--r--include/ftcid.h (renamed from include/freetype/ftcid.h)0
-rw-r--r--include/fterrdef.h (renamed from include/freetype/fterrdef.h)0
-rw-r--r--include/fterrors.h (renamed from include/freetype/fterrors.h)0
-rw-r--r--include/ftgasp.h (renamed from include/freetype/ftgasp.h)0
-rw-r--r--include/ftglyph.h (renamed from include/freetype/ftglyph.h)10
-rw-r--r--include/ftgxval.h (renamed from include/freetype/ftgxval.h)10
-rw-r--r--include/ftgzip.h (renamed from include/freetype/ftgzip.h)49
-rw-r--r--include/ftimage.h (renamed from include/freetype/ftimage.h)18
-rw-r--r--include/ftincrem.h (renamed from include/freetype/ftincrem.h)0
-rw-r--r--include/ftlcdfil.h (renamed from include/freetype/ftlcdfil.h)6
-rw-r--r--include/ftlist.h (renamed from include/freetype/ftlist.h)12
-rw-r--r--include/ftlzw.h (renamed from include/freetype/ftlzw.h)0
-rw-r--r--include/ftmac.h (renamed from include/freetype/ftmac.h)6
-rw-r--r--include/ftmm.h (renamed from include/freetype/ftmm.h)7
-rw-r--r--include/ftmodapi.h (renamed from include/freetype/ftmodapi.h)8
-rw-r--r--include/ftmoderr.h (renamed from include/freetype/ftmoderr.h)0
-rw-r--r--include/ftotval.h (renamed from include/freetype/ftotval.h)6
-rw-r--r--include/ftoutln.h (renamed from include/freetype/ftoutln.h)23
-rw-r--r--include/ftpfr.h (renamed from include/freetype/ftpfr.h)0
-rw-r--r--include/ftrender.h (renamed from include/freetype/ftrender.h)0
-rw-r--r--include/ftsizes.h (renamed from include/freetype/ftsizes.h)4
-rw-r--r--include/ftsnames.h (renamed from include/freetype/ftsnames.h)6
-rw-r--r--include/ftstroke.h (renamed from include/freetype/ftstroke.h)0
-rw-r--r--include/ftsynth.h (renamed from include/freetype/ftsynth.h)4
-rw-r--r--include/ftsystem.h (renamed from include/freetype/ftsystem.h)0
-rw-r--r--include/fttrigon.h (renamed from include/freetype/fttrigon.h)0
-rw-r--r--include/ftttdrv.h (renamed from include/freetype/ftttdrv.h)22
-rw-r--r--include/fttypes.h (renamed from include/freetype/fttypes.h)6
-rw-r--r--include/ftwinfnt.h (renamed from include/freetype/ftwinfnt.h)7
-rw-r--r--include/ftxf86.h (renamed from include/freetype/ftxf86.h)4
-rw-r--r--include/internal/autohint.h (renamed from include/freetype/internal/autohint.h)0
-rw-r--r--include/internal/ftcalc.h (renamed from include/freetype/internal/ftcalc.h)6
-rw-r--r--include/internal/ftdebug.h (renamed from include/freetype/internal/ftdebug.h)1
-rw-r--r--include/internal/ftdriver.h (renamed from include/freetype/internal/ftdriver.h)0
-rw-r--r--include/internal/ftgloadr.h (renamed from include/freetype/internal/ftgloadr.h)0
-rw-r--r--include/internal/ftmemory.h (renamed from include/freetype/internal/ftmemory.h)0
-rw-r--r--include/internal/ftobjs.h (renamed from include/freetype/internal/ftobjs.h)4
-rw-r--r--include/internal/ftpic.h (renamed from include/freetype/internal/ftpic.h)0
-rw-r--r--include/internal/ftrfork.h (renamed from include/freetype/internal/ftrfork.h)0
-rw-r--r--include/internal/ftserv.h (renamed from include/freetype/internal/ftserv.h)48
-rw-r--r--include/internal/ftstream.h (renamed from include/freetype/internal/ftstream.h)0
-rw-r--r--include/internal/fttrace.h (renamed from include/freetype/internal/fttrace.h)0
-rw-r--r--include/internal/ftvalid.h (renamed from include/freetype/internal/ftvalid.h)0
-rw-r--r--include/internal/internal.h63
-rw-r--r--include/internal/psaux.h (renamed from include/freetype/internal/psaux.h)0
-rw-r--r--include/internal/pshints.h (renamed from include/freetype/internal/pshints.h)0
-rw-r--r--include/internal/services/svbdf.h (renamed from include/freetype/internal/services/svbdf.h)0
-rw-r--r--include/internal/services/svcid.h (renamed from include/freetype/internal/services/svcid.h)0
-rw-r--r--include/internal/services/svgldict.h (renamed from include/freetype/internal/services/svgldict.h)0
-rw-r--r--include/internal/services/svgxval.h (renamed from include/freetype/internal/services/svgxval.h)0
-rw-r--r--include/internal/services/svkern.h (renamed from include/freetype/internal/services/svkern.h)0
-rw-r--r--include/internal/services/svmm.h (renamed from include/freetype/internal/services/svmm.h)0
-rw-r--r--include/internal/services/svotval.h (renamed from include/freetype/internal/services/svotval.h)0
-rw-r--r--include/internal/services/svpfr.h (renamed from include/freetype/internal/services/svpfr.h)0
-rw-r--r--include/internal/services/svpostnm.h (renamed from include/freetype/internal/services/svpostnm.h)0
-rw-r--r--include/internal/services/svprop.h (renamed from include/freetype/internal/services/svprop.h)0
-rw-r--r--include/internal/services/svpscmap.h (renamed from include/freetype/internal/services/svpscmap.h)0
-rw-r--r--include/internal/services/svpsinfo.h (renamed from include/freetype/internal/services/svpsinfo.h)0
-rw-r--r--include/internal/services/svsfnt.h (renamed from include/freetype/internal/services/svsfnt.h)0
-rw-r--r--include/internal/services/svttcmap.h (renamed from include/freetype/internal/services/svttcmap.h)4
-rw-r--r--include/internal/services/svtteng.h (renamed from include/freetype/internal/services/svtteng.h)0
-rw-r--r--include/internal/services/svttglyf.h (renamed from include/freetype/internal/services/svttglyf.h)0
-rw-r--r--include/internal/services/svwinfnt.h (renamed from include/freetype/internal/services/svwinfnt.h)0
-rw-r--r--include/internal/services/svxf86nm.h (renamed from include/freetype/internal/services/svxf86nm.h)0
-rw-r--r--include/internal/sfnt.h (renamed from include/freetype/internal/sfnt.h)0
-rw-r--r--include/internal/t1types.h (renamed from include/freetype/internal/t1types.h)0
-rw-r--r--include/internal/tttypes.h (renamed from include/freetype/internal/tttypes.h)108
-rw-r--r--include/t1tables.h (renamed from include/freetype/t1tables.h)0
-rw-r--r--include/ttnameid.h (renamed from include/freetype/ttnameid.h)4
-rw-r--r--include/tttables.h (renamed from include/freetype/tttables.h)38
-rw-r--r--include/tttags.h (renamed from include/freetype/tttags.h)2
-rw-r--r--include/ttunpat.h (renamed from include/freetype/ttunpat.h)0
91 files changed, 993 insertions, 526 deletions
diff --git a/include/freetype/config/ftconfig.h b/include/config/ftconfig.h
index 5dce30e..0770e78 100644
--- a/include/freetype/config/ftconfig.h
+++ b/include/config/ftconfig.h
@@ -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) */
+#ifdef __clang__
+ "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/include/freetype/config/ftheader.h b/include/config/ftheader.h
index 8371a31..b623629 100644
--- a/include/freetype/config/ftheader.h
+++ b/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/include/freetype/config/ftmodule.h b/include/config/ftmodule.h
index 8a91d17..8a91d17 100644
--- a/include/freetype/config/ftmodule.h
+++ b/include/config/ftmodule.h
diff --git a/include/freetype/config/ftoption.h b/include/config/ftoption.h
index bc239bf..72cc060 100644
--- a/include/freetype/config/ftoption.h
+++ b/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. */
/* */
@@ -528,7 +528,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
@@ -569,7 +569,7 @@ FT_BEGIN_HEADER
/* Do not #undef this macro here, since the build system might */
/* define it for certain configurations only. */
/* */
-/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
/*************************************************************************/
@@ -641,7 +641,7 @@ FT_BEGIN_HEADER
/* ... */
/* } */
/* */
-#define TT_CONFIG_OPTION_UNPATENTED_HINTING
+/* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */
/*************************************************************************/
diff --git a/include/freetype/config/ftstdlib.h b/include/config/ftstdlib.h
index b940efc..b940efc 100644
--- a/include/freetype/config/ftstdlib.h
+++ b/include/config/ftstdlib.h
diff --git a/include/freetype/freetype.h b/include/freetype.h
index 0d5680b..372319a 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype.h
@@ -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 */
@@ -329,12 +364,14 @@ FT_BEGIN_HEADER
/* It also embeds a memory manager (see @FT_Memory), as well as a */
/* scan-line converter object (see @FT_Raster). */
/* */
- /* For multi-threading applications each thread should have its own */
- /* FT_Library object. */
+ /* In multi-threaded applications, make sure that the same FT_Library */
+ /* object or any of its children doesn't get accessed in parallel. */
/* */
/* <Note> */
/* Library objects are normally created by @FT_Init_FreeType, and */
- /* destroyed with @FT_Done_FreeType. */
+ /* destroyed with @FT_Done_FreeType. If you need reference-counting */
+ /* (cf. @FT_Reference_Library), use @FT_New_Library and */
+ /* @FT_Done_Library. */
/* */
typedef struct FT_LibraryRec_ *FT_Library;
@@ -415,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 */
@@ -550,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 :: */
@@ -568,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 */
@@ -643,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. */
@@ -806,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 */
@@ -818,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 */
@@ -1052,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. */
@@ -1060,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. */
/* */
@@ -1073,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 )
@@ -1087,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 )
/*************************************************************************
@@ -1271,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> */
@@ -1392,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. */
@@ -1462,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 */
@@ -1492,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. */
@@ -1582,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': */
/* */
/* { */
@@ -1678,6 +1736,9 @@ FT_BEGIN_HEADER
/* For multi-threading applications each thread should have its own */
/* FT_Library object. */
/* */
+ /* If you need reference-counting (cf. @FT_Reference_Library), use */
+ /* @FT_New_Library and @FT_Done_Library. */
+ /* */
FT_EXPORT( FT_Error )
FT_Init_FreeType( FT_Library *alibrary );
@@ -1808,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 */
@@ -1872,6 +1933,10 @@ FT_BEGIN_HEADER
/* <Return> */
/* FreeType error code. 0~means success. */
/* */
+ /* <Note> */
+ /* Use @FT_Done_Face to destroy the created @FT_Face object (along */
+ /* with its slot and sizes). */
+ /* */
FT_EXPORT( FT_Error )
FT_New_Face( FT_Library library,
const char* filepathname,
@@ -1885,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> */
@@ -1931,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 */
@@ -1947,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 */
@@ -1956,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. */
/* */
@@ -2014,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> */
@@ -2045,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> */
@@ -2352,7 +2417,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. */
/* */
@@ -2626,7 +2691,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.
*
@@ -2994,7 +3059,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,
@@ -3050,8 +3115,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 )
@@ -3405,7 +3470,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> */
@@ -3585,7 +3650,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. */
/* */
@@ -3619,7 +3684,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. */
/* */
@@ -3891,8 +3956,8 @@ FT_BEGIN_HEADER
*
*/
#define FREETYPE_MAJOR 2
-#define FREETYPE_MINOR 4
-#define FREETYPE_PATCH 12
+#define FREETYPE_MINOR 5
+#define FREETYPE_PATCH 2
/*************************************************************************/
diff --git a/include/freetype/ftcffdrv.h b/include/freetype/ftcffdrv.h
deleted file mode 100644
index ccbcbcc..0000000
--- a/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/include/freetype/internal/internal.h b/include/freetype/internal/internal.h
deleted file mode 100644
index f500a65..0000000
--- a/include/freetype/internal/internal.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/***************************************************************************/
-/* */
-/* internal.h */
-/* */
-/* Internal header files (specification only). */
-/* */
-/* Copyright 1996-2001, 2002, 2003, 2004 by */
-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
-/* */
-/* This file is part of the FreeType project, and may only be used, */
-/* modified, and distributed under the terms of the FreeType project */
-/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
-/* this file you indicate that you have read the license and */
-/* understand and accept it fully. */
-/* */
-/***************************************************************************/
-
-
- /*************************************************************************/
- /* */
- /* This file is automatically included by `ft2build.h'. */
- /* Do not include it manually! */
- /* */
- /*************************************************************************/
-
-
-#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>
-
-
-/* END */
diff --git a/include/freetype/internal/pcftypes.h b/include/freetype/internal/pcftypes.h
deleted file mode 100644
index 382796f..0000000
--- a/include/freetype/internal/pcftypes.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* pcftypes.h
-
- FreeType font driver for pcf fonts
-
- Copyright (C) 2000, 2001, 2002 by
- Francesco Zappa Nardelli
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-*/
-
-
-#ifndef __PCFTYPES_H__
-#define __PCFTYPES_H__
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-
-FT_BEGIN_HEADER
-
-
- typedef struct PCF_Public_FaceRec_
- {
- FT_FaceRec root;
- FT_StreamRec gzip_stream;
- FT_Stream gzip_source;
-
- char* charset_encoding;
- char* charset_registry;
-
- } PCF_Public_FaceRec, *PCF_Public_Face;
-
-
-FT_END_HEADER
-
-#endif /* __PCFTYPES_H__ */
-
-
-/* END */
diff --git a/include/ft2build.h b/include/ft2build.h
index 923d887..6f8eb7f 100644
--- a/include/ft2build.h
+++ b/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/include/freetype/ftadvanc.h b/include/ftadvanc.h
index 012b74b..8f7e2fc 100644
--- a/include/freetype/ftadvanc.h
+++ b/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/include/freetype/ftautoh.h b/include/ftautoh.h
index 62ce96d..bf97b3f 100644
--- a/include/freetype/ftautoh.h
+++ b/include/ftautoh.h
@@ -4,7 +4,7 @@
/* */
/* FreeType API for controlling the auto-hinter (specification only). */
/* */
-/* Copyright 2012 by */
+/* Copyright 2012, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -61,6 +61,8 @@ FT_BEGIN_HEADER
* glyph-to-script-map
*
* @description:
+ * *Experimental* *only*
+ *
* The auto-hinter provides various script modules to hint glyphs.
* Examples of supported scripts are Latin or CJK. Before a glyph is
* auto-hinted, the Unicode character map of the font gets examined, and
@@ -77,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.
@@ -113,6 +115,8 @@ FT_BEGIN_HEADER
* FT_AUTOHINTER_SCRIPT_XXX
*
* @description:
+ * *Experimental* *only*
+ *
* A list of constants used for the @glyph-to-script-map property to
* specify the script submodule the auto-hinter should use for hinting a
* particular glyph.
@@ -236,6 +240,8 @@ FT_BEGIN_HEADER
* FT_Prop_GlyphToScriptMap
*
* @description:
+ * *Experimental* *only*
+ *
* The data exchange structure for the @glyph-to-script-map property.
*
*/
@@ -253,6 +259,8 @@ FT_BEGIN_HEADER
* fallback-script
*
* @description:
+ * *Experimental* *only*
+ *
* If no auto-hinter script module can be assigned to a glyph, a
* fallback script gets assigned to it (see also the
* @glyph-to-script-map property). By default, this is
@@ -274,7 +282,7 @@ 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
diff --git a/include/freetype/ftbbox.h b/include/ftbbox.h
index 9766919..8938841 100644
--- a/include/freetype/ftbbox.h
+++ b/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/include/freetype/ftbdf.h b/include/ftbdf.h
index 4f8baf8..4f8baf8 100644
--- a/include/freetype/ftbdf.h
+++ b/include/ftbdf.h
diff --git a/include/freetype/ftbitmap.h b/include/ftbitmap.h
index 7dbf5ba..7dbf5ba 100644
--- a/include/freetype/ftbitmap.h
+++ b/include/ftbitmap.h
diff --git a/include/ftbzip2.h b/include/ftbzip2.h
new file mode 100644
index 0000000..1bf81b1
--- /dev/null
+++ b/include/ftbzip2.h
@@ -0,0 +1,102 @@
+/***************************************************************************/
+/* */
+/* ftbzip2.h */
+/* */
+/* Bzip2-compressed stream support. */
+/* */
+/* Copyright 2010 by */
+/* Joel Klinghed. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __FTBZIP2_H__
+#define __FTBZIP2_H__
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+ /*************************************************************************/
+ /* */
+ /* <Section> */
+ /* bzip2 */
+ /* */
+ /* <Title> */
+ /* BZIP2 Streams */
+ /* */
+ /* <Abstract> */
+ /* Using bzip2-compressed font files. */
+ /* */
+ /* <Description> */
+ /* This section contains the declaration of Bzip2-specific functions. */
+ /* */
+ /*************************************************************************/
+
+
+ /************************************************************************
+ *
+ * @function:
+ * FT_Stream_OpenBzip2
+ *
+ * @description:
+ * Open a new stream to parse bzip2-compressed font files. This is
+ * mainly used to support the compressed `*.pcf.bz2' fonts that come
+ * with XFree86.
+ *
+ * @input:
+ * stream ::
+ * The target embedding stream.
+ *
+ * source ::
+ * The source stream.
+ *
+ * @return:
+ * FreeType error code. 0~means success.
+ *
+ * @note:
+ * The source stream must be opened _before_ calling this function.
+ *
+ * Calling the internal function `FT_Stream_Close' on the new stream will
+ * *not* call `FT_Stream_Close' on the source stream. None of the stream
+ * objects will be released to the heap.
+ *
+ * The stream implementation is very basic and resets the decompression
+ * process each time seeking backwards is needed within the stream.
+ *
+ * In certain builds of the library, bzip2 compression recognition is
+ * automatically handled when calling @FT_New_Face or @FT_Open_Face.
+ * This means that if no font driver is capable of handling the raw
+ * compressed file, the library will try to open a bzip2 compressed stream
+ * from it and re-open the face with it.
+ *
+ * This function may return `FT_Err_Unimplemented_Feature' if your build
+ * of FreeType was not compiled with bzip2 support.
+ */
+ FT_EXPORT( FT_Error )
+ FT_Stream_OpenBzip2( FT_Stream stream,
+ FT_Stream source );
+
+ /* */
+
+
+FT_END_HEADER
+
+#endif /* __FTBZIP2_H__ */
+
+
+/* END */
diff --git a/include/freetype/ftcache.h b/include/ftcache.h
index 4ec9587..a5d7100 100644
--- a/include/freetype/ftcache.h
+++ b/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/include/ftcffdrv.h b/include/ftcffdrv.h
new file mode 100644
index 0000000..e4d039d
--- /dev/null
+++ b/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/include/freetype/ftchapters.h b/include/ftchapters.h
index c55670d..d333761 100644
--- a/include/freetype/ftchapters.h
+++ b/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/include/freetype/ftcid.h b/include/ftcid.h
index 203a30c..203a30c 100644
--- a/include/freetype/ftcid.h
+++ b/include/ftcid.h
diff --git a/include/freetype/fterrdef.h b/include/fterrdef.h
index 76c7b9e..76c7b9e 100644
--- a/include/freetype/fterrdef.h
+++ b/include/fterrdef.h
diff --git a/include/freetype/fterrors.h b/include/fterrors.h
index 0fa3e4d..0fa3e4d 100644
--- a/include/freetype/fterrors.h
+++ b/include/fterrors.h
diff --git a/include/freetype/ftgasp.h b/include/ftgasp.h
index 453d4fa..453d4fa 100644
--- a/include/freetype/ftgasp.h
+++ b/include/ftgasp.h
diff --git a/include/freetype/ftglyph.h b/include/ftglyph.h
index 31dc331..2d30ed9 100644
--- a/include/freetype/ftglyph.h
+++ b/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/include/freetype/ftgxval.h b/include/ftgxval.h
index 497015c..6d38e32 100644
--- a/include/freetype/ftgxval.h
+++ b/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/include/freetype/ftgzip.h b/include/ftgzip.h
index acbc4f0..78e7269 100644
--- a/include/freetype/ftgzip.h
+++ b/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/include/freetype/ftimage.h b/include/ftimage.h
index 3b826b1..ea71a78 100644
--- a/include/freetype/ftimage.h
+++ b/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/include/freetype/ftincrem.h b/include/ftincrem.h
index aaf689f..aaf689f 100644
--- a/include/freetype/ftincrem.h
+++ b/include/ftincrem.h
diff --git a/include/freetype/ftlcdfil.h b/include/ftlcdfil.h
index 8b253f1..39206f0 100644
--- a/include/freetype/ftlcdfil.h
+++ b/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/include/freetype/ftlist.h b/include/ftlist.h
index bb6f7f1..241e21e 100644
--- a/include/freetype/ftlist.h
+++ b/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/include/freetype/ftlzw.h b/include/ftlzw.h
index 00d4016..00d4016 100644
--- a/include/freetype/ftlzw.h
+++ b/include/ftlzw.h
diff --git a/include/freetype/ftmac.h b/include/ftmac.h
index ab5bab5..42874fe 100644
--- a/include/freetype/ftmac.h
+++ b/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/include/freetype/ftmm.h b/include/ftmm.h
index 3aefb9e..837975a 100644
--- a/include/freetype/ftmm.h
+++ b/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/include/freetype/ftmodapi.h b/include/ftmodapi.h
index 8abffb5..22878f8 100644
--- a/include/freetype/ftmodapi.h
+++ b/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/include/freetype/ftmoderr.h b/include/ftmoderr.h
index 5a27db1..5a27db1 100644
--- a/include/freetype/ftmoderr.h
+++ b/include/ftmoderr.h
diff --git a/include/freetype/ftotval.h b/include/ftotval.h
index 027f2e8..bb52dc4 100644
--- a/include/freetype/ftotval.h
+++ b/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/include/freetype/ftoutln.h b/include/ftoutln.h
index fd69f28..8c7c57d 100644
--- a/include/freetype/ftoutln.h
+++ b/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-2013 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. */
@@ -525,9 +532,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/include/freetype/ftpfr.h b/include/ftpfr.h
index 0b7b7d4..0b7b7d4 100644
--- a/include/freetype/ftpfr.h
+++ b/include/ftpfr.h
diff --git a/include/freetype/ftrender.h b/include/ftrender.h
index dd0229b..dd0229b 100644
--- a/include/freetype/ftrender.h
+++ b/include/ftrender.h
diff --git a/include/freetype/ftsizes.h b/include/ftsizes.h
index 3e548cc..4167045 100644
--- a/include/freetype/ftsizes.h
+++ b/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/include/freetype/ftsnames.h b/include/ftsnames.h
index 485e4e1..88af440 100644
--- a/include/freetype/ftsnames.h
+++ b/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/include/freetype/ftstroke.h b/include/ftstroke.h
index a498e4a..a498e4a 100644
--- a/include/freetype/ftstroke.h
+++ b/include/ftstroke.h
diff --git a/include/freetype/ftsynth.h b/include/ftsynth.h
index 2074503..839ab5e 100644
--- a/include/freetype/ftsynth.h
+++ b/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/include/freetype/ftsystem.h b/include/ftsystem.h
index e07460c..e07460c 100644
--- a/include/freetype/ftsystem.h
+++ b/include/ftsystem.h
diff --git a/include/freetype/fttrigon.h b/include/fttrigon.h
index 65143cb..65143cb 100644
--- a/include/freetype/fttrigon.h
+++ b/include/fttrigon.h
diff --git a/include/freetype/ftttdrv.h b/include/ftttdrv.h
index d5d3f1c..70ad3d5 100644
--- a/include/freetype/ftttdrv.h
+++ b/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/include/freetype/fttypes.h b/include/fttypes.h
index 027e59c..bd944a4 100644
--- a/include/freetype/fttypes.h
+++ b/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/include/freetype/ftwinfnt.h b/include/ftwinfnt.h
index ea33353..0b67351 100644
--- a/include/freetype/ftwinfnt.h
+++ b/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/include/freetype/ftxf86.h b/include/ftxf86.h
index 8c68afd..493cccd 100644
--- a/include/freetype/ftxf86.h
+++ b/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/include/freetype/internal/autohint.h b/include/internal/autohint.h
index 545de93..545de93 100644
--- a/include/freetype/internal/autohint.h
+++ b/include/internal/autohint.h
diff --git a/include/freetype/internal/ftcalc.h b/include/internal/ftcalc.h
index faac3a3..03bd68e 100644
--- a/include/freetype/internal/ftcalc.h
+++ b/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/include/freetype/internal/ftdebug.h b/include/internal/ftdebug.h
index 1ee120f..58a3916 100644
--- a/include/freetype/internal/ftdebug.h
+++ b/include/internal/ftdebug.h
@@ -247,7 +247,6 @@ FT_BEGIN_HEADER
FT_BASE( void )
ft_debug_init( void );
-
FT_END_HEADER
#endif /* __FTDEBUG_H__ */
diff --git a/include/freetype/internal/ftdriver.h b/include/internal/ftdriver.h
index 940218e..940218e 100644
--- a/include/freetype/internal/ftdriver.h
+++ b/include/internal/ftdriver.h
diff --git a/include/freetype/internal/ftgloadr.h b/include/internal/ftgloadr.h
index ce4dc6c..ce4dc6c 100644
--- a/include/freetype/internal/ftgloadr.h
+++ b/include/internal/ftgloadr.h
diff --git a/include/freetype/internal/ftmemory.h b/include/internal/ftmemory.h
index 3d51aee..3d51aee 100644
--- a/include/freetype/internal/ftmemory.h
+++ b/include/internal/ftmemory.h
diff --git a/include/freetype/internal/ftobjs.h b/include/internal/ftobjs.h
index 8a309b8..701c850 100644
--- a/include/freetype/internal/ftobjs.h
+++ b/include/internal/ftobjs.h
@@ -363,7 +363,7 @@ FT_BEGIN_HEADER
#endif
FT_Bool ignore_unpatented_hinter;
- FT_UInt refcount;
+ FT_Int refcount;
} FT_Face_InternalRec;
@@ -883,7 +883,7 @@ FT_BEGIN_HEADER
FT_PIC_Container pic_container;
#endif
- FT_UInt refcount;
+ FT_Int refcount;
} FT_LibraryRec;
diff --git a/include/freetype/internal/ftpic.h b/include/internal/ftpic.h
index 485ce7a..485ce7a 100644
--- a/include/freetype/internal/ftpic.h
+++ b/include/internal/ftpic.h
diff --git a/include/freetype/internal/ftrfork.h b/include/internal/ftrfork.h
index 6307f2d..6307f2d 100644
--- a/include/freetype/internal/ftrfork.h
+++ b/include/internal/ftrfork.h
diff --git a/include/freetype/internal/ftserv.h b/include/internal/ftserv.h
index 4ac988b..1203ec8 100644
--- a/include/freetype/internal/ftserv.h
+++ b/include/internal/ftserv.h
@@ -34,14 +34,6 @@
FT_BEGIN_HEADER
-#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */
- /* We disable the warning `conditional expression is */
- /* constant' in order to compile cleanly with the maximum */
- /* level of warnings. */
-#pragma warning( push )
-#pragma warning( disable : 4127 )
-#endif /* _MSC_VER */
-
/*
* @macro:
* FT_FACE_FIND_SERVICE
@@ -742,31 +734,27 @@ 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>
/* */
-#if defined( _MSC_VER )
-#pragma warning( pop )
-#endif
-
FT_END_HEADER
#endif /* __FTSERV_H__ */
diff --git a/include/freetype/internal/ftstream.h b/include/internal/ftstream.h
index 2661858..2661858 100644
--- a/include/freetype/internal/ftstream.h
+++ b/include/internal/ftstream.h
diff --git a/include/freetype/internal/fttrace.h b/include/internal/fttrace.h
index a9d98b6..a9d98b6 100644
--- a/include/freetype/internal/fttrace.h
+++ b/include/internal/fttrace.h
diff --git a/include/freetype/internal/ftvalid.h b/include/internal/ftvalid.h
index 12ad036..12ad036 100644
--- a/include/freetype/internal/ftvalid.h
+++ b/include/internal/ftvalid.h
diff --git a/include/internal/internal.h b/include/internal/internal.h
new file mode 100644
index 0000000..e0ddb06
--- /dev/null
+++ b/include/internal/internal.h
@@ -0,0 +1,63 @@
+/***************************************************************************/
+/* */
+/* internal.h */
+/* */
+/* Internal header files (specification only). */
+/* */
+/* Copyright 1996-2004, 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. */
+/* */
+/***************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* This file is automatically included by `ft2build.h'. */
+ /* Do not include it manually! */
+ /* */
+ /*************************************************************************/
+
+
+#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++) */
+
+ /* We disable the warning `conditional expression is constant' here */
+ /* in order to compile cleanly with the maximum level of warnings. */
+ /* In particular, the warning complains about stuff like `while(0)' */
+ /* which is very useful in macro definitions. There is no benefit */
+ /* in having it enabled. */
+#pragma warning( disable : 4127 )
+
+#endif /* _MSC_VER */
+
+
+/* END */
diff --git a/include/freetype/internal/psaux.h b/include/internal/psaux.h
index e903114..e903114 100644
--- a/include/freetype/internal/psaux.h
+++ b/include/internal/psaux.h
diff --git a/include/freetype/internal/pshints.h b/include/internal/pshints.h
index 3fb18dc..3fb18dc 100644
--- a/include/freetype/internal/pshints.h
+++ b/include/internal/pshints.h
diff --git a/include/freetype/internal/services/svbdf.h b/include/internal/services/svbdf.h
index 0974752..0974752 100644
--- a/include/freetype/internal/services/svbdf.h
+++ b/include/internal/services/svbdf.h
diff --git a/include/freetype/internal/services/svcid.h b/include/internal/services/svcid.h
index 6be3f93..6be3f93 100644
--- a/include/freetype/internal/services/svcid.h
+++ b/include/internal/services/svcid.h
diff --git a/include/freetype/internal/services/svgldict.h b/include/internal/services/svgldict.h
index 1d12534..1d12534 100644
--- a/include/freetype/internal/services/svgldict.h
+++ b/include/internal/services/svgldict.h
diff --git a/include/freetype/internal/services/svgxval.h b/include/internal/services/svgxval.h
index 2cdab50..2cdab50 100644
--- a/include/freetype/internal/services/svgxval.h
+++ b/include/internal/services/svgxval.h
diff --git a/include/freetype/internal/services/svkern.h b/include/internal/services/svkern.h
index 1488adf..1488adf 100644
--- a/include/freetype/internal/services/svkern.h
+++ b/include/internal/services/svkern.h
diff --git a/include/freetype/internal/services/svmm.h b/include/internal/services/svmm.h
index b08a663..b08a663 100644
--- a/include/freetype/internal/services/svmm.h
+++ b/include/internal/services/svmm.h
diff --git a/include/freetype/internal/services/svotval.h b/include/internal/services/svotval.h
index 970bbd5..970bbd5 100644
--- a/include/freetype/internal/services/svotval.h
+++ b/include/internal/services/svotval.h
diff --git a/include/freetype/internal/services/svpfr.h b/include/internal/services/svpfr.h
index 462786f..462786f 100644
--- a/include/freetype/internal/services/svpfr.h
+++ b/include/internal/services/svpfr.h
diff --git a/include/freetype/internal/services/svpostnm.h b/include/internal/services/svpostnm.h
index a76b4fe..a76b4fe 100644
--- a/include/freetype/internal/services/svpostnm.h
+++ b/include/internal/services/svpostnm.h
diff --git a/include/freetype/internal/services/svprop.h b/include/internal/services/svprop.h
index 22da0bb..22da0bb 100644
--- a/include/freetype/internal/services/svprop.h
+++ b/include/internal/services/svprop.h
diff --git a/include/freetype/internal/services/svpscmap.h b/include/internal/services/svpscmap.h
index 030948e..030948e 100644
--- a/include/freetype/internal/services/svpscmap.h
+++ b/include/internal/services/svpscmap.h
diff --git a/include/freetype/internal/services/svpsinfo.h b/include/internal/services/svpsinfo.h
index 4bfb506..4bfb506 100644
--- a/include/freetype/internal/services/svpsinfo.h
+++ b/include/internal/services/svpsinfo.h
diff --git a/include/freetype/internal/services/svsfnt.h b/include/internal/services/svsfnt.h
index d3835aa..d3835aa 100644
--- a/include/freetype/internal/services/svsfnt.h
+++ b/include/internal/services/svsfnt.h
diff --git a/include/freetype/internal/services/svttcmap.h b/include/internal/services/svttcmap.h
index 83994aa..4370f4c 100644
--- a/include/freetype/internal/services/svttcmap.h
+++ b/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/include/freetype/internal/services/svtteng.h b/include/internal/services/svtteng.h
index 58e02a6..58e02a6 100644
--- a/include/freetype/internal/services/svtteng.h
+++ b/include/internal/services/svtteng.h
diff --git a/include/freetype/internal/services/svttglyf.h b/include/internal/services/svttglyf.h
index 369eb84..369eb84 100644
--- a/include/freetype/internal/services/svttglyf.h
+++ b/include/internal/services/svttglyf.h
diff --git a/include/freetype/internal/services/svwinfnt.h b/include/internal/services/svwinfnt.h
index 57f7765..57f7765 100644
--- a/include/freetype/internal/services/svwinfnt.h
+++ b/include/internal/services/svwinfnt.h
diff --git a/include/freetype/internal/services/svxf86nm.h b/include/internal/services/svxf86nm.h
index ca5d884..ca5d884 100644
--- a/include/freetype/internal/services/svxf86nm.h
+++ b/include/internal/services/svxf86nm.h
diff --git a/include/freetype/internal/sfnt.h b/include/internal/sfnt.h
index 6b5e41f..6b5e41f 100644
--- a/include/freetype/internal/sfnt.h
+++ b/include/internal/sfnt.h
diff --git a/include/freetype/internal/t1types.h b/include/internal/t1types.h
index e20237c..e20237c 100644
--- a/include/freetype/internal/t1types.h
+++ b/include/internal/t1types.h
diff --git a/include/freetype/internal/tttypes.h b/include/internal/tttypes.h
index 1bbfe49..ad302b8 100644
--- a/include/freetype/internal/tttypes.h
+++ b/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/include/freetype/t1tables.h b/include/t1tables.h
index a14255e..a14255e 100644
--- a/include/freetype/t1tables.h
+++ b/include/t1tables.h
diff --git a/include/freetype/ttnameid.h b/include/ttnameid.h
index 173f88c..9711d1d 100644
--- a/include/freetype/ttnameid.h
+++ b/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/include/freetype/tttables.h b/include/tttables.h
index fe07117..bb49dc0 100644
--- a/include/freetype/tttables.h
+++ b/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/include/freetype/tttags.h b/include/tttags.h
index be8c524..d59aa19 100644
--- a/include/freetype/tttags.h
+++ b/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/include/freetype/ttunpat.h b/include/ttunpat.h
index a016275..a016275 100644
--- a/include/freetype/ttunpat.h
+++ b/include/ttunpat.h