summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJungshik Shin <jungshik@google.com>2016-01-15 16:18:25 -0800
committerThe Android Automerger <android-build@google.com>2016-02-24 13:20:13 -0800
commitf720f0dbcf012d6c984dbbefa0875ef9840458c6 (patch)
treebdb1068e64623c623100071dc586117aba4a2417 /include
parentec62c527eb34ee4481a0153ceb42dfd35d7e1d26 (diff)
downloadandroid_external_freetype-f720f0dbcf012d6c984dbbefa0875ef9840458c6.tar.gz
android_external_freetype-f720f0dbcf012d6c984dbbefa0875ef9840458c6.tar.bz2
android_external_freetype-f720f0dbcf012d6c984dbbefa0875ef9840458c6.zip
[DO NOT MERGE] Update FreeType to 2.6.2 + update from 2.6.0
1. Update to a512b0fe7a (several patches past 2.6.2). Major changes include - stem-darkening is OFF for CFF fonts by default - general code tightening - header file location is back to include/freetype (used be include/) 2. A bit more details are added to README.android for the reference. This CL requires a pdfium change (the way it includes FT header files : https://googleplex-android-review.git.corp.google.com/#/c/846889 An AOSP master CL (https://android-review.googlesource.com/#/c/196504/) is ported to mnc-dev. Bug: 24296662 Change-Id: Iec6784838d89098f332e6d1ed79663efd91a8441 Signed-off-by: Jungshik Shin <jungshik@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/freetype/config/ftconfig.h (renamed from include/config/ftconfig.h)4
-rw-r--r--include/freetype/config/ftheader.h (renamed from include/config/ftheader.h)116
-rw-r--r--include/freetype/config/ftmodule.h (renamed from include/config/ftmodule.h)0
-rw-r--r--include/freetype/config/ftoption.h (renamed from include/config/ftoption.h)28
-rw-r--r--include/freetype/config/ftstdlib.h (renamed from include/config/ftstdlib.h)1
-rw-r--r--include/freetype/freetype.h (renamed from include/freetype.h)309
-rw-r--r--include/freetype/ftadvanc.h (renamed from include/ftadvanc.h)0
-rw-r--r--include/freetype/ftautoh.h (renamed from include/ftautoh.h)57
-rw-r--r--include/freetype/ftbbox.h (renamed from include/ftbbox.h)0
-rw-r--r--include/freetype/ftbdf.h (renamed from include/ftbdf.h)0
-rw-r--r--include/freetype/ftbitmap.h (renamed from include/ftbitmap.h)0
-rw-r--r--include/freetype/ftbzip2.h (renamed from include/ftbzip2.h)0
-rw-r--r--include/freetype/ftcache.h (renamed from include/ftcache.h)0
-rw-r--r--include/freetype/ftcffdrv.h (renamed from include/ftcffdrv.h)8
-rw-r--r--include/freetype/ftchapters.h (renamed from include/ftchapters.h)14
-rw-r--r--include/freetype/ftcid.h (renamed from include/ftcid.h)0
-rw-r--r--include/freetype/fterrdef.h (renamed from include/fterrdef.h)49
-rw-r--r--include/freetype/fterrors.h (renamed from include/fterrors.h)102
-rw-r--r--include/freetype/ftfntfmt.h (renamed from include/ftfntfmt.h)0
-rw-r--r--include/freetype/ftgasp.h (renamed from include/ftgasp.h)0
-rw-r--r--include/freetype/ftglyph.h (renamed from include/ftglyph.h)0
-rw-r--r--include/freetype/ftgxval.h (renamed from include/ftgxval.h)0
-rw-r--r--include/freetype/ftgzip.h (renamed from include/ftgzip.h)0
-rw-r--r--include/freetype/ftimage.h (renamed from include/ftimage.h)0
-rw-r--r--include/freetype/ftincrem.h (renamed from include/ftincrem.h)0
-rw-r--r--include/freetype/ftlcdfil.h (renamed from include/ftlcdfil.h)139
-rw-r--r--include/freetype/ftlist.h (renamed from include/ftlist.h)0
-rw-r--r--include/freetype/ftlzw.h (renamed from include/ftlzw.h)0
-rw-r--r--include/freetype/ftmac.h (renamed from include/ftmac.h)0
-rw-r--r--include/freetype/ftmm.h (renamed from include/ftmm.h)7
-rw-r--r--include/freetype/ftmodapi.h (renamed from include/ftmodapi.h)17
-rw-r--r--include/freetype/ftmoderr.h (renamed from include/ftmoderr.h)0
-rw-r--r--include/freetype/ftotval.h (renamed from include/ftotval.h)0
-rw-r--r--include/freetype/ftoutln.h (renamed from include/ftoutln.h)4
-rw-r--r--include/freetype/ftpfr.h (renamed from include/ftpfr.h)0
-rw-r--r--include/freetype/ftrender.h (renamed from include/ftrender.h)0
-rw-r--r--include/freetype/ftsizes.h (renamed from include/ftsizes.h)0
-rw-r--r--include/freetype/ftsnames.h (renamed from include/ftsnames.h)0
-rw-r--r--include/freetype/ftstroke.h (renamed from include/ftstroke.h)0
-rw-r--r--include/freetype/ftsynth.h (renamed from include/ftsynth.h)0
-rw-r--r--include/freetype/ftsystem.h (renamed from include/ftsystem.h)0
-rw-r--r--include/freetype/fttrigon.h (renamed from include/fttrigon.h)4
-rw-r--r--include/freetype/ftttdrv.h (renamed from include/ftttdrv.h)77
-rw-r--r--include/freetype/fttypes.h (renamed from include/fttypes.h)0
-rw-r--r--include/freetype/ftwinfnt.h (renamed from include/ftwinfnt.h)0
-rw-r--r--include/freetype/internal/autohint.h (renamed from include/internal/autohint.h)0
-rw-r--r--include/freetype/internal/ftcalc.h (renamed from include/internal/ftcalc.h)20
-rw-r--r--include/freetype/internal/ftdebug.h (renamed from include/internal/ftdebug.h)0
-rw-r--r--include/freetype/internal/ftdriver.h (renamed from include/internal/ftdriver.h)0
-rw-r--r--include/freetype/internal/ftgloadr.h (renamed from include/internal/ftgloadr.h)0
-rw-r--r--include/freetype/internal/ftmemory.h (renamed from include/internal/ftmemory.h)0
-rw-r--r--include/freetype/internal/ftobjs.h (renamed from include/internal/ftobjs.h)9
-rw-r--r--include/freetype/internal/ftpic.h (renamed from include/internal/ftpic.h)0
-rw-r--r--include/freetype/internal/ftrfork.h (renamed from include/internal/ftrfork.h)0
-rw-r--r--include/freetype/internal/ftserv.h (renamed from include/internal/ftserv.h)36
-rw-r--r--include/freetype/internal/ftstream.h (renamed from include/internal/ftstream.h)0
-rw-r--r--include/freetype/internal/fttrace.h (renamed from include/internal/fttrace.h)2
-rw-r--r--include/freetype/internal/ftvalid.h (renamed from include/internal/ftvalid.h)0
-rw-r--r--include/freetype/internal/internal.h (renamed from include/internal/internal.h)44
-rw-r--r--include/freetype/internal/psaux.h (renamed from include/internal/psaux.h)0
-rw-r--r--include/freetype/internal/pshints.h (renamed from include/internal/pshints.h)0
-rw-r--r--include/freetype/internal/services/svbdf.h (renamed from include/internal/services/svbdf.h)0
-rw-r--r--include/freetype/internal/services/svcid.h (renamed from include/internal/services/svcid.h)0
-rw-r--r--include/freetype/internal/services/svfntfmt.h (renamed from include/internal/services/svfntfmt.h)0
-rw-r--r--include/freetype/internal/services/svgldict.h (renamed from include/internal/services/svgldict.h)0
-rw-r--r--include/freetype/internal/services/svgxval.h (renamed from include/internal/services/svgxval.h)0
-rw-r--r--include/freetype/internal/services/svkern.h (renamed from include/internal/services/svkern.h)0
-rw-r--r--include/freetype/internal/services/svmm.h (renamed from include/internal/services/svmm.h)0
-rw-r--r--include/freetype/internal/services/svotval.h (renamed from include/internal/services/svotval.h)0
-rw-r--r--include/freetype/internal/services/svpfr.h (renamed from include/internal/services/svpfr.h)0
-rw-r--r--include/freetype/internal/services/svpostnm.h (renamed from include/internal/services/svpostnm.h)0
-rw-r--r--include/freetype/internal/services/svprop.h (renamed from include/internal/services/svprop.h)0
-rw-r--r--include/freetype/internal/services/svpscmap.h (renamed from include/internal/services/svpscmap.h)0
-rw-r--r--include/freetype/internal/services/svpsinfo.h (renamed from include/internal/services/svpsinfo.h)0
-rw-r--r--include/freetype/internal/services/svsfnt.h (renamed from include/internal/services/svsfnt.h)0
-rw-r--r--include/freetype/internal/services/svttcmap.h (renamed from include/internal/services/svttcmap.h)5
-rw-r--r--include/freetype/internal/services/svtteng.h (renamed from include/internal/services/svtteng.h)0
-rw-r--r--include/freetype/internal/services/svttglyf.h (renamed from include/internal/services/svttglyf.h)0
-rw-r--r--include/freetype/internal/services/svwinfnt.h (renamed from include/internal/services/svwinfnt.h)0
-rw-r--r--include/freetype/internal/sfnt.h (renamed from include/internal/sfnt.h)45
-rw-r--r--include/freetype/internal/t1types.h (renamed from include/internal/t1types.h)0
-rw-r--r--include/freetype/internal/tttypes.h (renamed from include/internal/tttypes.h)19
-rw-r--r--include/freetype/t1tables.h (renamed from include/t1tables.h)0
-rw-r--r--include/freetype/ttnameid.h (renamed from include/ttnameid.h)0
-rw-r--r--include/freetype/tttables.h (renamed from include/tttables.h)0
-rw-r--r--include/freetype/tttags.h (renamed from include/tttags.h)0
-rw-r--r--include/freetype/ttunpat.h (renamed from include/ttunpat.h)0
-rw-r--r--include/ft2build.h2
88 files changed, 829 insertions, 289 deletions
diff --git a/include/config/ftconfig.h b/include/freetype/config/ftconfig.h
index 086db76..d4d7993 100644
--- a/include/config/ftconfig.h
+++ b/include/freetype/config/ftconfig.h
@@ -335,9 +335,9 @@ FT_BEGIN_HEADER
#if ( __GNUC__ >= 2 || \
defined( __IBM__TYPEOF__ ) || \
( __SUNPRO_C >= 0x5110 && !__STDC__ ) )
-#define TYPEOF( type ) (__typeof__ (type))
+#define FT_TYPEOF( type ) (__typeof__ (type))
#else
-#define TYPEOF( type ) /* empty */
+#define FT_TYPEOF( type ) /* empty */
#endif
diff --git a/include/config/ftheader.h b/include/freetype/config/ftheader.h
index 4906bc1..55f833d 100644
--- a/include/config/ftheader.h
+++ b/include/freetype/config/ftheader.h
@@ -107,7 +107,7 @@
*
*/
#ifndef FT_CONFIG_CONFIG_H
-#define FT_CONFIG_CONFIG_H <config/ftconfig.h>
+#define FT_CONFIG_CONFIG_H <freetype/config/ftconfig.h>
#endif
@@ -122,7 +122,7 @@
*
*/
#ifndef FT_CONFIG_STANDARD_LIBRARY_H
-#define FT_CONFIG_STANDARD_LIBRARY_H <config/ftstdlib.h>
+#define FT_CONFIG_STANDARD_LIBRARY_H <freetype/config/ftstdlib.h>
#endif
@@ -137,7 +137,7 @@
*
*/
#ifndef FT_CONFIG_OPTIONS_H
-#define FT_CONFIG_OPTIONS_H <config/ftoption.h>
+#define FT_CONFIG_OPTIONS_H <freetype/config/ftoption.h>
#endif
@@ -153,7 +153,7 @@
*
*/
#ifndef FT_CONFIG_MODULES_H
-#define FT_CONFIG_MODULES_H <config/ftmodule.h>
+#define FT_CONFIG_MODULES_H <freetype/config/ftmodule.h>
#endif
/* */
@@ -170,7 +170,7 @@
* base FreeType~2 API.
*
*/
-#define FT_FREETYPE_H <freetype.h>
+#define FT_FREETYPE_H <freetype/freetype.h>
/*************************************************************************
@@ -185,7 +185,7 @@
* It is included by @FT_FREETYPE_H.
*
*/
-#define FT_ERRORS_H <fterrors.h>
+#define FT_ERRORS_H <freetype/fterrors.h>
/*************************************************************************
@@ -198,7 +198,7 @@
* list of FreeType~2 module error offsets (and messages).
*
*/
-#define FT_MODULE_ERRORS_H <ftmoderr.h>
+#define FT_MODULE_ERRORS_H <freetype/ftmoderr.h>
/*************************************************************************
@@ -214,7 +214,7 @@
* It is included by @FT_FREETYPE_H.
*
*/
-#define FT_SYSTEM_H <ftsystem.h>
+#define FT_SYSTEM_H <freetype/ftsystem.h>
/*************************************************************************
@@ -230,7 +230,7 @@
* It is included by @FT_FREETYPE_H.
*
*/
-#define FT_IMAGE_H <ftimage.h>
+#define FT_IMAGE_H <freetype/ftimage.h>
/*************************************************************************
@@ -245,7 +245,7 @@
* It is included by @FT_FREETYPE_H.
*
*/
-#define FT_TYPES_H <fttypes.h>
+#define FT_TYPES_H <freetype/fttypes.h>
/*************************************************************************
@@ -260,7 +260,7 @@
* (Most applications will never need to include this file.)
*
*/
-#define FT_LIST_H <ftlist.h>
+#define FT_LIST_H <freetype/ftlist.h>
/*************************************************************************
@@ -273,7 +273,7 @@
* scalable outline management API of FreeType~2.
*
*/
-#define FT_OUTLINE_H <ftoutln.h>
+#define FT_OUTLINE_H <freetype/ftoutln.h>
/*************************************************************************
@@ -286,7 +286,7 @@
* API which manages multiple @FT_Size objects per face.
*
*/
-#define FT_SIZES_H <ftsizes.h>
+#define FT_SIZES_H <freetype/ftsizes.h>
/*************************************************************************
@@ -299,7 +299,7 @@
* module management API of FreeType~2.
*
*/
-#define FT_MODULE_H <ftmodapi.h>
+#define FT_MODULE_H <freetype/ftmodapi.h>
/*************************************************************************
@@ -312,7 +312,7 @@
* renderer module management API of FreeType~2.
*
*/
-#define FT_RENDER_H <ftrender.h>
+#define FT_RENDER_H <freetype/ftrender.h>
/*************************************************************************
@@ -325,7 +325,7 @@
* structures and macros related to the auto-hinting module.
*
*/
-#define FT_AUTOHINTER_H <ftautoh.h>
+#define FT_AUTOHINTER_H <freetype/ftautoh.h>
/*************************************************************************
@@ -338,7 +338,7 @@
* structures and macros related to the CFF driver module.
*
*/
-#define FT_CFF_DRIVER_H <ftcffdrv.h>
+#define FT_CFF_DRIVER_H <freetype/ftcffdrv.h>
/*************************************************************************
@@ -351,7 +351,7 @@
* structures and macros related to the TrueType driver module.
*
*/
-#define FT_TRUETYPE_DRIVER_H <ftttdrv.h>
+#define FT_TRUETYPE_DRIVER_H <freetype/ftttdrv.h>
/*************************************************************************
@@ -364,7 +364,7 @@
* types and API specific to the Type~1 format.
*
*/
-#define FT_TYPE1_TABLES_H <t1tables.h>
+#define FT_TYPE1_TABLES_H <freetype/t1tables.h>
/*************************************************************************
@@ -379,7 +379,7 @@
* definitions, taken from the TrueType and OpenType specifications.
*
*/
-#define FT_TRUETYPE_IDS_H <ttnameid.h>
+#define FT_TRUETYPE_IDS_H <freetype/ttnameid.h>
/*************************************************************************
@@ -392,7 +392,7 @@
* types and API specific to the TrueType (as well as OpenType) format.
*
*/
-#define FT_TRUETYPE_TABLES_H <tttables.h>
+#define FT_TRUETYPE_TABLES_H <freetype/tttables.h>
/*************************************************************************
@@ -406,7 +406,7 @@
* SFNT-based font formats (i.e., TrueType and OpenType).
*
*/
-#define FT_TRUETYPE_TAGS_H <tttags.h>
+#define FT_TRUETYPE_TAGS_H <freetype/tttags.h>
/*************************************************************************
@@ -420,7 +420,7 @@
* face.
*
*/
-#define FT_BDF_H <ftbdf.h>
+#define FT_BDF_H <freetype/ftbdf.h>
/*************************************************************************
@@ -434,7 +434,7 @@
* face.
*
*/
-#define FT_CID_H <ftcid.h>
+#define FT_CID_H <freetype/ftcid.h>
/*************************************************************************
@@ -447,7 +447,7 @@
* definitions of an API which supports gzip-compressed files.
*
*/
-#define FT_GZIP_H <ftgzip.h>
+#define FT_GZIP_H <freetype/ftgzip.h>
/*************************************************************************
@@ -460,7 +460,7 @@
* definitions of an API which supports LZW-compressed files.
*
*/
-#define FT_LZW_H <ftlzw.h>
+#define FT_LZW_H <freetype/ftlzw.h>
/*************************************************************************
@@ -473,7 +473,7 @@
* definitions of an API which supports bzip2-compressed files.
*
*/
-#define FT_BZIP2_H <ftbzip2.h>
+#define FT_BZIP2_H <freetype/ftbzip2.h>
/*************************************************************************
@@ -486,7 +486,7 @@
* definitions of an API which supports Windows FNT files.
*
*/
-#define FT_WINFONTS_H <ftwinfnt.h>
+#define FT_WINFONTS_H <freetype/ftwinfnt.h>
/*************************************************************************
@@ -499,7 +499,7 @@
* API of the optional glyph management component.
*
*/
-#define FT_GLYPH_H <ftglyph.h>
+#define FT_GLYPH_H <freetype/ftglyph.h>
/*************************************************************************
@@ -512,7 +512,7 @@
* API of the optional bitmap conversion component.
*
*/
-#define FT_BITMAP_H <ftbitmap.h>
+#define FT_BITMAP_H <freetype/ftbitmap.h>
/*************************************************************************
@@ -525,7 +525,7 @@
* API of the optional exact bounding box computation routines.
*
*/
-#define FT_BBOX_H <ftbbox.h>
+#define FT_BBOX_H <freetype/ftbbox.h>
/*************************************************************************
@@ -538,7 +538,7 @@
* API of the optional FreeType~2 cache sub-system.
*
*/
-#define FT_CACHE_H <ftcache.h>
+#define FT_CACHE_H <freetype/ftcache.h>
/*************************************************************************
@@ -612,7 +612,7 @@
* compiled on the Mac (note that the base API still works though).
*
*/
-#define FT_MAC_H <ftmac.h>
+#define FT_MAC_H <freetype/ftmac.h>
/*************************************************************************
@@ -625,7 +625,7 @@
* optional multiple-masters management API of FreeType~2.
*
*/
-#define FT_MULTIPLE_MASTERS_H <ftmm.h>
+#define FT_MULTIPLE_MASTERS_H <freetype/ftmm.h>
/*************************************************************************
@@ -639,7 +639,7 @@
* SFNT-based font formats (i.e., TrueType and OpenType).
*
*/
-#define FT_SFNT_NAMES_H <ftsnames.h>
+#define FT_SFNT_NAMES_H <freetype/ftsnames.h>
/*************************************************************************
@@ -653,7 +653,7 @@
* GPOS, GSUB, JSTF).
*
*/
-#define FT_OPENTYPE_VALIDATE_H <ftotval.h>
+#define FT_OPENTYPE_VALIDATE_H <freetype/ftotval.h>
/*************************************************************************
@@ -667,7 +667,7 @@
* mort, morx, bsln, just, kern, opbd, trak, prop).
*
*/
-#define FT_GX_VALIDATE_H <ftgxval.h>
+#define FT_GX_VALIDATE_H <freetype/ftgxval.h>
/*************************************************************************
@@ -680,7 +680,7 @@
* FreeType~2 API which accesses PFR-specific data.
*
*/
-#define FT_PFR_H <ftpfr.h>
+#define FT_PFR_H <freetype/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 <ftstroke.h>
+#define FT_STROKER_H <freetype/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 <ftsynth.h>
+#define FT_SYNTHESIS_H <freetype/ftsynth.h>
/*************************************************************************
@@ -716,7 +716,7 @@
* A macro used in #include statements to name the file containing the
* FreeType~2 API which provides functions specific to font formats.
*/
-#define FT_FONT_FORMATS_H <ftfntfmt.h>
+#define FT_FONT_FORMATS_H <freetype/ftfntfmt.h>
/* deprecated */
#define FT_XFREE86_H FT_FONT_FORMATS_H
@@ -732,7 +732,7 @@
* FreeType~2 API which performs trigonometric computations (e.g.,
* cosines and arc tangents).
*/
-#define FT_TRIGONOMETRY_H <fttrigon.h>
+#define FT_TRIGONOMETRY_H <freetype/fttrigon.h>
/*************************************************************************
@@ -744,7 +744,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 <ftlcdfil.h>
+#define FT_LCD_FILTER_H <freetype/ftlcdfil.h>
/*************************************************************************
@@ -756,7 +756,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 <ttunpat.h>
+#define FT_UNPATENTED_HINTING_H <freetype/ttunpat.h>
/*************************************************************************
@@ -768,7 +768,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 <ftincrem.h>
+#define FT_INCREMENTAL_H <freetype/ftincrem.h>
/*************************************************************************
@@ -780,7 +780,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 <ftgasp.h>
+#define FT_GASP_H <freetype/ftgasp.h>
/*************************************************************************
@@ -792,30 +792,30 @@
* 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 <ftadvanc.h>
+#define FT_ADVANCES_H <freetype/ftadvanc.h>
/* */
-#define FT_ERROR_DEFINITIONS_H <fterrdef.h>
+#define FT_ERROR_DEFINITIONS_H <freetype/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 <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_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_INCREMENTAL_H <ftincrem.h>
+#define FT_INCREMENTAL_H <freetype/ftincrem.h>
-#define FT_TRUETYPE_UNPATENTED_H <ttunpat.h>
+#define FT_TRUETYPE_UNPATENTED_H <freetype/ttunpat.h>
/*
@@ -823,7 +823,7 @@
* only when building the library.
*/
#ifdef FT2_BUILD_LIBRARY
-#define FT_INTERNAL_INTERNAL_H <internal/internal.h>
+#define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h>
#include FT_INTERNAL_INTERNAL_H
#endif /* FT2_BUILD_LIBRARY */
diff --git a/include/config/ftmodule.h b/include/freetype/config/ftmodule.h
index e145790..e145790 100644
--- a/include/config/ftmodule.h
+++ b/include/freetype/config/ftmodule.h
diff --git a/include/config/ftoption.h b/include/freetype/config/ftoption.h
index 6e8a528..3819586 100644
--- a/include/config/ftoption.h
+++ b/include/freetype/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/config/ftoption.h', where `$BUILD' is the */
- /* name of a directory that is included _before_ the FreeType include */
- /* path during compilation. */
+ /* 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. */
/* */
/* 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 <config/ftheader.h> */
+ /* #include <freetype/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 <config/ftmodule.h>. */
+ /* default, this file is <freetype/config/ftmodule.h>. */
/* */
/* We highly recommend using the third method whenever possible. */
/* */
@@ -693,6 +693,24 @@ FT_BEGIN_HEADER
/*************************************************************************/
+ /* */
+ /* Option TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES controls the maximum */
+ /* number of bytecode instructions executed for a single run of the */
+ /* bytecode interpreter, needed to prevent infinite loops. You don't */
+ /* want to change this except for very special situations (e.g., making */
+ /* a library fuzzer spend less time to handle broken fonts). */
+ /* */
+ /* It is not expected that this value is ever modified by a configuring */
+ /* script; instead, it gets surrounded with #ifndef ... #endif so that */
+ /* the value can be set as a preprocessor option on the compiler's */
+ /* command line. */
+ /* */
+#ifndef TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES
+#define TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES 1000000L
+#endif
+
+
+ /*************************************************************************/
/*************************************************************************/
/**** ****/
/**** T Y P E 1 D R I V E R C O N F I G U R A T I O N ****/
diff --git a/include/config/ftstdlib.h b/include/freetype/config/ftstdlib.h
index 8ef43c0..4b471d4 100644
--- a/include/config/ftstdlib.h
+++ b/include/freetype/config/ftstdlib.h
@@ -64,6 +64,7 @@
#define FT_INT_MAX INT_MAX
#define FT_INT_MIN INT_MIN
#define FT_UINT_MAX UINT_MAX
+#define FT_LONG_MAX LONG_MAX
#define FT_ULONG_MAX ULONG_MAX
diff --git a/include/freetype.h b/include/freetype/freetype.h
index bca93e5..f68718d 100644
--- a/include/freetype.h
+++ b/include/freetype/freetype.h
@@ -876,17 +876,36 @@ FT_BEGIN_HEADER
/* font formats can have multiple faces in */
/* a font file. */
/* */
- /* face_index :: The index of the face in the font file. It */
- /* is set to~0 if there is only one face in */
+ /* face_index :: This field holds two different values. */
+ /* Bits 0-15 are the index of the face in the */
+ /* font file (starting with value~0). They */
+ /* are set to~0 if there is only one face in */
/* the font file. */
/* */
+ /* Bits 16-30 are relevant to GX variation */
+ /* fonts only, holding the named instance */
+ /* index for the current face index (starting */
+ /* with value~1; value~0 indicates font access */
+ /* without GX variation data). For non-GX */
+ /* fonts, bits 16-30 are ignored. If we have */
+ /* the third named instance of face~4, say, */
+ /* `face_index' is set to 0x00030004. */
+ /* */
+ /* Bit 31 is always zero (this is, */
+ /* `face_index' is always a positive value). */
+ /* */
/* face_flags :: A set of bit flags that give important */
/* information about the face; see */
/* @FT_FACE_FLAG_XXX for the details. */
/* */
- /* style_flags :: A set of bit flags indicating the style of */
- /* the face; see @FT_STYLE_FLAG_XXX for the */
- /* details. */
+ /* style_flags :: The lower 16~bits contain a set of bit */
+ /* flags indicating the style of the face; see */
+ /* @FT_STYLE_FLAG_XXX for the details. Bits */
+ /* 16-30 hold the number of named instances */
+ /* available for the current face if we have a */
+ /* GX variation (sub)font. Bit 31 is always */
+ /* zero (this is, `style_flags' is always a */
+ /* positive value). */
/* */
/* num_glyphs :: The number of glyphs in the face. If the */
/* face is scalable and has sbits (see */
@@ -1392,7 +1411,7 @@ FT_BEGIN_HEADER
/* FT_STYLE_FLAG_XXX */
/* */
/* <Description> */
- /* A list of bit-flags used to indicate the style of a given face. */
+ /* A list of bit flags used to indicate the style of a given face. */
/* These are used in the `style_flags' field of @FT_FaceRec. */
/* */
/* <Values> */
@@ -1824,7 +1843,7 @@ FT_BEGIN_HEADER
/* FT_OPEN_XXX */
/* */
/* <Description> */
- /* A list of bit-field constants used within the `flags' field of the */
+ /* A list of bit field constants used within the `flags' field of the */
/* @FT_Open_Args structure. */
/* */
/* <Values> */
@@ -1971,13 +1990,12 @@ FT_BEGIN_HEADER
/* <Input> */
/* pathname :: A path to the font file. */
/* */
- /* face_index :: The index of the face within the font. The first */
- /* face has index~0. */
+ /* face_index :: See @FT_Open_Face for a detailed description of this */
+ /* parameter. */
/* */
/* <Output> */
/* aface :: A handle to a new face object. If `face_index' is */
/* greater than or equal to zero, it must be non-NULL. */
- /* See @FT_Open_Face for more details. */
/* */
/* <Return> */
/* FreeType error code. 0~means success. */
@@ -2010,13 +2028,12 @@ FT_BEGIN_HEADER
/* */
/* file_size :: The size of the memory chunk used by the font data. */
/* */
- /* face_index :: The index of the face within the font. The first */
- /* face has index~0. */
+ /* face_index :: See @FT_Open_Face for a detailed description of this */
+ /* parameter. */
/* */
/* <Output> */
/* aface :: A handle to a new face object. If `face_index' is */
/* greater than or equal to zero, it must be non-NULL. */
- /* See @FT_Open_Face for more details. */
/* */
/* <Return> */
/* FreeType error code. 0~means success. */
@@ -2048,13 +2065,43 @@ FT_BEGIN_HEADER
/* 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 */
- /* face has index~0. */
+ /* face_index :: This field holds two different values. Bits 0-15 */
+ /* are the index of the face in the font file (starting */
+ /* with value~0). Set it to~0 if there is only one */
+ /* face in the font file. */
+ /* */
+ /* Bits 16-30 are relevant to GX variation fonts only, */
+ /* specifying the named instance index for the current */
+ /* face index (starting with value~1; value~0 makes */
+ /* FreeType ignore named instances). For non-GX fonts, */
+ /* bits 16-30 are ignored. Assuming that you want to */
+ /* access the third named instance in face~4, */
+ /* `face_index' should be set to 0x00030004. If you */
+ /* want to access face~4 without GX variation handling, */
+ /* simply set `face_index' to value~4. */
+ /* */
+ /* FT_Open_Face and its siblings can be used to quickly */
+ /* check whether the font format of a given font */
+ /* resource is supported by FreeType. In general, if */
+ /* the `face_index' argument is negative, the */
+ /* function's return value is~0 if the font format is */
+ /* recognized, or non-zero otherwise. The function */
+ /* allocates a more or less empty face handle in */
+ /* `*aface' (if `aface' isn't NULL); the only two */
+ /* useful fields in this special case are */
+ /* `face->num_faces' and `face->style_flags'. For any */
+ /* negative value of `face_index', `face->num_faces' */
+ /* gives the number of faces within the font file. For */
+ /* the negative value `-(N+1)' (with `N' a 16-bit */
+ /* value), bits 16-30 in `face->style_flags' give the */
+ /* number of named instances in face `N' if we have a */
+ /* GX variation font (or zero otherwise). After */
+ /* examination, the returned @FT_Face structure should */
+ /* be deallocated with a call to @FT_Done_Face. */
/* */
/* <Output> */
/* aface :: A handle to a new face object. If `face_index' is */
/* greater than or equal to zero, it must be non-NULL. */
- /* See note below. */
/* */
/* <Return> */
/* FreeType error code. 0~means success. */
@@ -2064,16 +2111,6 @@ FT_BEGIN_HEADER
/* 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 */
- /* format of a given font resource is supported by FreeType. If the */
- /* `face_index' field is negative, the function's return value is~0 */
- /* 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' 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. */
- /* */
/* Each new face object created with this function also owns a */
/* default @FT_Size object, accessible as `face->size'. */
/* */
@@ -2084,6 +2121,74 @@ FT_BEGIN_HEADER
/* See the discussion of reference counters in the description of */
/* @FT_Reference_Face. */
/* */
+ /* To loop over all faces, use code similar to the following snippet */
+ /* (omitting the error handling). */
+ /* */
+ /* { */
+ /* ... */
+ /* FT_Face face; */
+ /* FT_Long i, num_faces; */
+ /* */
+ /* */
+ /* error = FT_Open_Face( library, args, -1, &face ); */
+ /* if ( error ) { ... } */
+ /* */
+ /* num_faces = face->num_faces; */
+ /* FT_Done_Face( face ); */
+ /* */
+ /* for ( i = 0; i < num_faces; i++ ) */
+ /* { */
+ /* ... */
+ /* error = FT_Open_Face( library, args, i, &face ); */
+ /* ... */
+ /* FT_Done_Face( face ); */
+ /* ... */
+ /* } */
+ /* } */
+ /* */
+ /* To loop over all valid values for `face_index', use something */
+ /* similar to the following snippet, again without error handling. */
+ /* The code accesses all faces immediately (thus only a single call */
+ /* of `FT_Open_Face' within the do-loop), with and without named */
+ /* instances. */
+ /* */
+ /* { */
+ /* ... */
+ /* FT_Face face; */
+ /* */
+ /* FT_Long num_faces = 0; */
+ /* FT_Long num_instances = 0; */
+ /* */
+ /* FT_Long face_idx = 0; */
+ /* FT_Long instance_idx = 0; */
+ /* */
+ /* */
+ /* do */
+ /* { */
+ /* FT_Long id = ( instance_idx << 16 ) + face_idx; */
+ /* */
+ /* */
+ /* error = FT_Open_Face( library, args, id, &face ); */
+ /* if ( error ) { ... } */
+ /* */
+ /* num_faces = face->num_faces; */
+ /* num_instances = face->style_flags >> 16; */
+ /* */
+ /* ... */
+ /* */
+ /* FT_Done_Face( face ); */
+ /* */
+ /* if ( instance_idx < num_instances ) */
+ /* instance_idx++; */
+ /* else */
+ /* { */
+ /* face_idx++; */
+ /* instance_idx = 0; */
+ /* } */
+ /* */
+ /* } while ( face_idx < num_faces ) */
+ /* } */
+ /* */
FT_EXPORT( FT_Error )
FT_Open_Face( FT_Library library,
const FT_Open_Args* args,
@@ -2521,7 +2626,7 @@ FT_BEGIN_HEADER
* FT_LOAD_XXX
*
* @description:
- * A list of bit-field constants used with @FT_Load_Glyph to indicate
+ * A list of bit field constants used with @FT_Load_Glyph to indicate
* what kind of operations to perform during glyph loading.
*
* @values:
@@ -2638,6 +2743,16 @@ FT_BEGIN_HEADER
* bitmaps transparently. Those bitmaps will be in the
* @FT_PIXEL_MODE_GRAY format.
*
+ * FT_LOAD_COMPUTE_METRICS ::
+ * This flag sets computing glyph metrics without the use of bundled
+ * metrics tables (for example, the `hdmx' table in TrueType fonts).
+ * Well-behaving fonts have optimized bundled metrics and these should
+ * be used. This flag is mainly used by font validating or font
+ * editing applications, which need to ignore, verify, or edit those
+ * tables.
+ *
+ * Currently, this flag is only implemented for TrueType fonts.
+ *
* FT_LOAD_CROP_BITMAP ::
* Ignored. Deprecated.
*
@@ -2683,6 +2798,7 @@ FT_BEGIN_HEADER
#define FT_LOAD_NO_AUTOHINT ( 1L << 15 )
/* Bits 16..19 are used by `FT_LOAD_TARGET_' */
#define FT_LOAD_COLOR ( 1L << 20 )
+#define FT_LOAD_COMPUTE_METRICS ( 1L << 21 )
/* */
@@ -2705,9 +2821,6 @@ FT_BEGIN_HEADER
* have specified (e.g., the TrueType bytecode interpreter). You can set
* @FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is used.
*
- * Also note that @FT_LOAD_TARGET_LIGHT is an exception, in that it
- * always implies @FT_LOAD_FORCE_AUTOHINT.
- *
* @values:
* FT_LOAD_TARGET_NORMAL ::
* This corresponds to the default hinting algorithm, optimized for
@@ -2715,11 +2828,14 @@ FT_BEGIN_HEADER
* @FT_LOAD_TARGET_MONO instead.
*
* FT_LOAD_TARGET_LIGHT ::
- * A lighter hinting algorithm for non-monochrome modes. Many
- * generated glyphs are more fuzzy but better resemble its original
- * shape. A bit like rendering on Mac OS~X.
- *
- * As a special exception, this target implies @FT_LOAD_FORCE_AUTOHINT.
+ * A lighter hinting algorithm for gray-level modes. Many generated
+ * glyphs are fuzzier but better resemble their original shape. This
+ * is achieved by snapping glyphs to the pixel grid only vertically
+ * (Y-axis), as is done by Microsoft's ClearType and Adobe's
+ * proprietary font renderer. This preserves inter-glyph spacing in
+ * horizontal text. The snapping is done either by the native font
+ * driver if the driver itself and the font support it or by the
+ * auto-hinter.
*
* FT_LOAD_TARGET_MONO ::
* Strong hinting algorithm that should only be used for monochrome
@@ -2826,7 +2942,10 @@ FT_BEGIN_HEADER
/* field in the @FT_GlyphSlotRec structure gives the format of the */
/* returned bitmap. */
/* */
- /* All modes except @FT_RENDER_MODE_MONO use 256 levels of opacity. */
+ /* All modes except @FT_RENDER_MODE_MONO use 256 levels of opacity, */
+ /* indicating pixel coverage. Use linear alpha blending and gamma */
+ /* correction to correctly render non-monochrome glyph bitmaps onto a */
+ /* surface; see @FT_Render_Glyph. */
/* */
/* <Values> */
/* FT_RENDER_MODE_NORMAL :: */
@@ -2912,6 +3031,83 @@ FT_BEGIN_HEADER
/* To get meaningful results, font scaling values must be set with */
/* functions like @FT_Set_Char_Size before calling FT_Render_Glyph. */
/* */
+ /* When FreeType outputs a bitmap of a glyph, it really outputs an */
+ /* alpha coverage map. If a pixel is completely covered by a */
+ /* filled-in outline, the bitmap contains 0xFF at that pixel, meaning */
+ /* that 0xFF/0xFF fraction of that pixel is covered, meaning the */
+ /* pixel is 100% black (or 0% bright). If a pixel is only 50% */
+ /* covered (value 0x80), the pixel is made 50% black (50% bright or a */
+ /* middle shade of grey). 0% covered means 0% black (100% bright or */
+ /* white). */
+ /* */
+ /* On high-DPI screens like on smartphones and tablets, the pixels */
+ /* are so small that their chance of being completely covered and */
+ /* therefore completely black are fairly good. On the low-DPI */
+ /* screens, however, the situation is different. The pixels are too */
+ /* large for most of the details of a glyph and shades of gray are */
+ /* the norm rather than the exception. */
+ /* */
+ /* This is relevant because all our screens have a second problem: */
+ /* they are not linear. 1~+~1 is not~2. Twice the value does not */
+ /* result in twice the brightness. When a pixel is only 50% covered, */
+ /* the coverage map says 50% black, and this translates to a pixel */
+ /* value of 128 when you use 8~bits per channel (0-255). However, */
+ /* this does not translate to 50% brightness for that pixel on our */
+ /* sRGB and gamma~2.2 screens. Due to their non-linearity, they */
+ /* dwell longer in the darks and only a pixel value of about 186 */
+ /* results in 50% brightness – 128 ends up too dark on both bright */
+ /* and dark backgrounds. The net result is that dark text looks */
+ /* burnt-out, pixely and blotchy on bright background, bright text */
+ /* too frail on dark backgrounds, and colored text on colored */
+ /* background (for example, red on green) seems to have dark halos or */
+ /* `dirt' around it. The situation is especially ugly for diagonal */
+ /* stems like in `w' glyph shapes where the quality of FreeType's */
+ /* anti-aliasing depends on the correct display of grays. On */
+ /* high-DPI screens where smaller, fully black pixels reign supreme, */
+ /* this doesn't matter, but on our low-DPI screens with all the gray */
+ /* shades, it does. 0% and 100% brightness are the same things in */
+ /* linear and non-linear space, just all the shades in-between */
+ /* aren't. */
+ /* */
+ /* The blending function for placing text over a background is */
+ /* */
+ /* { */
+ /* dst = alpha * src + (1 - alpha) * dst , */
+ /* } */
+ /* */
+ /* which is known as the OVER operator. */
+ /* */
+ /* To correctly composite an antialiased pixel of a glyph onto a */
+ /* surface, */
+ /* */
+ /* 1. take the foreground and background colors (e.g., in sRGB space) */
+ /* and apply gamma to get them in a linear space, */
+ /* */
+ /* 2. use OVER to blend the two linear colors using the glyph pixel */
+ /* as the alpha value (remember, the glyph bitmap is an alpha */
+ /* coverage bitmap), and */
+ /* */
+ /* 3. apply inverse gamma to the blended pixel and write it back to */
+ /* the image. */
+ /* */
+ /* Internal testing at Adobe found that a target inverse gamma of~1.8 */
+ /* for step~3 gives good results across a wide range of displays with */
+ /* an sRGB gamma curve or a similar one. */
+ /* */
+ /* This process can cost performance. There is an approximation that */
+ /* does not need to know about the background color; see */
+ /* https://bel.fi/alankila/lcd/ and */
+ /* https://bel.fi/alankila/lcd/alpcor.html for details. */
+ /* */
+ /* *ATTENTION*: Linear blending is even more important when dealing */
+ /* with subpixel-rendered glyphs to prevent color-fringing! A */
+ /* subpixel-rendered glyph must first be filtered with a filter that */
+ /* gives equal weight to the three color primaries and does not */
+ /* exceed a sum of 0x100, see section @lcd_filtering. Then the */
+ /* only difference to gray linear blending is that subpixel-rendered */
+ /* linear blending is done 3~times per pixel: red foreground subpixel */
+ /* to red background subpixel and so on for green and blue. */
+ /* */
FT_EXPORT( FT_Error )
FT_Render_Glyph( FT_GlyphSlot slot,
FT_Render_Mode render_mode );
@@ -2927,15 +3123,22 @@ FT_BEGIN_HEADER
/* @FT_Get_Kerning. */
/* */
/* <Values> */
- /* FT_KERNING_DEFAULT :: Return scaled and grid-fitted kerning */
- /* distances (value is~0). */
+ /* FT_KERNING_DEFAULT :: Return grid-fitted kerning distances in */
+ /* pixels (value is~0). Whether they are */
+ /* scaled depends on @FT_LOAD_NO_SCALE. */
/* */
- /* FT_KERNING_UNFITTED :: Return scaled but un-grid-fitted kerning */
- /* distances. */
+ /* FT_KERNING_UNFITTED :: Return un-grid-fitted kerning distances in */
+ /* 26.6 fractional pixels. Whether they are */
+ /* scaled depends on @FT_LOAD_NO_SCALE. */
/* */
/* FT_KERNING_UNSCALED :: Return the kerning vector in original font */
/* units. */
/* */
+ /* <Note> */
+ /* FT_KERNING_DEFAULT returns full pixel values; it also makes */
+ /* FreeType heuristically scale down kerning distances at small ppem */
+ /* values so that they don't become too big. */
+ /* */
typedef enum FT_Kerning_Mode_
{
FT_KERNING_DEFAULT = 0,
@@ -2972,9 +3175,10 @@ FT_BEGIN_HEADER
/* kerning vector. */
/* */
/* <Output> */
- /* akerning :: The kerning vector. This is either in font units */
- /* or in pixels (26.6 format) for scalable formats, */
- /* and in pixels for fixed-sizes formats. */
+ /* akerning :: The kerning vector. This is either in font units, */
+ /* fractional pixels (26.6 format), or pixels for */
+ /* scalable formats, and in pixels for fixed-sizes */
+ /* formats. */
/* */
/* <Return> */
/* FreeType error code. 0~means success. */
@@ -3259,6 +3463,13 @@ FT_BEGIN_HEADER
/* } */
/* } */
/* */
+ /* Be aware that character codes can have values up to 0xFFFFFFFF; */
+ /* this might happen for non-Unicode or malformed cmaps. However, */
+ /* even with regular Unicode encoding, so-called `last resort fonts' */
+ /* (using SFNT cmap format 13, see function @FT_Get_CMap_Format) */
+ /* normally have entries for all Unicode characters up to 0x1FFFFF, */
+ /* which can cause *a lot* of iterations. */
+ /* */
/* Note that `*agindex' is set to~0 if the charmap is empty. The */
/* result itself can be~0 in two cases: if the charmap is empty or */
/* if the value~0 is the first valid character code. */
@@ -3454,6 +3665,9 @@ FT_BEGIN_HEADER
/* bitmaps available in the font, then the font is unembeddable. */
/* */
/* <Note> */
+ /* The flags are ORed together, thus more than a single value can be */
+ /* returned. */
+ /* */
/* While the fsType flags can indicate that a font may be embedded, a */
/* license with the font vendor may be separately required to use the */
/* font in this way. */
@@ -3839,7 +4053,8 @@ FT_BEGIN_HEADER
/* a :: The number to be rounded. */
/* */
/* <Return> */
- /* The result of `(a + 0x8000) & -0x10000'. */
+ /* `a' rounded to nearest 16.16 fixed integer, halfway cases away */
+ /* from zero. */
/* */
FT_EXPORT( FT_Fixed )
FT_RoundFix( FT_Fixed a );
@@ -3858,7 +4073,7 @@ FT_BEGIN_HEADER
/* a :: The number for which the ceiling function is to be computed. */
/* */
/* <Return> */
- /* The result of `(a + 0x10000 - 1) & -0x10000'. */
+ /* `a' rounded towards plus infinity. */
/* */
FT_EXPORT( FT_Fixed )
FT_CeilFix( FT_Fixed a );
@@ -3877,7 +4092,7 @@ FT_BEGIN_HEADER
/* a :: The number for which the floor function is to be computed. */
/* */
/* <Return> */
- /* The result of `a & -0x10000'. */
+ /* `a' rounded towards minus infinity. */
/* */
FT_EXPORT( FT_Fixed )
FT_FloorFix( FT_Fixed a );
@@ -3958,7 +4173,7 @@ FT_BEGIN_HEADER
*/
#define FREETYPE_MAJOR 2
#define FREETYPE_MINOR 6
-#define FREETYPE_PATCH 0
+#define FREETYPE_PATCH 2
/*************************************************************************/
diff --git a/include/ftadvanc.h b/include/freetype/ftadvanc.h
index b4d2aed..b4d2aed 100644
--- a/include/ftadvanc.h
+++ b/include/freetype/ftadvanc.h
diff --git a/include/ftautoh.h b/include/freetype/ftautoh.h
index cf7b76f..d0f6445 100644
--- a/include/ftautoh.h
+++ b/include/freetype/ftautoh.h
@@ -247,8 +247,8 @@ FT_BEGIN_HEADER
*/
typedef struct FT_Prop_GlyphToScriptMap_
{
- FT_Face face;
- FT_Byte* map;
+ FT_Face face;
+ FT_UShort* map;
} FT_Prop_GlyphToScriptMap;
@@ -439,6 +439,59 @@ FT_BEGIN_HEADER
*/
+ /**************************************************************************
+ *
+ * @property:
+ * no-stem-darkening[autofit]
+ *
+ * @description:
+ * *Experimental* *only,* *requires* *linear* *alpha* *blending* *and*
+ * *gamma* *correction*
+ *
+ * Stem darkening emboldens glyphs at smaller sizes to make them more
+ * readable on common low-DPI screens when using linear alpha blending
+ * and gamma correction, see @FT_Render_Glyph. When not using linear
+ * alpha blending and gamma correction, glyphs will appear heavy and
+ * fuzzy!
+ *
+ * Gamma correction essentially lightens fonts since shades of grey are
+ * shifted to higher pixel values (=~higher brightness) to match the
+ * original intention to the reality of our screens. The side-effect is
+ * that glyphs `thin out'. Mac OS~X and Adobe's proprietary font
+ * rendering library implement a counter-measure: stem darkening at
+ * smaller sizes where shades of gray dominate. By emboldening a glyph
+ * slightly in relation to its pixel size, individual pixels get higher
+ * coverage of filled-in outlines and are therefore `blacker'. This
+ * counteracts the `thinning out' of glyphs, making text remain readable
+ * at smaller sizes. All glyphs that pass through the auto-hinter will
+ * be emboldened unless this property is set to TRUE.
+ *
+ * See the description of the CFF driver for algorithmic details. Total
+ * consistency with the CFF driver is currently not achieved because the
+ * emboldening method differs and glyphs must be scaled down on the
+ * Y-axis to keep outline points inside their precomputed blue zones.
+ * The smaller the size (especially 9ppem and down), the higher the loss
+ * of emboldening versus the CFF driver.
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @property:
+ * darkening-parameters[autofit]
+ *
+ * @description:
+ * *Experimental* *only*
+ *
+ * See the description of the CFF driver for details. This
+ * implementation appropriates the
+ * CFF_CONFIG_OPTION_DARKENING_PARAMETER_* #defines for consistency.
+ * Note the differences described in @no-stem-darkening[autofit].
+ *
+ */
+
+
/* */
diff --git a/include/ftbbox.h b/include/freetype/ftbbox.h
index 9d9d040..9d9d040 100644
--- a/include/ftbbox.h
+++ b/include/freetype/ftbbox.h
diff --git a/include/ftbdf.h b/include/freetype/ftbdf.h
index 0bdabf4..0bdabf4 100644
--- a/include/ftbdf.h
+++ b/include/freetype/ftbdf.h
diff --git a/include/ftbitmap.h b/include/freetype/ftbitmap.h
index 46cc47b..46cc47b 100644
--- a/include/ftbitmap.h
+++ b/include/freetype/ftbitmap.h
diff --git a/include/ftbzip2.h b/include/freetype/ftbzip2.h
index c25f946..c25f946 100644
--- a/include/ftbzip2.h
+++ b/include/freetype/ftbzip2.h
diff --git a/include/ftcache.h b/include/freetype/ftcache.h
index 68525bb..68525bb 100644
--- a/include/ftcache.h
+++ b/include/freetype/ftcache.h
diff --git a/include/ftcffdrv.h b/include/freetype/ftcffdrv.h
index 6c8e416..8500346 100644
--- a/include/ftcffdrv.h
+++ b/include/freetype/ftcffdrv.h
@@ -111,8 +111,8 @@ FT_BEGIN_HEADER
*
* @order:
* hinting-engine
- * no-stem-darkening
- * darkening-parameters
+ * no-stem-darkening[cff]
+ * darkening-parameters[cff]
*
*/
@@ -175,7 +175,7 @@ FT_BEGIN_HEADER
/**************************************************************************
*
* @property:
- * no-stem-darkening
+ * no-stem-darkening[cff]
*
* @description:
* By default, the Adobe CFF engine darkens stems at smaller sizes,
@@ -205,7 +205,7 @@ FT_BEGIN_HEADER
/**************************************************************************
*
* @property:
- * darkening-parameters
+ * darkening-parameters[cff]
*
* @description:
* By default, the Adobe CFF engine darkens stems as follows (if the
diff --git a/include/ftchapters.h b/include/freetype/ftchapters.h
index d333761..ab43895 100644
--- a/include/ftchapters.h
+++ b/include/freetype/ftchapters.h
@@ -119,3 +119,17 @@
/* lcd_filtering */
/* */
/***************************************************************************/
+
+/***************************************************************************/
+/* */
+/* <Chapter> */
+/* error_codes */
+/* */
+/* <Title> */
+/* Error Codes */
+/* */
+/* <Sections> */
+/* error_enumerations */
+/* error_code_values */
+/* */
+/***************************************************************************/
diff --git a/include/ftcid.h b/include/freetype/ftcid.h
index 05741c8..05741c8 100644
--- a/include/ftcid.h
+++ b/include/freetype/ftcid.h
diff --git a/include/fterrdef.h b/include/freetype/fterrdef.h
index 1bf0751..3bf4e63 100644
--- a/include/fterrdef.h
+++ b/include/freetype/fterrdef.h
@@ -16,18 +16,43 @@
/***************************************************************************/
- /*******************************************************************/
- /*******************************************************************/
- /***** *****/
- /***** LIST OF ERROR CODES/MESSAGES *****/
- /***** *****/
- /*******************************************************************/
- /*******************************************************************/
+ /*************************************************************************/
+ /* */
+ /* <Section> */
+ /* error_code_values */
+ /* */
+ /* <Title> */
+ /* Error Code Values */
+ /* */
+ /* <Abstract> */
+ /* All possible error codes returned by FreeType functions. */
+ /* */
+ /* <Description> */
+ /* The list below is taken verbatim from the file `fterrdef.h' */
+ /* (loaded automatically by including `FT_FREETYPE_H'). The first */
+ /* argument of the `FT_ERROR_DEF_' macro is the error label; by */
+ /* default, the prefix `FT_Err_' gets added so that you get error */
+ /* names like `FT_Err_Cannot_Open_Resource'. The second argument is */
+ /* the error code, and the last argument an error string, which is not */
+ /* used by FreeType. */
+ /* */
+ /* Within your application you should *only* use error names and */
+ /* *never* its numeric values! The latter might (and actually do) */
+ /* change in forthcoming FreeType versions. */
+ /* */
+ /* Macro `FT_NOERRORDEF_' defines `FT_Err_Ok', which is always zero. */
+ /* See the `Error Enumerations' subsection how to automatically */
+ /* generate a list of error strings. */
+ /* */
+ /*************************************************************************/
- /* You need to define both FT_ERRORDEF_ and FT_NOERRORDEF_ before */
- /* including this file. */
-
+ /*************************************************************************/
+ /* */
+ /* <Enum> */
+ /* FT_Err_XXX */
+ /* */
+ /*************************************************************************/
/* generic errors */
@@ -218,7 +243,7 @@
FT_ERRORDEF_( No_Unicode_Glyph_Name, 0xA3,
"no Unicode glyph name found" )
FT_ERRORDEF_( Glyph_Too_Big, 0xA4,
- "glyph to big for hinting" )
+ "glyph too big for hinting" )
/* BDF errors */
@@ -245,5 +270,7 @@
FT_ERRORDEF_( Corrupted_Font_Glyphs, 0xBA,
"Font glyphs corrupted or missing fields" )
+ /* */
+
/* END */
diff --git a/include/fterrors.h b/include/freetype/fterrors.h
index 376bee6..0507b9a 100644
--- a/include/fterrors.h
+++ b/include/freetype/fterrors.h
@@ -18,68 +18,86 @@
/*************************************************************************/
/* */
- /* This special header file is used to define the handling of FT2 */
- /* enumeration constants. It can also be used to generate error message */
- /* strings with a small macro trick explained below. */
+ /* <Section> */
+ /* error_enumerations */
/* */
- /* I - Error Formats */
- /* ----------------- */
+ /* <Title> */
+ /* Error Enumerations */
+ /* */
+ /* <Abstract> */
+ /* How to handle errors and error strings. */
+ /* */
+ /* <Description> */
+ /* The header file `fterrors.h' (which is automatically included by */
+ /* `freetype.h' defines the handling of FreeType's enumeration */
+ /* constants. It can also be used to generate error message strings */
+ /* with a small macro trick explained below. */
+ /* */
+ /* *Error* *Formats* */
/* */
/* The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be */
- /* defined in ftoption.h in order to make the higher byte indicate */
+ /* defined in `ftoption.h' in order to make the higher byte indicate */
/* the module where the error has happened (this is not compatible */
- /* with standard builds of FreeType 2). See the file `ftmoderr.h' for */
- /* more details. */
+ /* with standard builds of FreeType&nbsp;2, however). See the file */
+ /* `ftmoderr.h' for more details. */
/* */
+ /* *Error* *Message* *Strings* */
/* */
- /* II - Error Message strings */
- /* -------------------------- */
- /* */
- /* The error definitions below are made through special macros that */
- /* allow client applications to build a table of error message strings */
- /* if they need it. The strings are not included in a normal build of */
- /* FreeType 2 to save space (most client applications do not use */
- /* them). */
+ /* Error definitions are set up with special macros that allow client */
+ /* applications to build a table of error message strings. The */
+ /* strings are not included in a normal build of FreeType&nbsp;2 to */
+ /* save space (most client applications do not use them). */
/* */
/* To do so, you have to define the following macros before including */
- /* this file: */
+ /* this file. */
/* */
- /* FT_ERROR_START_LIST :: */
- /* This macro is called before anything else to define the start of */
- /* the error list. It is followed by several FT_ERROR_DEF calls */
- /* (see below). */
+ /* { */
+ /* FT_ERROR_START_LIST */
+ /* } */
/* */
- /* FT_ERROR_DEF( e, v, s ) :: */
- /* This macro is called to define one single error. */
- /* `e' is the error code identifier (e.g. FT_Err_Invalid_Argument). */
- /* `v' is the error numerical value. */
- /* `s' is the corresponding error string. */
+ /* This macro is called before anything else to define the start of */
+ /* the error list. It is followed by several FT_ERROR_DEF calls. */
/* */
- /* FT_ERROR_END_LIST :: */
- /* This macro ends the list. */
+ /* { */
+ /* FT_ERROR_DEF( e, v, s ) */
+ /* } */
/* */
- /* Additionally, you have to undefine __FTERRORS_H__ before #including */
- /* this file. */
+ /* This macro is called to define one single error. `e' is the error */
+ /* code identifier (e.g., `Invalid_Argument'), `v' is the error's */
+ /* numerical value, and `s' is the corresponding error string. */
+ /* */
+ /* { */
+ /* FT_ERROR_END_LIST */
+ /* } */
+ /* */
+ /* This macro ends the list. */
+ /* */
+ /* Additionally, you have to undefine `__FTERRORS_H__' before */
+ /* #including this file. */
+ /* */
+ /* Here is a simple example. */
/* */
- /* Here is a simple example: */
+ /* { */
+ /* #undef __FTERRORS_H__ */
+ /* #define FT_ERRORDEF( e, v, s ) { e, s }, */
+ /* #define FT_ERROR_START_LIST { */
+ /* #define FT_ERROR_END_LIST { 0, NULL } }; */
/* */
+ /* const struct */
/* { */
- /* #undef __FTERRORS_H__ */
- /* #define FT_ERRORDEF( e, v, s ) { e, s }, */
- /* #define FT_ERROR_START_LIST { */
- /* #define FT_ERROR_END_LIST { 0, 0 } }; */
+ /* int err_code; */
+ /* const char* err_msg; */
+ /* } ft_errors[] = */
/* */
- /* const struct */
- /* { */
- /* int err_code; */
- /* const char* err_msg; */
- /* } ft_errors[] = */
+ /* #include FT_ERRORS_H */
+ /* } */
/* */
- /* #include FT_ERRORS_H */
- /* } */
+ /* Note that `FT_Err_Ok' is _not_ defined with `FT_ERRORDEF' but with */
+ /* `FT_NOERRORDEF'; it is always zero. */
/* */
/*************************************************************************/
+ /* */
#ifndef __FTERRORS_H__
#define __FTERRORS_H__
diff --git a/include/ftfntfmt.h b/include/freetype/ftfntfmt.h
index 1f8ff28..1f8ff28 100644
--- a/include/ftfntfmt.h
+++ b/include/freetype/ftfntfmt.h
diff --git a/include/ftgasp.h b/include/freetype/ftgasp.h
index 9a9b632..9a9b632 100644
--- a/include/ftgasp.h
+++ b/include/freetype/ftgasp.h
diff --git a/include/ftglyph.h b/include/freetype/ftglyph.h
index 803ad39..803ad39 100644
--- a/include/ftglyph.h
+++ b/include/freetype/ftglyph.h
diff --git a/include/ftgxval.h b/include/freetype/ftgxval.h
index 0e9ac1d..0e9ac1d 100644
--- a/include/ftgxval.h
+++ b/include/freetype/ftgxval.h
diff --git a/include/ftgzip.h b/include/freetype/ftgzip.h
index b3a532d..b3a532d 100644
--- a/include/ftgzip.h
+++ b/include/freetype/ftgzip.h
diff --git a/include/ftimage.h b/include/freetype/ftimage.h
index 82f284c..82f284c 100644
--- a/include/ftimage.h
+++ b/include/freetype/ftimage.h
diff --git a/include/ftincrem.h b/include/freetype/ftincrem.h
index 840af25..840af25 100644
--- a/include/ftincrem.h
+++ b/include/freetype/ftincrem.h
diff --git a/include/ftlcdfil.h b/include/freetype/ftlcdfil.h
index 4cd999a..a9dd3ea 100644
--- a/include/ftlcdfil.h
+++ b/include/freetype/ftlcdfil.h
@@ -41,56 +41,78 @@ FT_BEGIN_HEADER
* LCD Filtering
*
* @abstract:
- * Reduce color fringes of LCD-optimized bitmaps.
+ * Reduce color fringes of subpixel-rendered bitmaps.
*
* @description:
- * The @FT_Library_SetLcdFilter API can be used to specify a low-pass
- * filter, which is then applied to LCD-optimized bitmaps generated
- * through @FT_Render_Glyph. This is useful to reduce color fringes
- * that would occur with unfiltered rendering.
+ * Subpixel rendering exploits the color-striped structure of LCD
+ * pixels, increasing the available resolution in the direction of the
+ * stripe (usually horizontal RGB) by a factor of~3. Since these
+ * subpixels are color pixels, using them unfiltered creates severe
+ * color fringes. Use the @FT_Library_SetLcdFilter API to specify a
+ * low-pass filter, which is then applied to subpixel-rendered bitmaps
+ * generated through @FT_Render_Glyph. The filter sacrifices some of
+ * the higher resolution to reduce color fringes, making the glyph image
+ * slightly blurrier. Positional improvements will remain.
*
* Note that no filter is active by default, and that this function is
* *not* implemented in default builds of the library. You need to
* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your `ftoption.h' file
* in order to activate it.
*
- * FreeType generates alpha coverage maps, which are linear by nature.
- * For instance, the value 0x80 in bitmap representation means that
- * (within numerical precision) 0x80/0xFF fraction of that pixel is
- * covered by the glyph's outline. The blending function for placing
- * text over a background is
- *
- * {
- * dst = alpha * src + (1 - alpha) * dst ,
- * }
- *
- * which is known as OVER. However, when calculating the output of the
- * OVER operator, the source colors should first be transformed to a
- * linear color space, then alpha blended in that space, and transformed
- * back to the output color space.
- *
- * When linear light blending is used, the default FIR5 filtering
- * weights (as given by FT_LCD_FILTER_DEFAULT) are no longer optimal, as
- * they have been designed for black on white rendering while lacking
- * gamma correction. To preserve color neutrality, weights for a FIR5
- * filter should be chosen according to two free parameters `a' and `c',
- * and the FIR weights should be
- *
- * {
- * [a - c, a + c, 2 * a, a + c, a - c] .
- * }
- *
- * This formula generates equal weights for all the color primaries
- * across the filter kernel, which makes it colorless. One suggested
- * set of weights is
- *
- * {
- * [0x10, 0x50, 0x60, 0x50, 0x10] ,
- * }
- *
- * where `a' has value 0x30 and `b' value 0x20. The weights in filter
- * may have a sum larger than 0x100, which increases coloration slightly
- * but also improves contrast.
+ * A filter should have two properties:
+ *
+ * 1) It should be normalized, meaning the sum of the 5~components
+ * should be 256 (0x100). It is possible to go above or under this
+ * target sum, however: going under means tossing out contrast, going
+ * over means invoking clamping and thereby non-linearities that
+ * increase contrast somewhat at the expense of greater distortion
+ * and color-fringing. Contrast is better enhanced through stem
+ * darkening.
+ *
+ * 2) It should be color-balanced, meaning a filter `{~a, b, c, b, a~}'
+ * where a~+ b~=~c. It distributes the computed coverage for one
+ * subpixel to all subpixels equally, sacrificing some won resolution
+ * but drastically reducing color-fringing. Positioning improvements
+ * remain! Note that color-fringing can only really be minimized
+ * when using a color-balanced filter and alpha-blending the glyph
+ * onto a surface in linear space; see @FT_Render_Glyph.
+ *
+ * Regarding the form, a filter can be a `boxy' filter or a `beveled'
+ * filter. Boxy filters are sharper but are less forgiving of non-ideal
+ * gamma curves of a screen (viewing angles!), beveled filters are
+ * fuzzier but more tolerant.
+ *
+ * Examples:
+ *
+ * - [0x10 0x40 0x70 0x40 0x10] is beveled and neither balanced nor
+ * normalized.
+ *
+ * - [0x1A 0x33 0x4D 0x33 0x1A] is beveled and balanced but not
+ * normalized.
+ *
+ * - [0x19 0x33 0x66 0x4c 0x19] is beveled and normalized but not
+ * balanced.
+ *
+ * - [0x00 0x4c 0x66 0x4c 0x00] is boxily beveled and normalized but not
+ * balanced.
+ *
+ * - [0x00 0x55 0x56 0x55 0x00] is boxy, normalized, and almost
+ * balanced.
+ *
+ * - [0x08 0x4D 0x56 0x4D 0x08] is beveled, normalized and, almost
+ * balanced.
+ *
+ * It is important to understand that linear alpha blending and gamma
+ * correction is critical for correctly rendering glyphs onto surfaces
+ * without artifacts and even more critical when subpixel rendering is
+ * involved.
+ *
+ * Each of the 3~alpha values (subpixels) is independently used to blend
+ * one color channel. That is, red alpha blends the red channel of the
+ * text color with the red channel of the background pixel. The
+ * distribution of density values by the color-balanced filter assumes
+ * alpha blending is done in linear space; only then color artifacts
+ * cancel out.
*/
@@ -111,10 +133,21 @@ FT_BEGIN_HEADER
* The default filter reduces color fringes considerably, at the cost
* of a slight blurriness in the output.
*
+ * It is a beveled, normalized, and color-balanced five-tap filter
+ * that is more forgiving to screens with non-ideal gamma curves and
+ * viewing angles. Note that while color-fringing is reduced, it can
+ * only be minimized by using linear alpha blending and gamma
+ * correction to render glyphs onto surfaces.
+ *
* FT_LCD_FILTER_LIGHT ::
- * The light filter is a variant that produces less blurriness at the
- * cost of slightly more color fringes than the default one. It might
- * be better, depending on taste, your monitor, or your personal vision.
+ * The light filter is a variant that is sharper at the cost of
+ * slightly more color fringes than the default one.
+ *
+ * It is a boxy, normalized, and color-balanced three-tap filter that
+ * is less forgiving to screens with non-ideal gamma curves and
+ * viewing angles. This filter works best when the rendering system
+ * uses linear alpha blending and gamma correction to render glyphs
+ * onto surfaces.
*
* FT_LCD_FILTER_LEGACY ::
* This filter corresponds to the original libXft color filter. It
@@ -126,14 +159,23 @@ FT_BEGIN_HEADER
* This filter is only provided for comparison purposes, and might be
* disabled or stay unsupported in the future.
*
+ * FT_LCD_FILTER_LEGACY1 ::
+ * For historical reasons, the FontConfig library returns a different
+ * enumeration value for legacy LCD filtering. To make code work that
+ * (incorrectly) forwards FontConfig's enumeration value to
+ * @FT_Library_SetLcdFilter without proper mapping, it is thus easiest
+ * to have another enumeration value, which is completely equal to
+ * `FT_LCD_FILTER_LEGACY'.
+ *
* @since:
- * 2.3.0
+ * 2.3.0 (`FT_LCD_FILTER_LEGACY1' since 2.6.2)
*/
typedef enum FT_LcdFilter_
{
FT_LCD_FILTER_NONE = 0,
FT_LCD_FILTER_DEFAULT = 1,
FT_LCD_FILTER_LIGHT = 2,
+ FT_LCD_FILTER_LEGACY1 = 3,
FT_LCD_FILTER_LEGACY = 16,
FT_LCD_FILTER_MAX /* do not remove */
@@ -208,9 +250,8 @@ FT_BEGIN_HEADER
* @description:
* Use this function to override the filter weights selected by
* @FT_Library_SetLcdFilter. By default, FreeType uses the quintuple
- * (0x00, 0x55, 0x56, 0x55, 0x00) for FT_LCD_FILTER_LIGHT, and (0x10,
- * 0x40, 0x70, 0x40, 0x10) for FT_LCD_FILTER_DEFAULT and
- * FT_LCD_FILTER_LEGACY.
+ * (0x00, 0x55, 0x56, 0x55, 0x00) for FT_LCD_FILTER_LIGHT, and (0x08,
+ * 0x4D, 0x56, 0x4D, 0x08) for FT_LCD_FILTER_DEFAULT.
*
* @input:
* library ::
diff --git a/include/ftlist.h b/include/freetype/ftlist.h
index 12b48c7..12b48c7 100644
--- a/include/ftlist.h
+++ b/include/freetype/ftlist.h
diff --git a/include/ftlzw.h b/include/freetype/ftlzw.h
index d3ec28e..d3ec28e 100644
--- a/include/ftlzw.h
+++ b/include/freetype/ftlzw.h
diff --git a/include/ftmac.h b/include/freetype/ftmac.h
index 14c55cf..14c55cf 100644
--- a/include/ftmac.h
+++ b/include/freetype/ftmac.h
diff --git a/include/ftmm.h b/include/freetype/ftmm.h
index 6ef4798..96dd66e 100644
--- a/include/ftmm.h
+++ b/include/freetype/ftmm.h
@@ -203,9 +203,13 @@ FT_BEGIN_HEADER
/* */
/* axis :: An axis descriptor table. */
/* GX fonts contain slightly more data than MM. */
+ /* Memory management of this pointer is done */
+ /* internally by FreeType. */
/* */
/* namedstyle :: A named style table. */
/* Only meaningful with GX. */
+ /* Memory management of this pointer is done */
+ /* internally by FreeType. */
/* */
typedef struct FT_MM_Var_
{
@@ -255,7 +259,8 @@ FT_BEGIN_HEADER
/* */
/* <Output> */
/* amaster :: The Multiple Masters/GX var descriptor. */
- /* Allocates a data structure, which the user must free. */
+ /* Allocates a data structure, which the user must */
+ /* deallocate with `free' after use. */
/* */
/* <Return> */
/* FreeType error code. 0~means success. */
diff --git a/include/ftmodapi.h b/include/freetype/ftmodapi.h
index 2ef3f46..89d9347 100644
--- a/include/ftmodapi.h
+++ b/include/freetype/ftmodapi.h
@@ -63,7 +63,7 @@ FT_BEGIN_HEADER
/* psaux */
/* pshinter */
/* psnames */
- /* raster1, raster5 */
+ /* raster1 */
/* sfnt */
/* smooth, smooth-lcd, smooth-lcdv */
/* truetype */
@@ -111,12 +111,14 @@ FT_BEGIN_HEADER
#define FT_MODULE_HINTER 4 /* this module is a glyph hinter */
#define FT_MODULE_STYLER 8 /* this module is a styler */
-#define FT_MODULE_DRIVER_SCALABLE 0x100 /* the driver supports */
+#define FT_MODULE_DRIVER_SCALABLE 0x100 /* the driver supports */
/* scalable fonts */
-#define FT_MODULE_DRIVER_NO_OUTLINES 0x200 /* the driver does not */
+#define FT_MODULE_DRIVER_NO_OUTLINES 0x200 /* the driver does not */
/* support vector outlines */
-#define FT_MODULE_DRIVER_HAS_HINTER 0x400 /* the driver provides its */
+#define FT_MODULE_DRIVER_HAS_HINTER 0x400 /* the driver provides its */
/* own hinter */
+#define FT_MODULE_DRIVER_HINTS_LIGHTLY 0x800 /* the driver's hinter */
+ /* produces LIGHT hints */
/* deprecated values */
@@ -125,9 +127,10 @@ FT_BEGIN_HEADER
#define ft_module_hinter FT_MODULE_HINTER
#define ft_module_styler FT_MODULE_STYLER
-#define ft_module_driver_scalable FT_MODULE_DRIVER_SCALABLE
-#define ft_module_driver_no_outlines FT_MODULE_DRIVER_NO_OUTLINES
-#define ft_module_driver_has_hinter FT_MODULE_DRIVER_HAS_HINTER
+#define ft_module_driver_scalable FT_MODULE_DRIVER_SCALABLE
+#define ft_module_driver_no_outlines FT_MODULE_DRIVER_NO_OUTLINES
+#define ft_module_driver_has_hinter FT_MODULE_DRIVER_HAS_HINTER
+#define ft_module_driver_hints_lightly FT_MODULE_DRIVER_HINTS_LIGHTLY
typedef FT_Pointer FT_Module_Interface;
diff --git a/include/ftmoderr.h b/include/freetype/ftmoderr.h
index 9d7f981..9d7f981 100644
--- a/include/ftmoderr.h
+++ b/include/freetype/ftmoderr.h
diff --git a/include/ftotval.h b/include/freetype/ftotval.h
index e744b71..e744b71 100644
--- a/include/ftotval.h
+++ b/include/freetype/ftotval.h
diff --git a/include/ftoutln.h b/include/freetype/ftoutln.h
index 106cfde..b6ec70d 100644
--- a/include/ftoutln.h
+++ b/include/freetype/ftoutln.h
@@ -354,8 +354,8 @@ FT_BEGIN_HEADER
/* */
/* { */
/* FT_Load_Glyph( face, index, FT_LOAD_DEFAULT ); */
- /* if ( face->slot->format == FT_GLYPH_FORMAT_OUTLINE ) */
- /* FT_Outline_Embolden( &face->slot->outline, strength ); */
+ /* if ( face->glyph->format == FT_GLYPH_FORMAT_OUTLINE ) */
+ /* FT_Outline_Embolden( &face->glyph->outline, strength ); */
/* } */
/* */
/* To get meaningful results, font scaling values must be set with */
diff --git a/include/ftpfr.h b/include/freetype/ftpfr.h
index a1c02a2..a1c02a2 100644
--- a/include/ftpfr.h
+++ b/include/freetype/ftpfr.h
diff --git a/include/ftrender.h b/include/freetype/ftrender.h
index ec8da70..ec8da70 100644
--- a/include/ftrender.h
+++ b/include/freetype/ftrender.h
diff --git a/include/ftsizes.h b/include/freetype/ftsizes.h
index bef8424..bef8424 100644
--- a/include/ftsizes.h
+++ b/include/freetype/ftsizes.h
diff --git a/include/ftsnames.h b/include/freetype/ftsnames.h
index 0f7fbe1..0f7fbe1 100644
--- a/include/ftsnames.h
+++ b/include/freetype/ftsnames.h
diff --git a/include/ftstroke.h b/include/freetype/ftstroke.h
index 7ebb1e7..7ebb1e7 100644
--- a/include/ftstroke.h
+++ b/include/freetype/ftstroke.h
diff --git a/include/ftsynth.h b/include/freetype/ftsynth.h
index fbcbad8..fbcbad8 100644
--- a/include/ftsynth.h
+++ b/include/freetype/ftsynth.h
diff --git a/include/ftsystem.h b/include/freetype/ftsystem.h
index 2bc9999..2bc9999 100644
--- a/include/ftsystem.h
+++ b/include/freetype/ftsystem.h
diff --git a/include/fttrigon.h b/include/freetype/fttrigon.h
index 3d821ba..485ec51 100644
--- a/include/fttrigon.h
+++ b/include/freetype/fttrigon.h
@@ -225,8 +225,8 @@ FT_BEGIN_HEADER
*
* @description:
* Return the unit vector corresponding to a given angle. After the
- * call, the value of `vec.x' will be `sin(angle)', and the value of
- * `vec.y' will be `cos(angle)'.
+ * call, the value of `vec.x' will be `cos(angle)', and the value of
+ * `vec.y' will be `sin(angle)'.
*
* This function is useful to retrieve both the sinus and cosinus of a
* given angle quickly.
diff --git a/include/ftttdrv.h b/include/freetype/ftttdrv.h
index f56040b..dc0081a 100644
--- a/include/ftttdrv.h
+++ b/include/freetype/ftttdrv.h
@@ -52,6 +52,83 @@ FT_BEGIN_HEADER
*
* The TrueType driver's module name is `truetype'.
*
+ * We start with a list of definitions, kindly provided by Greg
+ * Hitchcock.
+ *
+ * _Bi-Level_ _Rendering_
+ *
+ * Monochromatic rendering, exclusively used in the early days of
+ * TrueType by both Apple and Microsoft. Microsoft's GDI interface
+ * supported hinting of the right-side bearing point, such that the
+ * advance width could be non-linear. Most often this was done to
+ * achieve some level of glyph symmetry. To enable reasonable
+ * performance (e.g., not having to run hinting on all glyphs just to
+ * get the widths) there was a bit in the head table indicating if the
+ * side bearing was hinted, and additional tables, `hdmx' and `LTSH', to
+ * cache hinting widths across multiple sizes and device aspect ratios.
+ *
+ * _Font_ _Smoothing_
+ *
+ * Microsoft's GDI implementation of anti-aliasing. Not traditional
+ * anti-aliasing as the outlines were hinted before the sampling. The
+ * widths matched the bi-level rendering.
+ *
+ * _ClearType_ _Rendering_
+ *
+ * Technique that uses physical subpixels to improve rendering on LCD
+ * (and other) displays. Because of the higher resolution, many methods
+ * of improving symmetry in glyphs through hinting the right-side
+ * bearing were no longer necessary. This lead to what GDI calls
+ * `natural widths' ClearType, see
+ * http://www.beatstamm.com/typography/RTRCh4.htm#Sec21. Since hinting
+ * has extra resolution, most non-linearity went away, but it is still
+ * possible for hints to change the advance widths in this mode.
+ *
+ * _ClearType_ _Compatible_ _Widths_
+ *
+ * One of the earliest challenges with ClearType was allowing the
+ * implementation in GDI to be selected without requiring all UI and
+ * documents to reflow. To address this, a compatible method of
+ * rendering ClearType was added where the font hints are executed once
+ * to determine the width in bi-level rendering, and then re-run in
+ * ClearType, with the difference in widths being absorbed in the font
+ * hints for ClearType (mostly in the white space of hints); see
+ * http://www.beatstamm.com/typography/RTRCh4.htm#Sec20. Somewhat by
+ * definition, compatible width ClearType allows for non-linear widths,
+ * but only when the bi-level version has non-linear widths.
+ *
+ * _ClearType_ _Subpixel_ _Positioning_
+ *
+ * One of the nice benefits of ClearType is the ability to more crisply
+ * display fractional widths; unfortunately, the GDI model of integer
+ * bitmaps did not support this. However, the WPF and Direct Write
+ * frameworks do support fractional widths. DWrite calls this `natural
+ * mode', not to be confused with GDI's `natural widths'. Subpixel
+ * positioning, in the current implementation of Direct Write,
+ * unfortunately does not support hinted advance widths, see
+ * http://www.beatstamm.com/typography/RTRCh4.htm#Sec22. Note that the
+ * TrueType interpreter fully allows the advance width to be adjusted in
+ * this mode, just the DWrite client will ignore those changes.
+ *
+ * _ClearType_ _Backwards_ _Compatibility_
+ *
+ * This is a set of exceptions made in the TrueType interpreter to
+ * minimize hinting techniques that were problematic with the extra
+ * resolution of ClearType; see
+ * http://www.beatstamm.com/typography/RTRCh4.htm#Sec1 and
+ * http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx.
+ * This technique is not to be confused with ClearType compatible
+ * widths. ClearType backwards compatibility has no direct impact on
+ * changing advance widths, but there might be an indirect impact on
+ * disabling some deltas. This could be worked around in backwards
+ * compatibility mode.
+ *
+ * _Native_ _ClearType_ _Mode_
+ *
+ * (Not to be confused with `natural widths'.) This mode removes all
+ * the exceptions in the TrueType interpreter when running with
+ * ClearType. Any issues on widths would still apply, though.
+ *
*/
diff --git a/include/fttypes.h b/include/freetype/fttypes.h
index 706a1be..706a1be 100644
--- a/include/fttypes.h
+++ b/include/freetype/fttypes.h
diff --git a/include/ftwinfnt.h b/include/freetype/ftwinfnt.h
index caedaa1..caedaa1 100644
--- a/include/ftwinfnt.h
+++ b/include/freetype/ftwinfnt.h
diff --git a/include/internal/autohint.h b/include/freetype/internal/autohint.h
index 8d5a977..8d5a977 100644
--- a/include/internal/autohint.h
+++ b/include/freetype/internal/autohint.h
diff --git a/include/internal/ftcalc.h b/include/freetype/internal/ftcalc.h
index 75752c3..a76682b 100644
--- a/include/internal/ftcalc.h
+++ b/include/freetype/internal/ftcalc.h
@@ -47,7 +47,7 @@ FT_BEGIN_HEADER
FT_MulFix_arm( FT_Int32 a,
FT_Int32 b )
{
- register FT_Int32 t, t2;
+ FT_Int32 t, t2;
__asm
@@ -80,7 +80,7 @@ FT_BEGIN_HEADER
FT_MulFix_arm( FT_Int32 a,
FT_Int32 b )
{
- register FT_Int32 t, t2;
+ FT_Int32 t, t2;
__asm__ __volatile__ (
@@ -116,7 +116,7 @@ FT_BEGIN_HEADER
FT_MulFix_i386( FT_Int32 a,
FT_Int32 b )
{
- register FT_Int32 result;
+ FT_Int32 result;
__asm__ __volatile__ (
@@ -152,7 +152,7 @@ FT_BEGIN_HEADER
FT_MulFix_i386( FT_Int32 a,
FT_Int32 b )
{
- register FT_Int32 result;
+ FT_Int32 result;
__asm
{
@@ -300,6 +300,18 @@ FT_BEGIN_HEADER
/*
+ * This function normalizes a vector and returns its original length.
+ * The normalized vector is a 16.16 fixed-point unit vector with length
+ * close to 0x10000. The accuracy of the returned length is limited to
+ * 16 bits also. The function utilizes quick inverse square root
+ * approximation without divisions and square roots relying on Newton's
+ * iterations instead.
+ */
+ FT_BASE( FT_UInt32 )
+ FT_Vector_NormLen( FT_Vector* vector );
+
+
+ /*
* Return -1, 0, or +1, depending on the orientation of a given corner.
* We use the Cartesian coordinate system, with positive vertical values
* going upwards. The function returns +1 if the corner turns to the
diff --git a/include/internal/ftdebug.h b/include/freetype/internal/ftdebug.h
index 216c730..216c730 100644
--- a/include/internal/ftdebug.h
+++ b/include/freetype/internal/ftdebug.h
diff --git a/include/internal/ftdriver.h b/include/freetype/internal/ftdriver.h
index 16856d3..16856d3 100644
--- a/include/internal/ftdriver.h
+++ b/include/freetype/internal/ftdriver.h
diff --git a/include/internal/ftgloadr.h b/include/freetype/internal/ftgloadr.h
index 970dd70..970dd70 100644
--- a/include/internal/ftgloadr.h
+++ b/include/freetype/internal/ftgloadr.h
diff --git a/include/internal/ftmemory.h b/include/freetype/internal/ftmemory.h
index c0c553b..c0c553b 100644
--- a/include/internal/ftmemory.h
+++ b/include/freetype/internal/ftmemory.h
diff --git a/include/internal/ftobjs.h b/include/freetype/internal/ftobjs.h
index 37317a4..9a333fc 100644
--- a/include/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -83,12 +83,12 @@ FT_BEGIN_HEADER
x > y ? x + ( 3 * y >> 3 ) \
: y + ( 3 * x >> 3 ) )
- /* we use the TYPEOF macro to suppress signedness compilation warnings */
-#define FT_PAD_FLOOR( x, n ) ( (x) & ~TYPEOF( x )( (n)-1 ) )
+ /* we use FT_TYPEOF to suppress signedness compilation warnings */
+#define FT_PAD_FLOOR( x, n ) ( (x) & ~FT_TYPEOF( x )( (n)-1 ) )
#define FT_PAD_ROUND( x, n ) FT_PAD_FLOOR( (x) + ((n)/2), n )
#define FT_PAD_CEIL( x, n ) FT_PAD_FLOOR( (x) + ((n)-1), n )
-#define FT_PIX_FLOOR( x ) ( (x) & ~TYPEOF( x )63 )
+#define FT_PIX_FLOOR( x ) ( (x) & ~FT_TYPEOF( x )63 )
#define FT_PIX_ROUND( x ) FT_PIX_FLOOR( (x) + 32 )
#define FT_PIX_CEIL( x ) FT_PIX_FLOOR( (x) + 63 )
@@ -506,6 +506,9 @@ FT_BEGIN_HEADER
#define FT_DRIVER_HAS_HINTER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
FT_MODULE_DRIVER_HAS_HINTER )
+#define FT_DRIVER_HINTS_LIGHTLY( x ) ( FT_MODULE_CLASS( x )->module_flags & \
+ FT_MODULE_DRIVER_HINTS_LIGHTLY )
+
/*************************************************************************/
/* */
diff --git a/include/internal/ftpic.h b/include/freetype/internal/ftpic.h
index 7f9154f..7f9154f 100644
--- a/include/internal/ftpic.h
+++ b/include/freetype/internal/ftpic.h
diff --git a/include/internal/ftrfork.h b/include/freetype/internal/ftrfork.h
index da61ca7..da61ca7 100644
--- a/include/internal/ftrfork.h
+++ b/include/freetype/internal/ftrfork.h
diff --git a/include/internal/ftserv.h b/include/freetype/internal/ftserv.h
index 8f837e4..11a0c7f 100644
--- a/include/internal/ftserv.h
+++ b/include/freetype/internal/ftserv.h
@@ -734,24 +734,24 @@ FT_BEGIN_HEADER
* The header files containing the services.
*/
-#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_FONT_FORMAT_H <internal/services/svfntfmt.h>
-#define FT_SERVICE_TRUETYPE_GLYF_H <internal/services/svttglyf.h>
+#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_FONT_FORMAT_H <freetype/internal/services/svfntfmt.h>
+#define FT_SERVICE_TRUETYPE_GLYF_H <freetype/internal/services/svttglyf.h>
/* */
diff --git a/include/internal/ftstream.h b/include/freetype/internal/ftstream.h
index 384e5df..384e5df 100644
--- a/include/internal/ftstream.h
+++ b/include/freetype/internal/ftstream.h
diff --git a/include/internal/fttrace.h b/include/freetype/internal/fttrace.h
index 9d28d21..2b0bf9d 100644
--- a/include/internal/fttrace.h
+++ b/include/freetype/internal/fttrace.h
@@ -148,7 +148,7 @@ FT_TRACE_DEF( afcjk )
FT_TRACE_DEF( aflatin )
FT_TRACE_DEF( aflatin2 )
FT_TRACE_DEF( afwarp )
-FT_TRACE_DEF( afharfbuzz )
+FT_TRACE_DEF( afshaper )
FT_TRACE_DEF( afglobal )
/* END */
diff --git a/include/internal/ftvalid.h b/include/freetype/internal/ftvalid.h
index 9cda6ee..9cda6ee 100644
--- a/include/internal/ftvalid.h
+++ b/include/freetype/internal/ftvalid.h
diff --git a/include/internal/internal.h b/include/freetype/internal/internal.h
index 1c1fd0e..809ce59 100644
--- a/include/internal/internal.h
+++ b/include/freetype/internal/internal.h
@@ -24,28 +24,28 @@
/*************************************************************************/
-#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>
+#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>
#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */
diff --git a/include/internal/psaux.h b/include/freetype/internal/psaux.h
index 1c5f784..1c5f784 100644
--- a/include/internal/psaux.h
+++ b/include/freetype/internal/psaux.h
diff --git a/include/internal/pshints.h b/include/freetype/internal/pshints.h
index 12aaaba..12aaaba 100644
--- a/include/internal/pshints.h
+++ b/include/freetype/internal/pshints.h
diff --git a/include/internal/services/svbdf.h b/include/freetype/internal/services/svbdf.h
index 865b536..865b536 100644
--- a/include/internal/services/svbdf.h
+++ b/include/freetype/internal/services/svbdf.h
diff --git a/include/internal/services/svcid.h b/include/freetype/internal/services/svcid.h
index 4a535a6..4a535a6 100644
--- a/include/internal/services/svcid.h
+++ b/include/freetype/internal/services/svcid.h
diff --git a/include/internal/services/svfntfmt.h b/include/freetype/internal/services/svfntfmt.h
index f8b3617..f8b3617 100644
--- a/include/internal/services/svfntfmt.h
+++ b/include/freetype/internal/services/svfntfmt.h
diff --git a/include/internal/services/svgldict.h b/include/freetype/internal/services/svgldict.h
index f78bca5..f78bca5 100644
--- a/include/internal/services/svgldict.h
+++ b/include/freetype/internal/services/svgldict.h
diff --git a/include/internal/services/svgxval.h b/include/freetype/internal/services/svgxval.h
index 59cc3b7..59cc3b7 100644
--- a/include/internal/services/svgxval.h
+++ b/include/freetype/internal/services/svgxval.h
diff --git a/include/internal/services/svkern.h b/include/freetype/internal/services/svkern.h
index bc26f15..bc26f15 100644
--- a/include/internal/services/svkern.h
+++ b/include/freetype/internal/services/svkern.h
diff --git a/include/internal/services/svmm.h b/include/freetype/internal/services/svmm.h
index f2cecfb..f2cecfb 100644
--- a/include/internal/services/svmm.h
+++ b/include/freetype/internal/services/svmm.h
diff --git a/include/internal/services/svotval.h b/include/freetype/internal/services/svotval.h
index a82a642..a82a642 100644
--- a/include/internal/services/svotval.h
+++ b/include/freetype/internal/services/svotval.h
diff --git a/include/internal/services/svpfr.h b/include/freetype/internal/services/svpfr.h
index d4eb169..d4eb169 100644
--- a/include/internal/services/svpfr.h
+++ b/include/freetype/internal/services/svpfr.h
diff --git a/include/internal/services/svpostnm.h b/include/freetype/internal/services/svpostnm.h
index a89f79e..a89f79e 100644
--- a/include/internal/services/svpostnm.h
+++ b/include/freetype/internal/services/svpostnm.h
diff --git a/include/internal/services/svprop.h b/include/freetype/internal/services/svprop.h
index c9f07ce..c9f07ce 100644
--- a/include/internal/services/svprop.h
+++ b/include/freetype/internal/services/svprop.h
diff --git a/include/internal/services/svpscmap.h b/include/freetype/internal/services/svpscmap.h
index 66da6e1..66da6e1 100644
--- a/include/internal/services/svpscmap.h
+++ b/include/freetype/internal/services/svpscmap.h
diff --git a/include/internal/services/svpsinfo.h b/include/freetype/internal/services/svpsinfo.h
index 752a266..752a266 100644
--- a/include/internal/services/svpsinfo.h
+++ b/include/freetype/internal/services/svpsinfo.h
diff --git a/include/internal/services/svsfnt.h b/include/freetype/internal/services/svsfnt.h
index 252ae1c..252ae1c 100644
--- a/include/internal/services/svsfnt.h
+++ b/include/freetype/internal/services/svsfnt.h
diff --git a/include/internal/services/svttcmap.h b/include/freetype/internal/services/svttcmap.h
index 4351a9a..cd95b9a 100644
--- a/include/internal/services/svttcmap.h
+++ b/include/freetype/internal/services/svttcmap.h
@@ -48,11 +48,12 @@ FT_BEGIN_HEADER
/* `ttnameid.h'. */
/* */
/* format :: */
- /* The cmap format. OpenType 1.5 defines the formats 0 (byte */
+ /* The cmap format. OpenType 1.6 defines the formats 0 (byte */
/* encoding table), 2~(high-byte mapping through table), 4~(segment */
/* mapping to delta values), 6~(trimmed table mapping), 8~(mixed */
/* 16-bit and 32-bit coverage), 10~(trimmed array), 12~(segmented */
- /* coverage), and 14 (Unicode Variation Sequences). */
+ /* coverage), 13~(last resort font), and 14 (Unicode Variation */
+ /* Sequences). */
/* */
typedef struct TT_CMapInfo_
{
diff --git a/include/internal/services/svtteng.h b/include/freetype/internal/services/svtteng.h
index 272ee8c..272ee8c 100644
--- a/include/internal/services/svtteng.h
+++ b/include/freetype/internal/services/svtteng.h
diff --git a/include/internal/services/svttglyf.h b/include/freetype/internal/services/svttglyf.h
index f5cb76a..f5cb76a 100644
--- a/include/internal/services/svttglyf.h
+++ b/include/freetype/internal/services/svttglyf.h
diff --git a/include/internal/services/svwinfnt.h b/include/freetype/internal/services/svwinfnt.h
index 0036929..0036929 100644
--- a/include/internal/services/svwinfnt.h
+++ b/include/freetype/internal/services/svwinfnt.h
diff --git a/include/internal/sfnt.h b/include/freetype/internal/sfnt.h
index 97ce390..30f53bf 100644
--- a/include/internal/sfnt.h
+++ b/include/freetype/internal/sfnt.h
@@ -44,7 +44,9 @@ FT_BEGIN_HEADER
/* face :: A handle to the target face object. */
/* */
/* face_index :: The index of the TrueType font, if we are opening a */
- /* collection. */
+ /* collection, in bits 0-15. The numbered instance */
+ /* index~+~1 of a GX (sub)font, if applicable, in bits */
+ /* 16-30. */
/* */
/* num_params :: The number of additional parameters. */
/* */
@@ -87,7 +89,9 @@ FT_BEGIN_HEADER
/* face :: A handle to the target face object. */
/* */
/* face_index :: The index of the TrueType font, if we are opening a */
- /* collection. */
+ /* collection, in bits 0-15. The numbered instance */
+ /* index~+~1 of a GX (sub)font, if applicable, in bits */
+ /* 16-30. */
/* */
/* num_params :: The number of additional parameters. */
/* */
@@ -427,6 +431,33 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <FuncType> */
+ /* TT_Get_Name_Func */
+ /* */
+ /* <Description> */
+ /* From the `name' table, return a given ENGLISH name record in */
+ /* ASCII. */
+ /* */
+ /* <Input> */
+ /* face :: A handle to the source face object. */
+ /* */
+ /* nameid :: The name id of the name record to return. */
+ /* */
+ /* <InOut> */
+ /* name :: The address of an allocated string pointer. NULL if */
+ /* no name is present. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. */
+ /* */
+ typedef FT_Error
+ (*TT_Get_Name_Func)( TT_Face face,
+ FT_UShort nameid,
+ FT_String** name );
+
+
+ /*************************************************************************/
+ /* */
+ /* <FuncType> */
/* TT_Load_Table_Func */
/* */
/* <Description> */
@@ -556,6 +587,8 @@ FT_BEGIN_HEADER
TT_Get_Metrics_Func get_metrics;
+ TT_Get_Name_Func get_name;
+
} SFNT_Interface;
@@ -594,7 +627,8 @@ FT_BEGIN_HEADER
free_eblc_, \
set_sbit_strike_, \
load_strike_metrics_, \
- get_metrics_ ) \
+ get_metrics_, \
+ get_name_ ) \
static const SFNT_Interface class_ = \
{ \
goto_table_, \
@@ -626,6 +660,7 @@ FT_BEGIN_HEADER
set_sbit_strike_, \
load_strike_metrics_, \
get_metrics_, \
+ get_name_, \
};
#else /* FT_CONFIG_OPTION_PIC */
@@ -663,7 +698,8 @@ FT_BEGIN_HEADER
free_eblc_, \
set_sbit_strike_, \
load_strike_metrics_, \
- get_metrics_ ) \
+ get_metrics_, \
+ get_name_ ) \
void \
FT_Init_Class_ ## class_( FT_Library library, \
SFNT_Interface* clazz ) \
@@ -699,6 +735,7 @@ FT_BEGIN_HEADER
clazz->set_sbit_strike = set_sbit_strike_; \
clazz->load_strike_metrics = load_strike_metrics_; \
clazz->get_metrics = get_metrics_; \
+ clazz->get_name = get_name_; \
}
#endif /* FT_CONFIG_OPTION_PIC */
diff --git a/include/internal/t1types.h b/include/freetype/internal/t1types.h
index 029acc4..029acc4 100644
--- a/include/internal/t1types.h
+++ b/include/freetype/internal/t1types.h
diff --git a/include/internal/tttypes.h b/include/freetype/internal/tttypes.h
index 31dd0aa..000c5a8 100644
--- a/include/internal/tttypes.h
+++ b/include/freetype/internal/tttypes.h
@@ -1457,11 +1457,23 @@ FT_BEGIN_HEADER
/* handle to execution context */
typedef struct TT_ExecContextRec_* TT_ExecContext;
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* TT_Size */
+ /* */
+ /* <Description> */
+ /* A handle to a TrueType size object. */
+ /* */
+ typedef struct TT_SizeRec_* TT_Size;
+
+
/* glyph loader structure */
typedef struct TT_LoaderRec_
{
- FT_Face face;
- FT_Size size;
+ TT_Face face;
+ TT_Size size;
FT_GlyphSlot glyph;
FT_GlyphLoader gloader;
@@ -1503,6 +1515,9 @@ FT_BEGIN_HEADER
FT_Byte* cursor;
FT_Byte* limit;
+ /* since version 2.6.2 */
+ FT_ListRec composites;
+
} TT_LoaderRec;
diff --git a/include/t1tables.h b/include/freetype/t1tables.h
index a6ea415..a6ea415 100644
--- a/include/t1tables.h
+++ b/include/freetype/t1tables.h
diff --git a/include/ttnameid.h b/include/freetype/ttnameid.h
index c9585f2..c9585f2 100644
--- a/include/ttnameid.h
+++ b/include/freetype/ttnameid.h
diff --git a/include/tttables.h b/include/freetype/tttables.h
index 1568f40..1568f40 100644
--- a/include/tttables.h
+++ b/include/freetype/tttables.h
diff --git a/include/tttags.h b/include/freetype/tttags.h
index 3836c7b..3836c7b 100644
--- a/include/tttags.h
+++ b/include/freetype/tttags.h
diff --git a/include/ttunpat.h b/include/freetype/ttunpat.h
index 8ea5568..8ea5568 100644
--- a/include/ttunpat.h
+++ b/include/freetype/ttunpat.h
diff --git a/include/ft2build.h b/include/ft2build.h
index 09c19d4..419b80a 100644
--- a/include/ft2build.h
+++ b/include/ft2build.h
@@ -34,7 +34,7 @@
#ifndef __FT2BUILD_H__
#define __FT2BUILD_H__
-#include <config/ftheader.h>
+#include <freetype/config/ftheader.h>
#endif /* __FT2BUILD_H__ */